computational mechanics i { introduction to fea

163
Computational Mechanics I – Introduction to FEA (Spring 2021) Prof. Dr. Dennis M. Kochmann Mechanics & Materials Lab Institute of Mechanical Systems Department of Mechanical and Process Engineering ETH Z¨ urich mm.ethz.ch Copyright 2021 by Dennis M. Kochmann

Upload: others

Post on 21-Dec-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computational Mechanics I { Introduction to FEA

Computational Mechanics I ndash

Introduction to FEA(Spring 2021)

Prof Dr Dennis M Kochmann

Mechanics amp Materials LabInstitute of Mechanical Systems

Department of Mechanical and Process EngineeringETH Zurichmmethzch

Copyright copy 2021 by Dennis M Kochmann

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

These lecture notes are a concise summary of the topics covered in this course They are not acomplete textbook that could replace participating in lectures You are strongly encouraged to

take your own notes during lectures while using this set of notes for reference

2

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Contents

0 Preface 6

1 Introduction Continuum Mechanics and Notation 7

11 Kinematics 7

12 Kinetics 8

13 Computational Mechanics 12

14 (Initial) Boundary Value Problems 13

2 Dimensionless Forms 16

3 Direct Numerical Methods Finite Differences 18

4 Stability of Finite Difference Schemes 23

41 CFL Condition 23

42 von Neumann Analysis and Phase Error Analysis 24

43 Direct vs Indirect Methods 27

5 Methods of Weighted Residuals 28

51 Collocation Method 29

52 Subdomain Method 29

53 Method of Least Squares 30

54 Higher Dimensions 31

55 Galerkinrsquos Method 34

6 Variational Calculus 37

61 Functionals 37

62 Variations 39

63 Rayleigh-Ritz Method 42

7 The weak form 45

71 Classical and weak solutions 45

72 Equivalence of strong and weak forms 47

73 Approximate solutions 47

8 The mechanical variational problem at small strains 49

81 General case 49

82 Linear elasticity 51

9 Interpolation spaces 53

91 Shape functions 53

92 Approximation power and completeness 54

93 Completeness in higher dimensions 55

10 The Finite Element Method 56

11 Finite element spaces polynomial shape functions in 1D 59

111 2-node bar element 59

112 Problem assembly 62

3

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order 64

1131 Lagrangian interpolation 64

1132 Hierarchical interpolation 64

114 2-node beam element 65

115 A note on beam elements and boundary conditions 69

12 Shape Functions in higher dimensions 71

13 Simplicial elements 72

131 Linear Triangle (T3) 72

132 Extension to three dimensions 75

133 Finite element implementation 76

1331 Special case linear elasticity 77

1332 General case of non-linear elastic materials 77

134 Higher-order triangles and tetrahedra 77

14 The bilinear quadrilateral element 79

15 Higher-order elements Q8 Q9 8-node brick 83

16 Numerical quadrature 85

161 Example Riemann sums 85

162 Gauss quadrature 86

1621 Gauss-Legendre quadrature 87

1622 Other Gauss quadrature rules 88

163 Higher dimensions 88

17 FEM which quadrature rule to use 90

171 Integrals in the FE context 90

172 Which quadrature rule to use 90

18 Element defects shear locking and hourglassing 92

19 Assembly 95

20 Iterative solvers 96

201 Netwon-Raphson (NR) method 96

202 Damped Newton-Raphson (dNR) method 97

203 Quasi-Newton (QN) method 97

204 Line search method 98

205 Nonlinear Least Squares 98

206 Gradient flow method 99

207 Conjugate Gradient (CG) method 99

21 Boundary conditions 100

211 Neumann boundary conditions 100

212 Dirichlet boundary conditions 105

2121 Substitution 105

2122 Condensation 105

213 A note on Dirichlet boundary conditions in iterative solvers 106

4

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

214 Rigid body motion 107

22 Dynamics 109

23 Vibrations 114

231 Free undamped vibrations 114

232 Forced vibrations 117

233 Modal decomposition 118

234 Structural damping 120

24 Time-dependent transient solutions 121

241 Explicit time integration 121

242 A reinterpretation of finite differences 122

243 Implicit time integration 124

2431 Newmark-β method 124

244 HHT-α method 127

245 Use of mass matrices 127

25 Extensions 128

251 Finite kinematics 128

252 Thermal problems 130

26 Error analysis and adaptivity common mistakes 133

261 Finite element error analysis 133

262 Smoothing and adaptivity 135

263 Common errors 136

27 FEM ndash Extensions amp Applications 139

Appendices 142

A Vector Spaces 142

B Function Spaces 143

C Approximation Theory 147

D Sobolev spaces 150

E Operators 153

F Uniqueness of solutions 154

G Vainbergrsquos theorem 155

H Energy norm 156

I Gauss quadrature 157

J Quadrature error estimates 159

Index 160

5

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

0 Preface

Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientistsacross all disciplines Whether it is commercial software like Abaqusreg Ansysreg and LS-Dynareg

or open-source libraries such as fenics or FEAP ndash FEA techniques are available in variousflavors and have become an essential ingredient for the analysis of mechanical thermal andmulti-physics initial boundary value problems

The availability and ease of use of FEA tools comes with a risk though the ability to producecolorful plots by the push of a button does not obviate the userrsquos expert knowledge in deploy-ing FEA tools properly and responsibly (ultimately lives could be endangered and significanteconomic losses incurred if engineering design is flawed) What element types to use whatquadrature rules to use what stress components to plot how to interpolate or extrapolate andhow to present results those are questions to be answered by the FEA user and they requirea background knowledge on what the ldquoblack box FEArdquo does for us

To turn the black box into an versatile and understandable toolbox this course discusses thefundamentals of numerical methods and in particular the finite element method Rather thanstudying and using commercial software packages we study FEA from the basics and with thegoal in mind of understanding the theoretical underpinning and the details of numerical imple-mentations This of course requires us to review the underlying mechanical and mathematicaltheory and to discuss the wide variety of finite element types and choices to be made whenusing FEA

Since no course on computational methods would be effective without a computational compo-nent we will write our own finite element code (using MATLABreg) starting with simple barand beam elements for truss and frame problems and advancing to solid elements for static anddynamic analysis Throughout the course we will complete a total of five projects that buildupon each other and grow our finite element code over time in a modular fashion ndash ultimatelyproviding a simple but versatile FEA code that is no longer a black box but whose every singleline we will understand

In order to follow the course contents is assumed that you have a background in solid andstructural mechanics (equivalent to Mechanics 1-2 and Dynamics at ETH Zurich) as well asknowledge in analysis and linear algebra We will begin with a brief review of continuummechanics and an introduction to the notation used in this course after which we will dive intothe discussion of numerical methods

I apologize in advance for any typos that may have found their way into these lecture notesThis is a truly evolving set of notes which was started in the spring semester of 2019 and hasevolved significantly over time Note that this set of notes is not meant as a complete textbookand you are encouraged to take notes during lectures Though I made a great effort to ensurethese notes are free of essential typos I cannot rule out that some have remained If you spotany mistakes feel free to send me a highlighted PDF at the end of the semester so I can makesure those typos are corrected for future years

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

Dennis M KochmannZurich March 2021

6

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1 Introduction Continuum Mechanics and Notation

11 Kinematics

We describe a body Ω sub Rd with boundary partΩ as a collection of material points Each pointhas a position x isin Ω in a Cartesian coordinate system (x1 xd) in d dimensions with origin O

Points are described by vectors with respect to O which in turn are defined by components inthe Cartesian reference frame with basis e1 ed Therefore we write

x =d

sumi=1

xiei = xiei (11)

Here and in the following we use Einsteinrsquos summation convention which implies a summationover an index that appears twice in any product (for a thorough review of index notation seethe tensor notes available online) In the above example i is a dummy index and can bereplace by any other index For example an inner product of two vectors is written as

u sdot v = (d

sumi=1

uiei) sdot⎛⎝

d

sumj=1

vjej⎞⎠=

d

sumi=1

d

sumj=1

uivi(ei sdot ej) =d

sumi=1

uivi = uivi = ukvk (12)

Likewise the norm of a vector is

∥u∥ =radicu sdotu =

radicuiui (13)

The deformation and motion of a body Ω is described bya displacement field

u = u(x t) (14)

which to every undeformed point x isin Ω in its referenceconfiguration defines a unique deformed location y isin Rdsuch that

y(x t) = x +u(x t) (15)

x1

+

x2

x3

e1

e2

e3

+

x

WparaW

y

u

From the displacement field we may derive kinematic variables such as the velocity field

v(x t) = d

dtu(x t) (16)

and the acceleration field

a(x t) = d

dtv(x t) = d2

dt2u(x t) (17)

For convenience we also use dots to denote derivatives with respect to time so that v = u anda = v = u

Deformation is best described not by the displacement field (which would also include rigidbody motion) but by the strain tensor which is a second-order tensor with components

εij =1

2(partuipartxj

+partuj

partxi) = 1

2(uij + uji) rArr ε = 1

2[gradu + (gradu)T] (18)

7

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here used index notation again and to define the second-order tensor Specifically we usedthe gradient of a vector field defined as a second-order tensor with components

[gradu]ij =partuipartxj

= uij (19)

Here and in the following a comma in an index implies differentation with respect to the spatialx-component(s) following the comma

Recall that ε11 ε22 and ε33 are the nominal strains along in the three coordinate directionsof an infinitesimal cube of material εij (with i ne j) by contrast represent shear strains Bydefinition εij = εji or ε = εT ie the strain tensor is symmetric

12 Kinetics

In order to deform body Ω forces (or displacements) must be ap-plied Consider again an infinitesimal cube with (infinitesimal)force vectors dFi applied to each surface dAi normal to the xi-axis(positive in the +xi-direction negative in the minusxi-direction) Wedefine the components of the stress tensor σ as

σij =dFidAj

(110)

x1

x2

x3

s11

s21

s31

s22

s12s32

s13

s23

s33t1

-t1

t3

t2

Analogous to the strains components σ11 σ22 and σ33 represent nominal stresses (resultingin extension or compression of the cube along its axes) while σij (with i ne j) imply a shearstresses acting parallel to the surface that it is acting on (and resulting in angle changes withinthe cube) The complete (infinitesimal) force vector acting on a surface with normal n is givenby

t(n) = σn rArr [t(ei)] =⎛⎜⎝

t1t2t3

⎞⎟⎠=⎛⎜⎝

σ1i

σ2i

σ3i

⎞⎟⎠ (111)

ie the ith column of σ is the traction vector on a surface normal to ei Here and in thefollowing we use brackets to indicate vector (or tensor) components in the Cartesian frameNote that by angular momentum balance on the cube (and in close analogy to the strain tensor)we must have σ = σT (ie σ is symmetric)

Stresses and strains are linked by constitutive relations that depend on the material of whichbody Ω is made The simplest material model is linear elasticity for which stresses and strainsare linearly linked via the linear relation

σij = Cijklεkl hArr σ = Cε (112)

with a fourth-order elasticity tensor whose component Cijkl describes the linear dependenceof the stress component σij to the strain component εkl In principle C has d4 entries yetthe symmetry of both the stress and strain tensors as well as any existing material symmetriesreduce the number of independent material parameters required to describe C For the simplestcase of isotropy (ie the material behavior is the same in every direction) C can be describedby only two constants eg Youngrsquos modulus E and Poissionrsquos ratio ν or the Lame moduli λand micro

8

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

As a convenient alternative to defining the constitutive relation as a link between stresses andstrain we can encode the constitutive response in a strain energy density W = W (ε) whicheg for the case of linear elasticity reads

W = 1

2ε sdotCε hArr W = 1

2εijCijklεkl (113)

so that

σij =partW

partεij Cijkl =

partσij

partεkl (114)

Vector or tensor derivatives of the above type are to be understood component-wise (for detailsand a proper tensorial definition see the tensor notes available online)

In order to solve any mechanical problem we need governing equations that describe howstresses and strains vary over time and space These are given by the conservation or balancelaws First we consider the balance of linear momentum which for a macroscopic body Ωstates that

sumi

Fi =maCM (115)

which equates the sum of all forces applied externally to Ω to its total (constant) mass m andthe acceleration of its center of mass aCM Let us now consider body Ω as a deformable objectfor which we can write the above balance law using integrals over Ω Specifically (115) isequivalent to

intpartΩσn dS + int

ΩρbdV = int

Ωρa dV (116)

where the first term represents all external forces applied to the boundary partΩ of the bodythrough tractions σn the second term denotes external forces in the form of distributed bodyforces and the right-hand side stems from applying the definition of the center of mass and itsacceleration since

aCM = d2

dt2uCM = d2

dt2intΩ ρu dV

intΩ ρ dV= 1

mint

Ωρ

d2u

dt2dV = 1

mint

Ωρa dV (117)

Applying the divergence theorem to the first term in (116) viz

intpartΩσijnj dS = int

Ωσijj dV (118)

which defines the divergence of a second-order tensor as a vector with components

[divσ]i = σijj (119)

Rewriting the resulting equation gives

intΩ(divσ + ρb minus ρa) dV = 0 (120)

This relation must hold not only for the whole body Ω but also for any sub-body cut free fromΩ (as discussed in Mechanics 2 and 3) For the integral to vanish for any arbitrary subset of Ωwe must have

divσ + ρb minus ρa = 0 hArr divσ + ρb = ρa or σijj + ρbi = ρai (121)

which is the local form of the balance of linear momentum

9

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 11 One-dimensional elastic rod

Consider a long and slender rod that is deforming only along its x-axis The displacement field u = u(x t) describes the axial motionof each point on the rod so the associated acceleration field issimply a = a(x t) = u(x t) x

+

u(xt)

The only non-zero strain component is the axial strain εxx(x t) = ε(x t) = ux(x t) and theonly non-zero stress is the axial stress σxx(x t) = σ(x t) which for linear elasticity obeysσ(x t) = E(x)ε(x t) with Youngrsquos modulus E(x) that may vary with position x

Inserting all of this into the balance law of linear momentum gives

ρ(x)a(x t) = divσ(x t) rArr ρ(x)u(x t) = (σ(x t))x= (E(x)ux(x t))x (122)

For the special case of a constant density ρ(x) = ρ = const and constant modulus E(x) = E =const the above reduces to

ρu(x t) = Euxx(x t) hArr u(x t) = c2uxx(x t) with c =radic

E

ρ(123)

This is the one-dimensional wave equation governing the deformation and motion of the rodin one dimension and c is the longitudinal wave speed in the rod For the special case of staticswe have u(x t) = 0 for all x isin Ω and times t

mdashmdashmdashmdash

Example 12 Wave equation in higher dimensions

For the more general case of a body Ω undergoing linear elastic deformation over time thebalance law of linear momentum reads

ρ(x)a(x t) = divσ(x t) hArr ρ(x)ui(x t) = [Cijkl(x)ukl(x t)]j (124)

For the special case of a constant density ρ(x) = ρ = const and constant elastic modulus tensordsC(x) = C = const the above reduces to

ρui(x t) = Cijkl(x)ukjl(x t) (125)

This is sometimes referred to as the Navier equation governing the deformation and motionof a linear elastic body in higher dimensions As before for the special case of statics we haveu(x t) = 0 for all x isin Ω and for all times t

mdashmdashmdashmdash

The balance of energy provides another governing equation which is particularly of interst fornon-elastic problems as wel as for thermal problems The balance of energy states that thechange of internal energy E in a body Ω over time t balances the inward and outward flux ofenergy and the energy being produced inside the body (by some heat source density s) as wellas mechanical power P imposed on the body through mechanical work Mathematically thisimplies

d

dtE = int

Ωs dV minus int

partΩq sdotn dS + P (126)

We can use the divergence theorem to write

intpartΩq sdotn dS = int

partΩqini dS = int

Ωqii dS = int

Ωdivq dS (127)

10

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which defines the divergence of a vector as the scalar quantity

div(sdot) = (sdot)ii (128)

Energy is an extensive variable ie the total energy doubles when adding to bodies of thesame energy This is in contrast to intensive variables such as temperature or pressure whenadding to bosides having the same eg temperature Since energy is an extensive variable wecan introduce an energy density e and write

E = intΩe dV rArr d

dtE = int

Ωe dV (129)

The analogous applies to the mechanical work being a change in strain energy density so

P = d

dtint

ΩW dV = int

ΩW dV (130)

Rewriting the balance law of energy now yields

intΩe dV = int

Ωs dV minus int

Ωdivq dV + int

ΩW dV (131)

This can be rewritten as

intΩ(e minus s + divq minus W ) dV = 0 (132)

Since the balance of energy does not only have to hold for Ω but for any subbody ω sub Ω wemay conclude that the local energy balance equation is

e = W + s minus divq (133)

This is the local (ie pointwise) counterpart to the macroscopic energy balance and states thatat each point x isin Ω the rate of energy change (e) is given by the local production of heat (ρs)plus the local mechanical power supplied (W ) minus the heat lost by outward fluxes q awayfrom the point

Example 13 Heat conduction

Consider a purely thermal problem without mechanical energy (so W = 0) Thermally storedenergy is given by e = ρcvT with mass density ρ(x) constant specific heat capacity cv(x) andan unknown temperature field T = T (x t) Let us assume that heat conduction follows Fourierrsquoslaw ie

q(x t) = minusκ(x)gradT (x t) hArr qi(x t) = minusκ(x)Ti(x t) (134)

with a heat conductivity κ(x) The local energy balance equation then becomes

ρ(x)cv(x)T (x t) = [κ(x)Ti(x t)]i + s(x t) (135)

and for the special case of a homogeneous body with spatially constant material properties wearrive at the well-known heat equation (also known as the inhomogeneous Laplace equa-tion)

ρcvT (x t) = κnabla2T (x t) + s(x t) (136)

11

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

where we used the definition of the Laplacian viz Tii = nabla2T = ∆T Whenever we consider astatic problem we assume that the body is in equilibrium and the temperature field is constantwhich reduces the above to the Poisson equation

κ∆T = minuss (137)

Also for a 1D problem the heat equation with T = T (x t) reduces to

ρcvT (x t) = κTxx(x t) + s(x t) (138)

mdashmdashmdashmdash

13 Computational Mechanics

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

from reality to mathematical model a practical problem is turned into an abstractproblem by making a series of simplifications and assumptions thus introducing modelingerrors in order to define a proper mathematical problem

from mathematical model to numerical model if the mathematical model cannotbe solved analytically the sought infinite-dimensional solution is turned into a finite-dimensional solution by making approximations here discretizing the body Ω so that itsdescription involves a finite number of unknowns This incurrs discretization errors

from numerical model to results solving the numerical problem computationally gen-erally involves solution errors that stem from round-offfloating-point errors iterativesolution approaches etc

Ensuring that the results agree with the mathematical model (eg by comparing the numericalsolution to an analytical solution where available) is the step of verification while ensuringthat the obtained results properly reflects reality (eg by comparing the numerical solution toexperimental data) is the validation step

12

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 (Initial) Boundary Value Problems

So far we have seen how partial differential equations governthe thermal and mechanical behavior of solid bodies (and ofcourse those two can be coupled as well to describe the thermo-mechanical behavior of deformable bodies) In order to solve aproblem we need an initial boundary value problem (IBVP)which furnishes the above equations with appropriate boundaryconditions (BCs) and initial conditions (ICs)

To this end we subdivide the boundary partΩ of a body Ω into

t

u = u

W

paraWD

paraWN

partΩD equiv Dirichlet boundary prescribing the primary field (eg u T etc)

eg u(x t) = u(x t) on partΩD or T (x t) = T (x t) on partΩD (139)

partΩN equiv Neumann boundary prescribing derivatives of the primary field (eg εgradT etc)

eg t(x t) = σ(x t)n(x t) = t(x t) on partΩN or q(x t) = q(x t) on partΩN

(140)

Note that we may generally assume that

partΩD cup partΩN = partΩ and in most problems also partΩD cap partΩN = empty (141)

In addition all time-dependent problems require initial conditions eg

T (x0) = T0(x) forall x isin Ω

or u(x0) = u0(x) and v(x0) = v0(x) forall x isin Ω(142)

The number of required BCsICs depends on the order of a PDE eg

ρcvT = div(K gradT ) + ρs (143)

is first-order in time and therefore requires one IC eg T (x0) = T0(x) It is second-order inspace and hence requires BCs along all partΩ (eg two conditions per xi coordinate)

In summary we will have governing PDEs supplemented by ICs and BCs as required (egquasistatic problems of course do not require any initial conditions) Those need to be solvedfor the primary fields (eg temperature T or displacements u)

Any of the aforementioned PDEs can be written in an operator form introducing an operatorL For example we may abbreviate the 1D wave equation

u minus c2uxx = 0 rArr L[u] = 0 with L = part

partt2minus c2 part

partx2(144)

One key feature of all PDEs discussed so far (including the heat and wave equations) is thattheir operators are linear A linear operator L is characterized by

L[α1u1 + βu2] = α1L[u1] +α2L[u2] forall α1 α2 isin R and for all functions u1 u2 (145)

In the following we will need to be more specific about what we mean by all functions (since wemay need to classify admissible or useful classes of functions) but this is left for the examplesin the following sections A few examples involving linear operators are summarized here

13

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

wave equation in one dimension (second order in space and time)

L[u] = 0 with L = part

partt2minus c2 part

partx2hArr u = c2uxx (146)

heat equation in one dimension (second order in space first order in time)

L[T ] = s with L = ρcvpart

parttminus κ part

2

partx2hArr ρcvT = κTxx + s (147)

advection or transport equation (first order in space and time) with flow speed v

L[u] = 0 with L = part

partt+ v part

partxhArr u + v ux = 0 (148)

Similarly boundary conditions can also be expressed by linear operators For example for wemay define boundary operators for

boundary tractions of a one-dimensional bar

B[u] = t with B = E part

partxhArr Eux = t (149)

boundary flux in a one-dimensional rod

B[T ] = q with B = minusκ partpartx

hArr minus κTx = q (150)

Unfortunately analytical solutions (I)BVPs of the above type are hardly ever available ndash exceptfor relatively simple problems involving

simple geometries

simple material behavior

simple ICsBCs

For realistic geometries materials andor ICsBCs one usually requires numerical techniquesto obtain approximate solutions numerically

We point out that computing machines have two main shortcomings that require the discussionof topics in the following few sections

First computers do not know any units To this end any numerical technique must cope withthe intrinsic units present in physical problems This is commonly in done in one of two wayseither one defines a set of consistent units (eg only SI units) and tacitly implies that thoseunits are being used throughout (this is common practice in most commercial FEA codes) orone reduces the physical system to a dimensionless problem This will be discussed in Section 2

Second computers cannot deal with infinity For this reason any numerical technique has theobjective to turn an infinite-dimensional problem into a finite-dimensional one The exactsolution to any of the above systems of IBVPs lives within an inifinite-dimensional functionspace In other words we donrsquot know much about the sought function fields u(x t) or T (x t) a-priori so the problem is not to simply identify the coefficients of some known type of polynomialbut to find an arbitrary function (with some differentiability constraints) Numerical techniquesreduce such problems commonly to finite-dimensional ones Let us consider a few examples

14

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Any function can be expressed as an infinite Fourier series or as a polynomial series(those series have an infinite number of terms and hence coefficients) We can aim forapproximations by considering eg only the lowest n terms of such a truncated seriesand find the respective coefficients by some numerical method This way we have reducedthe infinite-dimensional problem to an n-dimensional one

Any computer stores and operates rational numbers (with infinite precision) with a finitenumber 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 isin Ω andfor all times we could set out to find solutions that are known only at certain discretepoints xi and possibly also at discrete time steps tα This defines the concept of finitedifferences which will be discussed in Section 3

15

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

2 Dimensionless Forms

Computer programming languages have no notion of units which is why one usually definesa set of units that are commonly agreed upon or as an elegant alternative one introducesdimensionless forms before solving problems numerically Let us illustrate the procedure throughan example

Example 21 Linear elastic spring vibration

Consider a particle of mass m attached to a linear elastic spring of stiffness k subjected toan external force F (t) The vibration of the particle is described by the equation of motionalong with an initial condition (here assuming that the spring is unstretched initially) Let u(t)denote the position of the mass then

mu(t) = minusku + F (t)u(0) = u0

(21)

We start by making the unknown displacement u dimensionless by the normalization

u = u

u0 (22)

Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0eg) but we could use any non-zero length for this normalization Insertion into the equationof motion and dividing by m yields

part2

partt2u = minus k

mu + F (t)

u0m

u(0) = 1

(23)

The first equation shows thatradicmk must have the units of time so we may define

t = tradicmk

= tradic

k

mrArr part2

partt2u = minusu + F (t)

ku0(24)

Finally introducing a dimensionless force as follows leads to the dimensionless form of theoriginal problem

f(t) =F (t

radicmk)

ku0rArr

part2

partt2u = minusu + f (t)

u(0) = 1

(25)

mdashmdashmdashmdash

Example 22 Heat equation

Let us consider the heat equation derived above as

ρcV T = sh + knabla2T for x isin Ω (26)

with some suitable boundary and initial conditions We start by introducing a reference lengthL (eg the size of the body) and a reference temperature T0 (eg the initial temperature ofthe body) and defining

x = xL

rArr part

partx= 1

L

part

partxand T = T

T0 (27)

16

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This turns the heat equation into

ρcV T0T = sh + kT0

L2nabla2T with nabla = ( part

partx1

part

partxd)

T

(28)

Next we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into

ρcV T0L2

kT0T = shL

2

kT0+nabla2

T (29)

Obviously the last term on the right-hand side is dimensionless which implies that also theremaining two terms must be dimensionless This allows us to make two more definitions ofdimensionless type viz

sh =shL

2

kT0and

ρcV T0L2

kT0

part

partt= part

partthArr t = kT0

ρcV T0L2t (210)

This finally leads to the dimensionless heat equation

T t = sh +nabla2T (211)

Note that in an analogous fashion the boundary and initial conditions can also be made dimen-sionless Dirichlet boundary conditions simply use the definition of the dimensionless temper-ature directly converting T = T T0 Neumann boundary conditions of the type q = minusknablaT = qcan be transformed according to

minuskT0

LnablaT = q rArr minusnablaT = q with q = qL

kT0 (212)

mdashmdashmdashmdash

Analogously any other problem can be made dimensionless by introducing proper normaliza-tions and rewriting the governing equations and any initial andor boundary conditions A moregeneral protocol for finding dimensionless definitions based on a given set of system parametersis given by Buckinghamrsquos Π-theorem which is not discussed In the following we typicallyassume that any given problem is dimensionless (even though not showing the normalizationspecifically)

17

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

3 Direct Numerical Methods Finite Differences

To numerically solve such ODEsPDEs we generally have so-called direct and indirect methods

Direct methods aim to solve the governing PDEsdirectly for example by approximating all spatial andtemporal derivatives using finite differences (FD)Consider eg an unknown scalar field u(x t) whosederivatives appear in the governing PDEs (for simplifictylet us consider only a 1D problem whose results caneasily be extended to higher dimensions by applying thederivatives component-wise)

We introduce a regular (∆x∆t)-grid with constant spac-ings ∆x = xi+1 = xi and ∆t = tα+1 minus tα and we define thesought field u only at the grid points writing

uαi = u(xi tα) (31)

x

tDx

Dt

xi xi+1xi-1

+at

a+1ta-1t

a(t x )i

In order to approximate derivatives at the grid points we use Taylor expansions eg inspace

u(xi+1 tα) = uαi+1 = uαi +∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

+ (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(32)

u(ximinus1 tα) = uαiminus1 = uαi minus∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

minus (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(33)

where O(sdot) denotes on the order of (sdot) Addition of the two equations leads to

uαi+1+uαiminus1 = 2uαi +(∆x)2 part2u

partx2∣xitα

+O(∆x4) rArr part2u

partx2(xi tα) =

uαi+1 minus 2uαi + uαiminus1

(∆x)2+O(∆x2)

(34)

This is the second-derivative central difference approximation (which is second-order ac-curate as evident from O(∆x2))

Analogously subtraction of the two equations gives the first-derivative central differenceapproximation (which is second-order accurate as well)

uαi+1 minus uαiminus1 = 2∆xpartu

partx∣xitα

+O(∆x3) rArr partu

partx(xi tα) =

uαi+1 minus uαiminus1

2∆x+O(∆x2) (35)

Of course the same can be carried out for derivatives in time yielding analogously eg

uα+1i minus uαminus1

i = 2∆tpartu

partt∣xitα

+O(∆t3) rArr partu

partt(xi tα) =

uα+1i minus uαminus1

i

2∆t+O(∆t2) (36)

Many other such finite-difference approximations of derivatives can be obtained in a similarfashion For example a simpler first-derivative stencil is obtained from the first Taylor equa-tion (32) alone

uα+1i minus uαi = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uα+1i minus uαi

∆t+O(∆t) (37)

18

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which is known as the (first-order accurate) first-derivative forward-Euler approximation

Analogously we use the second Taylor expansion (33) to obtain the first-derivative backward-Euler approximation (which is first-order accurate)

uαi minus uαminus1i = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uαi minus uαminus1i

∆t+O(∆t) (38)

In order to numerically solve a PDE directly we choose suitable finite-difference approximationsfor all appearing derivatives Of course an extension of the above to non-constant grid spacings∆tα and ∆xi is straight-forward Also when dealing with higher dimensions any chosen stencilis applied to each partial derivative

Example 31 Heat equation by finite differences in 1D

Consider the general form of the 1D heat equation

T (x t) = k Txx(x t) + r(x t) (39)

When using the second-order central-difference approximation for the spatial and the forward-Euler approximation for the temporal derivative in the heat equation the discretized governingequation becomes

Tα+1i minus Tαi

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (310)

which in the limit ∆t∆xrarr 0 is expected to converge towards the same solution as the governingequation (this is the requirement of consistency of the discretized equation) Notice that theright-hand side of (310) does not involve Tα+1

i nor any information at the new time tα+1 whichis found only on the left-hand side Such time-dependent finite-difference schemes are calledexplicit

As a key feature of explicit schemes one can easily solve for Tα+1i at the new time for known

values Tαi at the current time and Tαminus1i at the previous time without solving a system of

equations Specifically solving the above for Tα+1i yields the update rule

Tα+1i asymp Tαi + k∆t

(∆x)2(Tαi+1 minus 2Tαi + Tαiminus1) +∆t r(xi tα) (311)

By contrast when using the backward-Euler approximation we obtain

Tαi minus Tαminus1i

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (312)

which is a linear system to be solved for Tα+1i at the newest time step (which is here α) Such

a time-dependent finite-difference scheme which has unknown degrees of freedom at the newesttime step on both sides of the equation is called an implicit scheme

Let us rewrite the above implicit approximation of the heat equation as

minuscTαi+1 + (1 + 2c)Tαi minus cTαiminus1 asymp ∆t r(xi tα) + Tαminus1i with c = k∆t

(∆x)2 (313)

19

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The solution for a system of n grid points in space is obtained from solving

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

⋱⋱minusc 1 + 2c minusc

minusc 1 + 2c minuscminusc 1 + 2c minusc

⋱⋱

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

Tα1⋮⋮Tαi⋮⋮Tαn

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

∆t rα1 + Tαminus11

⋮⋮

∆t rαi + Tαminus1i

⋮⋮

∆t rαn + Tαminus1n

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

(314)

Note that suitable boundary conditions must be supplied For example if we have theessential boundary condition Tαi = Ti(tα) we may replace the equation for Tαi in the abovesystem (ie the αth row in (314)) by Tαi = Ti(tα) By contrast if we have a natural boundarycondition Tx(xi tα) = qi(tα) then we need to introduce a finite-difference stencil to Tx(xi tα)and again replace the respective equation in the above system

mdashmdashmdashmdash

Any of the above finite-difference schemes can be interpreted as a stencil (which may alsoreveal the required BCsICs) For example the explicit and implicit update rules given byrespectively (311) and (2430) have the stencils shown below revealing how information ispassed from time step to time step (and also revealing the explicit vs implicit nature of eachfinite-difference scheme)

i i +1i -1

Dx

Dt

a

a+1

a-1i i +1i -1

Dx

Dt

a

a+1

a-1

(a) explicit stencil (b) implicit stencil

Example 32 Bar under its own weight

Analogous finite difference approaches can be taken forquasistatic problems where a time-independent solutionis thought in one or several dimensions For exampleconsider a vertical elastic bar of constant Youngrsquos mod-ulus E and length L clamped at its top end deformingunder its own weight The unknown displacement field isu(x) as a function of the axial x-coordinate Gravity actsdownward In this case the governing equation is linearmomentum balance viz

divσ(x) + ρg = 0 rArr uxx = minusρg

E (315)

x

u(x) L

+

g

+

xi+1

xi

xi-1

ui

x0

xn

Dx

Boundary conditions are (assuming a free end at x = L)

u(0) = 0 and F (L) = EAux(L) = 0 hArr ux(L) = 0 (316)

We can easily find an analytical solution for this case by integrating (315) twice with respectto x and inserting the boundary conditions which yields

u(x) = ρg

2E(2L minus x)x (317)

20

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us discretize the bar into n+ 1 segments of equal lengths ∆x = L(n+ 1) so that the (n+ 1)grid points are located at xi = in for i = 0 n We may use a second-order central-differenceapproximation for the second derivative with respect to x leading to

ui+1 minus 2ui + uiminus1

(∆x)2= minusρg

Ewith u0 = 0 and

un+1 minus un∆x

= 0 (318)

where we introduced a ghost node at xn+1 = xn + ∆x to enforce the free traction boundarycondition via a first-order forward-Euler approximation and the central-difference stencil isapplied to update all nodes i = 1 n while nodes 0 and n + 1 are updated by the boundaryconditions u0 = 0 and un+1 = un This results in a linear system of equations

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

1 0 0 0 ⋱1 minus2 1

1 minus2 11 minus2 1

⋱1 minus2 1

minus1 1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

u0

⋮⋮ui⋮⋮unun+1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

0⋮ccc⋮c0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

with c = minusρgE

(∆x)2 (319)

Notice how we replaced the first and last row in the matrix and the respective entries in theright-hand-side vector in order to enforce the two boundary conditions This is a convenientstrategy to impose boundary conditions directly within the system to be solved (which we willalso exploit later in the context of finite elements) Solving the above linear systems yields theapproximate finite-difference solution

This is not a time-dependent problem hence our above definition of explicit vs implicit schemesdoes 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

Shown below is the solution obtained for n = 9 (green) n = 19 (purple) n = 29 (light blue)n = 49 (orange) and n = 99 (red) showing convergence with increasing number of grid pointstowards the exact solution u(x) which is included as the solid blue line (Results are normalizedsuch that u = uE

ρgL2 and x = xL) Note that convergence is from below ie the discretized bar

appears stiffer than it is in reality (a fact that we will get back to later)

02 04 06 08 10

01

02

03

04

05

x

u

mdashmdashmdashmdash

Notice that the above finite-difference approximation also admits a physical interpretation inthe following sense Imagine that we subdivide the bar into n bars each of length ∆x = Ln

21

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We can replace a bar by an elastic spring of effective stiffness k = EA∆x = nEAL At thesame time each bar carries a weight m = ρA∆x = ρALn which we may distribute evenly to itstwo ends As a result we arrive at a chain of n+1 masses (the inner ones being m the first andlast ones m2) connected by linear springs If we formulate the system of equations resultingfrom the static force equilibrium of eg the ith mass we obtain

nEA

L(ui minus uiminus1) minus

nEA

L(ui+1 minus ui) minus gρALn = 0 (320)

or (after some simplification)

ui+1 minus 2ui + uiminus1 = minusρgE(Ln)2 (321)

which is identical to (318) and (319) (for each inner mass while the first and last differ)

x

u(x) L

+

g+

xi+1

xi

xi-1

ui

x0

xn

Dx

+

ui

Dxmmm

mm2

m2

kkk

m2

m2kDx =

+ =

22

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

4 Stability of Finite Difference Schemes

So far we have derived first- and higher-order finite difference approximations in space and timeand discussed the explicit and implicit finite-difference schemes resulting from applying thoseapproximations to PDEs We still need to discuss the suitability of particular combinations offinite-difference combinations in space and time for a particular PDE This raises the questionof finite-difference stability which is classically associated with two names

the Courant-Friedrichs-Levy or CFL condition is a necessary condition for the sta-bility of a finite-difference scheme

von Neumann analysis yields a sufficient condition or the stability of a finite-differencescheme and is related to phase error analysis

We will discuss all three concepts at the example of the 1D wave equation below

41 CFL Condition

Every finite-difference stencil comes with a numerical domain of dependence For exampleconsider the 1D wave equation which when discretized by second-order central-difference ap-proximations in space and time becomes

uα+1i minus 2uαi + uαminus1

i

(∆t)2= c2u

αi+1 minus 2uαi + uαiminus1

(∆x)2 (41)

Drawing the stencil in the shape of a plus sign indicatesthat the solution for uα+1

i depends on information at theprevous time step specifically on uαi+1 uαi and uα+1

iminus1 (aswell as uαminus1

i from two time steps ago) When repeatingto apply this stencil on a large grid we may draw thenumerical domain of dependence as all those pointswhose information was affected the value uα+1

i For theabove example this turns into a triangular fan for whichany change to the value of u at a grid point interior tothe fan affects the value of uα+1

i whereas points outsidethe fan do not impact the value of uα+1

i The slope of thetwo curves limiting our fan in the x-t-diagram are simplyplusmn∆t∆x

Dx

Dt

mathematical domain of dependence

numerical domainof dependencec

We may also define the mathematical domain of dependence by studying the exact solution ofthe wave equation which we know is composed of characteristics of the type

u(x t) = f1(x + ct) + f2(x minus ct) (42)

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

x + ct = const and x minus ct = const (43)

are characteristics of the solution Now consider a grid point (xi tα) such that the character-istics through this point are defined by

x + ct = xi + ctα and x minus ct = xi minus ctα (44)

23

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The fan enclosed below these two lines is the mathematical domain of dependence sinceany point inside the fan can affect the solution on the bounding curves of the cone and hencecan affect u(xi tα) The latter does not apply to points outside the fan More mathematicallyspeaking we may invoke drsquoAlembertrsquos formula if the initial conditions are supplied as u(x t0) =u0(x) and u(x t0) = v0(x) then

u(xi tα) =u0(xi + ctα) + u0(xi minus ctα)

2+ 1

2cint

xi+ctα

ximinusctαv0(y)dy (45)

which again confirms that u(xi tα) depends only on information at time t0 = 0 contained withinxi minus ctα le x le xi + ctα

The Courant-Friedrichs-Levy (CFL) condition now states that convergence and thusstability requires that the mathematical domain of dependence is contained in the numericaldomain of dependence

For the above example of the 1D wave equation this implies that the fan of the mathematicaldomain of dependence must be enclosed by the fan of the numerical domain of dependencewhich ndash by comparing the slopes of the bounding lines ndash is equivalent to requiring that

minus∆x

∆tle c le ∆x

∆thArr minus 1 le c∆t

∆xle 1 hArr ∣c∆t

∆x∣ le 1 (46)

This is the CFL condition for the 1D wave equation which is only a necessary conditionof stability In order to determine the sufficient condition(s) of stability we need to discuss themethods described in the following

42 von Neumann Analysis and Phase Error Analysis

A sufficient condition of stability is obtained from so-called von Neumann analysis Sinceit is very closely related to phase error analysis we will discuss these two together Let usagain consider the stencil (41) for the 1D wave equation Losely speaking stability requiresthat small errors in the numerical solution uαi (which always occur due to round-off errors andmachine precision) remain bounded and do not grow over time when the finite-difference schemeis applied time and time again The latter would imply instability and result in exponentialgrowth of numerical noise over time

Let us assume that at any time t there is a small perturbation to the solution written as

uαj = ei(ωtαminuskxj) = ei(ωα∆tminusj∆xk) (47)

which is of harmonic type Note that any general noise function can always be decomposed asa Fourier series so if we can show that the above function does not grow over time for arbitraryω and k then any perturbation of the solution should remain stable Note that we deliberatelydid not include an amplitude since it does not affect the outcome of a linear PDE

Inserting (47) into (41) results in

ei(ω(α+1)∆tminusj∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ω(αminus1)∆tminusj∆xk)

= c2(∆t)2

(∆x)2[ei(ωα∆tminus(j+1)∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ωα∆tminus(jminus1)∆xk)]

(48)

Dividing by uαj = ei(ωα∆tminusj∆xk) yields

eiω∆t minus 2 + eminusiω∆t = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + eminusi∆xk] (49)

24

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or (dividing by 2 and using Eulerrsquos identity for the cosine)

cos(ω∆t) minus 1 = σ2 [cos(k∆x) minus 1] with σ = c∆t

∆x (410)

To establish a relation between ω and k we need to consider three cases

σ = 1 in this case we obtain cos(ω∆t) = cos(k∆x) or ω∆t = plusmnk∆x

∣σ∣ gt 1 in this case we have cos(ω∆t) = 1+σ2 [cos(k∆x) minus 1] and there are cases of k forwhich the right-hand side becomes lt minus1 meaning that there are solutions ω isin C Hencecertain wave vectors k cause instability in the form of expontential growth of solutions

∣σ∣ lt 1 in this case there are frequencies ω for which no k isin R exists (only solutions k isin C)This implies that waves at those frequencies vanish since they are damped out by thescheme

In summary the scheme is unstable if ∣σ∣ gt 1 or in other words the scheme is conditionallystable and stability requires that

∣σ∣ le 1 hArr ∣c∆t

∆x∣ le 1 hArr minus 1 le c∆t

∆xle 1 (411)

We also conclude that σ = 1 leads to no damping while ∣σ∣ lt 1 leads to numerical damping ofcertain frequencies

Classical von Neumann analysis is not interested in phase delays and therefore uses a slightlymodified approach writing z = eiω∆t so that

uαj = zαeminusikxj with z isin C (412)

This implies that for any grid point xj the solution from one time step to the next relates as

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

=uα+1j

uαj= z (413)

Stability hence requires that ∥z∥ le 1 since otherwise again exponential growth occurs over timeInsertion of (412) into the finite-difference approximated wave equation (41) and dividing byzα yields

z minus 2 + zminus1 = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + e+i∆xk] = 2σ2 [cos(k∆x) minus 1] (414)

Solving the above for z leads to

z = 1 + σ2 [cos(k∆x) minus 1] plusmn ∣σ∣radic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (415)

Now observe that if ∣σ∣ le 1 then the radicand is always non-positive and soradic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = iradicminus [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (416)

which leads to

∥z∥2 = (1 + σ2 [cos(k∆x) minus 1])2 minus σ2 [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = 1 (417)

Therefore ∣σ∣ le 1 implies a stable scheme Otherwise the scheme is unstable

Finally let us note that the Lax-Richtmyer theorem states that a finite-difference schemeconverges if and only if (1) the scheme is consistent (ie all truncation errors decay as∆x∆trarr 0) and (2) the scheme is stable

25

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 41 Advection equation by an implicit finite-difference scheme

As mentioned in Section 14 the advection equation governing eg fluid transport processesis given by

u(x t) + v ux(x t) = 0 (418)

here written for a 1D scenario for instructive purposes with a constant advection speed v isin RLet us introduce a regular grid in both space and time and introduce the dimensionless speed

c = v ∆t

∆x (419)

Let us discretize the advection equation by a backward-Euler approximation in time and afirst-order central difference approximation in space ie

u(xj tα) =uαj minus uαminus1

j

∆t+O(∆t) ux(xj tα) =

uαj+1 minus uαjminus1

2∆x+O(∆x2) (420)

Insertion into (418) leads to

uαj minus uαminus1j

∆t= minusv

uαj+1 minus uαjminus1

2∆xhArr uαj minus uαminus1

j = minus c2(uαj+1 minus uαjminus1) (421)

Note that this is an implicit stencil since it requires solving a system of equations for theunknown field u at time tα

Let us perform von Neumann stability analysis which starts by assuming an error of the type(note that wersquoll replace the spatial index i by j to not confuse it with i =

radicminus1)

uαj = zαeminusikxj with z isin C (422)

Insertion into uαj minus uαminus1j = minusc (uαj+1 minus uαjminus1) from (421) gives

zαeminusikxj minus zαminus1eminusikxj = minus c2(zαeminusikxj+1 minus zαeminusikxjminus1) (423)

Using that xjplusmn1 = xj plusmn∆x and dividing by zαeminusikxj results in

1 minus 1

z= minus c

2(eminusik∆x minus e+ik∆x) = c

2(eik∆x minus eminusik∆x) = c

22i sin(k∆x) = i c sin(k∆x) (424)

and isolating z isin C gives

1

z= 1 minus i c sin(k∆x) hArr 1

∥z∥2= 1 + c2 sin2(k∆x) (425)

and thus

∥z∥2 = 1

1 + c2 sin2(k∆x)le 1 (426)

We conclude that irrespective of k and ∆x the right-hand side is always less or equal to1 implying that ∥z∥ le 1 so that the scheme is unconditionally stable (not that this isindependent of the sign of v as may be expected) Unconditional stability is generally notobserved in explicit schemes and can be a significant advantage of an implicit scheme (if itapplies not every implicit scheme is unconditionally stable)

mdashmdashmdashmdash

26

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

43 Direct vs Indirect Methods

The above finite-difference schemes are powerful direct numerical techniques but they comewith significant disadvantages Problems associated with direct methods include the following

a regular grid is required (which is fine for many fluid mechanics problems but oftentimesproblematic for complex solid geometries especially when undergoing large deformation)

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 primaryfields and their errors are undefined between grid points) This can be problematic whenseeking approximate solutions that are ldquoglobally optimalrdquo Also the question needs toaddressed how BCsICs are applied in between grid points and how about moving BCsare imposed

stabilityefficiency issues arise due to the above stability restrictions choices of ∆t and∆x are not arbitrary but ndash aside from accuracy concerns ndash the stability of especially ofexplicit finite-difference schemes dictates the maximum step widths to be used (whichmay impose severe computational costs due to small steps sizes)

As an alternative indirect methods do not solve the ODEsPDEs directly but search forldquooptimalrdquo approximations Essentially one reduces the infinite-dimensional problem to a finite-dimensional problem by considering solutions uh(x t) asymp u(x t) that satisfy the BCs and ICsand approximate the exact solution as well as possible Particular questions to be addressedinclude

How do we choose uh(x t) For example are these globally or locally defined functionsWhich choices minimize the error

What does ldquooptimalrdquo mean in this context How do we quantify the error betweenapproximation and exact solution

What types of functions should be used for uh(x t) ndash eg polynomial or Fourier seriespiecewise-polynomial or maybe even piece-constant

We need a few more concepts to address those questions Note that in the following we willformulate most concepts in 1D with analogous generalizations possible for higher dimensionsunless specifically mentioned

27

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

5 Methods of Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh(x t) thatminimize the total error (which still needs to be defined) when comparing with the exact solutionu(x t) For simplicity let us drop the time dependence for now and only consider (quasi)staticproblems We will add dynamics later in the course for completeness but it is beneficial to firstdiscuss the instructive static scenario Also let us start with 1D problems seeking uh(x) andlater expand all concepts to higher dimensions as needed

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

uh(x) =n

suma=1

caφa(x) (51)

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-prioriExamples are polynomials ie φa(x) = xa or Fourier series with eg φa(x) = sin(πax)

ca are unknown coefficients to be determined

We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solvedfor n coefficients) Note that nrarrinfin yields the exact solution if a proper orthogonal set of basisfunctions is chosen (eg polynomials or Fourier series) while we deliberately choose n≪infin sothat the resulting finite-dimensional problem is computationally tractable

One constraint to be imposed is that the approximate function uh(x) must satisfy all Dirichlet(essential) boundary conditions (otherwise it does not qualify as a solution to the problem)One possible approach is to separate the boundary part from the interior part by defining

uh(x) = upartΩD(x) +

n

suma=1

caφa(x) with φa(x) = 0 on partΩD (52)

and upartΩD(x) satisfying all essential boundary conditions Alternatively one can impose the es-

sential boundary conditions onto the unknown coefficients as a direct constraint to be accountedfor while solving (we will use this latter strategy in most of the below examples)

As explored in Section 14 the general boundary value problem we aim to solve can be writtenin general as

find u(x) st L[u] = s for x isin Ω and Bj[u] = tj for x isin partΩj (j = 1 k) (53)

where L is a linear differential operator and Bj is a linear differential boundary operator Notethat we here account for the fact that we may have k different boundary conditions

We now insert our approximate solution uh(x) into the above set of PDEs knowing that itwill in general not satisfy those governing equations (otherwise we would have found an exactsolution) As a consequence we obtain residuals defined by

rΩ = L[uh] minus s and rpartΩj = Bj[uh] minus tj (54)

Unless we have found the exact solution we will have rΩ ne 0 and rpartΩj ne 0 and we seek coefficients

ca (a = 1 n) such that our approximate solution uh(x) satisfies rΩ asymp 0 and rpartΩj asymp 0 in somesense In order to find the n coefficients we need n equations

28

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

To this end the family of methods of weighted residuals defines n total residuals as

Ri = intΩrΩWidV + ξ2

k

sumj=1int

ΩrpartΩjwidS rArr Ri = 0 for i = 1 n (55)

where Wi and wi (i = 1 n) are weighting functions for the bulk and surface residualsrespectively which define ndash loosely speaking ndash the priority of where the residuals are to beevaluated ξ2 gt 0 is an in principle arbitrary constant introduced for unit compatibility (andwe write ξ2 instead of ξ to make sure the pre-factor in front of the second integral is positiveassuming ξ isin R) Now there are various ways to define the weights (each of different difficultyand accuracy levels) and this leads to the following methods of weighted residuals

51 Collocation Method

A straight-forward approach is to evaluate the residuals only at specific locations which resultsin the so-called collocation method

To this end we define

Wi = δ(x minus xi) for xi isin Ω i = 1 n minus kwi = δ(x minus xi) for xi isin partΩiminus(nminusk) i = n minus k + 1 n

(56)

so that the equations to be solved are

rΩ(xi) = 0 for i = 1 n minus krpartΩiminus(nminusk)(xi) = 0 for i = n minus k + 1 n

(57)W

+x1

+x2

+x3

+x4

+x5

t+

x6

Points xi (i = 1 n) are called collocation points This method is closest to the finite-difference techniques discussed before since it aims to minimize the error only at discretepoints (much like finite differences aimed to solve the PDE exactly only on a discrete grid)For convenience we here chose k collocation points on the k boundaries with natural boundaryconditions (one per boundary) while one could also choose this distribution differently as longas sufficiently many equations are available

52 Subdomain Method

The subdomain method is similar in spirit to the collocationmethod but instead of evaluating the residuals at specific colloca-tion points we subdivide the body and its boundary into subdo-mains and require the total residual to vanish on average over eachof the subdomains Therefore we define

Wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isinDi

0 elsefor i = 1 n minus k (58)

and

t

WD1

D2

D3

wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isin partΩiminus(nminusk)

0 elsefor i = n minus k + 1 n (59)

where Di sub Ω for i = 1 n minus k are (possibly overlapping) domains within the body whilepartΩi sub partΩ are the k boundary domains

29

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the n equations to be solved for the n coefficients ca are

intDirΩ dV = 0 for i = 1 n minus k

intpartΩi

rpartΩi dS = 0 for i = 1 k(510)

Keep in mind that we here aim to solve the PDE and boundary conditions only on averageacross the respective domains

53 Method of Least Squares

The least squares method is most intuitive and seeks to determine the unknown coefficientsby minimizing the bulk and boundary residuals To this end we introduce the total error

E = intΩr2

Ω dV + ξ2k

sumj=1intpartΩj

r2partΩj

dS (511)

and obtain the coefficients as the minimizers thereof ie

c1 cn = arg minE (512)

As before ξ2 gt 0 is an arbitrary (positive) parameter introduced for dimensional consistencyThe associated stationarity conditions become

partE

partca= 0 hArr int

ΩrΩpartrΩ

partcadV + ξ2

k

sumj=1intpartΩj

rpartΩj

partrpartΩj

partcadS = 0 for a = 1 n (513)

from which we realize by comparing to (55) that we have yet another method of weightedresiduals and that we have effectively chosen

Wa =partrΩ

partca and wa =

partrpartΩj

partcaon Neumann boundary partΩj (514)

Recalling our definitions and exploiting the properties of a linear operator we may write

uh(x) =n

suma=1

caφa(x) rArr rΩ = L[uh] minus s =n

suma=1

caL[φa(x)] minus s (515)

and

rpartΩj = Bj[uh] minus tj =

n

suma=1

caBj[φa(x)] minus tj (516)

so that

Wa =partrΩ

partca= L[φa(x)] wa =

partrpartΩj

partca= Bj[φa(x)] on Neumann boundary partΩj (517)

This turns the stationarity conditions (513) for a = 1 n into1

intΩ(n

sumb=1

cbL[φb(x)] minus s)L[φa(x)]dV

+ ξ2k

sumj=1intpartΩj

(n

sumb=1

cbBj[φb(x)] minus tj)Bj[φa(x)]dS = 0

(518)

1Here and everywhere in the following we will switch the summation index when multiplying to sums in orderto avoid duplicated indices and ambiguity eg rΩ

partrΩpartca

= (sumnb=1 c

bL[φb(x)] minus s)L[φa(x)] where summation index

b is used instead of a in parentheses in order to avoid ambiguity when multiplying by L[φa(x)]

30

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or after some re-arrangement (separating terms depending on cb from those independent of thecoefficients)

n

sumb=1

⎡⎢⎢⎢⎢⎣int

ΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS

⎤⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Kab

cb

= intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBi[φa(x)]dS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFa

for a = 1 n

(519)

This is a linear system of n equations which may be rewritten concisely as

n

sumb=1

Kabcb = F a for a = 1 n or Kc = F (520)

where we grouped all unknown coefficients into the vector

c = (c1 cn)T(521)

Matrix K and vector F are both constant and their components read respectively

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (522)

and

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (523)

We notice that K is by definition symmetric (Kab = Kba) For reasons to be explained laterwe here and in the following use the notation Kab for the matrix component associated withcoefficients a and b (instead of writing Kab) Let us accept this for now ndash we will get back to thisnotation when discussing higher dimensions where each coefficient ca isin Rd has d componentsso we need to find all cai with a = 1 n and i = 1 d and we will need matrices with Kab

ij

54 Higher Dimensions

Any of the above methods can be extended to higher spatial dimensions as needed (after all onlyfew real-world problems can be reduced to one dimension) In higher dimensions we generallyseek a function u(x) ∶ Ωrarr Rd and introduce the approximation

uh(x) = sumaisinT

caφa(x) (524)

where ca isin Rd are the unknown vector coefficients and φa(x) denote the basis functions Forexample we may again use polynomial or Fourier basis functions eg φa(x) = sin(πa sdotx) withappropriate choices of the vector set T Now we need d times n independent equations to solve forall components of the n coefficient vectors ca (d equations per any of the n coefficients) It issimplest to explain these concepts through practical examples which will follow later

31

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 51 Rotating bar with attached point mass

Consider a bar of length L constant Youngrsquos modulus E cross-sectional area A and mass density ρ which is hinged at the originand rotating about this hinge with a constant angular velocity ωIn addition a point mass m is attached at the free end of therotating bar

w

mEAr

L

xu(x)+

Let us first find the exact solution of the 1D displacement field u(x) inside the bar We considera co-rotating frame of reference with coordinate x running along the bar starting at the originLinear momentum balance with the centripetal acceleration a = minusω2x states that

divσ = ρa rArr (Eux)x = minusρω2x rArr uxx = minusρω2

Ex (525)

and the boundary conditions are (the force again coming from the cenitrpetal acceleration)

u(0) = 0 and F (L) = AEux(L) =mω2L (526)

Integration the ODE twice for u(x) and obtaining the two integration constants from the twoboundary conditions yields the exact solution

u(x) = minusρω2

6Ex3 + (mω

2L

EA+ ρω

2L2

2E)x (527)

Next let us find approximate solutions by the various methods of weighted residuals To thisend we first introduce an approximate solution with a polynomial basis φa(x) = xa such that

uh(x) =n

suma=0

caxa (528)

where we chose a polynomial function space of order n which is often abbreviated asuh(x) isin Pn The boundary condition u(0) = 0 requires that c0 = 0 Also for a practical example(which admits simple closed-form solutions) let us pick n = 3 Hence we in fact use

uh(x) =3

suma=1

caxa = c1x + c2x2 + c3x3 (529)

The bulk and surface residuals in this problem are written as respectively

rΩ(x) = Euhxx(x)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraL[uh]

+ ρω2xsup2minuss

for 0 le x le L

rpartΩ(x) = EAuhx(L)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraB[uh]

minusmω2Lacutesup1sup1sup1sup1cedilsup1sup1sup1sup1sup1paraminusF

(530)

Since there is only one Neumann boundary (viz the free end of the bar at x = L there is onlya single boundary residual and k = 1)

Collocation Method In order to use the collocation method we must choose a total of n = 3collocation points to obtain the same number of equations as we have unknown coefficients inthe approximation uh(x) isin P3 Since we have one boundary residual let us choose two pointsalong the bar (eg equally spaced) and one at the end x = L overall leading to

x1 = L3 x2 = 2L3 x3 = L (531)

32

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

With those collocation points the collocation method yields the three residuals that we set tozero

rΩ(x1) = E(2c2 + 2c3L) + ρω2L3 = 0

rΩ(x2) = E(2c2 + 4c3L) + 2ρω2L3 = 0

rpartΩ(x3) = EA(c1 + 2c2L + 3c3L2) minusmω2L = 0

(532)

In matrix form the above becomes the linear system of equations

⎡⎢⎢⎢⎢⎢⎣

0 2E 2EL0 2E 4ELEA 2EAL 3EAL2

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

minusρω2L3minus2ρω2L3mω2L

⎞⎟⎠ (533)

whose solution yields

c1 = mω2L

EA+ ρω

2L2

2E c2 = 0 c3 = minusρω

2

6E (534)

Insertion into (529) shows that

uh(x) = c1x + c2x2 + c3x3 = (mω2L

EA+ ρω

2L2

2E)x minus ρω

2

6Ex3 = u(x) (535)

is in fact the exact solution cf Eq (527) The chosen collocation points were chosen optimally(a different choice of the collocation points could have resulted in a different set of coefficientsand hence in a different solution)

Subdomain Method Let us repeat the above example using the subdomain method Tothis end we define two equally-sized subdomains in the bulk of the bar (simply by dividing thebar into two equal halfs)

D1 = x ∶ 0 le x le L2 D2 = x ∶ L2 le x le L (536)

and we have x = L as our third ldquodomainrdquo to satisfy the Neumann boundary condition Weinvite you to try this case as an exercise at home (you will again obtain the correct solutionuh(x) = u(x))

Least Squares Method Finally let us use the method of least squares for which we hadshown that the problem reduces to solving the linear system (520) with matrix components

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (537)

and vector components

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (538)

For this particular problem we have defined L[sdot] and B[sdot] in (530) which results in

Kab = intL

0L[xa]L[xb]Adx + ξ2[B[xa]B[xb]]

x=Lfor a b = 123 (539)

33

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = intL

0(minusρω2x)L[xa]Adx + ξ2mω2LB[xa]x=L (540)

We still need to choose an appropriate scaling parameter ξ such that the above forms make sensewith respect to their dimensions By comparison of the two terms we realize that ξ2 = (LA)minus1

(or any inverse volume in general) is a suitable choice

Carrying out the above integrals with L[sdot] and B[sdot] from (530) yields the linear system

⎡⎢⎢⎢⎢⎢⎣

AE2

L 2AE2 3AE2L2AE2 8AE2L 12AE2L2

3AE2L 12AE2L2 21AE2L3

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

Emω2

ELω2(2m minusALρ)EL2ω2(3m minus 2ALρ)

⎞⎟⎠ (541)

whose solution again recovers the exact solution (527) (the individual steps are left out herebut you are invited to solve the problem on your own at home)

mdashmdashmdashmdash

55 Galerkinrsquos Method

As introduced in basic mechanics and continuum mechanics courses (and therefore not discussedhere in detail) the equilibrium conditions of a mechanical boundary value problem can also bestated in terms of the principle of virtual work

intΩσijvij dV = int

ΩρbividV + int

ΩNtividS (542)

for any kinematically admissible virtual displacement field v(x) defined on the body Ω Inother words the virtual work done by the internal stresses equals the virtual work done bythe externally applied body forces and surface tractions Note that admissibility in particularrequires that v = 0 everywhere on partΩD since no virtual displacement can be applied to pointson the surface that are restrained from moving

Applying the divergence theorem to the first term in the principle of virtual work yields

intΩσijvij dV = int

partΩσijnjvidS minus int

ΩσijjvidV (543)

so that rewriting (542) leads to

intΩ(σijj + ρbi)vidV + int

partΩN(ti minus σijnj)vidS = 0 (544)

Since this equation must hold for all admissible virtual displacements v it is concluded that wemust have

σijj + ρbi = 0 in Ω and σijnj = ti on partΩN (545)

These are equivalent to the (static) balance of linear momentum and the associated tractionboundary condition so that (542) ndash when valid for all admissible virtual displacements v ndashindeed holds true and is an alternative expression of the balance of linear momentum and theassociated traction BCs as stated in (545)

Notice that the form of (544) is identical to the total residual (55) in the methods of weightedresiduals with the trial or weighting functions now being v(x) Hence the principle of virtual

34

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

work lends itself for a very natural way to formulate a total weighted residual (without the needto introduce a scaling parameter ξ and without having to pay separate attention to variousboundary terms) Note that v(x) is a continuous function so we here have in principle aninfinite-dimensional problem (and infinitely many admissible weighting functions v) Howeverwe can (and will) turn this problem into a finite-dimensional one by introducing approximateforms for both uh(x) asymp u(x) and vh(x) asymp v(x) which will form the basis of the finite elementformulation later

Example 52 Hanging bar under its own weight revisited

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

Euxx(x) + ρg = 0 with u(0) = 0 and F (L) = EAux(L) = F (546)

With σ = Eε = Eux the principle of virtual work here reads

intL

0σvxAdx = int

L

0ρgvAdx+F v(L) rArr int

L

0EuxvxAdx = int

L

0ρgvAdx+F v(L) (547)

Integration by parts on the first integral yields

[EuxvA]L0 minus intL

0EuxxvAdx = int

L

0ρgvAdx + F v(L) (548)

We exploit that v(0) = 0 (since u(0) = 0 is fixed virtual displacements at x = 0 must vanish)and re-arrange the integrals into

intL

0(Euxx + ρg) vAdx + [F minusEAux(L)] v(L) = 0 (549)

Since we want this equation to hold for any admissible function v(x) we thus conclude that thetwo terms in parentheses and brackets must vanish which in turn confirms that a function u(x)that satisfies (547) for any admissible virtual displacement v(x) is also a solution of (546)

Finally note that (547) can be rewritten as

R = intL

0EuxvxAdx minus int

L

0ρgvAdx minus F v(L) = 0 (550)

which is of the form (55) of the total residual discussed for the methods of weighted residualsand we can as before introduce a finite-dimensional representation for uh(x) asymp u(x) eg inthe form of a polynomial or a Fourier series and solve for the n unknown coefficients ca byintroducing n independent weight functions va(x) Since the residual R in (550) is linear inu(x) we would have to solve a linear system for the coefficients

mdashmdashmdashmdash

At the end of this section let us recap the basic principle of weighted residual methods discussedhere This indirect method set out to not solve the governing PDEs directly but instead tominimize the error made by an approximate solution as follows

(i) we first define an approximate solution space and an approximate solution uh(x) definedup to n unknown coefficients

35

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

(iii) we define a global residual R to be minimized and choose appropriate weighting functionsWi wi such as to produce n equations to be solved for the n unknown coefficients byminimizing the global residuals

(iv) we numerically solve the obtained linear system of equations

Although the methods of weighted residuals are handy simple and can be applied to in principleany physical problem of interest the solution depends significantly on the choice of the weightsand 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 thosechoices

It turns out that for most physical problems including the classical mechanical thermal and alsoelectromagnetic problems there is a more intuitive way to arrive at equations of the type (542)viz by considering the energetic (or so-called variational) basis of the underlying boundary valueproblems In simple terms we know that any physical system aims to minimize its energy ina stable equilibrium We will see that (542) is in fact nothing but the associated stationarityequation of such a minimization problem but to get there we first need to introduce some ofthe fundamentals of variational calculus

36

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

6 Variational Calculus

As a motivational example let us revisit a simple physics problem We knowfrom elementary physics that the energy stored in an elastic spring (stiffnessk) stretched by an amount ∆x is 1

2k(∆x)2 If a spring is hanging from the

ceiling and a weight mg is attached at its free end then the total energy is

I = 1

2kx2 minusmgx (61)

where x denotes the elongation of the spring and the second term enters asthe work done by the external force mg (or alternatively interpreted thepotential energy of the attached mass m)

m

k

x

In order to calculate the stretched equilibrium length of the spring we may minimize the totalenergy leading to

partI

partx= 0 = kx minusmg rArr x = mg

k (62)

Note that the stationarity equation kx =mg is nothing but (static) linear momentum balance(or Newtonrsquos second axiom) Hence we may minimize the total energy I in order to find theequilibrium solution and that solution is ensured to satisfy linear momentum balance

For the general continuum thermo-mechanical problems considered here we would like to havea similar concept at hand to turn equilibrium equations (such as the governing PDEs discussedabove) into energy minimization problems Unfortunately the situation is a bit more complexsince we here no longer seek to find equilibria described by variables (like x above) but by func-tions (such as the displacement field u(x)) We can intuitively imagine extending the conceptndash defining an energy I that depends on u(x) and being minimized by the exact solution How-ever we first need to verify some mathematical preliminaries related to the so-called functionalI and how to minimize a functional with respect to a function (we can no longer take simplederivatives to arrive at the stationarity conditions since we are minimizing not with respect toa set of variables but with respect to a function) The underlying mathematical concepts areknown as variational calculus

61 Functionals

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

I ∶ u isin U rarr I[u] isin R (63)

In simple terms a functional2 I is a ldquofunction of functionsrdquo ie a function whose argumentis another function you hand it a function u(x) and it returns a scalar I isin R (eg the energyassociated with u(x)) Functionals are to be distinguished from functions such as f(x) =x2 with f ∶ R rarr R+

0 Unlike a function which is a mapping from Rd rarr R a functional rsquosdomain is generally a function space U (eg all polynomial functions up to a certain degreen abbreviated as Pn or all continuously differentiable functions or all piecewise polynomialfunctions etc) For more information on vector and function spaces see Appendices A and B

When seeking solutions u(x) we typically seek solutions within a particular function space U For example a functional may impose constraints on the differentiability or integrability of

2To differentiate functionals from functions we will write I[u] with brackets instead of parantheses as in u(x)

37

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

function u(x) As an example consider the functional

I[u] = int1

0u2x(x) dx (64)

which is a functional requiring that u(x) is differentiable (ie possesses a first derivative ux)and that the first derivative squared can be integrated to yield a finite value as a counter-example a piecewise constant function u(x) would not be square-integrable (the first derivativeconsists of delta-functions which if squared yield infinity when integrated) Hence functionalI[u] in (64) restricts the function u(x) to belong to the function space

U = u ∶ (01)rarr R such that int1

0u2x(x) dx ltinfin (65)

In the following it will be important to define such spaces U of admissible functions

For convenience of notation let us introduce the Sobolev space3

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥Hk(Ω) ltinfin (66)

with the Sobolev norm (in 1D)

∥u∥Hk(Ω) =radicint

Ωu(x)2 dx + int

Ω[uprime(x)]2 dx + + int

Ω[u(k)(x)]2

dx (67)

In simple terms (and this is all we will need to remember in the following) Hk(Ω) denotes thespace of all functions whose derivatives up to kth order are square-integrable The aboveexample in (64) eg requires u isin U subH1(01) ie the first derivative of functions u(x) mustbe square-integrable on the interval (01) (Of course in this example u(x) need not be square-integrable itself (the functional only contains ux) yet there is no function u(x) which is notsquare-integrable while its first derivative is square-integrable)

Example 61 Energy of a strained bar

Consider bar of length L and with constant Youngrsquos modulus E and cross-sectional area A andstrain energy density W The total energy I of the bar as a function of the 1D displacementfield u(x) is

I[u] = intL

0W (ε)Adx = int

L

0

E

2[ux(x)]2 Adx (68)

where we used that W = E2 ε

2 and ε = ux Here we generally may want to impose the restrictionu isin H1(0 L) (unless when dealing with discontinuities such as cracks) to ensure that the firstderivative ux is square-integrable To replicate Example 52 of the hanging bar with an appliedend force F we have to append to the above energy by the work done by the external forcethus arriving at the total potential energy functional

I[u] = intL

0

E

2[ux(x)]2 Adx minus F u(L) (69)

Minimizing this functional with respect to the unknown function u(x) is expected to yield thesought solution Unfortunately we still do not know how to minimize a functional with respectto a function which will be discussed next

mdashmdashmdashmdash

3Though not needed for our purposes here more information on Sobolev norms and spaces is available inAppendix D

38

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

62 Variations

Consider a functional I ∶ U rarr R such as the potential energy Analogous to the stationaritycondition of classical optimization problems a necessary condition for an extremum of I is thatthe first variation of I vanishes ie δI[u] = 0 (this is the stationarity condition) Like infunctional analysis we are going to compute the analog of a derivative to identify maxima andminima of the functional To this end we perturb the functional around a point by a smallvariation and verify if the functional increases or decreases Complicating is the fact that aldquopointrdquo is now in fact a function and a perturbation must be a variation of that function Tothis end we define the following

A variation δu(x) is an arbitrary function that represents admissi-ble changes of u(x) If Ω sub Rd is the domain of u isin U with boundarypartΩ and we seek solutions

u isin U = u isinHk(Ω) ∶ u = u on partΩD (610) x

u

0+L

uu+du

+

du

then the variation must satisfy

δu isin U0 = δu isinHk(Ω) ∶ δu = 0 on partΩD (611)

k can be determined from the specific form of I[u] (and δu and u must lie in the same functionspace since we want to be able to compute I[u + δu]) The fact that variations δu must vanishon the Dirichlet boundary partΩD stems from the need for perturbations that allow the perturbedfunction 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 partΩD

With this we define the first variation of I (ie the analog of a first derivative) as

δI[u] = limεrarr0

I[u + ε δu] minus I[u]ε

= d

dεI[u + ε δu]∣

εrarr0

(612)

Analogously higher-order variations are defined recursively via

δkI[u] = δ (δkminus1I) for k ge 2 (613)

Note that a Taylor expansion of a functional I can now be written as

I[u + δu] = I[u] + δI[u] + 1

2δ2I[u] + 1

3δ3I[u] + (614)

The following are helpful relations (which follow directly from the definition of variations) Forany functions u v isin U functionals Ii ∶ U rarr R and constants αi isin R we have the following rules

δ (α1I1 + α2I2) = α1 δI1 + α2 δI2

δ(I1I2) = (δI1)I2 + I1(δI2)

δdu

dx=

d

dxδu (assuming differentiability of u)

δ intΩ u dx = intΩ δu dx (assuming Ω is independent of u)

δI[u v ] =d

dεI[u+ε δu v+ε δv ]εrarr0 (for functionals depending on several functions)

39

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 62 Calculation of variations

Let us consider

I[u] = int1

0u2 dx so that we seek u isin U =H0(01) (615)

The first second and k-th variations respectively follow as

δI = limεrarr0

d

dεint

1

0(u + ε δu)2 dx = lim

εrarr0int

1

02(u + ε δu)δu dx = 2int

1

0uδu dx

δ2I = limεrarr0

δI[u + ε δu] = limεrarr0

d

dεint

1

02(u + ε δu) δu dx = 2int

1

0(δu)2 dx

δkI = 0 for all k gt 2

(616)

Notice that we automatically recover the Taylor series

I[u + δu] = int1

0(u + δu)2 dx = int

1

0u2 dx + int

1

02uδu dx + int

1

0(δu)2 dx

= I[u] + δI[u] + 1

2δ2I[u]

(617)

mdashmdashmdashmdash

The above gives the formal definition of variations which can always be applied to derivevariations of arbitrary order As a practical shortcut note that for a functional

I[u] = intΩf(unablaunabla2u ) dx (618)

we may write

I[u] = d

dεint

Ωf(u + ε δunablau + ε δnablaunabla2u + ε δnabla2u ) dx∣

εrarr0

= intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx

(619)

so that we may use from now on that

δI[u] = intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx (620)

The analogous of course also applies in higher dimensions ndash which will become important inour later boundary value problems For example if we seek a displacement field u(x) ∶ Ωrarr Rdthe functional becomes

I[u] = intΩf(ui uij uijk ) dV (621)

so we can write

I[u] = intΩf(unablau ) dx rArr δI[u] = int

Ω( partfpartui

δui +partf

partuijδuij ) dV (622)

using classical index notation

Now that we have established the basics of variational calculus let us exploit the variationalstructure of our boundary value problems ie their solutions u isin U can be interpreted asextremal points over U of a functional I[u]

40

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 63 Hanging bar under its own weight revisited (again I know)

Once more let us consider a bar of length L (Youngrsquos modulus E cross-sectional area Adensity ρ) that is hanging from the ceiling and deforming under its own weight (gravitationalacceleration g) with a constant force F applied to its free end at x = L u(x) denotes the 1Ddisplacement field where x runs from top to bottom of the bar The total potential energy isthus the total strain energy of the elastic bar minus the work done by the graviational bodyforces and the constant end force

I[u] = intL

0

E

2u2x(x)Adx minus int

L

0ρg u(x)Adx minus F u(L) (623)

and

u(x) isin U = u isinH1(0 L) ∶ u(0) = 0 (624)

The first variation yields

δI[u] = 0 = intL

0Eux(x) δux(x)Adx minus int

L

0ρg δu(x)Adx minus F δu(L)

= minusintL

0[Euxx(x) + ρg] δu(x)Adx +EAux(L) δu(L) minusEAux(0) δu(0) minus F δu(L)

(625)

where we used integration by parts of the first integral to arrive at the final form Noting thatδux(0) = 0 because of essential boundary condition the above reduces to

intL

0[Euxx(x) + ρg] δu(x)Adx minus [F minusEAux(L)] δu(L) = 0 forall δu isin U0 (626)

As we noted above recall that (626) must vanish for all variations δu isin U0 This implies thatwe must in fact have

Euxx(x) + ρg = 0 and EAux(L) = F (627)

These are exactly the governing equation and traction boundary condition that the bar needsto satisfy cf Eq (546) Hence we have shown that rendering (623) stationary with respectto u(x) isin U is equivalent to solving (627) with u(0) = 0 That is we have a strategy to replacethe solution of a differential equation by an optimization problem and we would in both casesobtain the exact or classical solution

To see if the solution is a maximizer or minimizer of I let us compute the second variation

δ2I[u] = intL

0Eδux δuxA dx = int

L

0E(δux)2 dV ge 0 forall δux (628)

Hence δ2I[u] gt 0 in general (unless δu equiv 0) and as in classical functional analysis we concludethat the extremum is a minimizer We thereby tactily assume that E gt 0 E lt 0 would lead tosolutions being unstable energy maxima which implies that E gt 0 is a (necessary and sufficient)stability condition

Finally notice that the first line here is exactly the principle of virtual work discussed beforecf Eq (547) if we replace δu by v Thus our variations here are the same as virtual displace-ments in the principle of virtual work and we obtain the latter automatically from the energyfunctional as the first variation

mdashmdashmdashmdash

41

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us revisit the hanging bar problem once more to observe a particular structure of theproblem that will come handy shortly For the hanging bar (assuming that E = const) noticethat we can rewrite the energy functional for short as

I[u] = 1

2B[uu] minusL[u] (629)

where we introduced a bilinear form B and a linear form L defined as

B[a b] = intΩE(grada)(grad b) dV and L[a] = int

Ωρga dV minus int

partΩD

ta dS (630)

where we included tractions t applied to the surface ΩD

The above is in fact a recipe for a more general class of variational problems (the same structureapplies to heat conduction electrostatics or mechanical equilibrium as discussed later) Let usconsider an energy functional of the general form (629) Taking variations shows that

I[u] = 1

2B[uu] minusL[u] rArr δI[u] = B[u δu] minusL[δu] (631)

For example in the hanging bar problem compare the energy functional (623) and the firstvariation (625) to confirm the above relation

For convenience let us adopt the following notation found in various textbooks on finite ele-ments the first variation is usually abbreviated as an operator acting on both the unknownfield u and its variation δu ie we write G ∶ U times U0 rarr V sub R with

G[u δu] = limεrarr0

d

dεI[u + δu] (632)

Without proof we just note that one of the beauties of the above variational problem (631)(based on a bilinear and a linear form) is that a unique minimizer exists by the Lax-Milgramtheorem (for more information see Appendix F) Recall that for the linear heat problem abovewe already showed that the solution is a unique (global) minimizer if E gt 0

63 Rayleigh-Ritz Method

One way to exploit the above variational structure right away is the so-called Rayleigh-Ritzapproach which introduces an approximation uh(x) asymp u(x) eg a polynomial series

uh(x) =n

suma=0

caxa (633)

with unknown coefficients ca isin R Any choice of (linearly independent) ansatz functions ispermissible including eg Fourier series of cosine or sine terms as long as they satisfy anyexisting essential boundary conditions and the differentiabilityintegrability requirements ofthe problem (eg a piecewise linear guess for uh(x) would not be permissible if its derivativesmust be square-integrable etc) For example for the hanging bar problem we need to enforcec0 = 0 because of the boundary condition u(0) = 0

Next we insert uh(x) into the total energy functional I which then depends only on the coef-ficients ca as the only unknowns We know that the exact equilibrium solution u(x) minimzies

42

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

the total potential energy I[u] Therefore we conclude that we may want to minmize I[uh]with respect to ca giving a system of equations

0 = partI[uh]

partcaforall a = 0 n (634)

Recall that we had expressed the energy functional in operator form so that

I[uh] = 1

2B[uh uh] minusL[uh] = 1

2B[

n

suma=0

caxan

sumb=0

cbxb] minusL[n

suma=0

caxa]

= 1

2

n

suma=0

n

sumb=0

cacbB[xa xb] minusn

suma=0

caL[xa](635)

where we exploited the (bi)linear nature of the two forms B[sdot sdot] and L[sdot] This leads to

partI[uh]partca

=n

sumb=0

cbB[xa xb] minusL[xa] = 0 forall a = 0 n (636)

This is a linear system of equations to be solved for the unknown coefficients cb (with b = 0 n)which we abbreviate as

n

sumb=0

Kabcb = F a for a = 1 n or Kc = F (637)

with K isin Rntimesn and F c isin Rn having components

Kab = B[xa xb] F a = L[xa] and c = (c0 cn)T (638)

Notice that this is fully analogous to (520) 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 problemwhich is more physical)

Example 64 Hanging bar by Rayleigh-Ritz

For the problem of the freely hanging bar (no end force applied here for brevity) the totalenergy potential with the approximate solution uh(x) from (633) becomes

I[uh] = intL

0

E

2(uhx)2(x)Adx minus int

L

0ρg uh(x)Adx with uh(x) =

n

suma=1

caxa (639)

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

partI[uh]partca

= 0 for a = 1 n (640)

As we know from (636) the resulting system of stationarity equations is Kc = F with

Kab = B[xa xb] = intL

0E(xa)x(xb)xAdx

= intL

0Eaxaminus1bxbminus1Adx = abEAint

L

0xa+bminus2 dx = abEA La+bminus1

a + b minus 1

(641)

43

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = L[xa] = intL

0ρg xaAdx = ρgAint

L

0xadx = ρgAL

a+1

a + 1 (642)

Solving the linear system Kc = F for any n ge 2 (feel free to try this as an exercise at home)yields

c1 = ρgEL c2 = minus ρg

2E and ca = 0 for all a gt 2 (643)

which is in fact the exact solution see Eq (317)

u(x) = ρg

2E(2L minus x)x (644)

This could have been expected since we chose polynomial ansatz functions in (633) takinguh(x) isin Pn The exact solution is a polynomial of order 2 If we choose uh(x) isin Pn withn ge 2 the exact solution is contained in the solution space within which we are looking for theoptimal solution As a consequence the Rayleigh-Ritz approach recovers the exact solution asthe energy minimizer Choosing any Pn with n gt 2 does not affect the solution since P2 sub Pnfor n gt 2 so the solution is still contained in the solution space and therefore found

mdashmdashmdashmdash

44

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

7 The weak form

In the previous sections we have seen how indirect methods aim to find approximate solutionsto boundary value problems by introducing an approximate (finite-dimensional) solution spaceand solving for the unknowns describing the sought approximate solution by enforcing thestrong form in some average sense (rather than at every grid point as in finite differences)We have also seen how this ldquoaverage senserdquo can be defined in various ways eg by enforcingthe governing PDE only at collocation points on average over subdomains or by minimizingthe total error made across the entire body Finally we have seen how most boundary valueproblems can be linked to a variational structure implying that the strong form is in fact thestationarity condition of an energy minimization problem This in turn allowed us to replacethe strong form by an optimization problem which was exploited eg by the Rayleigh-Ritzapproach It is important to keep in mind that the variational approach gave us something evenmore powerful it gave us the stationarity conditions of the minimization problem which wewill call the weak form Those stationarity conditions combined with an approximate functionspace where shown to guide us to a linear system of equations to be solved for the unknowncoefficients of the approximate solution Here we would like to explore the underlying structurefurther and finally come to the general mechanical boundary value problem to be solved bymethods such as the finite element technique

71 Classical and weak solutions

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

(E ux)x + s = 0 in Ω

u = u on partΩD

Eux = t on partΩN

(71)

This general strong form applies to the mechanical problem (where u is the displacement field EYoungrsquos modulus s = ρb body forces u is a prescribed displacement and t a prescribed surfacetraction) as well as to electrical problems (where u denotes the electric voltage potential E isthe 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 andt 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 tothe above problem let us define that a function u is of class Ck(Ω) (or in the function spaceCk(Ω)) with an integer k ge 0 if it is k times continuously differentiable over Ω (ie u possessesderivatives up to the kth order and these derivatives are continuous functions) Hence thestrong form (71) imposes the requirement

u isin C2(Ω) (72)

That is we require the function to be twice continuously differentiable in order for the strongform to make sense4

4To be exact the strong form in fact requires that u isin C2(Ω) cap C0

(Ω) ie functions u must be twicecontinuously differentiable within Ω and at least continuous up to the boundary partΩ But this detail is of minorimportance here and in the following

45

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 71 Ck-continuity

Any kth-order polynomial u(x) with k ge 0 is generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks or shocks (or discontinuities in the BCsICs)we usually assume that the classical solution fields are Cinfin(Ω) so we may take derivativesotherwise derivatives exist almost everywhere (ae)

mdashmdashmdashmdash

As we showed previously the solution u can alternatively be found by using a variationalapproach viz as the minimizer of I[u] within a function space U which we write as

u = arg minI[u] ∶ u isin U with I[u] = 1

2B[uu] minusL[u] (73)

whose stationarity condition is

δI[u] = G[u δu] = B[u δu] minusL[δu] = 0 for all δu isin U0(Ω) (74)

Therefore we can reformulate the problem (71) (without in principle knowing anything aboutvariational calculus) as

find u isin U st G[u v] = B[u v] minusL[v] = 0 for all v isin U0(Ω) (75)

This is called Galerkinrsquos weak form and the resulting solution u is called weak solutionThis terminology has the following origin Notice that we no longer seek solutions u isin C2(Ω)but instead we seek solutions u within

U = u isinH1(Ω) ∶ u = u on partΩD (76)

which satisfy (75) for all v isin U0(Ω) There is one essential difference between the weak andstrong form solutions u of the weak form are required to be u isin H1(Ω) whereas the strongform required solutions u to be u isin C2(Ω) The latter is a considerably stronger constraintThus we have weakenedrelaxed the conditions on the family of solutions which is why theabove is called the weak form

To see this take eg functions u that are piecewise-linear (like a zig-zag curve) The firstderivative is piecewise-constant and is therefore square-integrable (we can easily integrate apiecewise-constant function) hence u satisfies u isin H1(Ω) By contrast if you take a secondderivative differentiating the piecewise-constant first derivative leads to a sum of delta functions(which are certainly not continuous functions) so u notin C2(Ω) Such a function does not qualifyas a solution to the strong form as the governing PDE makes little sense with sums of deltafunctions Hence piecewise-linear functions qualify as approximate solutions of the weak formbut not necessarily of the strong form Thus we have relaxed the requirements on our function

Recall that if v is interpreted as a virtual displacement field then (75) is equivalent to theprinciple of virtual work and the form agrees with (542) (or (547) for the 1D bar problem)This is important because even if no variational basis exists we could still formulate the weakform by starting from the principle of virtual work Whether or not a variational structure

46

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

exists for a given strong form can be verified by the use of Vainbergrsquos theorem summarizedin Appendix G

Computationally solving the weak form is usually preferable over the strong form for (at least)two reasons First u isin H1(Ω) is simpler to satisfy than u isin C2(Ω) (eg piecewise linearinterpolation is sufficient in the weak form but not in the strong form) Second as we showedalready for the Rayleigh-Ritz approach the weak form boils down to solving a system of algebraicequations (rather than solving PDEs)

72 Equivalence of strong and weak forms

We now have two equivalent principles for finding the solution of the BVP described by (71)

Given a function space

U = u isinHk(Ω) ∶ u = u on partΩD (77)

a functional I ∶ U rarr R and the associated bilinear form B(sdot sdot) and linear form L(sdot) both definedon functions u isin U we seek to

(A) find u isin U st u = arg min I[u] (78)

(B) find u isin U st B[u v] = L[v] for all v isin U0 (79)

We know that the two have a unique connection since δI = B[u δu]minusL[δu] Thus we also knowthat

(A)hArr (B) (710)

with a unique solution for this particular type of problem (if it is stable ie if E gt 0)

73 Approximate solutions

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

Uh sub U (711)

in which we seek a solution uh where h stands for the discretization size

An n-dimensional space Uh is defined by a set of n basis or shape functions N1 Nnalong with the approximate functions

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (712)

When we use the same approximation space for uh and vh we make the so-called the Bubnov-Galerkin approximation Alternatively one can choose different function spaces for theapproximations uh and vh which leads to the so-called Petrov-Galerkin method The lattergains importance when solving overunderconstrained problems since it allows us to control thenumber of equations by the choice of the dimension of the space of vh

47

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Assume that the approximation space is chosen wisely so the the exact solution can be attainedwith infinite refinement ie we assume that

for all u isin U there exists uh(v) isin Uh such that limhrarr0

∥uh(v) minus u∥ = 0 (713)

Then we can formulate the discrete problem

(C) find uh isin Uh st B[uh vh] = L[vh] for all vh isin Uh0 (714)

It is a relatively simple exercise to verify that the above form reduces again to a linear systemof equations to be solved To this end insert the approximations (712) into (714) to obtain

B [n

suma=1

uaNan

sumb=1

vbN b] = L [n

sumb=1

vbN b] for all vb (715)

Exploiting that B is bilinear and L is linear lets us transform the above into

n

sumb=1

vb (n

suma=1

uaB [NaN b] minusL [N b]) = 0 for all vb (716)

Since this must hold for all (admissible) vb we conclude that

n

suma=1

uaB [NaN b] = L [N b] for b = 1 n (717)

This is a linear system to be solved for ua (a = 1 n) Comparison to Eq (636) shows thatthe linear equations are identical to those derived for the Rayleigh-Ritz method This is in factnot surprising for the Rayleigh-Ritz method we inserted the approximate solution uh directlyinto I and minimized I[uh] with respect to the unknown coefficients ca Here we first obtainedthe stationarity equation G[u v] = 0 from I[u] exactly and then inserted uh and vh Yet if wechoose the very same function space for uh and vh then both methods lead to the very samesystem of equations Thus we may also re-interpret the Bubnov-Galerkin scheme as computingthe coefficients ua as the minimizers of I[uh]

As before let us define a vector of all unknown coefficients

Uh = u1 unT (718)

Further we define a (symmetric) matrix K isin Rntimesn and vector F isin Rn with components

Kab = B [NaN b] F b = L [N b] (719)

Then the linear system reads

KUh = F hArr Kabub = F a (720)

Note that this system of equations is identical to (638) which was derived by the Rayleigh-Ritzmethod

48

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

8 The mechanical variational problem at small strains

81 General case

After all those precursors let us analyze the mechanical variational problem and start with thesimplest problem quasistatics in linearized kinematics Here the strong form is

σijj + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(81)

and in the special case of linear elasticity (using σij = Cijklεkl = Cijklukl) the above strongform reduces to

(Cijklukl)j + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(82)

From this we see that classical solutions must satisfy u isin C2(Ω)

In the following let us first treat the general case ndash based on (81) ndash and then study linearelasticity ndash given by (82) ndash as a special case The total potential energy functional associatedwith (81) is

I[u] = intΩW (ε) dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parainternal stored energy

minus [intΩρb sdotu dV + int

partΩNt sdotu dS]

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parawork by external forces

(83)

and we seek displacement field solutions

u = arg minI[u] ∶ u = u on partΩD (84)

For the special case of linear elasticity we know that the strain energy density takes the form

W (ε) = 1

2εijCijklεkl =

1

2uijCijklukl (85)

from which we may conclude that the variational problem seeks solutions u isin U subH1(Ω)

We compute the first variation defining sym(sdot) = 12(sdot + sdot

T)

δI[u] = intΩ

partW

partεijsym(δuij) dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS

= intΩσijδuij dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS = 0 forall δu isin U0

(86)

where we used σij = partW partεij and σij = σji (by angular momentum balance) This form isindeed equivalent to the principle of virtual work if we replace δui by vi see Eq (542)

Application of the divergence theorem to the first term above proves the equivalence of the twoforms since

δI[u] = 0 = intpartΩN

(σijnj minus ti)δuidS minus intΩ(σijj + ρbi)δuidV forall δu isin U0 (87)

49

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since this must hold for all arbitrary variations δu isin U0 the two terms in brackets must vanishwhich yields indeed the strong form (81)

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

G(uv) = A(uv) minusL(v) = 0 forall v isin U0 (88)

with

A[uv] = intΩσijvij dV and L[v] = int

ΩρbividV + int

partΩNtividS (89)

Note that the dependence of A on u is not directly obvious but the stresses depend throughthe strains on the displacement field ie σij = σij(ε) and εij = ( sym(uij)) A(sdot sdot) is thereforein general not a bilinear operator while L(sdot) is a linear operator

In the special case of linear elasticity

σij = Cijklεkl = Cijklukl rArr σijvij = Cijkluklvij = Cijkluijvkl (810)

exploiting the symmetries Cijkl = Cijlk = Cklij This leads to

A[uv] = intΩσijvij dV = int

ΩCijkluijvkl = B[uv] (811)

Thus we see that for linear elasticity A is indeed a bilinear operator

Next we introduce the discrete weak form A(uhvh) minus L(vh) = 0 with the Bubnov-Galerkinapproximation

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (812)

so that we arrive at (in component form)

n

suma=1

vai [intΩσij(nablauh)Na

j dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para[F int]

ai

minusintΩρbiN

adV minus intpartΩN

tiNadS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraminus[F ext]

ai

] = 0 for all adm va (813)

which is equivalent to

Fint(Uh) minusFext = 0 with Uh = u1 unT (814)

where we introduced FintFext isin Rdsdotn with components

F ainti = intΩσij(nablauh)Na

j dV and F aexti = intΩρbiN

adV + intpartΩN

tiNadS (815)

As mentioned above for the special case of linear elasticity we have a bilinear form describingthe weak form Inserting the approximate fields (815) then becomes

F ainti = intΩCijkluhklN

aj dV =

n

sumb=1int

ΩCijklubkN

blN

aj dV =

n

sumb=1

ubk intΩCijklNa

jNbl dV

=n

sumb=1

Kabik u

bk with Kab

ik = intΩCijklNa

jNbl dV

(816)

50

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so we arrive at a linear problem to be solved for the unknown coefficients Uh = u1 un

Fint =KUh rArr KUh minusFext = 0 rArr Uh =Kminus1Fext if detK ne 0 (817)

As before matrix K isin Rdsdotntimesdsdotn is by definition symmetric and positive definite as long as theelastic modulus tensor C is strongly elliptic (ie for stable elastic moduli)

For computational purposes notice that vectors Uh isin Rdsdotn and FintFext isin Rdsdotn eg in 3D arerespectively (dropping the superscripts on F for universality)

[Uh] =⎛⎜⎝

u1

un

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

u11

u12

u13

un1un2un3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

[F ] =⎛⎜⎝

F 1

F n

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

F 11

F 12

F 13

Fn1Fn2Fn3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(818)

Here we used 1-index notation like in Matlab (ie we sum over a = 1 n and not a =0 n minus 1 as eg in CC++) so that

uai is the (d sdot (a minus 1) + i)th component of vector Uh in d dimensions (819)

Similarly we apply the same rule to the rows and columns of matrix K so that

Kabik is the component at (d sdot (aminus 1)+ i d sdot (bminus 1)+ k) of matrix K in d dimensions (820)

Note that we now use super- and subscripts on K and F since our unknown coefficients arevector-valued here Any superscript a refers to the a-th coefficient while a subscript i refers tothe i-th component of the coefficient

82 Linear elasticity

In the simplified framework of linear elasticity (already introduced above) the governing equa-tions are oftentimes written in a more condensed version that allows for a simple extraction ofmatrix K We here start with

uh(x) =n

suma=1

uaNa(x) rArr εhij =1

2(uhij + uhji) =

1

2

n

suma=1

[uaiNaj(x) + uajNa

i(x)] (821)

which allows us to write (eg in 3D)

[ε] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

ε11

ε22

ε33

2ε23

2ε13

2ε12

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

N11 0 0 N2

1 0 0 Nn1 0 0

0 N12 0 0 N2

2 0 0 Nn2 0

0 0 N13 0 0 N2

3 0 0 Nn3

0 N13 N1

2 0 N23 N2

2 0 Nn3 Nn

2

N13 0 N1

1 N23 0 N2

1 Nn3 0 Nn

1

N12 N1

1 0 N22 N2

1 0 Nn2 Nn

1 0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

B

Uh (822)

where we introduced the matrix B isin R3ntimes6 in 3D (and analogously B isin R2nsdot3 in 2D) in order towrite for short

ε(x) =B(x)Uh (823)

51

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here use Voigt notation to condense the strain tensor into a strain vector with only uniquecomponents Since ε is symmetric one usually stores only the six independent components ina vector which leads to the above Voigt notation The factor 2 in the shear strain componentsin Voigt notation (which is not found in the stresses) is required so the energy density isconveniently given by W = 1

2σijεij =12 ε sdot σ

Hence we may define the stress vector σ in Voigt notation and the associated linear elasticconstitutive law as (again in in 3D)

σ = (σ11 σ22 σ33 σ23 σ13 σ12)T rArr σ = E ε rArr σ = EBUh (824)

where E denotes an elastic stiffness matrix whose components are deduced from C and followfrom the definitions of stresses and strains For example for an isotropic linear elastic materialcharacterized by Youngrsquos modulus E and Poissonrsquos ratio ν the E-matrix in 3D reads

[E3D] = E

(1 + ν)(1 minus 2ν)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 minus ν ν ν 0 0 0ν 1 minus ν ν 0 0 0ν ν 1 minus ν 0 0 0

0 0 0 1minus2ν2 0 0

0 0 0 0 1minus2ν2 0

0 0 0 0 0 1minus2ν2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(825)

while the 2D version depends on the plane stress vs plane strain scenario

[Eplane stress] =E

1 minus ν2

⎛⎜⎝

1 ν 0ν 1 0

0 0 1minusν2

⎞⎟⎠ [Eplane strain] =

E

(1 + ν)(1 minus 2ν)

⎛⎜⎝

1 minus ν ν 0ν 1 minus ν 0

0 0 1minus2ν2

⎞⎟⎠

(826)

Analogous matrices can be derived for other elasticities eg for general linear elastic anisotropicmedia

Altogether we thus arrive at the stored internal energy

I int = intΩW dV = int

Ω

1

2σ sdot ε dV = int

Ω

1

2ε sdotE ε dV = 1

2Uh sdot int

ΩBTEB dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraK

Uh (827)

so that we observe that

I int = 1

2Uh sdotKUh rArr F int = partI

int

partUh=KUh (828)

and the matrix K can be computed quickly as

K = intΩBTEB dV (829)

with B from (822) and E depending on the material model (note that B contains only ba-sistrial function derivatives so that ndash once a basis Na for a = 1 n has been chosen ndash B isknown and can be compted)

52

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

9 Interpolation spaces

So far we have assumed that the approximate solution uh (or uh in higher dimensions) is basedon a choice of basisshape functions Na(x) with a = 1 n Before discussing particular suchbasis functions it is important to consider what conditions those shape functions Na(x) mustsatisfy We have seen already that polynomial or Fourier series may lead to simpler integralswhen computing matrixK and right-hand-side vector F Yet this is only an observation and norigorous constraint on the basis functions Let us here discuss the requirements of appropriateinterpolation spaces

91 Shape functions

We consider approximations uh isin Uh of the type

uh(x) =n

suma=1

uaNa(x) (91)

which are defined through the shape functions Na(x)

In general there are two possible choices for the nature of Na(x)

global shape functions are defined everywhere in Ω ie ∣suppNa∣ sim ∣Ω∣eg polynomials Na(x) = xa or trigonometric polynomials Na(x) = cos (π(a minus 1)x)

local shape functions are defined only locally ∣suppNa∣ ≪ ∣Ω∣eg picewise linear shape functions

Here we introduced the support of a continuous function f ∶ Ω rarr R as the set of all points5

where f(x) ne 0 ie

supp f = x isin Ω ∶ f(x) ne 0 (92)

This means that f(x) = 0 for all points outside the support ie for x isin Ω supp f

x

x

Na Na

suppNa suppNa

local shape functions global shape functions

Irrespective of global or local shape function choices for any set of shape functions the followingshape function properties must be satisfied

(I) For any x isin Ω there must be at least one a with 1 le a le n such that Na(x) ne 0 (iethe whole domain must be covered) Otherwise no approximation would exist in certainregions or at certain points in the body

5To be more specific the support is the closure in Ω of the set of all points with non-zero f(x) Yet this isof minor importance here so we will not make that differentiation

53

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(II) The chosen shape functions Na should allow us in some ldquosimplerdquo manner to satisfy anyDirichlet boundary conditions where required (recall that uh should satisfy the essentialBCs)

(III) All shape functions must be linearly independent ie

n

suma=1

uaNa = 0 hArr ua = 0 for all a = 1 n (93)

In other words given any function uh isin Uh there exists a unique set of parametersu1 un such that

uh =n

suma=1

uaNa (94)

Linear independence is important since it avoids ill-posed problems For example takeUh = P2 and N1N2N3 = 1 x x2 so that uh = u1N1 + u2N2 + u3N3 Hence if eguh = a+bx then we immediately conclude that u1 = a u2 = b u3 = 0 uniquely By contrastif we chose the not linearly independent functions N1N2N3 = 1 x1+x there wouldbe no unique choice of the coefficients since uh = a + bx in this case would have solutionsu1 = a minus s u2 = b minus s u3 = s for arbitrary s isin R

More generally if there existed a set α1 αn ne 0 such that sumna=1 αaNa = 0 then this

set of parameters could be added on top of any solution u1 un such that

uh =n

suma=1

uaNa =n

suma=1

(ua + αa)Na = uhα (95)

which means both uh and uhα are solutions (hence the problem is not well-posed)

For these reasons we must define shape functions that are linearly independent If func-tions N1 Nn are indeed linearly independent then we call them a basis of Uh

(IV) The shape functions Na must satisfy the differentiabilityintegrability requirements of theweak form (this depends on the problem to be solved as discussed before in the contextof the weak form in Section 7)

(V) The shape functions must possess ldquosufficient approximation powerrdquo In other wordsconsider uh isin Uh sub U we should ensure that uh = sumna=1 u

aNa rarr u as n rarr infin Thisrequirement is important and will be discussed below in Section 93

92 Approximation power and completeness

Condition (V) above tells us that for an approximation uh to converge to u we must pick anapproximate function space Uh which gives the solution uh ldquoa chance to convergerdquo to u Forexample assume you aim to approximate a high-order polynomial u isin Pn (with n ≫ 1) by anapproximation uh using shape functions 1 x x2 x3 xn This is expected to converge asnrarrinfin because the coefficients of u will approach the coefficients of uh However choosing thebasis functions poorly as 1 x x3 xn (notice the x2-term is omitted) will never converge asnrarrinfin If all terms are present and none is omitted then polynomials are expected to convergeby the following theorem

Weierstrass approximation theorem Given a continuous function f ∶ [a b] sub R rarr R andany scalar ε gt 0 then there exists a polynomial

pn(x) isin Pinfin such that ∣f(x) minus pn(x)∣ lt ε for all x isin [a b] (96)

54

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This means every continuous function u can be approximated by a polynomial approximiationuh isin Pn to within any level of accuracy Therefore N i = 1 x x2 x3 ie the polynomialsin R is a suitable choice for the shape functions that satisfy the so-called completenessproperty (and we have shown their linear independence)

Note that as discussed above one cannot omit any intermediate-order terms from the set

1 x x2 x3 (97)

As an extension the Weierstrass approximation theorem also applies to trigonometric poly-nomials (cf Fourier series)

93 Completeness in higher dimensions

When going to higher dimensions we need to specify what complete polynomials are A poly-nomial approximation in Rd is complete up to order q if it contains independently allmonomials xα with ∣α∣ = α1 + + αd le q ie using multi-indices we write

uh =q

sumβ=0

sum∣α∣=β

cαxα (98)

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

1D For d = 1 the above reduces to

uh =q

sumβ=0

sumα=β

cαxα =

q

sumβ=0

cβxβ (99)

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 93

2D for d = 2 with coordinates x1 and x2 we use the above definition of complete polynomialsFrom the above definition we conclude

uh =q

sumβ=0

sumα1+α2=β

c(α1α2)xα11 xα2

2 (910)

This results in the following bases for increasing q-values

q = 0 ∶ 1q = 1 ∶ 1 x1 x2q = 2 ∶ 1 x1 x2 x

21 x1x2 x

22

q = 3 ∶ 1 x1 x2 x21 x1x2 x

22 x

31 x

21x2 x1x

22 x

32

(911)

The number of independent monomials in 2D is (q + 1)(q + 2)2

The same definition can be extended to higher dimensions

55

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

10 The Finite Element Method

All of the shape functions discussed in previous sections were global ie they were defined overthe entire body Ω This is quite disadvantageous for (at least) two reasons First using globalshape functions such as polynomials xa (for a = 0 n) results in a dense matrix K whenforming the linear system to be solved for the unknown coefficients by the various methodsintroduced before That is because integrals of the type B[NaN b] ne 0 in general The denseK-matrix creates high computational costs (by contrast a sparse matrix admits more efficientsolving of the system of equations) Second global shape functions are problematic when itcomes to Dirichlet BCs imagine eg prescribing the displacements at both ends of a 1D barEnforcing uh(0) = 0 is simple whereas setting uh(0) = 0 and uh(L) = ∆u is more involved asthe latter leads to a condition involving all unknown coefficients

uh(x) =n

suma=0

uaNa(x) rArr uh(0) = u0 = 0 uh(L) =n

suma=1

uaNa(L) = ∆u (101)

Such global coefficient constraints as given by the latter form are especially cumbersome whendealing with multiple essential BCs in higher dimensions The motivation for the finite elementmethod was hence to construct local shape functions that admit the relatively easy implemen-tation of essential BCs (while also resulting in sparse matrices)

The main idea is to introduce a discretization Th which splits Ωinto a finite number of subdomains Ωe the so-called elementssuch that

Ωe sube Ω Ω =⋃e

Ωe partΩ sube⋃epartΩe (102)

The discretization Th is defined by the collection of nodes andelements it is called a mesh

nodeelement

mesh

Mathematically (and computationally) a finite element (FE) is an object that has

(i) a (sub)domain Ωe sube Ω

(ii) a space of shape functions Nae (defined within Ωe and suppNa

e = Ωe)

(iii) a set of degrees of freedom (dofs) viz the uae-coefficients associated with those Nae

The Finite Element Method (FEM) defines continuous piecewise-polynomial shape func-tions such that

Na(xb) = δab for all a b isin 1 n (103)

In other words each shape function Na is 1 when evaluated at exactly one node a and itvanishes at all other nodes This is the defining relation that determines the shape functionsNotice that if we evaluate the approximation uh(x) at one of the nodes xb then

uh(xb) =n

suma=1

uaNa(xb) =n

suma=1

uaδab = ub (104)

That is the coefficient ub can now be identified as the value of approximate function uh atnode b This makes for a very beneficial interpretation of the (yet to be determined) shapefunction coefficients

56

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us check if FE shape functions satisfying (103) also satisfy the requirements for shapefunctions discussed in Section 91

(I) is automatically satisfied if x isin Ω then we must have x isin Ωe for some element e Conse-quently there must be element shape functions Na(x) ne 0

(II) can be satisfied (approximately) by fixing those degrees of freedom associated with theboundary nodes (while leaving the entire nodes unaffected and vice-versa) For example ifour 1D bar is discretized into n nodes and nminus1 elements such that uh(x) = sumna=1 u

aNa(x)then imposing uh(0) = 0 and uh(L) = ∆u is simply enforced by fixing the coefficientsu1 = 0 and un = ∆u

(III) Linear independence can be shown by contradiction assume that uh(x) = 0 for all x isin Ωwhile there is indeed some ua ne 0 for 1 le a le n Now evaluate uh at any node b

0 = uh(xb) =n

suma=1

uaNa(xb) = ub rArr ub = 0 forall b = 1 n (105)

which contradicts the assumption that some ua ne 0 Thus (103) ensures that we havelinearly independent shape functions

(IV) Integrabilitydifferentiability requirements depend on the variational problem to be solvedand must be ensured For example for the mechanical BVP we have seen that Uh sub H1ie 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 onthe type of piecewise-polynomial interpolation functions to be used

(V) Completeness requires uh rarr u (and thus Uh rarr U) to within desirable accuracy In the FEmethod one commonly enriches Uh by one of the following methods (shown below)

h-refinement refining the discretization Th while keeping the polynomial interpo-lation order within elements fixed (ie decreasing the element size while using thesame type of shape functions)

p-refinement increasing the polynomial interpolation order within a fixed dis-cretization Th (ie keeping the elements but using higher-order polynomial shapefunctions)

hp-refinement a combination of the two above (ie increasing the number ofelements while also increasing the polynomial order of shape functions)

r-refinement repositioning of nodes while keeping the discretization and interpo-lation order fixed (eg moving nodes into regions requiring higher accuracy)

element element element

element

original mesh h-refinement p-refinement r-refinement

linear interpol

linear interpol

quadratic interpolation

linear interpol

When using either of these refinement techniques appropriately within the FE context wemay expect that Uh rarr U and hence that the approximate solution uh converges to the exactsolution u

57

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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 isin Ω so that within a small h-neighborhood of x(and h being interpretable as the element size) we may expand

u(x + h) = u(x) + huprime(x) + 1

2h2uprimeprime(x) + + 1

qhqu(q)(x) +O(hq+1) (106)

Assume that Uh contains all polynomials complete up to degree q (ie Uh = Pq) then thereexists

uh isin Uh such that u(x) = uh(x) +O(hq+1) (107)

Let p denote the highest derivative in the weak form then

dpu

dxp= dpuh

dxp+O(hq+1minusp) (108)

For the solution to converge as h rarr 0 we need the errors to be at least of order O(h) whichimplies that we must have q + 1 minus p ge 1 Thus we must ensure that

q ge p (109)

For example for the mechanicalthermalelectromagnetic variational problem discussed previ-ously we had the requirement uuh isinH1(Ω) since the energy and resulting weak form containedfirst derivatives of u only Hence we have p = 1 and interpolations must satisfy q ge p = 1 There-fore shape functions to be used for solving mechanical BVPs require at least piecewise-linearshape functions

58

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

11 Finite element spaces polynomial shape functions in 1D

Let us start with the simplest of all choices continuous piecewise-polynomial interpolation func-tions As explained above we need q ge 1 since p = 1 for the mechanicalthermalelectromagneticvariational problem ie we need at least linear interpolation within elements

111 2-node bar element

The simplest example for our discussion of shape functions is the2-node bar element in 1D Since the element has only two nodes(which we call nodes 1 and 2) we employ shape functions for theinterpolation of the element dofs Ue = u1

e u2e so that

uhe(x) = N1e (x)u1

e +N2e (x)u2

e (111)

and we must have uhe(0) = u1e and uhe(∆x) = u2

e for an elementdefined on x isin [0∆x] as shown on the right

1 2

Dx

1u 2u

x

2N 1Ne e

e e

We know that the shape functions must be linear polynomials (q = 1) so that uhe(x) = c1e + c2

ex(we have only two nodes and therefore must have an interpolation with two coefficients)

Imposing those two constraints implies

uhe(0) = c1e = u1

e uhe(∆x) = c1e + c2

e∆x = u2e hArr c2

e =u2e minus c1

∆x= u

2e minus u1

e

∆x(112)

and hence

uhe(x) = c1e + c2

ex = (1 minus x

∆x)u1

e +x

∆xu2e (113)

Comparison with (111) yields the element shape functions (plotted above) as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (114)

Notice that these functions automatically satisfy (103) ie each shape function a is 1 at nodea and 0 at the respective other node

Differentiating the above linear shape functions yields

N1ex(x) =

d

dx(1 minus x

∆x) = minus 1

∆x N2

ex(x) =d

dx

x

∆x= 1

∆x (115)

so that the (only non-zero) axial strain inside the bar element is constant since

εhxx = uhex(x) =n

sumi=1

uieNiex(x) = u1

eN1ex(x) + u2

eN2ex(x) =

u2e minus u1

e

∆x= const (116)

If we assume a linear elastic bar so σ = E ε we obtain from (815)

F ainte = intΩσxx(εhxx)Na

xdV = int∆x

0Eu2e minus u1

e

∆xNaxA dx = EA

∆x(u2

e minus u1e)int

∆x

0Naxdx (117)

and inserting the constant shape function derivatives finally yields

F 1inte =

EA

∆x(u2

e minus u1e) (minus

1

∆x)∆x = minusEA

∆x(u2

e minus u1e) and F 2

int = minusF 1int (118)

59

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The components of the element stiffness matrix Ke follow as

[Ke] = [partF iint

partuje] = EA

∆x( 1 minus1minus1 1

) (119)

which has the typical form known from 1D assemblies of linear springs of effective stiffnessk = EA∆x We could alternatively have used our definition obtained from the linear elasticmechanical weak form

Kab = intΩeB[NaN b] dV = int

∆x

0ENa

exNbexAdx = EA∆xNa

exNbex =

EA

∆x

⎧⎪⎪⎨⎪⎪⎩

1 if a = bminus1 else

(1110)

where inserting the constant shape function derivatives again led to (119)

Note that the two nodal forces F 1inte and F 2

inte depend linearly on the nodal displacements (ascan be expected from a linear elastic bar) so that

[Finte] = (F1int

F 2int

) = EA∆x

( 1 minus1minus1 1

)(u1e

u2e) hArr Finte =KeUe (1111)

Further we realize that indeed

Ie(Ue) = int∆x

0

E

2(εhxx)

2Adx = 1

2Ue sdotKeUe so Finte =

partIepartUe

(1112)

So far we have only considered axial (ie 1D) deformation of the bar element In general thebar may be part of a 2D or 3D structure so it is important to generalize the above frameworkto higher dimensions This can be achieved by projecting the 2D or 3D displacements of theelement nodes onto the orientation of the bar element as follows

In d dimensions the nodal displacements of the bar element are

Ue = (u1eu

2e)

Twith uae = (uae1 uaed)

T (1113)

That is in 2D we deal with four nodal dofs (viz the u1- and u2-displacement components ofeach of the two nodes in the x1- and x2-directions respectively) while in 3D we have six nodaldofs (the u1- u2- and u3-displacement components of each of the two nodes)

We obtain the orientation of the bar element in space from its

nodal coordinates in the reference configuration Xe = (x1ex

2e)

T

such that ∆xe = ∥x2e minusx1

e∥ In 2D the angle with the x1-axis isobtained from geometry as

ϕe = arctan⎛⎝x2e2 minus x1

e2

x2e1 minus x1

e1

⎞⎠ (1114)

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

1(xe1

1 x )e2

2(xe1

2 x )e2

Dxe

The projection of the nodal displacements Ue onto the bar axis identifies the axial displacementsUe of the two nodes (written with a tilde to avoid ambiguity) as

(u1e

u2e) = (cosϕe sinϕe 0 0

0 0 cosϕe sinϕe)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[R(ϕe)]

⎛⎜⎜⎜⎜⎝

u1e1

u1e2

u2e1

u2e2

⎞⎟⎟⎟⎟⎠

hArr Ue =R(ϕe)Ue (1115)

60

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice further that the resulting axial forces acting at the two nodes Finte = (F 1inte F

2inte)

T

can be decomposed into the nodal forces in 2D Finte = (F 1inte1 F

1inte2 F

2inte1 F

2inte2)

T via

⎛⎜⎜⎜⎜⎝

F 1inte1

F 1inte2

F 2inte1

F 2inte2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

cosϕe 0sinϕe 0

0 cosϕe0 sinϕe

⎞⎟⎟⎟⎠(F 1

inte

F 2inte

) hArr Finte =RT(ϕe)Finte (1116)

Recall that we showed

Finte =KeUe rArr RT(ϕe)Finte =KeRT(ϕe)Ue hArr Finte =R(ϕe)KeR

T(ϕe)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

=Ke

Ue

with the axial stiffness matrix determined above as

[Ke] =EA

∆xe( 1 minus1minus1 1

) (1117)

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

R(ϕe)KeRT(ϕe) = Ke hArr Ke =RT(ϕe)KeR(ϕe) (1118)

Without derivation we mention that the same relations apply in 3D with the rotation matrix

R = ( l m n 0 0 00 0 0 l m n

) (1119)

where l m and n are respectively the direction cosines with the x1- x2- and x3-axes iel = cosang(xe1) where x is the unit vector pointing along the bar axis m = cosang(xe2) etc

Example 111 Truss consisting of three bars in 2D

Consider a truss consisting of three linear elastic bars connected byhinges and supported by a rigid impenetrable ground as shownon the right Loading the truss by a vertical force F we seek thedisplacements of the three nodal hinges

We first compute the stiffness matrix of each bar element individ-ually accounting for two displacement dofs per node By reusingthe stiffness matrix derived in (1117) and (1118) the horizontalbar (bar 1 connecting nodes 1 and 2) with ϕe = 0 has

L L

L1 2

3

F

sbquoƒ

EA

[K1] =RT(0)KeR(0) = EAL

⎛⎜⎜⎜⎝

1 0 minus1 00 0 0 0minus1 0 1 00 0 0 0

⎞⎟⎟⎟⎠ (1120)

Similarly bar 2 on the right (connecting nodes 2 and 3) with ϕe = 2π3 has

[K2] =RT(2π3 )KeR(2π

3 ) = EA4L

⎛⎜⎜⎜⎜⎝

1 minusradic

3 minus1radic

3

minusradic

3 3radic

3 minus3

minus1radic

3 1 minusradic

3radic3 minus3 minus

radic3 3

⎞⎟⎟⎟⎟⎠

(1121)

61

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly bar 3 on the left (connecting nodes 1 and 3) with ϕe = π3 has

[K3] =RT(π3 )KeR(π3 ) =EA

4L

⎛⎜⎜⎜⎜⎝

1radic

3 minus1 minusradic

3radic3 3 minus

radic3 minus3

minus1 minusradic

3 1radic

3

minusradic

3 minus3radic

3 3

⎞⎟⎟⎟⎟⎠

(1122)

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 barrsquosreference axis with the x1-axis with the first node being the center of rotation)

mdashmdashmdashmdash

112 Problem assembly

In order to solve the above truss problem we need to formulate the system of equations tobe solved This requires an important step known as the assembly of the global stiffnessmatrix Each of the above stiffness matrices represents a local stiffness matrix ie each ofthe matrices K1 K2 and K3 are each valid only for one particular element and the matricesare therefore associated with the displacements of the nodes of the respective elements In orderto solve the truss problem we need to formulate the global system of equations for the unknowndisplacements U = (u1

1 u12 u

21 u

22 u

31 u

32)T of the three nodes

Notice that to this end we need to differentiate between local and global dofs eg beamelement 2 (on the right) locally links its two nodes with dofs (u1

e1 u1e2) and (u1

e1 u1e2) However

taking the global view it is linking the global nodes 2 and 3 Hence local node 1 correspondsto the global node 2 and local node 2 corresponds to the global node 3 This local-to-globalmap is an essential book-keeping task within the FEM To avoid confusion we introduced thesubscripts e for local element-internal quantities For example for element 2 we have u1

e = u2

and u2e = u3 For element 3 we have analogously u1

e = u1 and u2e = u3 etc

Example 112 Three-bar truss in 2D (continued)

Let us continue Problem 111 using the above local-to-global map Now that we have understoodhow local nodes (1 and 2 for each beam element) are linked to global nodes (1 2 and 3) wecan assemble the global system All we must do is add the components of the local stiffnessmatrices to the right spots in the global stiffness matrix For example K1 (linking nodes 1 and2) in the global system with U = (u1

1 u12 u

21 u

22 u

31 u

32)T becomes

[K1]global =EA

L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 minus1 0 0 00 0 0 0 0 0minus1 0 1 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1123)

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

[K2]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 0 0 0 0 0

0 0 1 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

0 0 minus1radic

3 1 minusradic

3

0 0radic

3 minus3 minusradic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1124)

62

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

1radic

3 0 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

0 0 0 0 0 00 0 0 0 0 0

minus1 minusradic

3 0 0 1radic

3

minusradic

3 minus3 0 0radic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1125)

Now we obtain the global stiffness matrix simply from the assembly of the local matrices ie

[K] = [K1]global+[K2]global+[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

5radic

3 minus4 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

minus4 0 5 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

minus1 minusradic

3 minus1radic

3 2 0

minusradic

3 minus3radic

3 minus3 0 6

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1126)

In order to solve for the deformation of the truss in Problem 111 we may now use the assembledstiffness matrix (1126) but we must impose proper boundary conditions First we have anexternal force F applied vertically downwards at node 3 The global external force vector(collecting all external forces applied to the truss) reads

[Fext] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

000minusF

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1127)

where we left question marks for the two unknown support reactions in the vertical directionof the two sliders on the ground The natural boundary conditions (here the force F ) are thusimposed through the external force vector Fext

When it comes to essential BCs we must constrain nodes 1 and 2 from moving off the groundso we have u1

2 = 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 wefurther impose arbitrarily u3

1 = 0 (which will result in symmetric deformation)

Let us impose the essential BCs by eliminating the respective rows and columns from the systemConsequently we only retain rows and colums 1 3 and 6 of K and analogously we only retainrows 1 3 and 6 of Fext (which automatically removes the question marks in the external forcevector) Overall we arrive at the linear system

EA

4L

⎛⎜⎝

5 minus4 minusradic

3

minus4 5radic

3

minusradic

3radic

3 6

⎞⎟⎠

⎛⎜⎝

u11

u21

u32

⎞⎟⎠=⎛⎜⎝

00minusF

⎞⎟⎠

rArr⎛⎜⎝

u11

u21

u32

⎞⎟⎠= FL

4radic

3EA

⎛⎜⎝

minus11

minus3radic

3

⎞⎟⎠

(1128)

Hence we see that the truss deforms indeed symmetrically as u11 = minusu2

1 and the top node movesdownwards under the applied load while the bottom nodes move outwards Note that we canalso compute the unknown nodal reactions from Fext = Fint =KU

mdashmdashmdashmdash

63

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order

So far we have only considered linear shape functions When going to higher-order polynomialinterpolation (as required eg for p-refinement but also for BVPs with higher-order derivativesin the weak form) various choices are possible for the definition of the element shape functionsWe here discuss two such approaches

1131 Lagrangian interpolation

The above scenario is a special case (ie the simplest case possible) of Lagrangian interpo-lation in 1D which can be extended to higher orders as follows Assume an interpolation upto degree q ie 1 x x2 xq such that

uhe(x) =q+1

suma=1

Nae (x)uae = a0 + a1x + a2x

2 + + aqxq (1129)

In general shape functions Nae (x) for a = 1 q + 1 can be determined by solving the q + 1

equations

uhe(xi) = ui for all i = 1 q + 1 (1130)

for the q + 1 coefficients ai (i = 0 q) Then rearranging the resulting polynomial allows toextract the shape functions Na

e (x) by comparison of the coefficients of uae cf (113) for the 1Dbar element

Alternatively we can solve

Nae (xb) = δab for all nodes b = 1 q + 1 (1131)

The solution to this problem is quite intuitive

Nae (x) =

(x minus x1) sdot sdot (x minus xaminus1) sdot (x minus xa+1) sdot sdot (x minus xq+1)(xa minus x1) sdot sdot (xa minus xaminus1) sdot (xa minus xa+1) sdot sdot (xa minus xq+1)

(1132)

so that Nae (x) is by definition 1 if x = xa and it vanishes at all

other nodes Hence one can readily verify that Nae (xb) = δab

These shape functions are called Lagrange polynomials Thedenominator is known and depends only on the nodal locationswhile the numerator is indeed a polynomial of order q

Shown on the right is an example of quadratic shape functionsinterpolating the displacement field in a bar element with threenodes

1 2

Dx

1u 2u

x

2N 1Ne e

e e33ue

3Ne

1132 Hierarchical interpolation

An alternative to the above Lagrangian interpolation is so-called hierarchical interpolationHere we construct higher-order interpolations based on lower-order shape functions For ex-ample we start with a 2-node bar element

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (1133)

64

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us enrich the interpolation to reach q = 2 by defining

uhe(x) = N1e (x)u1

e +N2e (x)u2

e + N3e (x)αe (1134)

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

N3e (x) = a0 + a1x + a2x

2 (1135)

which is associated with the newly introduced dof α To identify the coefficients ai recall thatwe must have

N3e (0) = N3

e (∆x) = 0 rArr N3e (x) = c

x

∆x(1 minus x

∆x) (1136)

with some arbitrary non-zero constant c ne 0 (which is to be chosen)

Note that αe does not have to be continuous across elements and can hence be determinedlocally (ie given u1

e and u2e αe can be determined internally for each element which allows

for condensation of the αe-dof with efficiency advantages)

114 2-node beam element

A practical example of elements with higher-order interpolation are beam element Unlikethe 2-node bar element (which only captures stretching of the bar see Section 111) beamelements account for bending (and can be superposed with the bar element to result in generalelements ready for stretching and bending) The linear elastic Euler-Bernoulli beam isthe most common structural element for this purpose whose deformation is defined by thedeflection w(x) Let us first review the underlying governing equations

Consider a continuous linear elastic beam of length L (constant Young modulus E and areamoment Iy) loaded by a distributed transverse load q(x) as well as bending moments My (aboutthe y-axis) and transverse forces Fz (in the positive z-direction) applied at its two ends Thestrong form of this problem (assuming EIy = const) reads

EIywxxxx(x) = q(x) with x isin (0 L) (1137)

with the boundary conditions (flipped signs at the negative cut)

minusF 1z = minusE Iy wxxx(0) minusM1

y = minusEIywxx(0)F 2z = minusEIywxxx(L) M2

y = minusEIywxx(L)(1138)

wxz 1F

z

2F

y

2My

1ML

z

q

The potential energy functional for the variational problem with deflection w(x) is

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1139)

where the plus-signs in the terms involving bending moments result from May being against

the rotation direction of wx The first variation yields the weak form (which must hold for alladmissible v(x))

G[w v] = intL

0[EIywxxvxx minus qv] dxminusF 1

z v(0)minusF 2z v(L)+M1

y vx(0)+M2y vx(L) = 0 (1140)

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

w isin U = w isinH2(0 L) ∶ w = w on partΩD (1141)

65

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Following our definitions from Section 7 we identify from (1140) the bilinear form

B[w v] = intL

0EIywxxvxxdx (1142)

and the linear boundary operator

L[v] = intL

0q vdx + F 1

z v(0) + F 2z v(L) minusM1

y vx(0) minusM2y vx(L) (1143)

such that

G[w v] = B[w v] minusL[v] = 0 forall v isin Uh0 = v isinH2(0 L) ∶ v = 0 on partΩD (1144)

As shown in Section 73 introducing an approximate solution

wh(x) =n

suma=1

waNa(x) (1145)

transforms the continuous problem into a linear problem for the n unknown coefficients wa andthe stiffness matrix associated with the linear problem has components

Kab = B[NaN b] = intL

0EIyN

axxN

bxxdx (1146)

To identify suitable shape functions Na(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 beamelement We know from the weak form that q ge 2 so the simplest admissible interpolation forthe unknown deflection w(x) would be based on 1 x x2 However this would introduce onlythree unknown coefficients (for two nodes) which is why we deliberately go one order higherand choose the basis 1 x x2 x3 This leads to the approximate deflection

whe (x) = c0 + c1x + c2x2 + c3x

3 for x isin [0 Le] (1147)

Since the four coefficients ci are hard to interpret physically in general we instead assign toeach node a deflection w and a deflection angle θ = wx and we use those as the four unknownsdefining the element interpolation The four coefficients ci are thus uniquely defined by thenodal conditions (shown below schematically)

whe (0) = w1e whe (Le) = w2

e whex(0) = θ1e whex(Le) = θ2

e (1148)

In order to clearly associate the shape functions with the nodal dofs let us alternatively writethe element interpolation as

whe (x) =2

suma=1

[Nae (x)wae +Ma

e (x)θae ] (1149)

with the four shape functions N1e and N2

e (associated with the nodal deflections) as well as M1e

and M2e (associated with the nodal rotations)

1 2

Le

1w2w

x

ee

2qe1qe

66

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Inserting the interpolation (1149) into the four conditions (1148) we obtain four equations tosolve for the unknown shape functions The resulting shape functions are known as Hermitianpolynomials which for a beam with x isin [0 Le] evaluate to

N1e (x) = 1 minus 3( x

Le)

2

+ 2( xLe

)3

N2e (x) = 3( x

Le)

2

minus 2( xLe

)3

M1e (x) = x(1 minus x

Le)

2

M2e (x) =

x2

Le( xLe

minus 1) (1150)

We can easily verify that eg N1e (0) = 1 while N2

e (0) = 0 and analogously N1e (Le) = 0 while

N2e (Le) = 1 Further we need to have N1

ex(0) = N1ex(Le) = N2

ex(0) = N2ex(Le) = 0 as well

as M1e (0) = M1

e (Le) = M2e (0) = M2

e (Le) = 0 Note the difference in units between N ie and

M ie because they multiply deflections and deflection angles respectively in the interpolation

(1149) Shown below are the four shape functions

02 04 06 08 10

02

04

06

08

10

02 04 06 08 10

-015

-010

-005

005

010

015

xLe

xLe

2N 1Ne

e

1M Lee

2M Dxee

1 1

Note that this approximation is only one possible choice we could also define alternative nodesand nodal values However the above choice ensures that both deflection and angle are contin-uous across elements (since nodal values are shared by neighboring elements)

Having established the shape functions we proceed to deriving the resulting element stiffnessmatrix where we follow the analogous procedure as for the bar element in Section 111 we firstcompute Ke the stiffness matrix for a beam element that is horizontal and then generalize theformulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke

Let us sort the nodal dofs as Ue = (w1e θ

1e w

2e θ

2e)

T Using (1146) with N1

e M1e N2

e and M2e

(in that order to comply with the nodal dof sorting) we obtain

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠ (1151)

and the nodal reactions (including transverse forces F az and bending moments May conjugate to

the deflections wae and deflection angles θae respectively) are

Finte = KeUe with Finte = (F 1inteM

1inte F

2inteM

2inte)

T (1152)

Here forces and moments have the same directions as the conjugate deflections and rotationangles In conclusion the nodal dofs and the nodal reactions are related linearly via

⎛⎜⎜⎜⎜⎝

F 1inte

M1inte

F 2inte

M2inte

⎞⎟⎟⎟⎟⎠

=2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

w1e

θ1e

w2e

θ2e

⎞⎟⎟⎟⎠ (1153)

67

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Next let us generalize the beam element discussed above by considering a beam in 2D whose

nodal dofs are Ue = (u1e1 u

1e2 θ

1 u2e1 u

2e2 θ

2)T ie each node is now displacing in 2D and

rotating Since the above beam formulation only considers bending let us superimpose the barelement from Section 111 so that the resulting element can stretch and bend (otherwise thenodal dofs would not be independent as the length of the bar would have to remain unchangedwithout the ability of the element to stretch axially)

Consider a horizontal 2-node beam with nodal dofs Ue = (u1e w

1e θ

1 u2e w

2e θ

2)T so that wie

and θi describe the beam deflection while u2e minus u1

e defines the change in length of the beamelement 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 beamelements yielding

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 6 3Le 0 minus6 3Le0 3Le 2L2

e 0 minus3Le L2e

0 0 0 0 0 00 minus6 minus3Le 0 6 minus3Le0 3Le L2

e 0 minus3Le 2L2e

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

+ EALe

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 0 minus1 0 00 0 0 0 0 00 0 0 0 0 0minus1 0 0 1 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1154)

Note that we must carefully associate the stiffness matrix components with the correct nodaldofs as done above for the bending and stretching contributions

Now we can apply a coordinate transformation to generalize the above to beams with arbitraryorientation in 2D with ϕe denoting the angle of the beam elementrsquos reference orientation againstthe horizontal axis (see the schematic below where we flipped the directions of both deflectionsand rotation angles for consistency) as defined in (1114)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e

w1e

θ1

u2e

w2e

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraR(ϕe)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e1

u1e2

θ1

u2e1

u2e2

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Ue =R(ϕe)Ue (1155)

By using the same argument as for the 2-node bar element thestiffness matrix of the generally oriented 2-node beam element isthus obtained as

Ke =RT(ϕe)KeR(ϕe) (1156)

with R(ϕe) and Ke from (1155) and (1154) respectively Ofcourse the same can also be extended to beams in 3D where anappropriate transformation matrix R based on direction cosines isintroduced

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

L

2we~

1we~

1qe

2qe

The key difference between bar and beam elements lies in the deformation modes capturedby each Bars only undergo axial stretching and bar networks are hinged (ie bars carryno transverse forces nor bending moments) The above beam element supports both axial andbending deformation and beam networks are rigidly connected at nodes (angles between beamsat nodal junctions remain constant)

68

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

115 A note on beam elements and boundary conditions

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

The potential energy functional for the variational problem of an Euler-Bernoulli beam withthe deflection field w(x) was given by

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1157)

so that the first variation reads (dropping the dependence on x in the integral for brevity)

δI = intL

0[EIywxxδwxx minus q δw] dxminusF 1

z δw(0)minusF 2z δw(L)+M1

y δwx(0)+M2y δwx(L) (1158)

In order to recover the strong form (whose PDE is EIywxxxx minus q = 0) we integrate the firstterm by parts to obtain

δI = minusintL

0EIywxxxδwxdx + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1159)

and integrating the first term by parts again finally gives

δI = intL

0EIywxxxxδwdx minus [EIywxxxδw]L0 + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1160)

Re-arranging the above leads to the stationarity condition

δI = 0 = intL

0(EIywxxxx minus q) δw dx

minus [F 1z minusEIywxxx(0)] δw(0) minus [F 2

z +EIywxxx(L)] δw(L)minus [minusM1

y +EIywxx(0)] δwx(0) + [M2y +EIywxx(L)] δwx(L) forall δw isin U0

(1161)

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

EIywxxxx minus q = 0 for 0 lt x lt L (1162)

Furthermore the remaining four terms in (1161) must also vanish individually (since we can inprinciple choose the variations at the ends individually and δI = 0 must hold for all admissiblevariations) For example we must have

[F 1z minusEIywxxx(0)] δw(0) = 0 (1163)

which means that either F 1z minus EIywxxx(0) = 0 (ie a transverse force F 1

z is imposed at theend x = 0) or δw(0) = 0 (which implies that w(0) = w1 must be an essential BC) Likewise[minusM1

y +EIywxx(0)] δwx(0) means that either M1y = EIywxx(0) (ie a bending moment is

imposed at x = 0) or δwx = 0 (which implies that wx(0) = θ1 must be an essential BC)Therefore the above form of the first variation (in which the integral term matches the PDEof the strong form) reveals all possible boundary conditions both natural and essential (ieNeumann and Dirichlet respectively)

69

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We thus also need to revise our definition of a Dirichlet boundary condition not neces-sarily every derivative of the primary field u imposed implies a Neumann boundary conditionInstead we extract the notion of Dirichlet vs Neumann boundary conditions from the firstvariation of a variational problem As a rule of thumb essentialDirichlet BCs imposethe function itself as well as derivatives up to order (pminus 1) where p is half the order ofthe PDE in the strong form or the matching order of u and v in weak form (eg for a beamthe PDE is of fourth-order the matching-order weak form contains second derivatives essentialBCs impose the deflection itself or its first derivative)

70

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

12 Shape Functions in higher dimensions

So far we have used polynomial shape functions for element interpolations in 1D and we sawthat the shape functions depend on the element size ∆xe or Le In higher dimensions it wouldbe quite cumbersome to define polynomial shape functions on the actual shape of the elementthus depending on the nodal locations and the geometry of the element in space unless oneuses regular structured meshes (eg grids where all elements have the same shape) In generalall elements have different shapes and it is beneficial to define shape functions independent ofthe specific element shape

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 shapefunctions in the reference configuration to those in real physical space

To this end we introduce a (bijective) mapping φ from a reference domain (with referencecoordinates ξ = ξ η ζ) onto the physical domain (with coordinates x = x1 x2 x3) of anelement e

x = φ(ξ) ie in 3D for i = 123 xi = xi(ξ η ζ) (121)

A schematic of the parametric mapping concept is shown below in 2D for a quadrilateral (bi-linear) element which will be introduced soon The mapping links the element in its referenceconfiguration or space described by coordinates (ξ η) to the elementrsquos representation in realphysical space described by Cartesian coordinates (x1 x2) in 2D

For simplicity we reuse the interpolation concepts from before

so far we used uhe =n

sumi=1

N ie(x)uie

now we use uhe =n

sumi=1

N ie(ξ)uie and x =

m

sumi=1

N ie(ξ)xie

(122)

where we have three options for the mapping

(i) isoparametric mapping n =m and N ie = N i

e (same interpolation of positionsdofs)

(ii) subparametric mapping n gtm (lower-order interpolation of positions)

(iii) superparametric mapping n ltm (higher-order interpolation of positions)

The strategy is now to define N ie(ξ) in the reference configuration We will first discuss this

concept for simplicial elements in the next section before proceeding to more general classes ofpolynomial element interpolations

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

4 4 3

1 2

mapping

element in physical space element in its reference space

71

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

13 Simplicial elements

The probably simplest type of finite element are so-called simplicial elements (and we havealready seen one) These are characterized by having the minimum number of nodes possible ina given dimension Mathematically speaking a simplex of order k is a k-dimensional polytopewhich is the convex hull of its k + 1 vertices

In plain English a simplex in d dimensions is a convex body made up of d + 1 nodes

in 1D a 2-node bar whose interpolation basis is 1 x

in 2D a 3-node triangle (T3) whose interpolation basis is 1 x1 x2

in 3D a 4-node tetrahedron (T4) whose interpolation basis is 1 x1 x2 x3

Overall this shows that the element interpolation in each case is of degree q = 1 (linear) andthe space of shape functions is complete up to linear order for a simplicial element in everydimension

Although one could in principle derive the shape functions for any arbitrary element geometrythis turns out to be cumbersome in general Consider eg a simplicial element in 2D (a triangle)whose three nodes are equipped with some nodal dofs u1 u2 and u3 One could now write

uh(x) =n

suma=1

uaNa(x) (131)

and enforce the conditions uh(xa) = ua to solve the resulting system of equations for the shapefunctions Na(x) as done at the beginning of Section 111 However such an approach isinconvenient as the resulting shape functions will inevitably depend on the nodal locationsxa in a complex manner and therefore vary from element to element based on the elementlocation and geometry As a remedy one resorts to the concept of isoparametric mappings(see Section 12) to introduce general shape functions whose definition does not depend on theelement geometry For simplices one commonly introduces so-called barycentric coordinates

131 Linear Triangle (T3)

In order to derive the shape functions and resulting element inter-polation for a 3-node triangular element (T3) in 2D one definesthe barycentric coordinates

lae(x) =Aae(x)Ae

for a = 123 (132)

where Ae = ∣Ωe∣ is the total area of the triangular element and Aae isthe sub-area opposite from node a when splitting the triangle intothree parts by connecting the nodes to point x (see the schematicon the right) Consequently we have A1

e +A2e +A3

e = Ae 1

23

x

A1

A3A2

Note that by finite element convention we always number the local nodes of an element in 2Dcounter-clockwise

We now have two ways to describe a point inside the triangular element we either use itscoordinate x or the three barycentric coordinates lae to describe the point and there is a uniquerelation (a mapping) between (x1 x2) harr (l1a l2a l3a) In general we need only two coordinates

72

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

to describe a point in 2D space and here we notice that indeed we need only two of thebarycentric coordinates to uniquely describe a point in space (if two of the lae are known thenthe third is known as well since l1e + l2e + l3e = 1) For example we may define

ξ = l1e and η = l2e (133)

as the two coordinates (ξ η) to uniquely describe points within the triangle

Furthermore notice that the barycentric coordinates also satisfy the relation

lae(xb) = δab (134)

(eg if x is one of the nodal locations then two of the three areas Aae are zero and one areaequals Ae) This indicates that the three barycentric coordinates also qualify as shape functionsie we may choose Na(x) = lae(x) Note that also 0 le lie le 1 and sum3

i=1 lie(x) = 1 for all x isin Ωe

The shape functions associated with the three nodes now become

N1e (ξ η) = ξ N2

e (ξ η) = η N3e (ξ η) = 1 minus ξ minus η (135)

The beauty of these shape functions lies in the fact that in the above form they are independentof the element geometry In addition computing shape function derivatives with respect to (ξ η)is obviously trivial N1

eξ = 1 N1eη = 0 etc

We still need to find the link between the Cartesian coordinates (x1 x2) and the barycentriccoordinates (ξ η) To this end let us exploit that we know Na(xb) = δab and further the factthat the shape functions introduced above define a linear interpolation across the element in 2DThe latter is easy to realize when eg moving from one node a to another ndoe b and realizingthat the barycentric coordinates linearly vary between 0 and 1 between these two nodes (Na

e

will decrease from 1 to 0 while N be 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 Asa consequence we may introduce the isoparametric mapping

x(ξ η) =3

suma=1

Nae (ξ η)xae (136)

which applies the interpolation rules (classically used for the dofs) to the nodal locations of theelement Given the nodal locations x1

e x2e and x3

e the above mapping uniquely assigns a pointx in real space to any barycentric coordinates (ξ η) (136) thus presents the link the mappingbetween (x1 x2) and (ξ η)

Of course we may exploit the same interpolation for any nodal degrees of freedom (thus usingan isoparametric mapping) so

uh(ξ η) =3

suma=1

Nae (ξ η)uae (137)

A difficulty arises though when using this interpolation in the finite element context because weneed to compute shape function derivatives Na

xi in real space (needed eg for the calculationof Ke or Fint) It is easy to compute Na

ξ and Naη but that is not what we need (136) defines

(x1 x2) in terms of (ξ η) but not the other way around

Instead of inverting (136) let us use a mathematical shortcut known as the inverse functiontheorem To exploit this relation let us formally write x1 = x1(ξ η) and x2 = x2(ξ η) so thechain rule gives

( uhξuhη

) = ( uhx1x1ξ + uhx2

x2ξ

uhx1x1η + uhx2

x2η) = (x1ξ x2ξ

x1η x2η)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[J]

( uhx1

uhx2

) = [J] ( uhx1

uhx2

) (138)

73

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

with the Jacobian6 matrix

[J] = (x1ξ x2ξ

x1η x2η) (139)

and its determinant

J = detJ = partx1

partξ

partx2

partηminus partx1

partη

partx2

partξ (1310)

Note that like for the deformation mapping F = Gradϕ in continuum mechanics for theisoparametric mapping to be invertible we need to have J gt 0 This implies that elementscannot be distorted (inverted for simplicial elements or non-convex for general elements later)

By substituting our isoparametric mapping (136) for x1 and x2 in (139) we obtain

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξx

a1e

3

sumi=1

Naeξx

a2e

3

suma=1

Naeηx

a1e

3

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

(1311)

This solves the problem as we may now use (138) to switch between derivatives in the referenceconfiguration and in real space As discussed we need to have J gt 0 Thus we can invert J toarrive at (by the inverse function theorem)

( uhx1

uhx2

) = [J]minus1 ( uhξuhη

) = [J]minus1

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξu

ae

3

suma=1

Naeηu

ae

⎞⎟⎟⎟⎟⎠

but also ( uhx1

uhx2

) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naex1

uae

3

suma=1

Naex2

uae

⎞⎟⎟⎟⎟⎠

(1312)

By equating these two and comparing the coefficients of uae we thus obtain

(Naex1

Naex2

) = [J]minus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (1313)

where for brevity we summarized the barycentric coordinates into ξ = (ξ η)T Relation (1313)is generally applicable for any isoparametric mapping and will be valuable in the future

Applying the inverse function theorem to the specific shape functions (135) yields the Jacobianmatrix

[J] = (xξ x2ξ

xη x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naerx

a1e

3

suma=1

Naeξx

a2e

3

suma=1

Naesx

a1e

3

suma=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= (x11e minus x3

1e x12e minus x3

2e

x21e minus x3

1e x22e minus x3

2e) = const (1314)

and

J = detJ = (x11e minus x3

1e)(x22e minus x3

2e) minus (x21e minus x3

1e)(x12e minus x3

2e) = 2Ae = const (1315)

6The Jacobian in mathematics is usually defined as the transpose of J defined in (139) In the FE contextour definition is chosen for convenience so that we do not need a transpose in (1313) while J = detF remainsthe same

74

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice that J and hence J are constant and do not depend on (ξ η)

Further we have

(Naex1

Naex2

) = [J]minus1 (Naeη

Naeξ

) (1316)

As we had seen from (135) that all shape function derivatives Naξ and Na

η are constant (minus1+1 or 0) and since J = const as well we may also conclude that

Naex1

= const Naex2

= const and also dA = dx1 dx2 = J dξ dη = 2Aedξ dη (1317)

The constant shape function derivatives have an important consequence they indicate that allderivatives partuhpartxj within the triangular element are constant

For example for a mechanical boundary value problem we have two nodal dof components in2D uae = (uae1 uae2) and the interpolation of the displacement field reads

uh =3

suma=1

uaeNae (ξ) or uhi =

3

suma=1

uaeiNae (ξ) for i = 12 (1318)

The resulting strains are

εhij =1

2(uhij + uhji) =

1

2

3

suma=1

(uaeiNaxj + u

aejN

axi) = const (1319)

Consequently all strain components are constant within the element This is why the 3-nodetriangular element is also called the Constant Strain Triangle or CST element It also hasthe important consequence that integration of force vectors or stiffness matrices can easily beperformed exactly since the integrands (for the element energy nodal forces and stiffness) areconstant across the element

In case of higher-order triangular elements the following relation is helpful for evaluating inte-grals over the triangular element (shown without proof)

intΩeξαηβ dA = αβ

(α + β + 2)2Ae (1320)

132 Extension to three dimensions

The extension to three dimensions is straight-forward and results in the 4-node tetrahedron(constant strain tetrahedron) with reference coordinates (ξ η ζ) and shape functions

N1e (ξ η ζ) = ξ N2

e (ξ η ζ) = η N3e (ξ η ζ) = ζ N4

e (ξ η ζ) = 1minusξminusηminusζ (1321)

Here the barycentric coordinates are defined via the ratios of the partial tetrahedron volumes(obtained by splitting the tetrahedral element into four tetrahedra based on the location ofpoint x analogous to the above procedure in 2D) Like in 2D the resulting interpolated strainsare constant in the linear tetrahedron and dV = 6Vedξ dη dζ

The following relation is analogous to (1320)

intΩeξαηβζγ dA = αβγ

(α + β + γ + 2)2Ae (1322)

75

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

133 Finite element implementation

When using the above simplicial elements (like any finite element based on an isoparametricformulation) the finite element implementation can make use of the isoparametric mappingSpecifically for the simplicial elements we showed that

nablaxNae = Jminus1nablaξNa

e = const and Je = detJ = 2Ae (1323)

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

εhij = const rArr σij = σij(εh) = const (1324)

The key integrals to be evaluated (eg in 2D with an element thickness t) following Section 8now become

F aintei = intΩeσijN

aexj dV = int

ΩeσijN

aexj tdA = sum

r=ξη

σijJminus1jr N

aer

Jet

2 (1325)

where the classical summation convention (here over j is implied and not written out for concise-ness) Note that if we pre-compute and store the following constant quantities for each elemente (which only depend on the reference element geometry and not on its degrees of freedom)viz

we =Jet

2= const and Na

exj = sumr=ξη

Jminus1jr N

aer = const (1326)

then the calculation of the nodal force vectors reduces to

F aintei = σij(εh)Naexjwe (1327)

where only the stresses must be recomputed each time for given strains (which do depend onthe nodal dofs) Similarly we compute the element energy as

Ie = intΩeW (εh)dV = int

ΩeW (εh) tdA =W (εh)we (1328)

The analogous definition of a B-matrix as introduced in Section 82 can be applied here asfollows 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 straincomponents in Voigt notation using (1314) are computed as

[εh] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

uh11uh22

uh12 + uh21

⎞⎟⎠=⎛⎜⎝

sumea=1 uae1N

aex1

sumea=1 uae2N

aex2

sumea=1 [uae1Naex2

+ uae2Naex1

]

⎞⎟⎠

= 1

2Ae

⎛⎜⎝

y23e 0 y31

e 0 y12e 0

0 x32e 0 x13

e 0 x21e

x32e y23

e x13e y31

e x21e y12

e

⎞⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[B]

Ue with

xije = xie1 minus xje1

yije = xie2 minus xje2

2Ae = x21e y

31e minus x31

e y21e

(1329)

Note that we exploited J = const and we defined Ue = (u1e1 u

1e2 u

2e1 u

2e2 u

3e1 u

3e2)

T Fur-

thermore (xae1 xae2) denotes the 2D-location of the elementrsquos node a

76

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1331 Special case linear elasticity

For the special case of linear elasticity we may write

εh =BUe rArr σ = Eεh = EBUe (1330)

and the same relations apply as in Section 82 (see the definition of the elastic E-matrix there)Consequently we have the element stiffness matrix nodal internal force vector and internalenergy of element e as respectively

Ke = intΩeBTEBdV =BTEBtAe Finte =KeUe Ie =

1

2Ue sdotKeUe (1331)

where we exploited that BTEB = const and the volume of element e is ∣Ωe∣ = tAe for a 2DCST element Even though not wise for reasons of memory consumption the element stiffnessmatrices Ke can be computed and stored a-priori for each element for faster calculation of forcesand stiffness matrices during simulations

1332 General case of non-linear elastic materials

For the more general case of a material that is not linear elastic we may still write

W =W (ε) rArr σ = partWpartε

= σ(ε) C = partσpartε

= C(ε) (1332)

so that

Ie = intΩeW (εh)dV (1333)

and the internal force vector follows as

Finte =partI int

e

partUe= int

ΩeBTσ dV =BTσ(εh)tAe (1334)

while the incremental stiffness matrix (the analog of the stiffness matrix for nonlinearmaterial behavior) becomes

Te =partF int

e

partUe= int

ΩeBTCB dV =BTC(εh)B tAe (1335)

Note that if σ = Eε the above equations recover the linear elastic definitions with C = E = const

134 Higher-order triangles and tetrahedra

Following the above recipe for the simplicial elements one can also define higher-order triangularand tetrahedral elements based on the barycentric coordinates introduced here For examplethe quadratic triangle (T6) element has six nodes so that the interpolation function space is1 x1 x2 x

21 x1x2 x

22 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

With the same barycentric reference coordinates (ξ η) as for the T3 element the shape functionscan be found as

N1e (ξ η) = ξ(2ξ minus 1) N2

e (ξ η) = η(2η minus 1) N3e (ξ η) = θ(2θ minus 1)

N4e (ξ η) = 4ξη N5

e (ξ η) = 4ηθ N6e (ξ η) = 4ξθ with θ = 1 minus ξ minus η

(1336)

77

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since derivatives of the above shape functions are linear strains (and thus stresses) also varylinearly 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 curvedwhereas those of the CST element remained straight during deformation due to the linearinterpolation A schematic T6LST element is shown below

1

23

4

5

6

1

2

3

4

1

2

3

4

56

79

108

LST (T6) CST (T4) LST (T10)

Analogously the quadratic tetrahedron (T10 also shown above) has four corner nodes andsix nodes at edge midpoints resulting in linear strains within the element By our definitionboth T6 and T10 elements make use of a subparametric mapping since displacements areinterpolated based on higher-order polynomials while the mapping of positions between referenceand real space relies on the same linear interpolation based on barycentric coordinates

The same concepts can be extended to higher dimensions and to higher-order interpolation

78

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 The bilinear quadrilateral element

The above simplicial elements are simple to implement and their constant strains within el-ements admit an exact integration of the element energy nodal forces and stiffness matrixHowever the constant fields within the simplicial elements may not be ideal eg fine FEmeshes may be required to achieve the sought accuracy especially in regions with spatiallystrongly 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 elementsas well as elements in 3D

For the same reason as for the simplicial elements (where we aimed for shape function definitionsindependent 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 quadrilateralelement by definition the reference configuration is Ωe = [minus11]2 and node numbering starts inthe bottom left corner and is counterclockwise

Shape functions must satisfy the FE relation Nae (ξb) = δab in the reference configuration with

nodal positions ξb (b = 1 4) In fact these shape functions can be obtained from the 2-nodebar (whose shape functions we derived in Section 111) by scaling the linear scaling of the shapefunctions up to 2D Consider a 2-node bar whose nodes are positioned7 at ξ = plusmn1 whose shapefunctions are

N1e (ξ) =

1

2(1 minus ξ) N2

e (ξ) =1

2(1 + ξ) (141)

It can easily be verified that N1e (minus1) = 1 N1

e (1) = 0 and N2e (minus1) = 0 N2

e (1) = 1

The 2D quadrilateral element in its reference configuration is Ωe = [minus11]2 ie a square whosecorners are located at ξ = (plusmn1plusmn1) The shape functions can thus be obtained by combining theabove 1D bar shape functions independently in the ξ- and η-directions

N1e (ξ η) = N1

e (ξ)N1e (η) =

1

4(1 minus ξ)(1 minus η)

N2e (ξ η) = N2

e (ξ)N1e (η) =

1

4(1 + ξ)(1 minus η)

N3e (ξ η) = N2

e (ξ)N2e (η) =

1

4(1 + ξ)(1 + η)

N4e (ξ η) = N1

e (ξ)N2e (η) =

1

4(1 minus ξ)(1 + η)

(142)

One can easily verify that Nae (ξb ηb) = δab and sum4

a=1Nae (ξ η) = 1 for all ξ = (ξ η)

1 2x

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

44 3

1 2

mapping

Q4 element in physical spaceQ4 element in its reference space

-1 1

2-node bar in itsreference space

7We note that this choice of ξ isin [minus11] for the bar in the reference configuration is arbitrary one could alsohave chosen eg ξ isin [01]

79

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The isoparametric mapping here implies that the (x1 x2)-coordinates are interpolated across theelement using the same shape functions (viz the above ones) as those used for the interpolationof the fields of interest Therefore we have

x1 =4

suma=1

Nae (ξ η)xae1 x2 =

4

suma=1

Nae (ξ η)xae2 (143)

Notice that this implies straight edges (in the reference configuration) remain straight (in theactual mesh) For example take the bottom edge (characterized by η = minus1) the interpolationalong this edge is

x =4

suma=1

Nae (ξminus1)xae =

1 minus ξ2x1e +

1 + ξ2x2e =

x1e +x2

e

2+ x

2e minusx1

e

2ξ (144)

which is a linear interpolation in ξ Therefore the bottom edge in the real mesh in physicalspace is a linear interpolation between the two adjacent nodes Similar arguments hold for alledges so that this element has only straight edges in physical space

Looking at the shape functions we notice that completeness of the polynomial interpolationis up to q = 1 (even though the interpolation basis 1 ξ η ξη contains the bilinear term it isnot complete up to quadratic order see Section 93) This means we must be able to representlinear solutions of the type

uh(x1 x2) = c0 + c1x1 + c2x2 (145)

exactly As simple check reveals that this is indeed the case since our interpolation based onthe four nodal values uae = uh(xae) recovers the exact solution

uh(x1 x2) =4

suma=1

Nae u

ae =

4

suma=1

Nae u

h(xae1 xae2) =4

suma=1

Nae (c0 + c1x

ae1 + c2x

ae2)

= (4

suma=1

Nae ) c0 + c1

4

suma=1

Nae x

ae1 + c2

4

suma=1

Nae x

ae2 = c0 + c1x1 + c2x2

(146)

Hence we know that the chosen isoparametric element interpolation is capable of representinglinear solutions exactly

Furthermore notice that this interpolation scheme ensures that uh is continuous across ele-ments To see this recall from (144) that on any element edge only those two shape functionsare non-zero whose nodes are adjacent to that edge while the other shape functions are zeroThis implies that the interpolated field uh on any edge is simply a linear interpolation betweenthe 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 adjacentelements As a further consequence the above interpolation also ensures integrability in theweak form as a continuous piecewise polynomial field uh guarantees that uh isinH1(Ω)

As for the simplicial element computing shape function derivatives requires the use of theinverse function theorem first introduced in Section 131 In analogy to the simplicial elementwe use x = x(ξ η) and y = y(ξ η) so the inverse function theorem states

(Naex

Naey

) = Jminus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (147)

By contrast to the simplicial elements we no longer have that J nor nablaξNa are constant becauseof the bilinear term ξη in the shape functions Therefore strains and stresses will no longer beconstant within an element

80

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 141 2-node bar revisited

As a simple example recall the 2-node bar element whose shape functions we computed as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (148)

For a reference bar element with nodes at ξ = plusmn1 the analogous shape functions in 1D read

N1e (ξ) =

1 minus ξ2

N2e (ξ) =

1 + ξ2

(149)

It is simple to verify that these indeed evaluate to 0 and 1 at ξ = plusmn1 Applying the inversefunction theorem to this 1D problem gives the scalar Jacobian

J = partxpartξ

= partN1e

partξx1e +

partN2e

partξx2e =

x2e minus x1

e

2= ∆x

2(1410)

and further the relation between the shape function derivatives in physical and reference spaceas

Naex = Jminus1Na

eξ =2

∆xeNaeξ with N1

eξ = minus1

2 N2

eξ =1

2 (1411)

so that we obtain correctly

N1ex = minus

1

2

2

∆xe= minus 1

∆xe N1

ex =1

2

2

∆xe= 1

∆xe (1412)

mdashmdashmdashmdash

When applying the inverse function theorem and the above relations to the bilinear quadrilateral(Q4) element we obtain the Jacobian

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

4

suma=1

Naeξx

a1e

4

sumi=1

Naeξx

a2e

4

suma=1

Naeηx

a1e

4

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= 1

4(minus(1 minus η) (1 minus η) (1 + η) minus(1 minus η)minus(1 minus ξ) minus(1 + ξ) (1 + ξ) (1 minus ξ) )

⎛⎜⎜⎜⎜⎝

x1e1 x1

e2

x2e1 x2

e2

x3e1 x3

e2

x4e1 x4

e2

⎞⎟⎟⎟⎟⎠

(1413)

and J = detJ We notice that J indeed is not constant across the element but varies with ξand η For convenience let us define

[Γ] = [Jminus1] = (Γ11 Γ12

Γ21 Γ22) (1414)

Towards the FE implementation let us also introduce the B-matrix notation To this end wewrite

[ε] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

(1415)

81

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We further exploit the inverse function theorem viz

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

(1416)

Finally we also have

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

Ue (1417)

with the element dofs Ue = (u1e1 u

1e2 u

4e1 u

4e2)

T Altogether this shows that ε =BUe with

B =⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

(1418)

which defines theB-matrix for the Q4 element Again note thatB =B(ξ) ie theB-matrix isnot constant within an element but depends on ξ and η (through the shape function derivativesas well as through Γ = Jminus1 which are both not constant)

Analogous to the simplicial element a useful relation to evaluate area integrals over theelement in the following is (e1e2 being reference unit vectors)

dA = dx times dy = (partxpartξ

dξ e1 +partx

partηdη e2) times (party

partξdξ e1 +

party

partηdη e2) = J dξ dη e1 times e2 (1419)

so that

dA = ∣dA∣ = J dξ dη (1420)

Like for the simplicial elements the above can be used to compute the element energy

Ie = intΩeW (εh)dV (1421)

the internal force vector

Finte =partI int

e

partUe= int

ΩeBTσ dV (1422)

and the incremental stiffness matrix

Te =partF int

e

partUe= int

ΩeBTCB dV (1423)

For the special case of linear elasticity the above reduces to

Ke = intΩeBTEBdV Finte =KeUe Ie =

1

2Ue sdotKeUe (1424)

82

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

15 Higher-order elements Q8 Q9 8-node brick

The bilinear quadrilateral (Q4) element discussed in the previous section was the simplestexample of a (non-simplicial) element in 2D Of course the same concepts can be extended tomore complex elements using higher-order interpolation as well as to 3D elements Here wewould 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 whichinstead uses quadratic interpolation It derives its shape functions from applying the 1D shapefunctions of the 3-node bar (using Lagrangian interpolation) to the 2D case For example thefirst few shape functions are defined as

N1e (ξ η) =

ξ(1 minus ξ)η(1 minus η)4

N2e (ξ η) = minus

ξ(1 + ξ)η(1 minus η)4

N3e (ξ η) =

ξ(1 + ξ)η(1 + η)4

(151)

and all other shape functions follow analogously Overall the resulting interpolation uses thebasis (ie the above shape functions include these monomials)

1 ξ η ξη ξ2 η2 ξ2η ξη2 ξ2η2 (152)

which is complete up to order q = 2 (quadratic)

We notice that the above interpolation apparently includes far more monomials terms thanrequired for a quadratic interpolation (specifically ξ2η ξη2 and ξ2η2 are not required for acomplete quadratic interpolation) Therefore one can also construct elements with less nodesthat still provide a complete quadratic interpolation

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 consequenceshape functions are constructed in a different way than defined by (151) One starts by definingthose shape functions associated with the mid-edge nodes 5 6 7 and 8

N5e (ξ η) =

(1 minus η)(1 minus ξ2)2

N6e (ξ η) =

(1 minus η2)(1 + ξ)2

N7e (ξ η) =

(1 + η)(1 minus ξ2)2

N8e (ξ η) =

(1 minus η2)(1 minus ξ)2

(153)

and concludes the remaining four shape functions (serendipitously) as combinations of the aboveeg

N1e (ξ η) =

(1 minus η)(1 minus ξ)4

minus 1

2(N5+N8) N2

e (ξ η) =(1 minus η)(1 + ξ)

4minus 1

2(N5+N6) etc (154)

Both the Q8 and Q9 element are schematically shown below in their reference configurations

x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q9 in its reference space

5

6

7

8 9x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q8 in its reference space

5

6

7

8

83

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We may also extend the above construction of elements to three dimensions The simplestexample in 3D was the Constant-Strain Tetrahedron already discussed in Section Here wemay introduce further 3D elements by extending eg the definition of the bilinear quadrilateral(Q4) element into 3D

This results in the so-called 8-node brick element Here the 3D reference configuration isdescribed by coordinates (ξ η ζ) and the shape functions are a direction extension of (142)now to 3D which gives

N1e (ξ η ζ) =

1

8(1 minus ξ)(1 minus η)(1 minus ζ) N2

e (ξ η ζ) =1

8(1 + ξ)(1 minus η)(1 minus ζ)

N3e (ξ η ζ) =

1

8(1 + ξ)(1 + η)(1 minus ζ) etc

(155)

The link between the reference and actual configuration is again given by an isoparametricmapping so that shape function derivatives again follow from the inverse function theorem as

nablaxNae = Jminus1nablaξNa

e (156)

and volume integrals make use of

dV = J dξ dη dζ (157)

x

h

(-1-1-1) (1-1-1)

(111)

41 2

brick element in its reference space

z

3

85 6

7

(11-1)

84

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

16 Numerical quadrature

The Q4 Q8 Q9 and brick element are perfect examples to motivate the concepts discussed inthis section viz the use of numerical quadrature Recall that in order to perform finite elementsimulations we may need to compute the element energy nodal forces andor tangent matrix

Ie = intΩeW (εh)dV Finte = int

ΩeBTσ dV Te = int

ΩeBTCB dV (161)

each of which requires computing an integral over the element Ωe In general (unlike for thespecial case of simplicial elements) the integrands are not constant but may be complex func-tions of position (even in the linear elastic case) As a consequence the above integrals cannoteasily be calculated analytically which is why we make use of numerical integration schemes

As a clean mathematical example we start by considering an integral in 1D eg

I[u] = intb

au(x) dx (162)

which can later be extended to higher dimensions For convenience let us introduce the coor-dinate transformation

ξ = 2x minus ab minus a

minus 1 rArr ξ(x = a) = minus1 ξ(x = b) = 1 dξ = 2 dx

b minus a (163)

so that

I[u] = int1

minus1f(ξ) dξ where f(ξ) = b minus a

2u(x(ξ)) (164)

with

x = ξ + 1

2(b minus a) + a (165)

Instead of considering general integrals of the type (162) we concentrate on integrals of thetype (164) (and we have seen that we can transform one into the other) The goal is now toapproximate the integral (164) numerically

161 Example Riemann sums

As an example for numerical integration consider a partition of the range from minus1 to 1 into nsegments separated by n + 1 nodes

P = [ξ0 ξ1] [ξ1 ξ2] [ξnminus1 ξn] such that minus1 = ξ0 lt ξ1 lt ξ2 lt lt ξn = 1 (166)

The Riemann sum is probably the simplest approach to computing the above integral numer-ically by simply summing the contributions from all segments thus defining the approximateintegral S as

I asymp S =n

sumi=1

f(ξlowasti )(ξi minus ξiminus1) with ξiminus1 le ξlowasti le ξi (167)

Here the choice of ξlowasti within each interval is in principle arbitrary It should be somehowrepresentative of the function f within the interval [ξiminus1 ξi]

85

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Different choices of ξlowasti lead to different definitions of S eg including

(i) the left Riemann sum ξlowasti = ξiminus1

(ii) the right Riemann sum ξlowasti = ξi(iii) the middle Riemann sum ξlowasti =

12(ξiminus1 + ξi)

(iv) the trapezoidal sum average of left and right

(v) the upper Riemann sum ξlowasti st g(ξlowasti ) = supξisin[ξiminus1ξi] g(ξ)(vi) the lower Riemann sum ξlowasti st g(ξlowasti ) = infξisin[ξiminus1ξi] g(ξ)

More refined formulations can be found in the so-called Newton-Cotes formulas (the trape-zoidal rule is the Newton-Cotes formula of degree 1) While these Riemann and Newton-Cotesformulas are indeed viable schemes to carry out integration numerically they are rather ineffi-cient as they require the breaking down of the integrand into many segments in general Thefollowing concept of Gaussian quadrature aims to circumvent those computational expenses

x-1 +1

f(x)

xx0

f(x )i

xnxi-1xi

xx0

f(x )i

xi-1 +1

exact integral (middle) Riemann sum quadrature rule

162 Gauss quadrature

An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-ture rules in 3D) which are best suited for integrating polynomial functions The idea is toapproximate the integral by a weighted sum over integration points (as shown in the schematicabove on the right) ie we define

I[u] = int1

minus1f(ξ) dξ asymp

nQPminus1

sumi=0

Wi f(ξi) (168)

The challenge now is to choose the number of integration points nQP as well as the weightsW0 WnQPminus1 and locations ξ0 ξnQPminus1 of all each integration point That choiceshould depend on the function to be integrated (more specifically on its smoothness one caneasily imagine that smooth polynomials require few integration points while strongly fluctuat-ing functions require larger numbers of integration points) For the FE context most functionsof interest will be of polynomial type since our shape functions are commonly defined as poly-nomials

We say a quadrature rule is exact of order q if it integrates exactly all polynomial functionsg isin Pq([minus11]) Gauss quadrature generally chooses nQP quadrature points and associatedweights such that the quadrature rule is exact of order q = 2nQP minus 1 Let us find the optimalweights and integration points for Gaussian quadrature

86

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1621 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mo-ments micro are computed exactly In other words we find the weights and locations by requiringthat

microk = int1

minus1ξkdξ

=nQPminus1

sumi=0

Wi ξki k = 01 2nQP minus 1 (169)

These are 2nQP equations for the 2nQP free parameters (Wi ξi) for i = 0 nQP minus 1 Theequations are generally nonlinear and thus hard to solve analytically Yet we can find solutionsfor the lowest few orders in 1D as follows

a single quadrature point ie nQP = 1 approximates the integral by evaluating the func-tion only at a single location ξ0 isin [minus11]The two equations for the two unknowns (the weight W0 and location ξ0) are obtainedfrom requiring the any constant function f(ξ) = ξ0 and any linear function f(ξ) = ξ1must be integrated exactly This implies that

int1

minus1ξ0 dξ = 2

=W0 ξ00 =W0 and int

1

minus1ξ1 dξ = 0

=W0 ξ10 =W0ξ0 (1610)

From these two equations the first-order quadrature rule follows with

W0 = 2 ξ0 = 0 (1611)

That is only a single quadrature point at location ξ0 = 0 is required to integrate any linearfunction exactly Hence since linear functions are integrated exactly this quadrature ruleis exact to order q = 1

two quadrature points ie nQP = 2 require the calculation of the two weights and asso-ciated quadrature point locations

In close analogy to the above case we now have four unknowns (two weights W0 andW1 and two integration point locations ξ0 and ξ1) and construct the four equations tosolve for those by requiring that any constant linear quadratic or cubic function mustbe integrated exactly

int1

minus1ξ0 dξ = 2

=W0 +W1 int1

minus1ξ1 dξ = 0

=W0 ξ0 +W1 ξ1

int1

minus1ξ2 dξ = 2

3

=W0 ξ20 +W1 ξ

21 int

1

minus1ξ3 dξ = 0

=W0 ξ30 +W1 ξ

31

(1612)

While this is a nonlinear system of equations a simple solution can be found by assumingsymmetric quadrature points with respect to the origin ie ξ0 = minusξ1 In this case wemay conclude that

W0 =W1 = 1 ξ0 = minus1radic3 ξ1 =

1radic3 (1613)

Since this quadrature rule integrates cubic polynomials exactly it is exact to order q = 3

higher-order quadrature rules

Quadrature weights and points for arbitrary orders can be obtained in analogous fashionand most importantly can be found in numerous look-up tables (cf the classical FEMtextbooks) A more systematic way to compute Gauss-Legendre quadrature weights andpoints is given in Appendix I

87

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1622 Other Gauss quadrature rules

Note that for general functions f (which are not necessarily of polynomial type) one cansometimes find a decomposition f(ξ) = w(ξ)g(ξ) where w(sdot) is a known weighting function andg(ξ) is (approxiately) polynomial so that a more suitable quadrature rule may be found via

I[u] = int1

minus1f(ξ)dξ = int

1

minus1w(ξ) g(ξ)dξ asymp

nQPminus1

sumi=0

w(ξi) g(ξi) (1614)

Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type whichare obtained form a weighting function w(ξ) = (1 minus ξ2)minus12 and the quadrature points are theroots of Chebyshew polynomials Gauss-Hermite quadrature uses a weighting function w(ξ) =exp(minusξ2) (and the integral is taken over the entire real axis) Gauss-Legendre quadrature isincluded 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 degree2nQP minus 3 viz

I[u] = int1

minus1f(ξ) dξ asymp 2

nQP (nQP minus 1)[f(minus1) + f(1)] +

nQPminus1

sumi=2

Wi f(ξi) (1615)

163 Higher dimensions

Like the polynomial shape functions the above quadrature rules can easily be extended to 2Dand 3D eg

int1

minus1int

1

minus1f(ξ η)dξ dη = int

1

minus1[Nminus1

sumi=0

Wi f(ξi η)] dη =Nminus1

sumj=0

Wj [Nminus1

sumi=0

Wi f(ξi ηj)]

=nQPminus1

sumk=0

W lowastk f(ξk)

(1616)

with the combined weights W lowastk = WiWj and points ξk = (ξi ηj) obtained from the individual

quadrature rules in each direction By symmetry we choose N = radicnQP so that N2 = nQP

For example consider the Q4 element By using the 1D Gauss-Legendre weights and pointswe now have

first-order quadrature (q = 1) as in 1D has only a single quadrature point (nQP = 1)

W0 = 22 = 4 and (ξ0 η0) = (00) (1617)

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

third-order quadrature (q = 3) now has four quadrature points in 2D (nQP = 22 = 4)

W0 =W1 =W2 =W3 = 1 and (ξi ηi) = (plusmn 1radic3 plusmn 1radic

3) (1618)

Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly

88

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly in 3D the brick element may use Gauss-Legendre quadrature resulting in thefollowing schemes

first-order quadrature (q = 1) still has a single quadrature point (nQP = 1)

W0 = 23 = 8 and (ξ0 η0 ζ0) = (000) (1619)

third-order quadrature (q = 3) now has eight quadrature points (nQP = 23 = 8)

Wi = 1 and (ξi ηi ζi) = (plusmn 1radic3 plusmn 1radic

3 plusmn 1radic

3) (1620)

higher-order schemes follow analogously

Shown below are schematics of the quadrature point locations for Gauss-Legendre quadratureof orders q = 1 and q = 3 in both 1D and 2D

xx0

f(x )0

-1 +1

q = 1 in 1D

xx0

f(x )0

-1 +1x

x0

f(x )0

-1 +1x1

f(x )1

x

h

-1

-1

+1

+1

x0x1

x2x3

q = 3 in 1D

x

h

-1

-1

+1

+1

x0

q = 1 in 2D q = 3 in 2D

Ultimately the choice of a specific quadrature rule in any dimension depends on the functionf(ξ) to be integrated If the latter is of polynomial type then we may choose a Gaussianquadrature rule that leads to exact integration Else we may choose a quadrature rule basedon the smoothness of the function (Appendix J shows that the error introduced by a numericalquadrature rule strongly depends on the smoothness of function f) In general the choice of aquadrature rule is often a compromise between accuracy and efficiency

89

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

17 FEM which quadrature rule to use

171 Integrals in the FE context

The key integrals to be evaluated numerically within the FE context are (eg for a 2D quadri-lateral element with out-of-plane element thickness t) the element energy

Ie = intΩeW (εh)dV = int

1

minus1int

1

minus1W (εh(ξ))J(ξ)tedξdη asymp

nQPminus1

sumk=0

WkW (εh(ξk))J(ξk)te

as well as the nodal force vectors

F aintei = intΩeσij(εh)Na

j dV = int1

minus1int

1

minus1σij(εh(ξ))Na

j(ξ)J(ξ)tedξdη

asympnQPminus1

sumk=0

Wk σij(εh(ξk))Naj(ξk)J(ξk)te

(171)

Fruther we compute the element tangent matrix as

(Te)abik = intΩe

Cijkl(εh(ξk))NajN

bldV = int

1

minus1int

1

minus1Cijkl(εh(ξk))Na

j(ξ)N bl(ξ)J(ξ)tedξ dη

asympnQPminus1

sumk=0

WkCijkl(εh(ξk))Naj(ξk)N b

l(ξk)J(ξk)te(172)

Recall that in those relations the shape function derivatives and the strains are computed asrespectively

nablaxNa = Jminus1nablaξNa and εhij(ξ) =1

2suma

(uaeiNaej(ξ) + uaejNa

ei(ξ)) (173)

Of course the above can also be reformulate in terms of the B-matrix For example for a linearelastic element in 2D we have seen that

Te =Ke = intΩeB(ξ)TEB(ξ)dV asymp

nQPminus1

sumk=0

WkBT(ξk)EB(ξk)J(ξk)te (174)

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

172 Which quadrature rule to use

In all of the above integrals the required quadrature rule depends on the smoothness (orpolynomial order) of the integrands Since stresses shape function derivatives Jacobians andB-matrices are not necessarily smooth polynomials one often cannot (or due to computationalexpenses is not willing to) achieve exact integration for each element For example for the Q4element we have seen that J is linear in ξ hence Γ = Jminus1 is a fractional polynomial and Binvolves both Γ and nablaξNa

e As a consequence BTEB is some fractional polynomial that ishard to integrate exactly in general Therefore we introduce a minimum requirement forthe 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 anglesare preserved or in other words if J = const

90

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 171 Full integration for various element types

Let us determine full integration for the element types discussed before

The 4-node bilinear quadrilateral (Q4) is undistorted if the physical element has theshape of a rectangle (side lengths a and b) so that

J = ab4= const (175)

Then for a linear elastic Q4 element we have

F aintei = int1

minus1int

1

minus1Cijkl εhkl(ξ)N

aj(ξ)

ab

4tedξ dη = abte

4Cijkl int

1

minus1int

1

minus1εhkl(ξ)N

aj(ξ)dξ dη

(176)

where εh = sym(nablaxuh) is at most linear (since the interpolation of uh is bilinear) nablaxNa

is also at most linear for the same reason Overall the integrand is at most a quadraticpolynomial so that we need integration order q ge 2 Recall that in 1D we showed thatq = 2nQP minus 1 so that full integration of the Q4 element in 2D requires nQP = 2 times 2 = 4quadrature points

Full integration of the quadratic 2D elements Q8Q9 requires nQP = 32 = 9 quadraturepoints (the derivation is analogous to the above and is therefore omitted here)

Full integration of the 8-node brick element requires nQP = 8 quadrature points

For simplicial elements we showed that strains and stresses are constant across anelement so that a single quadrature point (nQP = 1) at an arbitrary location inside theelement is sufficient to integrate exactly Usually one chooses the element center whichgives

W0 = 1 ξ0 = η0 =1

3(in 2D) and ξ0 = η0 = ζ0 =

1

4(in 3D) (177)

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 simplicialquadrature rules (instead of Gaussian quadrature rules) whose weights and quadraturepoint locations can be found in look-up tables

mdashmdashmdashmdash

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 elementtangent matrix we make the same observation (ie those are integrated exactly as well) Forexample the energy reads

Ie = intΩeW dV = abte

4

1

2Cijkl int

1

minus1int

1

minus1εhij(ξ)εhkl(ξ)dξ dη

(Te)abij =abte

4Cijkl int

1

minus1int

1

minus1Naj(ξ)N b

l(ξ)dξ dη

(178)

where both Naj(ξ) and N b

l(ξ) are linear in ξ so that the resulting integrand is a quadraticpolynomial for the Q4 element in analogy to the above discussion of the nodal forces

Using an integration rule less than full integration is called under-integration or reducedintegration the opposite is called over-integration Which integration order to use dependsvery much on the element type the material model etc Sometimes under-integration can evenbe beneficial (eg to avoid locking) we will discuss one such example in Section 18

91

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

18 Element defects shear locking and hourglassing

The bilinear Q4 element is a classical example for an element type which displays a so-called element defect ie a spurious numerical artifact when using full integration in certainscenarios ndash specifically when used to simulate beam bending To demonstrate this we considera rectangular element having side lengths a and b in the x1- and x2-directions If bendingmoments M are applied to the two vertical edges then the element is expected to undergo purebending

In an actual (slender) Euler-Bernoulli beam we know from elastic beam theory that the stressesin the beam vary linearly across the thickness and that the only non-zero stress component isthe axial stress Therefore we may write (for an element of size a times b as shown below)

σ11 = minusx2

b2σmax σ22 = σ12 = 0 (181)

where σmax is the maximum tensile stress reached on the surface of the beam (at x2 = plusmnb2)From Hookersquos law in 1D we obtain

ε11 = minusσ11

E= minusx2σmax

Eb2 ε22 = minusν

σ11

E= ν x2σmax

Eb2 ε12 = 0 (182)

Let us try to find this solution using a single Q4 element To this end we apply horizontalforces to all four nodes of the element obtained from lumping the distributed beam stresses tothe nodes according to relation (815) found for the externally applied forces

Fext1 = intpartΩe

σ11N1e dS = minusint

1

minus1(minus x2

b2σmax)N1

e (ξ = minus1 η) t b2

= int1

minus1η σmax

(1 minus (minus1))(1 minus η)4

tb

2dη = minusσmaxtb

6= minusF with F = σmaxtb

6

(183)

(Note the minus stems from the negative cut so the traction at the left edge of the elementresponsible for the forces is in fact minusσ11) Analogously one obtains

Fext2 = F Fext3 = minusF Fext4 = F (184)

That is the bottom edge is stretched while the top edge is compressed (as in beam bending)

a

x1

x2

b MyMy

a

x1

x2

smax

smaxsmax

smax

x

hF

F

F

F

x

hU

U

U

U

beam loaded in bending stress distribution due tothe applied moments

Q4 element with equivalent nodal forces

elastic Q4 element deformedby the nodal forces

1 2

3 4

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 outhere for brevity but assume the exact stiffness matrix)

KeUhe = Fext =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusF0F0minusF0F0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Uhe =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusU0U0minusU0U0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

with U = aσmax

E

(1 + ν)(1 minus 2ν)2(1 minus ν) + (ab)2(1 minus 2ν)

92

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(185)

where we evaluated the element forces and stiffness matrix exactly (since the element is undis-torted we can easily reach full integration with 2 times 2 quadrature points)

The resulting strains within the element are evaluated as

εh11 = minusU

aη εh22 = 0 εh12 = minus

U

bξ (186)

While the axial strain component εh11 is physically reasonable (and the lack of a transverse shearεh22 ndash worst case ndash makes the element too soft against bending) the presence of a non-zero shearstress εh12 is problematic This so-called parasitic shear is not physical but a numerical artifact(elastic Euler beams produce no shear stresses cf (182)) This parasitic shear contributes tothe energy of the element so that ndash when minimizing the potential energy in a boundaryvalue problem ndash this shear component introduces artificial stiffness This becomes apparentwhen calculating eg the angle of bending θ of the beam in the above problem Comparingthe exact one (obtained form beam theory) to the approximate one (obtained from the aboveconstruction) one finds

θapprox

θexact=

1 minus ν2

1 +1 minus ν

2(a

b)

2 (187)

Notice that as the Q4 element becomes more and more slender (ab rarr infin) the numericallyobtained angle approaches 0 That is the element shows what is known as locking or morespecifically shear locking in case of long and slender elements (ab≫ 1) the high shear strainand associated elastic energy prevents the element from deformting it ldquolocksrdquo

MyMy

FF

F F

qapprox qexact

Next let us use numerical quadrature to evaluate the element quantities of interest For exam-ple for the energy we have

Ie = intΩe

1

2εh sdotCεhdV asymp t

2

nQPminus1

sumk=0

Wk εh(ξk) sdotCεh(ξk)J(ξk) (188)

We showed before that full integration requires nQP = 2 times 2 quadrature points (and we havedemonstrated above that exact integration leads to element locking under bending)

If instead we use reduced integration with only a single quadrature point (nQP = 1) locatedat ξ0 = 0 then notice that the strain fields in (186) vanish at the quadrature point locationξ = η = 0 Therefore the strains in this case produce no energy In other words any strain fieldof the form (186) can appear without causing any energy and therefore also without causingany resistance from the element in terms of nodal forces This is a zero-energy mode ofthe under-integrated Q4 element and a serious defect The resulting deformation of elements

93

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

undergoing alternating strains (186) is a numerical artifact and often referred to as hourglassmode or chicken-wire mode because of its appearance

Note that note only the underintegrated Q4 element has such a zero-energy mode For examplethe Q8Q9 elements have a similar zero-energy mode with curved element edges

+ + + +

+ + + +

+ + + +

++

++

underintegrated Q4 mesh showing hourglassing zero-energy mode of anunderintegrated Q8 element

simulation example with hourglassing

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 a2times 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with asingle quadrature point at ξk = 0 for the shear strain εh12 removes the spurious shear contributionwhile 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 deformationmodes) and should hence be used with caution

Overall take-home messages are (i) to not use Q4 elements to simulate beam bending (andinstead chose another type of element) and (ii) to be careful with reduced integration as zero-energy modes can appear as spurious deformation modes in the obtained solution

94

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

19 Assembly

Irrespective of the particular finite element type that is being used to solve a boundary valueproblem its solution requires the assembly of global vectors and matrices Specifically recallthat shape functions associated with a node a are non-zero only in elements adjacent to nodea in the FE context When computing eg the total energy E of a body (not accounting forexternal work) discretized into ne non-overlapping elements we may exploit that

E = intΩW (εh)dV =

ne

sume=1int

ΩeW (εh)dV =

ne

sume=1

Ie (191)

ie the total energy is the sum over all element energies When computing the global forcevectors and incremental stiffness matrices the situation is more complex which is why onecommonly introduces an assembly operator A such that

Fint =neAe=1Finte T =

neAe=1Te (192)

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 andglobal node numbering (and it is the reason elements must have ldquoknowledgerdquo of their node IDs)

Similarly the inverse operator extracts local element quantities from the global vector

Ue = Ae

minus1(U) (193)

For practical purposes it is helpful to recall that entry Uai (where a = 1 n is the node numberand i = 1 d refers to the coordinate) is located at position (a minus 1) sdot d + i in the assembledglobal vector Uh (using MATLAB notation with 1-indexed lists) For example consider a 2Dproblem using 2-node bar elements If an element connecting nodes 1 and 3 computes the nodalforce vectors F 1

inte and F 3inte then those are to be added onto the global force vector as

Fint =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+ F 1inte1

+ F 1inte2

sdotsdot

+ F 3inte1

+ F 3inte2

sdotsdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(194)

Analogously if the element connecting nodes 1 and 3 computes a stiffness matrix K13e then its

components must be added onto the global tangent stiffness matrix as

T =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+K1311 +K13

12 sdot sdot +K1313 +K13

14 sdot sdotK13

21 +K1322 sdot sdot +K13

23 +K1324 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdotsdot sdot sdot sdot sdot sdot sdot sdot

K1331 +K13

32 sdot sdot +K1333 +K13

34 sdot sdotK13

41 +K1342 sdot sdot +K13

43 +K1344 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(195)

Note that because nodes have non-zero FE shape functions only in adjacent elements the abovematrix is generally sparse (which comes with significant computational advantages)

95

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

20 Iterative solvers

The solution of linear elastic problems is easily found by solving a linear system of equations vizKU = Fext so that U = Kminus1Fext (assuming that rigid-body modes have been suppressed) Incase of nonlinear problems ndash such as those arising from more complex material models and fromthe geometric nonlinearity stemming from large deformations ndash an iterative solution method isrequired to solve the generally nonlinear system Fint(U) = Fext(U) (the external forces may ormay not depend on the deformation) Here we discuss a few common examples of such iterativesolvers the most important one being Newton-Raphson iteration

The problem to be solved can be written in the general form

f(U) = Fint(U) minusFext(U) = 0 (201)

where in many cases we assume that Fext is independent of U This however is not generallytrue ndash consider eg nodes attached to elastic springs so the nodal force depends on the positionof the node or a so-called follower force whose direction depends on the bodyrsquos deformation

All iterative solvers start with an initial guess U0 (eg U0 = 0) which is then corrected to find

Un+1 = Un +∆Un (202)

repeatedly until convergence is achieved An iterative scheme converges8 if ∆Un rarr 0 as nrarrinfinor equivalently f(Un) rarr 0 as n rarrinfin The various solution methods discussed in the followingdiffer primarily in the way ∆Un is computed based on a given vector Un

201 Netwon-Raphson (NR) method

The Newton-Raphson method (introduced by Newton in 1669 and generalized by Raphsonin 1690) is the most common technique for solving nonlinear systems of the above type Itstarts with a Taylor expansion assuming a small correction ∆Un

0 = f(Un+1) = f(Un +∆Un)

= f(Un) +partf

partU(Un)∆Un +O (∣∆Un∣2)

(203)

If we neglect higher-order terms then the above can be solved for the increment

∆Un = minus [T (Un)]minus1 f(Un) where T (Un) =partf

partU(Un) (204)

is the tangent matrix Note that we have thus broken the nonlinear problem (which is hardto solve) into many incremental linear problems (that are easy to solve)

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

T abik (Uhn ) =

partF aipartubk

(Un) =part

partubk(int

ΩσijN

aj dV minus F aexti)

= intΩ

partσij

partεhklN blN

aj dV minus

partF aexti

partubk

= intΩCijklNa

jNbldV minus

partF aexti

partubk

(205)

8The fact that an iterative solver converges does not necessarily imply that it converges to the correct equi-librium solution For the special case of linear elasticity indeed unique solution exists

96

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

We note that in general C = C(ε) ie for nonlinear problems the incremental tangent dependson the current state of deformation and hence on the nodal displacements U Only for thespecial case of linear elasticity is C a constant tensor containing the elastic moduli and beingindependent of deformation As shown before we can also write for each element e

Te(U) = intΩeBTCBdV (206)

where C is again the incremental stiffness matrix of the material model In the special caseof linear elasticity we saw that C = E = const and Te = intΩe

BTEB dV = Ke is the constantelement stiffness matrix

The Newton-Raphson solver requires that detT ne 0 in order to find a soltion which is guaranteedin linear elasticity if no rigid body mode exists as discussed in Section 214 (ie the linearizedsystem has no zero-energy mode so that U sdot T U ne 0 for all admissible U ne 0)

For linear elastic problems with constant external forces the Newton-Raphson solver convergesin only a single step since Fint =KU and therefore T =K = const so that

Un+1 = Un +∆Un = Un minus T minus1 [Fint minusFext]= Un minusKminus1 [KUn minusFext]= Un minusUn +Kminus1Fext

=Kminus1Fext

(207)

Let us close by mentioning the (dis)advantages of the Newton-Raphson scheme On thedownside the Newton-Raphson method requires the tangent matrix which may be expensiveto compute it may not always be available analytically and it may require significant com-puter memory (based on the matrix size for a mesh having n nodes in d dimensions we haveT isin Rndtimesnd) In addition the tangent matrix in nonlinear problems is not guaranteed to beinvertible this is particularly problematic in case of problems involving mechanical instabilityOn the plus side the Newton-Raphson method generally displays quadratic convergencewhile iterating which is why it is favorable for the solution of nonlinear problems (and it alsosolves linear problems in one step as shown above) If Newton-Raphson is not a viable optionthen the following techniques offer alternatives

202 Damped Newton-Raphson (dNR) method

A slight modification of the Newton-Raphson method the damped Newton-Raphson methodis beneficial eg when the NR method tends to overshoot (eg in case of oscillatory energylandscapes or multiple minima such as in large-strain elasticity)

The iterative scheme is identical to the classical NR method described above except that

Un+1 = Un + α∆Un with α isin (01) (208)

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

203 Quasi-Newton (QN) method

The Quasi-Newton method is the same as the classical NR method with the exception thatone does not use the actual tangent matrix T for computational simplicity or efficiency Its goal

97

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

is hence to avoid the expensive computation of T (U) and its inversion at each iteration stepTo this end one introduces a matrix Bn and updates its inverse directly

The general algorithm is as follows

(1) start with an initial guess U0 and matrix B0 = T (U0)(2) compute ∆Un = minusBminus1

n f(Un) and Un+1 = Un +∆Un and

Bminus1n+1 =Bminus1

n minus(Bminus1

n zn minus∆Un)otimes∆UnBminus1n

∆Un sdotBminus1n zn

with zn = f(Un+1)minus f(Un) (209)

We omit the full derivation of the update for Bminus1n+1 here for brevity The idea is that Bminus1

n+1 andBminus1n are approximately rank-one-connected using the Sherman-Morrison formula The added

benefit is that not only does T not have to be recomputed exactly but also can the inversion orlinear solver be skipped since the updated inverse is computed explicitly

204 Line search method

The line search method can be used as an improvement for other nonlinear iterative solversSimilar to the damped Newton-Raphson scheme updates are made according to

Un+1 = Un + β∆Un (2010)

where unlike in Section 202 β is not a constant but chosen such that f(Un+1) = 0 Forexample we may find β from solving

∆Un sdot f(Un + β∆Un) = 0 (2011)

This is generally a nonlinear but scalar problem to be solved for β isin R which can be solved bybisection regula falsi secant and other methods

Notice that (2011) is in fact the stationarity condition of the minimization problem

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

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

205 Nonlinear Least Squares

The family of methods based on nonlinear least squares aim to minimize

r(U) = ∥f(U)∥2 = f(U) sdot f(U) (2013)

which results in the stationarity condition

partr

partU(U) = 0 (2014)

This approach is helpful eg in case of over-constrained systems since the formulation ofthe residual r does not require as many equations as U has unknowns Application of theNewton-Raphson technique to this nonlinear system of stationarity equations leads to

∆U = minus [ part

partU

partr

partU]minus1

Un

partr

partU(Un)

= minus [TT(Un)partf

partU(Un)f(Un) +

partTT

partU(Un)f(Un)]

minus1

TT(Un)f(Un)(2015)

98

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

∆U = minus [TT(Un)T (Un)]minus1TT(Un)f(Un) (2016)

This latetr form is known as the Gauss-Newton method Note that this reduces to Newton-Raphson for standard problems (ie those with as many equations as unknowns) HoweverGauss-Newton can also be applied to overdetermined systems (ie more equations than un-knowns)

206 Gradient flow method

Although not necessarily with a proper physical meaning the gradient flow method (alsoknown as gradient descent) has become popular as an iterative solver for quasistatic problems

The idea is to replace the equation

0 = f(Un+1) (2017)

by a dynamic evolution equation

CUn+12 = minusf(Un) and Un+1 = Un +∆t Un+12 (2018)

with eg C = cI with c gt 0 It is obvious that as f rarr 0 we have Un+12 rarr 0 and thus themethod converges Although there is no guarantee to reach an extremum the method is popularbecause it does not require a tangent matrix and is quite robust

For example using a simple backward-Euler discretization for the time derivative and C = cIwe obtain

Un+1 = Un minus1

cf(Un) (2019)

207 Conjugate Gradient (CG) method

The conjugate gradient method follows the idea of iterating into the direction of steepestdescent in order to minimize the total potential energy (as a variation it can also be applied tothe nonlinear least squares problem)

Here the update is

Un+1 = Un + αnSn (2020)

where both the direction Sn and increment αn are determined in an optimal way as follows

The conjugate direction is updated according to

Sn = minusf(Un) + βnSnminus1 (2021)

with β computed from the current solution Un and the previous solution Un according to one ofseveral options (Polak-Ribiere Fletcher-Reeves etc) Then the scalar increment αn is obtainedfrom a line search to find

αn = arg min r (Un + αSn) (2022)

A benefit of the conjugate gradient technique is that as for gradient flow no tangent matrixis required A variation of this scheme originally developed for atomistics but also applicableto the FE method (and oftentimes converging faster than CG) is the so-called Fast InertialRelaxation Engine (FIRE)

99

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

21 Boundary conditions

We recall that the solving a mechanical boundary value problem by the finite element methodreduces to solving the global system of equations given by

Fint(U) = Fext(U) (211)

for the vector of all nodal dofs U If the material is linear elastic then Fint(U) = KU andsystem (211) is linear In general (ie for anything but linear elastic behavior) the system ofequations in (211) is nonlinear In Section 20 we discussed solution strategies for the abovesystem of equations but we still need to turn our attention to boundary conditions which hehave not discussed in detail so far This includes both Neumann boundary conditions (leadingto the specific form of Fext(U)) and Dirichlet boundary conditions (imposing restraints on thedegrees of freedom) These will be discussed in the following

211 Neumann boundary conditions

The right-hand side vector Fext in (211) includes the combined effects of externally appliedbody forces ρb and surface tractions t in general Of course if forces are applied only to FEnodes 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 nodalforces first

In Section 8 we derived the components of the external force vector as

F aexti = intΩρbiN

adV + intpartΩtiN

adS =sume

(intΩeρbiN

adV + intpartΩe

tiNadS) (212)

These integrals can be computed in the same fashion as all FE quantities (such as eg nodalforces and stiffness matrices) and it is convenient to use numerical quadrature to approximatethe above integrals in general For example for a 2D quadrilateral element (such as the Q4 Q8or Q9) we may write the contribution from element e to nodal force component F aexti due tobody forces as

F aextei = intΩeρbiN

adV = int1

minus1int

1

minus1ρbi(ξ)Na

e (ξ)J(ξ)tdξ dη asympnQPminus1

sumk=0

Wk ρbi(ξk)Nae (ξk) tJ(ξk)

(213)

Analogously surface tractions result in an external force on node a in direction i again for a2D isoparametric element e given by

F aextei = intpartΩe

tiNadS = int

1

minus1ti(ζ)Na

e (ζ)Jζ(ζ)tdζ asympnQPminus1

sumk=0

Wk ti(ζk)Nae (ζk) tJ(ζk) (214)

Note that the surface traction term integrates over the boundary of the element (ζ stands foreither ξ or η depending on the orientation of the surface on which the tractions are acting) soin d dimensions we can use a quadrature rule for d minus 1 dimensions (eg for a 2D element weuse 1D quadrature rule on an element edge)

Like for internal forces the global external force vector Fext results from assembling all elementcontributions ie from adding the contributions of all external element force vectors onto theglobal external force vector (see Section 19)

100

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

When using a variational formulation we may interpret external forces also in a variationalsense Specifically we can formulate the work done by the external force on element e as

Wexte = intΩeρb sdotu dV + int

partΩet sdotu dS (215)

The resulting force vector F aexte = partWextepartua acting on node a is given by the sum of (213)

and (214) We note that if t and ρb are independent of the nodal displacements ie Fext isindependent of U then the right-hand side of the system of equations to be solved is constantOtherwise Fint(U) minus Fext(U) = 0 is to be solved where the external forces also depend ondisplacements

Several examples of typical external forces in the FEM context are given below

P

PMy

k

n

au

Dx au

ll0

constant forceconstant moment

linear spring(linearized deform)

linear spring(nonlinear deform)

pressure loading(Q4 elements)

p

p

n2

n1

L1

L2

pL 22

pL 22

pL 21

pL 21

Before we dive into specific examples we point out one important aspect with regards to theimplementation and assembly of the overall problem So far we have primarily consideredproblems with context external forces so that we had to solve Fint(U) = Fext When theexternal forces also depend on the nodal unknowns (as eg in Examples 213 and 213 below)then the problem to be solved is in fact

f(U) = Fint(U) minusFext(U) = 0 (216)

Here we can still establish a variational structure exploiting that

I(U) = E(U)minusW (U)rarrminU

with E(U) = Anee=1Ie(Ue) W (U) = Anee=1Wexte(Ue)

(217)

so that

f(U) = partI

partU(U) = partE

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFint

minus partWpartU

(U)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFext

= Fint(U) minusFext(U) (218)

Here iterative solvers (discussed in Secion 20) need the complete tangent matrix (includingboth those contributions from internal and external forces) so that

T (U) = partf

partU(U) = partFint

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraTint from before

minus partFext

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraText∶ new contribution

= Tint(U) minus Text(U) (219)

Therefore when discussing the specific examples in the following we will define the work done bythe external force Wext along with the resulting external nodal forces F a

ext and the associatedexternal stiffness matrix contribution Text as introduced above When assembling the globalsystem both contributions ndash from internal and external forces ndash must be considered

101

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 211 Constant force

Consider a constant force P applied to a particular node b whose position is displacing with ubThe work done by this external force vector is

Wext = P sdotub (2110)

Therefore the resulting external force vector on any node a is

F aext =

partWext

partua= P δab (2111)

ie the constnat external force P is applied only to node b We note that the associated stiffnessmatrix (which would be needed for iterative solution schemes) vanishes since

T abext =partF a

ext

partub= 0 (2112)

Finally we note that the analogous formulation holds for applying a constant external bendingmoment My in case of beam elements with rotational dofs eg to node b in 2D

Wext =Myθb rArr Ma

ext =partWext

partθa=Myδab (2113)

mdashmdashmdashmdash

Example 212 Linear spring undergoing small deformations

Consider a linear elastic spring (stiffness k) attached to a node a along the n-direction (withunit vector ∣n∣ = 1 pointing in the direction of stretching the spring) which undergoes onlysmall deformations so that linearized kinematics can be used (the change of length ∆x of thespring is given by the projection of the displacement ua onto n) In this case the spring energyas a function of the displacement ua is

Espring =k

2∆x2 = k

2(ua sdotn)2 (2114)

To compute the nodal force vectors we need to be careful since Espring is the spring energyand not the work Wext performed by the spring Therefore one would add Espring to thepotential energy functional instead of substracting it as external work Recalling concepts fromundergraduate dynamics we know that the work done by the spring on the body must equalthe potential difference so Wext = Espring0 minus Espring where Espring0 = 0 in our case since thespring is initially unstretched Hence we have Wext = minusEspring The resulting force vector onnode a (all other nodal forces being zero) thus follows as

F aext =

partWext

partua= minus

partEspring

partua= minusk(ua sdotn)n (2115)

where the minus sign enters due to the use of E instead of Wext (and it makes sense physicallyif node a is displaced along the positive n direction the spring is stretched and hence the forceon node a must be acting in the opposite direction since the spring is pulling node a back)

The spring is an example where the external force vector does indeed depend on the nodaldisplacement ua The associated tangent stiffness matrix has the only non-zero component(sub)matrix T aaext and in general

T abext =partF a

ext

partub= minusknotimesn δab = const (2116)

mdashmdashmdashmdash

102

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 213 Linear spring undergoing large deformations

For comparison if the linear elastic spring from the previous example undergoes large defor-mations then the elastic energy in the spring ndash accounting for the nonlinear exact change inlength of the spring ndash is

E = k2( ∣xa +ua minusx0∣ minus ∣xa minusx0∣ )

2

(2117)

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 ie its anchor point and xa + ua with displacement ua is thedeformed position of node a (so that xa minus x0 is the undeformed spring length) External forcevector and stiffness matrix follow as before by differentiation

mdashmdashmdashmdash

Example 214 Pressure in linearized kinematics

A uniform pressure p is a common boundary condition in engineering applications (from pressurevessels to structures under snow loads etc) In this case the pressure p acting on a surface partΩwithin linearized kinematics results in tractions t = minuspn where n is the outward surface normal(with ∣n∣ = 1) Such a boundary condition is realized rather easily via (214) Specifically for asingle element surface partΩe with outward normal n the work done by a uniform pressure p is

Wexte = intpartΩe

t sdotuhdS = intpartΩe

(minusp)n sdotn

suma=1

uaeNae dS = minusp

n

suma=1

uae sdot intpartΩe

nNae dS (2118)

and the external force contribution from element e (associated with node a) follows as

F aexte =

partWexte

partuae= minuspint

partΩenNa

e dS (2119)

For example for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edgesare straight so that the normal n is constant along each element edge Further assume thatpressure p acts only on one edge partΩprime

e of length Le (and an out-of-plane thickness t) In thisspecial case the above simplifies to

F aext = minuspint

partΩprimee

nNae dS = minuspn

2intpartΩprime

e

Nae dS = minuspLet

2n (2120)

where we exploited that the shape function Na (varying linearly between 0 and 1 on the edgeif a is a node on the edge) integrates to 12 The total external force on node a due to pressureagain follows from summing over all element contributions so

F aext = sum

eisinNa

pLet

2(minusne) (2121)

where we need to sum over all elements adjacent to node a (here denoted by the set Na)pLet2 is nothing but the magnitude of the resultant force due to the uniform pressure p overthe element edge of length Le which is evenly distributed to the two nodes on that edge Notethat each edge has its own surface normal ne so that the above implies the net effect summedover all adjacent elements to node a One such example is shown in the rightmost graphicabove

We close by noting that the external forces are constant only because of the assumption ofsmall deformations If we considered large deformations then the force on the element edge

103

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

would change with deformation (as the surface area increases due to deformation so doesthe resultant force due to a uniform pressure) Therefore the finite-deformation scenario isconsiderably more complex and the work done by a constant external pressure acting on abody of deformed volume v = v(U) is Wext = pv

mdashmdashmdashmdash

Example 215 Linearly and quadratically varying surface tractions

In case of a linearly varying surface traction t(x) acting on the edge of an element e thecorresponding nodal forces can be obtained form the above equations Assume eg a (bi-)linear element in 2D (such as the CST or Q4) with straight edges for which a linearly varyingpressure p(x) (which varies between pa and pb see below) applied to an edge of length Le (andout-of-plane thickness t) translates into the two nodal forces

(Faexte

F bexte) = Let

6(2 1

1 2)(p

a

pb) (2122)

Similarly having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadraticelement (such as the LST Q8 Q9) leads to the equivalent nodal forces

⎛⎜⎝

F aexte

F bexte

F cexte

⎞⎟⎠= Let

30

⎛⎜⎝

4 2 minus12 16 2minus1 2 4

⎞⎟⎠

⎛⎜⎝

pa

pb

pc

⎞⎟⎠ (2123)

We note that of course one can also apply higher-order tractions to lower-order elements (ega quadratically varying load to a linearly interpolated edge) In this case however the workdone Wext is approximated by the FE discretization In the above two examples (which areshown schematically below) the equivalence is exact

pa

Le Le

a F

pb

a

bb F

pa

LeLe

a F

pc

a

bb F

c

pb

c F

linearly varying pressureon a linear element edge

quadratically varying pressureon a quadratic element edge

For more complex element types or more complex loading integration over the element edgeor surface can again be carried out using numerical quadrature on the element boundary (eachelement boundary normal ne is computed from the nodal locations) Again forces and stiffnessmatrix follow by differentiation (forces are constant and the stiffness matrix vanishes)

104

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

212 Dirichlet boundary conditions

Essential boundary conditions of the type uai = uai must be imposed onto the system of equationsFint(U) = Fext This is usually accomplished computationally in one of the two ways discussedin the following9 We here limit our discussion to linear elastic examples we will later reconsiderthe procedure for nonlinear systems when discussing iterative solvers in Section 213

2121 Substitution

Brute-force substitution is a simple method (which we already used in in Exercise 4) wereplace the respective equation for uai in the system KU = Fext by uai = uai eg if we wantu3 = u3 (using an example with only a single dof per node) then we replace the correspondingequation (ie the entries in the stiffness matrix and external force vector) resulting in

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 sdot sdotsdot sdot sdot sdot sdot0 0 1 0 0sdot sdot sdot sdot sdotsdot sdot sdot sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

u3

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

(2125)

2122 Condensation

The substitution method discussed above is simple to implement However it can be quiteexpensive computationally since the number of equations remains the same when imposingessential boundary conditions (this becomes a concern when a significant fraction of the dofsis constraint by essential boundary conditions) The condensation method removes from thelinear system to be solved those equations imposing essential boundary conditions

To understand this let us rewrite the above system of equations (2125) by moving the thirdcolumn to the right-hand side and inserting u3 = u3

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 0 K14 sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

F 3ext

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

minus

⎛⎜⎜⎜⎜⎜⎜⎝

K13

K23

K33

K43

K53

⎞⎟⎟⎟⎟⎟⎟⎠

u3 (2126)

so that we can eliminate the third row and column from the system

⎛⎜⎜⎜⎝

K11 K12 K14 sdotsdot sdot sdot sdotsdot sdot sdot sdotsdot sdot sdot K55

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

u1

u2

u4

u5

⎞⎟⎟⎟⎠=⎛⎜⎜⎜⎝

F 1ext

F 2ext

F 4ext

F 5ext

⎞⎟⎟⎟⎠minus⎛⎜⎜⎜⎝

K13

K23

K43

K53

⎞⎟⎟⎟⎠u3 (2127)

9We mention that similar techniques can also be employed to impose more complex conditions such as con-straints of the general type

f(uaub ) = 0 (2124)

which become important eg when enforcing rigid links between nodes (∣xa+uaminus(xb+ub)∣ = const) or systemsof bodies including rigid bodies (ie rigid links plus rigid angles) or imposing deformationmotion of a nodealong an inclined surfaces (ua = uan with fixed known unit vector n) Such constraints can be implemented ina similar fashion but are not discussed here further (we refer to the rich FEM literature)

105

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which we must solve for the unknowns (u1 u2 u4 u5) so that U = (u1 u2 u3 u4 u5)T

The clear advantage of this method is the reduction in size of the system to be solved Thedisadvantage is that it is computationally more involved (indeed it can be even more expensivethan the substitution technique when a small number of essential boundary conditions must beapplied to a large system)

x1

x2

x3

e1

e2

e3

+

x

paraW

u( p

P

g

paraWe

au p

P

g

x)

paraWe

au

1F

2F

3F

1P

2P

continuous BVP FE-discretized body FE-discretized BVP

213 A note on Dirichlet boundary conditions in iterative solvers

We would like to briefly re-assess the enforcement of Dirichlet boundary conditions in the contextof iterative solvers where we do not solve a simple linear system but we use iterative techniquesto solve a nonlinear system in incremental linear steps In order to impose uai = uai we discusstwo implementation strategies

Strategy I To impose uai = uai we can include this Dirichlet boundary condition directly in theinitial guess (ie make sure that uai = uai within vector U) and subsequently iterate accordingto

Un+1 = Un +∆Un (2128)

where the system of equations is modified such that ∆uain = 0 for all iterative steps n Thelatter can be accomplished in the same fashion as we imposed essential boundary conditionsearlier For example when using a Newton-Raphson solver we must solve

T (Un)∆Un = minusf(Un) (2129)

where we now modify the row of the tangent stiffness matrix T (Un) and right-hand-side vectorf(Un) such that ∆uain = 0 is enforced (see Section 212)

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 212) itcomes with one disadvantages when we enforce the boundary condition uai = uai directly in theinitial guess U0 (while using eg the solution from a previous load step as the initial guessfor all remaining dofs in U0) the resulting initial guess U0 may include a rather strong localdeformation 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 nonlinearproblems

Strategy II As a remedy to the above problems we may alternatively choose to not set uai = uaiin the initial guess and simply chose U0 as eg the solution from the previous load step (or

106

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

any other more or less sophisticated guess) In subsequent iterations we then solve

T (Un)∆Un = minusf(Un) (2130)

where we modify both T (Un) and f(Un) to enforce

∆uain = uai minus uain (2131)

so that the incremental update at iteration step n

Un+1 = Un +∆Un rArr uain+1 = uain +∆uain = uain + (uai minus uain) = uai (2132)

imposes uai = uai in a more natural incremental fashion without modifying the initial guess

214 Rigid body motion

For the linear elastic case the stiffness matrix K (and in the general nonlinear case the tan-gent matrix T ) has as many zero eigenvalues as it has rigid-body modes or zero-energymodes Ulowast This can easily be understood by recalling that the total potential energy of theFE-discretized body with global stiffness matrix K and in the absence of any external forcesreads

I = 1

2U sdotKU (2133)

If a particular global vector of the nodal displacements Ulowast ne 0 corresponds to rigid-bodymotion (ie 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 energyConsequently we must have

Ulowast sdotKUlowast = 0 (2134)

This in turn implies that Ulowast is an eigenvector of K with a corresponding zero eigenvalue(KUlowast = 0 which we also understand physically since rigid-body modes cause no nodal forcesso Fint = KUlowast = 0) Hence K has (at least) one zero eigenvalue and is thus not invertibleSince this holds true for each rigid-body mode Ulowast K has as many zero eigenvalues as rigidbody modes If such rigid-body modes exist then no unique solution can be found since bothU and U + Ulowast could be a solution (since K(U + Ulowast) = KU +KUlowast = KU = Fext) Thismanifests in K not being invertible so trying to find U =Kminus1Fext fails We saw this problemarise in Example 112

Therefore we must suppress each rigid body mode via appropriate essential boundary conditionsbefore solving a boundary value problem In 2D we need three essential boundary conditionsto suppress rigid-body translations and rotations in 3D we need a total of six (assuming thatnodes carry only displacement dofs) as shown below

107

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

rigid-body modes in 2D

rigid-body modes in 3D

We close by mentioning that when considering large nonlinear deformation mechanisms instructures may also constitute zero-energy modes (eg a pinned-pinned buckled beam has twostable equilibria and the displacement from one to the other is a so-called mechanism ie azero-energy body which is not rigid-body motion)

Finally if nodes carry further dofs beyond displacements (eg in case of beam elements orcoupled problems) the situation must be reassessed to make sure all possible rigid modes aresuppressed

108

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

22 Dynamics

Our discussion of mechanical boundary value problems so far has been limited to quasistaticsThe term quasistatics refers to the assumption of negligible inertial effects This does notnecessary 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 ofthe type σ = σ(ε ε) which clearly depend on the loading rate and hence on time irrespectiveof 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 eg vibrationsThis is intimately tied the boundary conditions of a problem and creates an initial boundaryvalue problem Static loading is generally time-independent Dynamic loads are time-dependentones for which inertial effects are not negligible Quasistatic loading is time-dependent but issufficiently slow such that inertial effects can be safely ignored

Here we will consider the extension of the mechanical boundary value problem discussed pre-viously to dynamic problems where inertial effects matter In an extension of the (quasi-)staticversion of Section 8 the strong form of the dynamic problem in linearized kinematics reads

⎡⎢⎢⎢⎢⎢⎢⎣

σijj + ρ bi = ρ ui in Ω

ui(x t) = ui(x t) on partΩD

σijnj(x t) = t(x t) on partΩN

(221)

with suitable initial conditions Now we have u ∶ ΩtimesRrarr Rd (ie the displacement field u(x t)varies with position x isin Ω and time t isin R) and it requires sufficient differentiability in bothspace and time Notice that the quasistatic case is easily recovered by neglecting the inertialterm ρu ie if the mass density ρ or the acceleration a(x t) = u(x t) vanish

Analogous to the quasistatic case we can cast the above strong form into a variational structureby making use of the so-called action principle To this end we define the action

A[u] = intt2

t1L[u]dt (222)

with the Lagrangian

L[u] = T [u] minus I[u] (223)

where I is the potential energy functional introduced in Section 6 and T denotes the kineticenergy functional

T [u] = intΩ

ρ

2∣u∣2 dV (224)

For a variational material model with energy density W and assuming that body forces ρb andsurface tractions t are imposed we thus arrive at the action

A[u] = intt2

t1[int

Ω(ρ

2∣u∣2 minusW (ε)) dV + int

Ωρb sdotu dV + int

partΩNt sdotu dS] dt (225)

The action principle (also known as the principle of stationary action10) states that thesolution u(x t) renders A stationary under suitable initial conditions ie

u = arg statA[u] ∶ st ICs (226)

10Various references call this dynamic variational principle the ldquoprinciple of least actionrdquo which is in generalnot correct since the solution must not necessarily be a minimizer of A it is merely guaranteed to be a stationarypoint

109

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This condition is analogous to the minimization of the total potential energy we used so far inthe quasistatic context Here we no longer minimize the total potential energy but we renderthe total action stationary with respect to the displacement field

Taking the first variation of the action A with respect to u (again using the divergence on thestress-term as done in quasistatic) we obtain the stationarity condition

δA[u] = intt2

t1[int

Ω(ρ ui δui minus σijδuij) dV + int

Ωρbiδui dV + int

partΩNtiδuidS] dt = 0 (227)

The dynamic weak form is thus given by

G[uv] = intt2

t1[int

Ω(ρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (228)

Let us for simplicity of the derivation assume that instead of giving two initial conditionsper point (eg imposing initial displacements and velocities) we seek a stationary solutionu(x t) which satisfies the conditions u(x t1) = u1(x) and u(x t2) = u2(x) (ie we assume thedisplacements are known at the initial and final times t1 and t2 respectively) Of course thisis hardly ever the case in reality ndash and the derived concepts apply equally to the case of knowninitial displacements and velocities yet this assumption simplifies our derivation significantly

The above weak form indicates the space of solutions and it particularly lets us conclude that

v isin U0 = v isinH1(Ω) timesH1(R) ∶ v = 0 on partΩD and at t = t1 or t = t2 (229)

where the last two conditions stem from our assumption of u(x t1) = u1(x) and u(x t2) =u2(x) being known

To remove the time derivative v we integrate by parts in time (the ldquoboundary termrdquo vanishessince v = 0 at t = t1 and t = t2)

G[uv] = minusintt2

t1[int

Ω(ρ uivi + σijvij) dV minus int

Ωρbivi dV minus int

partΩNtividS] dt = 0 (2210)

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

Since in the dynamic problem the displacement field depends on time we here introduce a semi-discretization ie we discretize the solution in space but not (yet) in time This implies thatwe introduce shape functions for the interpolation in space where ndash now ndash the nodal unknownsua become functions of time

uh(x t) =n

suma=1

ua(t)Na(x) and vh(x t) =n

suma=1

va(t)Na(x) (2211)

This also allows us to calculate time derivatives eg the approximate velocity and accelerationfields

uh(x t) =n

suma=1

ua(t)Na(x) and uh(x t) =n

suma=1

ua(t)Na(x) (2212)

Insertion into (2210) results in the semi-discrete weak form

G[uhvh] = minusintt2

t1

n

sumb=1

vbi [n

suma=1

uai intΩρNaN bdV + int

ΩσijN

bj dV

minusintΩρbiN

b dV minus intpartΩN

tiNbdS] dt = 0

(2213)

110

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which must hold for all vb(t) histories that vanish at t1 and t2 Because it must hold for allvb(t) histories we may conclude that the term in brackets must vanish vor all b = 1 n andi = 1 d (n being the number of nodes d the number of dimensions) These n times d equationsare discretized equations of motion

Analogous to before we collect all (now time-dependent) nodal dofs in the vector

U(t) = u1(t) un(t) (2214)

so that solving (2213) for all vb(t) is equivalent to solving the equation of motion

MU +Fint(U) minusFext(t) = 0 (2215)

with

Mabij = δij int

ΩρNaN bdV F binti = int

ΩσijN

bj dV F bexti = int

ΩρbiN

b dV +intpartΩN

tiNbdS

(2216)

Matrix M is called the consistent mass matrix and we write Fext = Fext(t) to indicate thatexternal forces are likely to depend on time (and they may also depend on displacements asdiscussed before)

Example 221 Consistent mass matrix of the 2-node bar element

The consistent mass matrix for a 2-node bar element (using theisoparametric formulation) is computed from its shape functions

N1(ξ) = 1 minus ξ2

N2(ξ) = 1 + ξ2

with ξ isin [minus11] (2217)

1 21

u 2ux

Specifically we have (with the total bar element mass me = ρALe)

Mab = intΩρNaN bdV = int

1

minus1ρNaN bA

Le2

dξ rArr Mbar1D = me

6(2 1

1 2) (2218)

Note that this is the consistent mass matrix for 1D motion ieU = (u1 u2)T If each node moves in 2D and hence has two dofsper node in the plane ie U = (u1

1 u12 u

21 u

22)T then each pair of

dofs (horizontal and vertical) is linked by the above mass matrixso that the total consistent mass matrix in 2D becomes

1 22u

x

1u1

1u

1u2u

1

2

2u

Mbar2D = me

6

⎛⎜⎜⎜⎝

2 0 1 00 0 0 01 0 2 00 0 0 0

⎞⎟⎟⎟⎠+ me

6

⎛⎜⎜⎜⎝

0 0 0 00 2 0 10 0 0 00 1 0 2

⎞⎟⎟⎟⎠= me

6

⎛⎜⎜⎜⎝

2 0 1 00 2 0 11 0 2 00 1 0 2

⎞⎟⎟⎟⎠ (2219)

mdashmdashmdashmdash

Example 222 Consistent mass matrix of the CST element

The consistent mass matrix of the constant-strain triangular element is computed analogouslyby integration of the shape functions Again starting with a single dof per node ie U =(u1 u2 u3)T the consistent mass matrix is obtained as (with element area Ae thickness te)

MCST1D = me

12

⎛⎜⎝

2 1 11 2 11 1 2

⎞⎟⎠

with me = ρAete (2220)

111

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The extension to 2D motion with dofs U = (u11 u

12 u

21 u

22 u

31 u

32)T follows from apply in the 1D

mass matrix to the horizontal and vertical dofs independently leading to

MCST2D = me

12

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

2 0 1 0 1 00 2 0 1 0 11 0 2 0 1 00 1 0 2 0 11 0 1 0 2 00 1 0 1 0 2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

with me = ρAete (2221)

mdashmdashmdashmdash

For all other elements the consistent mass matrix can be evaluated analogously or computedby numerical quadrature

Mab1D = int

ΩeρNaN bdV asymp

nQPminus1

sumk=0

WkρNa(ξk)N b(ξk)J(ξk) (2222)

We note that irrespective of the element type the (approximate) kinetic energy of an elementis computed as follows

T = intΩ

ρ

2∥uh∥2

dV = intΩ

ρ

2

n

suma=1

uaNa sdotn

sumb=1

ubN bdV = 1

2

n

suma=1

n

sumb=1

ua sdot ubintΩρNaN bdV (2223)

which can be conveniently recast into

T = 1

2U sdotM U (2224)

From the above examples we observe that the consistent mass matrix leads to a dynamiccoupling between the dofs ie the consistent mass matrix is not diagonal but includes significantoff-diagonal terms From a numerical perspective this is rather inconvenient as it may requireinverting M (as will be discussed soon) Therefore one often resorts to the so-called lumpedmass matrix which is an approximation that is diagonal

One such approach is the so-called particle-mass lumping which aims toevenly distribute the element mass me among its nodes and therefore simplyassumes that for an arbitrary element having ne nodes with d dofs per nodeMlumped isin Rnedtimesned is given by

Mlumpede =me

neI (2225)

m 2e m 2e

m 3e m 3e

m 3e

Example 223 Lumped mass matrix of the 2-node bar element

For example by using particle-mass lumping for a 2-node bar element one distributes the massme evenly to the two nodes resulting in

Mlumped1De =me

2(1 0

0 1) Mlumped2De =

me

2

⎛⎜⎜⎜⎝

1 0 0 00 1 0 00 0 1 00 0 0 1

⎞⎟⎟⎟⎠ (2226)

112

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that a comparison of the kinetic energies (eg in 1D) reveals

Tlumped =1

2Ue sdotMlumpedeUe =

me

4[(u1

e)2 + (u2e)2] (2227)

and

Tconsistent =1

2Ue sdotMconsistenteUe =

me

6[(u1

e)2 + (u2e)2 + u1

eu2e] (2228)

Hence using the lumped mass matrix implies an approximation of the kinetic energy (which isgenerally not exact)

mdashmdashmdashmdash

If defined properly then the solutions obtained from using either the consistent or lumpedmass matrix in the finite element context converge under h-refinement (As the element sizedecreases the differences between the two formulations also decrease so that in the limit ofinfinitely 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 matrixboth at the element and at the global level As a consequence all assembly operationsintroduced 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 androtational inertia must be considered (which is not discussed here in detail and no uniquesolution exists for the lumped mass matrix but various proposed approximations can be used ndashwhich either approximate the kinetic energy or the mass moments of inertia of the beam)

113

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

23 Vibrations

As shown in the previous section treating the dynamic mechanical problem in linearized kine-matics by the finite element method leads to the semi-discretized equations of motion

M U +Fint(U) = Fext(t) (231)

which are to be solved for the time-dependent vector of nodal dofs U = U(t) This solution isusually obtained in one of two ways we either solve for a time-continuous solution U(t) or wediscretize not only in space but also in time and introduce finite differences in time to solve forUα = U(tα) at discrete intervals tα = α∆t Time-continuous solutions in analytical form canusually be found only for special cases ndash vibrations are one such case discussed in the following

For our purposes vibrations are small-amplitude oscillations about a stable equilibrium con-figuration If a body is freely vibrating without any external excitation we speak of free vibra-tions otherwise (eg if harmonic forces or displacement boundary conditions are applied) weconsider forced vibrations In both cases we assume small amplitudes which leads to linearwaves and we consider oscillations about a stable equilibrium defined by nodal displacementsU0 (eg the undeformed configuration U0 = 0 is one such stable equilibrium)

231 Free undamped vibrations

Starting with the general nonlinear equations of motion (231) we linearize about a stableequilibrium configuration U0 with constant external forces Fext(t) = Fext = const such that thestatic equilibrium satisfies

Fint(U0) = Fext (232)

Next consider a small time-varying perturbation V (t) such that insertion of

U(t) = U0 +V (t) rArr U(t) = V (t) (233)

into the equations of motion leads to

MV +Fint(U0 +V ) = Fext (234)

Expanding the above for small ∣V ∣ ≪ ∣U0∣ to leading order gives

MV +Fint(U0) +partFint

partU(U0)V + hot = Fext (235)

or invoking equilibrium (232) and dropping all higher-order terms

MV + T (U0)V = 0 (236)

When considering free vibrations about the undeformed configuration of an elastic body theabove reduces to

MU +KU = 0 (237)

In general the form of the linearized equations of motion for free vibrations without externalforcing and without damping is

MU + TU = 0 (238)

114

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The general type of solution of the above ODE is of the harmonic form11

U = Ulowast exp(iωt) with ω isin R Ulowast isin Cdn (239)

Insertion into (238) leads to (exploiting that the equation must hold for all times t)

(T minus ω2M) U = 0 (2310)

which is an eigenvalue problem to be solved for the unknown ω isin R known as the eigen-frequency and the corresponding eigenvector U isin R known as the associated eigenmodeWe point out that M is positive-definite by definition (both for the consistent and lumpedmass matrix) and T = part2IpartU2(U0) is also positive-semi-definite because it is the tangent stiff-ness matrix associated with a stable equilibrium U0 As a consequence Mminus1T has only realeigenvalues ω determined from

det (T minus ω2M) = 0 (2311)

Further Ulowast = U isin Rnd is also real-valued (which is why we omitted the asterisk in (2310))Finally if ω is a solution of (2310) then so is minusω Since the sign if of minor importance herewe only consider the positive frequencies

For a FE discretization with ntimes d degrees of freedom (n nodes in d dimensions) the eigenvalueproblem (2310) has n times d eigenfrequencies ωj and associated eigenmodes Uj It is commonconvention to label the eigenfrequencies (and associated modes) in ascending order

0 le ω0 le ω1 le le ωntimesdminus1 (2312)

Recall that each rigid-body mode of the FE problem corresponds to a zero eigenfrequencyTherefore a 2D (3D) free vibration problem without essential BCs to suppress rigid-bodymotion has three (six) zero eigenfrequencies When all zero-energy modes have been removedthe lowest non-zero eigenfrequency is known as the natural frequency

Due to the linear nature of the ODE system the complete solution to the free-vibrationproblem is a superposition of the type

U(t) =ntimesd

sumj=1

clowastj Uj exp(iωjt) clowastj isin C for j = 1 n times d (2313)

for whose coefficients clowastj we must solve for a given set of initial conditions Recall that for amechanical initial boundary value problem we have two initial conditions per node and perdegree of freedom (eg imposing an initial displacement and velocity vector for each node)This provides the 2timesntimesd equations from which the coefficients clowastj isin C can be found (since thoseare complex we have in fact 2 times n times d unknowns viz the real and imaginary parts of each ofthe ntimesd coefficients) Roughly speaking free vibrations are characterized by the superpositionof vibrations at all eigenfrequencies with their respective eigenmodes

Example 231 Free vibration of a bar

Let us study the example of a freely vibrating linear elastic 2-node bar which we use to assessthe influence of the different types of mass matrices Consider a 2-node bar element with only

11The solution can alternatively be written in terms of trigonometric functions We here use the exponentialformulation U = Ulowast exp(iωt) for notational simplicity which by Eulerrsquos identity exp(iωt) = cos(ωt) + i sin(ωt)can be transformed into trigonometric solutions to obtain U = U1 cos(ωt) + U2 sin(ωt) To avoid confusion weuse the asterix lowast here and in the following to denote complex-valued variables

115

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

axial displacements in 1D so that each node has only a single dof ua The mass matrices andthe stiffness matrix for this case were derived previously as

Mconsistent =m

6(2 1

1 2) Mlumped =

m

2(1 0

0 1) K = EA

L( 1 minus1minus1 1

) (2314)

For each of the two mass matrices we compute the two eigenfrequencies and eigenmodes bysolving the eigenvalue problem

(K minus ω2M)U = 0 rArr det (K minus ω2M) = 0 (2315)

Insertion of the stiffness and consistent mass matrix results in the two solutions

ωconsistent0 = 0 ωconsistent

1 =radic

12EA

mL= 2

radic3

radicEA

mLasymp 3464

radicEA

mL (2316)

The corresponding eigenvectors follow from insertion of the eigen-frequencies into the eigenvalue problem giving

U consistent0 = (1

1) U consistent

1 = ( 1minus1

) (2317)

1 2

1 2

U0

U1

As expected we have one zero eigenfrequency associated with rigid body translation and onenon-zero eigenfrequency

When repeating the above procedure with the lumped mass matrix we instead obtain

ωlumped0 = 0 ωlumped

1 = 2

radicEA

mL (2318)

and

U lumped0 = (1

1) U lumped

1 = ( 1minus1

) (2319)

Hence the two cases yield the same eigenmodes U0 and U1 but they differ significantly in thefundamental frequency ωconsistent

1 vs ωlumped1

For comparison let us compute the exact solution by studying the free vibration of a continuoushomogeneous linear elastic bar Linear momentum balance ie

Euxx = ρu (2320)

admits the separable solution

u(x t) = u(x) exp(iωt) rArr Euxx(x) = minusω2ρ u(x) (2321)

Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L so that

ux(0) = ux(L) rArr u(x) = A cos(nπxL

) (2322)

with an integer n isin Z and a constant A isin R Insertion into (2320) leads to

minusE (nπL

)2

= minusω2ρ rArr ωn = nπradic

EA

mL (2323)

116

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the lowest two eigenfrequencies are obtained as

ω0 = 0 ω1 = πradic

EA

mL (2324)

Comparison with the above two approximate formulations reveals that

ωlumped1 le ω1 le ωconsistent

1 (2325)

mdashmdashmdashmdash

We can generalize the above observation to vibrational problems (here without proof) Theeigenfrequencies obtained from the consistent mass matrix generally over-estimate theeigenfrequencies while the lumped mass matrix usually provides under-estimates of theeigenfrequencies (the latter is not rigorous though since it depends on the choice of the lumpedmass matrix)

232 Forced vibrations

As defined above forced vibrations result from small-amplitude harmonic excitation of astructure We again start with the linearized governing equations

MU + TU = Fext(t) (2326)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext(t) = Fext cos(Ωt) (2327)

with an excitation frequency Ω isin R and an amplitude vector Fext isin Rdn (2326) showsthat the solution vector generally consists of a homogeneous solution and a particular solutionaccording to

U(t) = Uhom(t) +Upart(t) = Uhom(t) + U cos(Ωt) where U isin Rdn (2328)

The homogeneous solution corresponds to a free vibration (see Section 231) and is usuallyof little interest (any realistic system has a minimum amount of damping which makes thehomogeneous solution of a free vibration decay over time while the particular solution of theforced vibration assumes a steady state) Insertion of the particular solution into (2326) gives

(minusΩ2M + T ) U = Fext (2329)

which is a linear system of equations to be solved for the displacement amplitude vector U Specifically if

det (minusΩ2M + T ) ne 0 hArr Ω is not an eigenfrequency of the system (2330)

then

U = (minusΩ2M + T )minus1Fext rArr Upart(t) = (minusΩ2M + T )minus1

Fext cos(Ωt) (2331)

Hence the system responds to a harmonic excitation ndash at steady state ndash with a harmonicvibration at the excitation frequency As the excitation frequency approaches an eigenfrequency(Ω rarr ωj) the above matrix becomes singular and the displacement amplitude vector U tendsto infinity (this is characteristic of resonant effects)

117

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

233 Modal decomposition

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations thentime-continuous solutions are usually hard to find and one may resort to finite-difference schemes(as discussed next in Section 24) Alternatively one may find time-continuous solutions by themethod of modal decomposition which is based on the above eigenfrequency analysis

The starting point of the concept of modal decomposition is to express the unknown time historyof the vector of nodal dofs through a carefully chosen basis viz

U(t) =ntimesd

sumi=1

zi(t) Ui (2332)

where we use the (somehow normalized) eigenvectors Ui 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 ndash for which to understand we need toinclude a somewhat longer derivation By considering the eigenvalue problem for two distincteigenmodeseigenfrequencies i and j we may write

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0

(T minus ω2jM) Uj = 0 rArr Ui sdot (T minus ω2

jM) Uj = 0(2333)

where we pre-multiplied each of the two equations by the respective other eigenvector Sub-traction of the two equations (using that T is by definition symmetric) results in

(ω2i minus ω2

j ) Ui sdotM Uj = 0 hArr ωi = ωj or Ui sdotM Uj = 0 (2334)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ui sdotM Uj If weassume that we have only distinct eigenfrequencies12 then we may conclude that

Ui sdotM Uj = 0 if i ne j (2335)

We can normalize the eigenvectors in the following fashion

Ui larrUiradic

Ui sdotM UirArr Ui sdotM Ui = 1 (2336)

so that overall

Ui sdotM Uj = δij (2337)

Next if we start with

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0 (2338)

then we may also conclude that by invoking (2337)

Uj sdot T Ui = 0 if i ne j (2339)

12Theoretically we may surely have repeated eigenvalues and hence duplicated eigenfrequencies However anumerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (andrigid-body modes are usually removed unless the simulated response requires rigid-body motion) In case of anyduplicated eigenfrequencies one could still introduce eg Gram-Schmid orthonormalization to produce a set ofeigenmodes that do satisfy the below condition

118

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly by pre-multiplying by the respective same eigenvector ie

Ui sdot (T minus ω2iM) Ui = 0 (2340)

we solve for ω2i and obtain Rayleighrsquos quotient which here simplifies due to the normalization

(no summation over i implied)

ω2i =

U(i) sdot T U(i)

U(i) sdotMU(i)

= U(i) sdot T U(i) rArr Ui sdot T Uj =⎧⎪⎪⎨⎪⎪⎩

ω2i if i = j

0 else(2341)

Let us now return to the modal decomposition of a linearized elastic system using the Fourierrepresentation

U(t) =ntimesd

sumi=1

zi(t) Ui (2342)

where U1 Un 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 scalarcoefficients that are continuous functions of time (maintaining the semi -discretization)

We substitute (2342) into the linearized equations of motion with external forces Eq (2326)or MU + TU = Fext so we arrive at

ntimesd

sumi=1

[zi(t)MUi + zi(t)T Ui] = Fext(t) (2343)

Pre-multiplying by Uj gives

ntimesd

sumi=1

[zi(t) Uj sdotMUi + zi(t)Uj sdot T Ui] = Uj sdotFext(t) (2344)

and exploiting the above orthogonality relations leads to

zj(t) + ω2j zj(t) = Uj sdotFext(t) for j = 1 n times d (2345)

This equation is quite remarkable as it is a scalar linear ODE for each unknown function zj(t)Moreover the system of equations for the n times d unknown functions zi(t) (with i = 1 n times d)has decoupled into n times d uncoupled scalar ODEs to be solved independently for the zi(t) Thestrategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes Uj so that thecoefficients and right-hand sides in (2345) are known The resulting system of decoupled linearODEs can relatively inexpensively be solved for the functions zj(t)

For many practical problems only a limited number of modes are important so we may restrictthe representation (2342) to include only the lowest m lt n times d modes (corresponding to the mlowest eigenfrequencies) Therefore significant numerical efficiency can be gained by truncatingthe Fourier sum and only using the m lowest modes which is referred to as order reduction

U(t) =m

sumi=1

zi(t) Ui m lt n times d (2346)

119

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

234 Structural damping

In structural dynamics (ie in the analysis of structures involving bars beams plates etc)one often includes velocity-proportional damping in an approximate average sense by the intro-duction of a damping matrix C such that the equations of motion (2215) become

MU +CU +Fint(U) minusFext(t) = 0 (2347)

This is the higher-dimensional analog to the classical 1D system consisting of masses springsand dashpots as discussed in undergraduate Dynamics The C-matrix serves as the analog ofthe dashpot which provides velocity-proportional damping The most common form of C usedin structural FEA is mass- and stiffness-proportional damping which assumes

C = αM + βK α β isin R+ (2348)

That is C is a combination of the mass and stiffness matrices M and K respectively Thechoice of parameter α ge 0 controls low-frequency vibration attenuation while parameter β ge 0suppresses high-frequency vibrations We skip the detailed derivation here and refer to FEAliterature on structural damping

If damping is included in a problem of free or forced vibrations then the above strategies andrelations ndash in principle ndash still apply As a major difference solutionsU = U(t) will include a timedelay implying that the energy dissipation due to damping results in forces and displacementsnot being ldquoin syncrdquo anymore but the bodyrsquos deformation lagging behind any applied forces thatcause the deformation This is best captured by starting with an ansatz

U(t) = Ulowast exp(iωlowastt) with ωlowast isin C and Ulowast isin Cdn (2349)

solving for the complex valued solutions and finally extracting the displacement solution as thereal part ie U(t) = Re [Ulowast exp(iωlowastt)]

For example for a forced vibration with structural damping we now have

Upart(t) = Re [(minusΩ2M + iΩC + T )minus1Fext] cos(Ωt) (2350)

120

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

24 Time-dependent transient solutions

If the time-dependent solution for the nodal variables U(t) cannot be obtained in a continuousmanner (eg as discussed above for free vibrations or via modal decomposition) then one usu-ally seeks solutions in a time-discretized fashion (eg by using finite-difference approximationsin time) This turns the previously introduced semi -discretization of our fields of interest intoa proper discretization in both space and time

As discussed in Section 3 at the beginning of this course finitedifferences are a convenient technique when the discretization isapplied to a regular grid with uncomplicated boundary conditions(such as when choosing constant time increments ∆t with knowninitial conditions) We here re-use those techniques introduced backin Section 3 for the discretization in time Specifically we define aconstant time increment ∆t gt 0 and seek solutions at discrete timeintervals writing

∆t = tα+1 minus tα ua(tα) = uaα Uα = U(tα) forall α ge 0

and arbitrarily choosing t0 = 0

au

au

au

au

Dt

t

In order to solve the equations of motion we must choose between explicit and implicit inte-gration schemes ndash which come with all the advantages and disadvantages discussed in generalin Section 3 Let us first turn to the simpler case of explicit time integration13

241 Explicit time integration

The most frequent choice ensuring quadratic convergence while maintaining small finite-differencestencils is the use of central-difference approximations in time which turn the nodal velocityand acceleration vectors into respectively

U(tα) = Uα+1 minusUαminus1

2∆t+O(∆t2) U(tα) = U

α+1 minus 2Uα +Uαminus1

(∆t)2+O(∆t2) (241)

Insertion into the equations of motion (2347) (here including damping for completeness anddropping higher-order terms) leads to the time-discretized equations of motion

MUα+1 minus 2Uα +Uαminus1

(∆t)2+CU

α+1 minusUαminus1

2∆t+Fint(Uα) minusFext(tα) = 0 (242)

which can be reorganized into

[ M

(∆t)2+ C

2∆t]Uα+1 = 2M

(∆t)2Uα + [ C

2∆tminus M

(∆t)2]Uαminus1 minusFint (Uα) +Fext(tα) (243)

This is an update rule for Uα+1 resulting in a scheme of explicit time integration (ie vectorUα+1 can be computed directly from the known previous solutions Uα and Uαminus1 We note theabove relation indicates that solving for Uα+1 still requires the solution of a linear system (dueto the matrix in brackets in front of Uα+1) Yet all nonlinearity that is possibly inherent inFint (U) is irrelevant to the solution procedure as the internal forces in (243) depend only onthe previous known solution Uα

13We note that similar concepts can also be applied when the time increment ∆t is not constant or is adaptivelymodified during the course of a simulation However we here restrict our discussion to constant time steps ∆t

121

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Stability generally limits the choice of the time step ∆t in explicit schemes as discussed inSection 3 This also applies to the dynamic FE formulation described above Without proof wemention that stability requires

∆t le ∆tmax =2

ωmax (244)

with ωmax being the highest eigenfrequency of the FE problem (see Section 231) It is importantto realize that the highest eigenfrequency generally scales inversely with the size of the smallestelement in the mesh ie

ωmax prop1

hmin (245)

For example we showed in Example 231 that the fundamental frequency of a two-node barwas of the form ω1 prop 1

L

radicEρ with L being the element size

Despite the explicit scheme being straight-forward to implement and inexpensive to solve atthe time-step level the above stability constraint has unfortunate consequences The maximumallowed time step ∆tmax decreases with decreasing mesh size ie dynamic FE problems thatare already expensive because of high mesh resolution are even more expensive when usingexplicit time integration due to the required small time step size Moreover what matters isthe absolute smallest element size hmin and not the average element size Therefore the smallestelement in a FE mesh generally dictates the critical step size ∆tmax (even if the average elementsize is considerably larger)

242 A reinterpretation of finite differences

Instead of introducing finite-difference schemes in time as discussed above we could alterna-tively introduce interpolations in time analogous to the interpolation in space introduced withinthe FE context based on shape functions and nodal values We here aim to show that such aninterpolation in time is indeed feasible and that in fact the above explicit central-differencediscretization can be re-interpreted as such an interpolation

To start consider a discretization in time which evaluates U at discrete time intervals ∆t andthen uses a quadratic interpolation in time to define U(t) at all times t ge 0 ie we define

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t) for t isin [tα minus ∆t2 t

α + ∆t2 ] (246)

Shape functions Nα(t) interpolate in time and analogous to thespatial discretization of the FE method we define Nα(tβ) = δαβThe resulting quadratic shape functions are

Nα+1(t) = (t minus tα)(t minus tαminus1)2(∆t)2

Nα(t) = (tα+1 minus t)(t minus tαminus1)(∆t)2

and

Nαminus1(t) = (tα+1 minus t)(tα minus t)2(∆t)2

(247) Dt

t

aN

a+1N

a-1N

at +Dt2

at -Dt2

at

a+1t

a-1t

This piecewise-quadratic interpolation with the above range of validity ensures that U(t) istwice differentiable (as needed for the acceleration) It further guarantess that not only is U(t)continuous over time but also

part

parttNα+1(tα minus ∆t

2 ) = 0 andpart

parttNαminus1(tα + ∆t

2 ) = 0 (248)

122

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that U(t) is continuous as well Consequently the acceleration

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t)

= Uα+1

(∆t)2minus 2

(∆t)2+ U

αminus1

(∆t)2= U

α+1 minus 2Uα +Uαminus1

(∆t)2for t isin [tα minus ∆t

2 tα + ∆t

2 ](249)

is piecewise-constant and recovers the second-order central-difference scheme in time cf (241)

The approximate displacement field now discretized in both space and time has become

uh(x t) =n

suma=1

α+1

sumγ=αminus1

uaγNγ(t)Na(x) for t isin [tα minus ∆t2 t

α + ∆t2 ] x isin Ωh (2410)

where uaγ = uh(xa tγ) is the displacement of node a at time tγ The acceleration field followsas the piecewise-constant (in time) approximation

uh(x t) =n

suma=1

uaα+1 minus 2uaα +uaαminus1

(∆t)2Na(x) for t isin [tα minus ∆t

2 tα + ∆t

2 ] x isin Ωh (2411)

Next we must insert the discretization into the weak form (2210) which also requires a choicefor the trial function vh(x t) We can either choose a Bubnov-Galerkin scheme where vh(x t)is discretized in the same fashion as uh(x t) the consequence is that we arrive at an implicitsystem in time to solve for all nodal unknowns (ie one cannot simply march forward in timebut has to solve for the nodal solution at all times at once) Alternatively we may choose aPetrov-Galerkin scheme in time and ndash having in mind that we wish to evaluate informationonly at the discrete time steps ndash define the trial function (assuming nt time steps) as

vh(x t) =n

sumb=1

vb(t)N b(x) =n

sumb=1

nt

sumα=1

vbαN b(x)δ(t minus tα) (2412)

This approximation of collocation type leads to the weak form being reduced to only the discretetime steps When this choice of vh along with uh is inserted into the weak form (2210) ie

G[u v] = intt2

t1[int

Ω(minusρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (2413)

the integration over time reduces the delta functions to the simple form

nt

sumb=1

vbi

⎡⎢⎢⎢⎢⎣int

Ω

⎛⎝minusρuaα+1i minus 2uaαi + uaαminus1

i

(∆t)2NaN b minus σij(εhα)N b

j

⎞⎠

dV

+intΩρbi(tα)N b dV + int

partΩNti(tα)N bdS] = 0

(2414)

for each time step α (0 le tα le nt∆t) and for all admissible choices of vbi The latter implies thatthe above terms in brackets must vanish or that we must have

intΩρNaN b dV

uaα+1i minus 2uaαi + uaαminus1

i

(∆t)2+ int

Ωσij(εhα)N b

j dV

minus intΩρbi(tα)N b dV minus int

partΩNti(tα)N bdS = 0

(2415)

When inserting our definitions of the consistent mass matrix and the internalexternal forcevectors (cf (2216)) the above is equivalent to

MUα+1 minus 2Uα +Uαminus1

(∆t)2+Fint(Uα) minusFext(tα) = 0 (2416)

which was derived above for a second-order finite-difference time discretization see (242) Ofcourse the same procedure can also be applied to other choices of vh which leads to differenttime discretization schemes

123

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

243 Implicit time integration

Following the above explicit schemes we proceed to discuss implicit time integration whichuses the same discretization in time but requires solving a generally nonlinear system of equa-tions for Uα+1 Various techniques exist the most prominent ones of which we summarize inthe following

2431 Newmark-β method

The most popular scheme for mechanical problems is the so-called Newmark-β method (itwas originally developed for problems in structural mechanics in 1959 by Nathan M Newmarkof the University of Illinois at UrbanandashChampaign after whom it was later named)

We start with the mean value theorem which tells as that

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2417)

and analogously

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2418)

Particular schemes now differ by how U(t) is defined during an interval (tα tα+1) so that theabove two equations can be integrated to find U(t) and U(t)

The so-called average acceleration method eg assumes that the acceleration is piecewiseconstant between two time steps and specifically that

U(t) = Uα+1 + Uα

2= const for t isin (tα tα+1) (2419)

Insertion into (2418) along with U(tα) = Uα leads to

U(t) = Uα + (Uα+1 + Uα) t minus tα

2 (2420)

and inserting this into (2417) with U(tα) = Uα gives

U(t) = Uα + Uα(t minus tα) + (Uα+1 + Uα) (t minus tα)2

4 (2421)

Finally evaluating (2420) and (2421) at the new time step α + 1 yields respectively

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + Uα) (∆t)2

4

(2422)

This is apparently an implicit definition of the new velocity and displacement vectors sincethey involve the unknown acceleration Uα+1 at the new time

As an alternative the linear acceleration method assumes a linear interpolation instead of apiecewise-constant one thus starting with

U(t) = Uα + (Uα+1 minus Uα) t minus tα

∆tfor t isin (tα tα+1) (2423)

124

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Carrying out the same substitutions and integrations as above for the average accelerationscheme we here arrive at

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + 2Uα) (∆t)2

6

(2424)

which is yet another implicit definition of the new velocity and displacement vectors

We note that we can also cast our explicit central-difference scheme from before into theabove framework if we assume a piecewise-constant acceleration

U(t) =⎧⎪⎪⎨⎪⎪⎩

Uα for t isin (tα tα+tα+1

2 )Uα+1 for t isin ( tα+tα+1

2 tα+1) (2425)

The Newmark-β method generalizes the above cases into a single framework which definesthe new displacements and velocities as

Uα+1 = Uα +∆t Uα + (∆t)2

2[2β Uα+1 + (1 minus 2β)Uα] (2426a)

Uα+1 = Uα +∆t [γUα+1 + (1 minus γ)Uα] (2426b)

where 0 le β le 1 and 0 le γ le 1 are parameters to be chosen The above schemes are included asspecial cases

β = 14 γ = 1

2 leads to the most popular average acceleration scheme (which turns outto be unconditionally stable and to have no numerical damping)

β = 16 γ = 1

2 is the linear acceleration scheme (which is conditionally stable and showsnumerical damping)

β = 0 γ = 12 recovers the explicit central-difference scheme (241)

As a major benefit of the Newmark schemes for linear structural problems the method canprovide unconditional stability Specifically

γ ge 12 and β ge γ2 guarantees that the method is unconditionally stable

γ ge 12 and β lt γ2 leads to methods being conditionally stable where as discussed before∆tcr prop ωminus1

max

For γ = 12 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-differencemethods introduce artificial numerical damping (see the discussion in Section 42 on phaseerror analysis) Whenever γ gt 12 the Newmark family of methods produces numerical damp-ing The average acceleration scheme (β = 1

4 γ = 12) 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 definitionsof velocities and displacements (2426a) into a form that allows us to perform algorithmic timestepping To this end let us first solve (2426a) for the acceleration at the new time tα+1

Uα+1 = 1

β(∆t)2(Uα+1 minusUα minus∆t Uα) minus 1 minus 2β

2βUα (2427)

125

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Insertion into (2426b) yields

Uα+1 = Uα +∆t(1 minus γ)Uα + γ

β∆t(Uα+1 minusUα +∆t Uα) minus γ∆t

1 minus 2β

2βUα

= (1 minus γβ) Uα + γ

β∆t(Uα+1 minusUα) minus∆t( γ

2βminus 1) Uα

(2428)

Next inserting both velocity (2427) and acceleration (2428) into the equation of motion atthe new time tα+1

MUα+1 +CUα+1 +Fint(Uα+1) minusFext(tα+1) = 0 (2429)

leads ndash after some rearrangement ndash to

( 1

β(∆t)2M + γ

β∆tC)Uα+1 +Fint(Uα+1) minusFext(tα+1)

=M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2430)

The right-hand side of (2430) is fully known as it only involves Uα Uα and Uα from theprevious time step The left-hand side is generally nonlinear and requires an iterative solverunless the problem is linear elastic in which case Fint(Uα+1) =KUα+1 and the above left-handside is linear in Uα+1

Note that the implementation is quite similar to that of the quasistatic problem using eg theNewton-Raphson solver discussed in Section 201 Specifically we now have

f(Uα+1) =MlowastUα+1 +Fint(Uα+1) minusF lowastext(tα+1Uα Uα Uα) = 0 (2431)

where

Mlowast = 1

β(∆t)2M + γ

β∆tC = const (2432)

and

F lowastext(tα+1Uα Uα Uα) = Fext(tα+1) +M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2433)

Note that Mlowast is constant while F lowastext is fully known from the previous time step and the applied

external forces Therefore the problem is quite similar to the quasistatic problem The tangentmatrix used for iterations is

T lowast =Mlowast + T = 1

β(∆t)2M + γ

β∆tC + T (2434)

Boundary conditions can be implemented in the same fashion as for the quasistatic solversdiscussed in Section 213

In the special case of a linear elastic problem the nonlinear system of equations turns into alinear one viz

f(Uα+1) =MlowastUα+1 +KUα+1 minusF lowastext(tα+1Uα Uα Uα) = 0 (2435)

126

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that

Uα+1 = (Mlowast +K)minus1F lowast

ext(tα+1Uα Uα Uα) (2436)

The algorithmic structure is as follows At each time step we solve (2430) for Uα+1 (usingan iterative solver such as Newton-Raphson for nonlinear problems) based on the informationfrom the previous time step Uα Uα and Uα along with information about the applied externalforces Fext(tα+1) This implies we must store vectors Uα Uα and Uα after each converged timestep Once the new solution Uα+1 has been found we compute Uα+1 from (2427) and Uα+1

from (2428) store all of those vectors and move on to the next time step

244 HHT-α method

The HHT method (also known as the HHT-α method) is a modification of the above implicitNewmark scheme It is named after its inventors Hilber Hughes and Taylor and has gainedpopularity in commercial codes The idea is to use the same Newmark relations (2426a) and(2426b) but to modify the equations of motion into which they are inserted viz assuming

MUα+1 +C [(1 minus α)Uα+1 + α Uα] + (1 minus α)Fint(Uα+1) + αFint(Uα)= (1 minus α)Fext(tα+1) + αFext(tα)

(2437)

with a newly introduced parameter α (using the overline to avoid confusion with our timestep α) α = 0 recovers the Newmark-β scheme If one chooses

0 le α le 1

3 β = (1 + α)2

4 γ = 1

2+ α (2438)

then the HHT method is unconditionally stable and at least second-order accurate Increas-ing α decreases the simulated displacements at high frequencies (thus removing high-frequencynoise from simulated dynamics problems) which can be beneficial in structural dynamics

245 Use of mass matrices

Let us close this section by discussing the use of consistent vs lumped mass matrices in thecontext of explicitimplicit time stepping Recall that for free vibrations we had observedthat the consistent mass matrix generally overpredicts eigenfrequencies while the lumped massmatrix tends to underpredict those Unfortunately we do not have the time here but we coulddo a careful phase error analysis for the explicit and implicit time-stepping schemes derivedabove (recall that we discussed phase error analysis in the context of finite differences see Sec-tion 42) The outcome is that implicit schemes generally introduce numerical error in the formof so-called period elongation ie using implicit schemes like the average-acceleration one(although having no numerical damping) leads to vibrational frequencies being underestimatedHence combining implicit schemes with consistent mass matrices compensates for the errorsintroduced by the two Likewise explicit schemes like the central-difference one tend to exhibitperiod contraction hence compensating for the error introduced by lumped mass matricesThis shows that it is therefore recommended to use

explicit schemes with lumped mass matrices

implicit schemes with consistent mass matrices

This choice is also computationally beneficial lumped mass matrices may allow for solving theexplicit update rule (243) without the need for iterations whereas consistent mass matricescan be conveniently used in the implicit update rule (2430) where a system of equations mustbe solved anyways

127

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

25 Extensions

Many of the finite element tools we have discussed so far (from discretization principles andfunction spaces to elements types and quadrature rules and beyond) apply not only to theframework of small-strain mechanics problems but they extend to a much broader contextwhere they may be conveniently used In this section let us briefly summarize two extensionsof the theory developed so far towards common engineering applications

251 Finite kinematics

When going beyond small strains we need to work with a theory of large (finite) strains whichis commonly referred to as finite kinematics Classical examples are the simulation of rubberymaterials or of biological tissues which generally undergo large strains Here we do not onlyneed to introduce more complex constitutive laws (going well beyond linear elasticity) but wemust 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 strainsHere one typically introduces a deformation mapping of the type

ϕ(X t) ∶ Ω timesRrarr Rd such that x = ϕ(X t) (251)

which assignes to each undeformed point X isin Ω in the undeformed body Ω a point x isin ϕ(Ω)within the deformed body ϕ(Ω) For simplicity we assume that the two points are linked inthe same fashion as in small strains meaning we define a displacement field u ∶ Ω timesR rarr Rdsuch that

x(X t) =X +u(X t) (252)

To describe finite strains inside the deformed body one usually does not resort to ε but insteadintroduces the deformation gradient which is a second-order tensor

F = partx

partXhArr Fij =

partxipartXj

(253)

When inserting the relation (252) we notice that

Fij =partxipartXj

= δij + uij hArr F = I +nablau (254)

This strain measure is frequently used in finite-strain continuum mechanics (besides variousother strain measures that we do not want to introduce here for brevity)

Starting with quasistatics the variational problem in this finite-deformation setting is analogousto the small-strain version The functional of the total potential energy is

I[u] = intΩW (F ) dV minus int

Ωρ0b sdotu dV minus int

partΩNt sdotu dS (255)

where W is still the strain energy density (now depending on F ) ρ0 denotes the mass densityin the undeformed reference configuration (and we integrate over the reference configuration)We seek solutions

u isin U = u isinH1(Ω) ∶ u = u on partΩD such that u = arg min I[u] (256)

128

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The first variation follows as

δI[u] = intΩ

partW

partFijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS

= intΩPijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS = 0

(257)

where we introduced the first Piola-Kirchhoff stress tensor with components

Pij =partW

partFij (258)

which generally differs from the Cauchy stress tensor σ and is furthermore not symmetric Atfinite strains there exists a variety of stress measures we here simply make this choice becauseit emerges naturally from the variation Be alerted that commercial FEA software uses all sortsof strain and stress measures (absolute and incremental ones as well as rates) Only in the limitof small (infinitesimal) strains all stress measures tend to coincide and Pij rarr σij

The above form of the first variation looks quite similar to the small-strain version cf (86)Consequently applying a finite element discretizatio of Bubnov-Galerkin type leads to an FEgoverning equation analogous to (815) That is we again arrive at

Fint(Uh) minusFext = 0 (259)

this time with

F ainti = intΩPij(F h)Na

j dV and F aexti = intΩρ0biN

adV + intpartΩN

tiNadS (2510)

In a nutshell the linearized and finite variational problems result in the same system of equa-tions (259) For the special case of linearized kinematics we have Pij rarr σij so that we recoverthe small-strain version (815) Otherwise the above problem is generally nonlinear (even whenconsidering 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 significantnonlinearity and dependence on U In the above variational formulation we assumed that t =const ie that the externally applied forces are constant and do not depend on deformation Asdiscussed in Section 211 that may not always be the case and especially in finite deformationsit is oftentimes not the case eg consider pressure loading t = pn where n is the deformedsurface normal depending on the deformation and hence on U In such cases one needs torevise the external force term appropriately (For pressure loading eg we know the work doneby pressure is Wext = pv which must replace the traction term in the above total potentialenergy)

Despite all the above differences between large and small strains the key take-home messageis that the general finite element setup is fully analogous between both formulations In bothcases we seek displacement field solutions within the same function space and the governingequations are analogous In fact the above description of quasistatics can be extended todynamics again arriving at

MU +Fint(Uh) minusFext = 0 (2511)

with the consisten mass matrix M now having components

Mabij = δij int

Ωρ0N

aN bdV (2512)

Since the overall setup is equivalent this also implies that all finite element concepts discussedso far can be applied to finite-deformation problems That is all element types quadraturerules solvers etc are fully applicable here as well

129

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

252 Thermal problems

The second extension we would like to discuss aims at solving a thermal problem To this endlet us neglect mechanical boundary value problems and instead discuss how temperature evolvesin a body with heat sources and sinks heat conduction and heat fluxes across its boundaryTo give the punchline right away we will again observe that we can repurpose all our finiteelement tools to this new setting which admits the numerical solution of thermal problems Thereason is that as mentioned before mechanical thermal and also electromagnetic variationalproblems have a common structure of their governing equations (see Section 71)

For a thermal problem in d dimensions we aim to find the generally time-dependent temper-ature field

T = T (x t) (2513)

by solving the strong form

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

κnabla2T + ρs = ρcvT in Ω

T = T on partΩD

q = minusκnablaT sdotn = q on partΩN

T = T0 at t = 0

(2514)

with the following variables

κ equiv thermal conductivity (assuming Fourierrsquos law of heat conduction)

ρ equiv mass density

s equiv heat source (or sink) per mass

cv equiv specific heat

T equiv Dirichlet boundary conditions (imposing a temperature field on the boundary)

q equiv Neumann boundary conditions (imposing a heat flux across the boundary)

q equiv heat flux

n equiv outward unit normal vector on a surface

(2515)

Let us first consider the time-independent problem for simplicity (ie we take ρcvT rarr 0) Inthis case the resulting steady-state problem has a variational structure with the total potentialenergy defined by the functional I ∶ U rarr R with

I[T ] = intΩ(κ

2∥nablaT ∥2 minus ρsT) dV + int

partΩNq T dS (2516)

This functional indicates that we need to weak seek solutions T = T (x) from within the space

U = T isinH1(Ω) ∶ T = T on partΩD and U0 = δT isinH1(Ω) ∶ δT = 0 on partΩD (2517)

which is analogous to the mechanical problem ie we seek solutions from within the samefunction space (except that we now look for a scalar-value field T instead of the vector-valueddisplacement field u which simplifies relations even)

We know that the solution must render I[T ] stationary so we compute the first variation as

δI[T ] = intΩ(κTiδTi minus ρs δT ) dV + int

partΩNq δT dS = 0 for all δT isin U0 (2518)

130

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and we read out the weak form

G[T v] = intΩ(κTivi minus ρs v) dV + int

partΩNq v dS = 0 for all v isin U0 (2519)

Notice that the last term (due to the work by external fluxes) has a plus instead of the usualminus sign in the mechanical problem This arises because of the minus sign in the definitionof fluxes q = minusκnablaT To see this let us apply the divergence theorem to the first term andrearrange terms (with δT = 0 on partΩD) to reformulate the first variation as

δI[T ] = minusintΩ(κTii + ρs) δT dV + int

partΩN(κTini + q) δT dS = 0 for all δT isin U0 (2520)

This must hold for all admissible variations δT isin U0 Therefore (2520) is equivalent to stating

κnabla2T + ρs = 0 in Ω minusκnablaT sdotn = q on partΩN and T = T on partΩD (2521)

Ergo the signs are correct as we recover the (time-independent) strong form (2514) We henceconclude that extremal points T isin U of (2516) are indeed guaranteed to satisfy the governingequations (2514) and are thus classical solutions Differently put functional (2516) is thecorrect energy functional corresponding to the (static) strong form given by (2514) We canfurther show that the solution is a minimizer of I since the second variation is

δ2I[T ] = intΩκδTi δTidV = int

Ωκ ∥δnablaT ∥2 dV ge 0 for all δT isin U0 (2522)

The energy functional (2516) and the resulting weak form (2519) are quite similar to thoseof the mechanical boundary value problem To visualize this we rewrite functional I for thethermal problem for short as

I[T ] = 1

2B(TT ) minusL(T ) (2523)

with the bilinear form B and the linear form L defined by respectively

B(a b) = intΩκnablaa sdot nablab dV and L(a) = int

ΩρsadV minus int

partΩNq a dS (2524)

This form is analogous to eg that of the mechanical problem of a bar whose energy functionalwas derived as (631)

The weak form can be expressed using the above forms as

G[T v] = B[T v] minusL[v] = 0 for all δT isin U0 (2525)

Let us define a spatial finite element discretization of Bubnov-Galerkin-type viz

T h(x) =n

sumb=1

T bN b(x) vh(x) =n

suma=1

vaNa(x) (2526)

Insertion into the weak form (2525) which must hold for all choices of va allows us to deducethe governing equations as

(intΩκNa

iNbj dV )T b

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraQaint(T )

minus [intΩρsNadV minus int

partΩN

qNadS]acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Qaext

= 0 for all a = 1 n (2527)

131

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This implies a system of equations that is quite similar and fully analogous to that of linearelastic mechanical boundary value problems Specifically (2527) balances the internal heat fluxQaint(T ) due to heat conduction with the external heat flux Qaext due to heat sources and due toheat flux across the surface ndash for each node a This is of course the analog of the mechanicalsystem Fint(U) = Fext

When introducing the global vector of the unknown nodal temperatures as T = T 1 Tnthe above system conveniently shows that

Qint(T ) =KT with Kab = intΩκNa

iNbj dV (2528)

denoting the components of a conductivity matrix Note that like in linear elasticity weobserve a linear relation between Qint(T ) and vector T (which is a consequence of the assump-tion of Fourierrsquos law of heat conduction which is linear itself) This results in a linear systemof equations KT =Qext to be solved for the nodal temperatures

When considering time-dependent thermal problems we must extend the above to includetime dependence in the temperature field T = T (x t) Without showing all details (one canderive this form eg from the principle of virtual work) we arrive at the governing equation

CT +Qint(T ) minusQext(t) = 0 (2529)

with a matrix C that is similar to the mass matrix and has components

Cab = intΩρcvN

aN bdV (2530)

The time derivative can be approximated eg by using finite differences which leads to atime-incremental problem as in the dynamic FEA formulation of Section 22

We close by pointing out that (2529) bears great similarity to the dynamic mechanical FEgoverning equations of Section 22 and we seek solutions from within the same function space(except replacing vector-valued displacements by scalar-valued temperatures) As a conse-quence all element types quadrature rules solvers etc that we derived for mechanical (initial)boundary value problems are fully applicable here as well We may thus conveniently re-purposeour FE tools for the analysis of thermal problems

Shown below is an example of solution of the steady-state heat equation illustrating the tem-perature field in a pump casing model (more information can be found online)

132

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

26 Error analysis and adaptivity common mistakes

Having discussed the finite element method the equations to be solved the ways in which acontinuous problem is turned into a discrete one and the various choices of element typesquadrature rules solvers etc to be made it is important to understand the potential errorsources and ways to reduce errors In this section we first discuss the numerical error sourcesinherent in the finite element method then introduce mesh adaptivity and error estimates andfinally review common pitfalls in FE analysis

261 Finite element error analysis

Solving (initial) boundary value problems by the finite element method introduces numeroussources of errors that one should be aware of

(i) The discretization error (also known as the first fundamental error) arises fromdiscretizing the domain into elements of finite size h As a result the body Ω is notrepresented correctly and the model (eg the outer boundary) may not match the trueboundary partΩ (eg think of approximating a circular domain Ω by CST or Q4 elementswith straight edges) This error can be reduced by mesh refinement (and we discussedr-refinement h-refinement p-refinement and hp-refinement in Section 10)

(ii) The numerical integration error results from the application of numerical quadraturefor the evaluation of element force vectors and stiffness matrices in general as discussedin Section 17 (unless in exceptional cases like the simplicial elements integration can becarried out exactly)

intΩef(ξ)dξ cong

nQP

sumq=1

Wqf(ξq) (261)

For an integrand f isin Ck+1(Ω) the error in 1D is bounded by

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQP

sumq=1

Wq f(ξq)RRRRRRRRRRRle C ∥Ω∥hk+1 max

ξisin[minus11]∣α∣=k+1

∥Dαf(ξ)∥ (262)

with an element-dependent constant C gt 0 In other words the error due to numericalquadrature grows with element size h as hk+1 The error is smaller the smoother thefunction f to be integrated (The extension to higher dimensions is analogous) Hencethe numerical integration error depends on the smoothness of the integrand and calls fora proper choice of the integration order

(iii) The solution error stems from numerically solving linear systems TUh = F In generalthe accuracy of the solution depends on the condition number of the matrix

κ = ∥T ∥ sdot ∥T minus1∥ = ∣λmax

λmin∣ (263)

with λmax (λmin) being the largest (smallest) eigenvalue of T The higher the conditionnumber the larger the numerical errorA 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 alinear elastic simulation it is advisable to normalize elastic constants by 1 GPa insteadof assigning eg E = 210 sdot 109 (instead use E = 21 and know that your results will be in100 GParsquos)

133

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(iv) An approximation error is introduced by approximating the functional space U (inwhich to find the solution u(x)) by a finite-dimensional subspace Uh sub U As an example consider an exact solution u(x) in 1D which is approximated by a piece-wise linear polynomial function uh(x) The bar hanging from the ceiling under its ownweight was one such example for which the solution was found to be exact at the nodeswith an error e(x) = u(x)minus uh(x) arising within elements Therefore we can find a pointz within each element such that

parte

partx(z) = 0 for xi le z le xi+1 (264)

Consequently we can expand the error to find the solution at a node as

e(xi) = 0 = e(z) + (xi minus z)parte

partx(z) + (xi minus z)2

2

part2e

partx2(z) +O((xi minus z)3) (265)

Using (264) we find that

e(z) = minus(xi minus z)2

2

part2e

partx2(z) +O(h3) (266)

Note that

(xi minus z)2 le (xi+1 minus xi2

)2

= h2

4 (267)

where h denotes the nodal spacing Altogether we have thus shown that the maximumerror in an element is bounded by

∣e(x)∣max leh2

8max

xilexlexi+1

∣part2u

partx2∣ (268)

As shown in Appendix C the above error bound can be significantly generalized Forpolynomial shape functions of order k and u isinHk+1(Ω) we have

∣uh minus u∣H1(Ω) lehk

πk∣u∣Hk+1(Ω) and ∥uh minus u∥H1(Ω) le ch

k ∣u∣Hk+1(Ω) (269)

using Sobolev norms In simple terms the error is again determined by the smoothnessof the function to be interpolated and it is expected to decrease with decreasing elementsize (as hrarr 0) ndash the faster the higher the interpolation orderNote that special caution is required if stress concentrations of any kind are to be rep-resented (eg imagine a linear elastic fracture problem and the issues arising from usingpolynomial-type elements to capture the stress singularity near the crack tip)

(v) A truncation error is made by every computer when storing and operating numericvalues with only a finite number of digits (eg floats doubles etc) This is unavoidableand one should be aware of what this error is (especially when choosing eg solvertolerances) Choosing a solver tolerance ε in itself produces truncation error becausewe contend with a solution U that satisfies ∣Fint(U) minusFext∣ le ε (instead of being zero)

(vi) Finally no simulation is free of modeling errors which refers to the large collectionof errors made by the selection of the analytical model to be solved (before starting anynumerical approximation) For example we make choices about an appropriate materialmodel choose material parameters boundary conditions and geometric simplificationsincluding reductions to lower dimensions (eg plane strain or plane stress instead of a 3Dsimulation) Any such decision is prone to introducing errors

The sum of all of the above error sources makes up the numerical error inherent in everysimulation

134

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

262 Smoothing and adaptivity

Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (egthe stress and strain fields in case of simplicial elements) and computes a smooth approximationdefined by smoothed nodal values of the discontinuous quantities

In case of simplicial elements the stresses and strains are constantwithin elements Here one can define nodal quantities eg as

(εa)lowast =sumnnbj=1 εejVejsumnnbj=1 1Vej

(2610)

where the element quantities εe of all nnb neighboring elementsmeeting at a node a are weighted by the respective element volumeVe This weighting results in smaller elements (whose quadraturepoints are closer to the node) having a larger weight than largeelements (where quadrature points are far from the node)

a (e )

ee5+

+

++

+ee1

ee2ee3

ee4

In case of higher-order elements such as eg the Q4 element one can extrapolate elementquantities that are defined at the quadrature points ξk to the nodes For example for the Q4element there are four nodes and four quadrature points so that one can uniquely solve forthe four nodal values Once the smoothed nodal values are known one again uses a smooth-ing relation like (2610) with the element quantities εej replaced by the nodal value εae fromthe respective element and element volume Ve replaced by the nodal weight (obtained fromextrapolating the quadrature point weights WqJqt to the nodes)

When performing adaptive mesh refinement we need an error norm where as an example wediscuss the ZZ error estimator named after its inventors Zienkiewicz and Zhu If we usea smoothing scheme like the above we can define smoothed continuous strains εlowast which iscontrasted with the approximate solution εh so that one may define the error per element e byusing the energy norm viz

∥ε minus εlowast∥2e = int

ΩeW (εlowast minus ε)dV (2611)

Note that this definition is not unique and one could also use the L2-norm

∥ε minus εlowast∥2e = int

Ωe∥εlowast minus ε∥2

dV (2612)

or any other sensible norm These norms indicate the quality of a solution εh (if the solutionto be found is smooth or if the mesh is very fine then the piecewise constant solution εh canbe expected to be close to the interpolated smoothed solution εlowast)

In order to define an element-wise error estimate it makes senseto introduce the normalization

ηe =∥ε minus εlowast∥e

∥ε minus 0∥e + ∥ε minus εlowast∥e (2613)

ie the error is divided by the energy in the element so as to notover- or underestimate element errors based on element sizes as wellas in case of vast differences in element strain energies (the abovedenominator may be interpreted as an expansion for small errorsand avoids division by zero)

he

e

e

he

135

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The mesh refinement criterion states that an element e is refined if

ηe gt ηtol (2614)

with some tolerance ηtol determined as a compromise between accuracy and efficiency Basedon the above refinement criterion a set of elements flagged for refinement is identified after asolution uh has be found The elements of highest error ηe are refined and the error estimatesare re-evaluated until sufficiently low element errors are achieved

Needed next is a mesh refinement algorithm For example a frequent choice for triangularelements is longest edge bisection which identifies the longest edge in an element to berefined and inserts a new node at this edgersquos midpoint followed by an update of the elementconnectivity (thus replacing two existing elements by four new elements as schematically shownbelow) Note that this involves some book-keeping since adjacent elements flagged for refinementinterfere so that one needs an algorithmic decision about which elements to refine first and howto handle adjacent elements identified for refinement etc

element to be refined new node inserted atlongest-edge midpoint

new elements createdby connecting nodes

263 Common errors

As Cook Malkus Plesha and Wit put it in their FEA textbook man-made errors in FEAanalysis usually result from unfamiliarity of the user with (i) the physics of the problem (ii) theelement type and its behavior (iii) the limitations of the chosen analysis method and (iv) thesoftware being used Although it is difficult to list all possible error sources in FE analysis letus mention a few common pitfalls to be avoided

poor mesh quality is a very frequent error source The mesh size must be appropriatelyfine (eg one cannot hope to accurately represent stress concentrations near notches orcorners by a few large elements as was done in the Sleipner A oil platform examplediscussed at the very beginning see the mesh shown below) Gradients in mesh sizeshould be smooth rather than abrupt for improved accuracy of solutions Caution isrequired when mixing element types While this is generally possible there must not beany ldquohangingrdquo or unconnected nodes or element edges with different numbers of nodeswhen seen from both adjacent elements One should also avoid large element distortionssince this can lead (through the Jacobian J) to a considerable loss in accuracy Distortionsinclude large aspect ratios poorly shaped elements strongly curved or warped elementsetc For the same reason one should avoid warping of elements in 3D Several examplesare shown below

poor mesh (strong constrast)

better mesh (smooth gradient)poor mesh used in the

Sleipner A study

136

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

poor aspect ratio

ab

near-triangle Q4 off-centered mid-nodes

highly skewed element near-triangle Q4 strongly curved edge

warped Q8 element

Q8

CST

bad element combination

Many codes define the so-called Jacobian ratio j in order to quantify the distortion ofan element When using numerical quadrature all fields of interest are only evaluatedat the quadrature points (q = 0 nQP minus 1) which is where one needs to calculate theJacobian J(ξq) = detF (ξq) The Jacobian ratio of an element e is thus defined as

je =maxq J(ξq)minq J(ξq)

(2615)

ie we compare the minimum to the maximum value of the Jacobian within an elemente Ideally for an undistorted element we have J(ξq) = conts and hence maxq J(ξq) =minq J(ξq) or je = 1 If je ne 1 then the element is distorted ndash the more the further je isaway from 1

wrong element types are a common reason for trouble (eg us-ing structural vs solid elements or using 2D vs 3D elements) 2Delements can effectively be used only if the problem is plane-strainor plane-stress (and the element thickness must be set correctly)Structural elements are significantly more efficient than solid el-ements but they come with strong limitations and eg cannotaccurately represent stress concentrations encountered near sharpcorners (as shown on the right)

solid model beam model

stress concentration

linear vs nonlinear analysis are deformations expected to be large or small (so thatfinite or infinitesimal strains can be used respectively) Is the material model linearelastic or should a finite-deformation model be used

boundary conditions must be chosen appropriately (at the right locations of the righttype and magnitude) If symmetries can be exploited only a reduced system can bemodeled efficiently but boundary conditions must be chosen correctly and it must beensured that the solution is indeed symmetric (eg when studying buckling problemsthe assumption of symmetry automatically rules out asymmetric buckling modes thesame applies to vibrational eigenmodes)

step sizes (ie the load step size in quasistatic studies and the time step size ∆t indynamic studies) must be chosen to ensure convergence and stability of the solver

units must be chosen properly and entered consistently (eg always stick to SI units ndashbut bare in mind the problems associated with large numbers cf Section 261)

the interpretation of results requires caution Are color plots of fields of interest theraw data or smoothed fields Are the units correct are global or local coordinates being

137

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

used for eg the definition of tensor components Can a simple test case be comparedto an analytical or simplified solution

All commercial FEA codes have internal sanity checks which eg for an implicit analysisverify that the tangent or stiffness matrix has no zero diagonal entries The occurrence of suchwould imply eg nodes that are not connected to any element duplicated nodes or materialmoduli 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(eg a Riks path-following or line-search solver rather than a Newton-Raphson-type solver)The same applies to structures with mechanisms (ie zero-energy modes that are not rigid-body modes) For example discretizing a long bar into several 2-node bar elements leads tomechanisms since the 2-node bar element has only axial stiffness To identify the cause of zeroeigenvalues of the stiffness matrix it may be insightful to visualize the corresponding eigenmode

138

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

27 FEM ndash Extensions amp Applications

Through this Introduction to FEA we have discussed the foundations of the finite elementmethod and its applications particularly for solid and structural analysis within the frameworkof linearized kinematics (small strains) and primarily within linear elasticity with extensionsto (small-strain) inelastic behavior In this final section we would like to briefly point outextensions of the basics introduced so far along with practical hints

commercial codes most commercially available FE codes follow a similar structure tothe one discussed here in class as well as during exercises The FEM software providestools for assembling and solving boundary value problems further implementations ofthe most common element types and material models If the user cannot use existingimplementations then there is the common option to implement onersquos own element (so-called user element or UEL) or onersquos own material model (so-called user material modelor UMAT) The UMAT is usually the simpler and most often used option It is of utmostimportance to adhere to the exact strain and stress measures used in the code sinceconfusion thereof leads to nonsensical results In addition most commercial codes do nothave a variational basis and instead define the constitutive law as a relation between strainand stress rates (σ vs ε) or increments ( dσ vs dε) Especially at large strains it isagain essential to adhere to the correct rates or increments (there is a myriad of alternatedefinitions that can be used) improper use of non-conjugate rates is a common pitfall ofcommercial codes14

static vs dynamic FEA if at all possible a quasistatic implicit solution of mechanicalboundary value problems is generally preferable as it ensures that an equilibrium solutionhas been found However this may not always be possible eg because no consistenttangent T is available (because the material model lacks an analytical form of Cijkl orbecause the element implementation does not permit the analytical calculation of thetangent matrix T ) or because the tangent matrix is so large that its calculation and storageis disadvantageous if not impossible computationally We note that an approximatetangent matrix can always be compute numerically by employing finite differences

T abij (U) =partF ainti

partubj(U) asymp

F ainti(U + δebj) minus F ainti(U)δ

(271)

with vector ebi = (0 010 0)T of the length of U with a 1 placed at the locationof component ubj and 0 lt δ ≪ 1 This procedure has the disadvantage that it is compu-tationally expensive (the numerical calculation of T requires perturbing each and everyentry 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 replacethe static simulation to solve for U by a dynamic one to solve for U(t) including sufficientdamping leads to solutions that converge over time to a steady-state Uinfin = limtrarrinfinU(t)and it is expected that this steady state coincides with the static solution ie Uinfin = U Such solvers must be used with caution First it is important to check if the solution hasindeed converged over time (if vibrations or waves are still present in the solution thosemay over- or under-predict local strains and stresses by considerable amounts) Secondunless in a static linear elastic study (which surely should not be solved dynamically butstatically since an analytical tangent is available) the dynamic solver may converge toone of many equilibrium solutions and depending on the initial conditions may take onequite far from the sought solution

14Studies of errors resulting from improper use of rates can be found here and here

139

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

large deformations in this course we focused on linearized kinematics (commonly re-ferred to as ldquosmall strainsrdquo and valid up to at the very most a few percent strain)When larger deformations are to be considered one must employ a finite-strain formu-lation (eg working with deformation and velocity gradients as well as finite-kinematicsstress measures) As a consequence nodal element forces depend not only on the stressesinside the element but also the current deformed state of the element This in turn leadsto the tangent matrix T containing both material stiffness and as a new contributiongeometric stiffness Therefore even when assuming linear elastic material behaviorthe resulting problem is not linear and T is not constant in general As a further conse-quence one may experience mechanical instability and bifurcation which is problematicfor numerical solvers (as also discussed further below for damage and failure)

total-Lagrangian vs updated-Lagrangian so far we only discussed finite elementswhose initial geometry remains unchanged during a simulation For example even thoughloads vary with time we always use the same reference configuration of an element This iscalled a total-Lagrangian formulation By contrast we could also update the referenceconfiguration after each solution step ie once U(tα) has been found we update all nodalpositions xa(tα)larr xa(tα)+ua(tα) recompute the shape functions and ndash at the next timestep tα+1 solve for U(tα+1) based on the new reference configuration This approach isemployed to avoid large mesh distortions and is referred to as updated-LagrangianWhile both have their advantages and disadvantages one computational challange of theupdated-Lagrangian implementation is the accummulation of numerical errors over timeA further alternative generally used in fluid mechanics is the Eulerian formulation inwhich all governing equations are formulated in the currentdeformed configuration

incompressibility especially in large deformations the assumption of incompressibility(ie of zero volume change) is common when modeling eg problems of rubber elastic-ity or generally of soft matter such as tissues and polymers but also in metal plasticityModeling incompressibility is not straight-forward since it imposes a constraint on thedeformation within elements (the nodal dofs of an element are no longer independentsince the element must maintain a constant volume under incompressible deformation)This case calls for a special type of element that can handle incompressibility such asthe so-called family of augmented finite elements or mixed finite elements whichhave mixed dofs including both displacements and the pressure inside the element Theseelements are often referred to as PkQl elements where k denotes the order of interpo-lation of the displacement field while l stands for the polynomial interpolation order ofpressure (and one generally seeks l le k) Common choices of lowest order are eg P1Q0and P1Q1

singularities the FE method is based on polynomial shape functions to interpolateall fields of interest When boundary value problems involve singularities (such as themechanical fields around a crack tip or a sharp notch or the thermal fields around apoint heat source) then the polynomial interpolation inherently cannot lead to a goodapproximate solution As a consequence results are usually mesh-dependent the smallerthe elements (eg at the crack tip) the higher the calculated stress values within thoseelements adjacent to the crack tip It is for this reason that classical FEM is problematicwhen dealing with fracture problems (or generally any problem involving singularities)and results must be interpreted with utmost care An h-convergence study usually revealsthe diverging solution quickly

As a remedy techniques like the extended FE method (XFEM) have been introducedwhich enrich the interpolation space Uh by singularities of the expected type For examplefor fracture problems within linearized kinematics the stress is expected to diverge as

140

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1radicr at the crack tip with r gt 0 being the distance from the tip Hence including shape

functions of this type allows the interpolation to capture the diverging mechanical fieldsthus removing the singularity and yielding reasonable solutions

damage and failure when a material model includes damage or failure it generallysoftens under increasing loads (as the material suffers from damage its stiffness ultimatelytends to zero under increased loading) Such behavior also causes numerical difficultiesbecause the softening branch of the stress-strain response leads to instability (eg mostiterative solvers fail when the tangent matrix T is no longer positive-definite which isgenerally the case during mechanical softening) This manifests not only in solver failurebut also in mesh-dependence (again a study of h-convergence should reveal such issues)

141

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

A Vector Spaces

We define a set Ω as a collection of points X isin Ω

We further say Ω is a (proper) subset of all space if Ω sube Rd in d dimensions (proper if Ω sub Rd)

We usually take Ω to be an open set ie Ω cap partΩ = empty with boundary partΩ

Deformation and motion are described by a mapping

ϕ ∶ X isin Ωrarr ϕ(X) isin Rd or ϕ ∶ Ωrarr Rd (A1)

where Ω is the domain and Rd the range of ϕ The mapped (current) configuration of Ω isϕ(Ω)

Every function f(x) ∶ Rrarr R is a mapping from R to R

We call a mapping injective (or one-to-one) if for each x isin ϕ(Ω) there is one unique X isin Ωsuch that x = ϕ(X) In other words no two points X isin Ω are mapped onto the same positionx A mapping is surjective (or onto) if the entire set Ω is mapped onto the entire set ϕ(Ω)ie for every X isin Ω there exists at least one x isin ϕ(Ω) such that x = ϕ(X) If a mapping is bothinjective and surjective (or one-to-one and onto) we say it is bijective A bijective mapping isalso called an isomorphism

For example ϕ ∶ Ωrarr Rd is injective whereas ϕ ∶ Ωrarr ϕ(Ω) would be bijective

For time-dependent problems we have ϕ ∶ ΩtimesRrarr Rd and x = ϕ(X t) This describes a familyof configurations ϕ(Ω t) from which we arbitrarily define a reference configuration Ω for whichϕ = id (the identity mapping)

A linearvector space Ω+R sdot is defined by the following identities For any uvw isin Ωand αβ isin R it holds that

(i) closure α sdotu + β sdot v isin Ω

(ii) associativity wrt + (u + v) +w = u + (v +w)(iii) null element exist 0 isin Ω such that u + 0 = u(iv) negative element for all u isin Ω exist minusu isin Ω such that u + (minusu) = 0

(v) commutativity u + v = v +u(vi) associativity wrt sdot (αβ) sdotu = α(β sdotu)

(vii) distributivity wrt R (α + β) sdotu = α sdotu + β sdotu(viii) distributivity wrt Ω α sdot (u + v) = α sdotu + α sdot v

(ix) identity 1 sdotu = u

examples

Rd is a vector space By contrast Ω sub Rd is not a vector space since ndash in general ndash itviolates eg (i) closure and (iv) null element

P2 = ax2+bx+c ∶ a b c isin R is the space of all second-order polynomial functionsor an ordered triad (a b c) isin R3 More generally Pk(Ω) is the space of all kth-orderpolynomial functions defined on Ω Pk(Ω) is a linear space

We call P2 a linear subspace of Pk with k ge 2 and we write P2 sube Pk

142

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

B Function Spaces

Consider a function u(x) ∶ Ωrarr R and Ω sub R

u is continuous at a point x if given any scalar ε gt 0 there is a r(ε) isin R such that

∣u(y) minus u(x)∣ lt ε provided that ∣y minus x∣ lt r (B1)

A function u is continuous over Ω if it is continuous at all points x isin Ω

u is of class Ck(Ω) with an integer k ge 0 if it is k times continuously differentiable over Ω (ieu possesses derivatives up to the kth order and these derivatives are continuous functions)

Examples

Functions u(x) isin Pk with k ge 0 are generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks shocks etc (or discontinuities in the BCsICs) weusually assume the solution fields are Cinfin(Ω) so we may take derivatives otherwise derivativesexist almost everywhere (ae)

To evaluate the global errors of functions we need norms

Consider a linear space U +R sdot A mapping ⟨sdot sdot⟩ ∶ U times U rarr R is called inner product onU times U if for all u vw isin U and α isin R

(i) ⟨u + vw⟩ = ⟨uw⟩ + ⟨vw⟩(ii) ⟨u v⟩ = ⟨v u⟩

(iii) ⟨α sdot u v⟩ = α ⟨u v⟩(iv) ⟨uu⟩ ge 0 and ⟨uu⟩ = 0hArr u = 0

A linear space U endowed with an inner product is called an inner product space

Examples

⟨uv⟩ = uivi = u sdot v defines an inner product for uv isin Rd

The L2-inner product for functions u v isin U with domain Ω

⟨u v⟩L2(Ω) = intΩu(x) v(x)dx and often just ⟨u v⟩ = ⟨u v⟩L2(Ω) (B2)

Note that if ⟨u v⟩ = 0 we say u and v are orthogonal

Examples

Legendre polynomials

pn(x) =1

2nn

dn

dxn(x2 minus1)n so that p0 = 1 p1 = x p2 =

1

2(3x2 minus1) (B3)

orthogonality on Ω = (minus11)

int1

minus1pn(x)pm(x)dx = 2

2n + 1δmn (B4)

143

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

trigonometric functions

pn(x) = cos(πnxL

) (B5)

orthogonality on Ω = (minusLL)

intL

minusLpn(x)pm(x)dx =

⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩

2L if m = n = 0

L if m = n ne 0

0 else

(B6)

Now we are in place to define the distance between x1 and x2

d(x1 x2) =radic

⟨x1 minus x2 x1 minus x2⟩ (B7)

We need this concept not only for points in space but also to define the closeness or proximityof functions

Consider a linear space U +R sdot A mapping ∥sdot∥ ∶ U rarr R+ is called a norm on U if for allu v isin U and α isin R

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (triangle inequality)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥(iii) ∥u∥ ge 0 and ∥u∥ = 0 hArr u = 0

A linear space Ω endowed with a norm is called a normed linear space (NLS)

Examples of norms

Consider the d-dimensional Euclidean space so x = x1 xdT Then we define

ndash the 1-norm ∥x∥1 = sumdi=1 ∣xi∣

ndash the 2-norm ∥x∥2 = (sumdi=1 ∣xi∣2)12

(Euclidean norm)

ndash the n-norm ∥x∥n = (sumdi=1 ∣xi∣n)1n

ndash the infin-norm ∥x∥infin = max1leilen ∣xi∣

Now turning to functions the Lp-norm of a function u ∶ Ωrarr R

∥u∥Lp(Ω) = (intΩup dx)

1p

(B8)

The most common norm is the L2-norm

∥u∥L2(Ω) = ⟨uu⟩12L2(Ω)

= (intΩu2(x)dx)

12

(B9)

Furthermore notice that

∥u∥Linfin(Ω) = ess supxisinΩ

∣u(x)∣ (B10)

where we introduced the essential supremum

ess supxisinΩ

∣u(x)∣ =M with the smallest M that satisfies ∣u(x)∣ leM for ae x isin Ω (B11)

144

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Now that we have norms we can generalize our definition of the distance If un u isin U equippedwith a norm ∥sdot∥ ∶ U rarr R then we define the distance as

d(un u) = ∥un minus u∥ (B12)

Now we are in place to define the convergence of a sequence of functions un to u in U wesay un rarr u isin U if for all ε gt 0 there exists N(ε) such that d(un u) lt ε for all n gt N

Examples

Consider un isin U = P2(Ω) with L2-norm and Ω sub R

un(x) = (1 + 1

n)x2 rarr u(x) = x2 since d(un minus u) =

1

nint x2 dx (B13)

with u isin U = P2(Ω) For example for d(un minus u) lt ε we need n gt N = intΩ x2 dxε

Fourier series

u(x) =infin

sumi=0

ci xi rArr un(x) =

n

sumi=0

ci xi such that un rarr u as nrarrinfin (B14)

Given a point u in a normed linear space U a neighborhood Nr(u) of radius r gt 0 is definedas the set of points v isin U for which d(u v) lt r Now we can define sets properly

A subset V sub U is called open if for each point u isin V there exists a neighborhood Nr(u) whichis fully contained in V The complement V of an open set V is by definition a closed set Theclosure V of an open set V is the smallest closed set that contains V In simple terms a closedset is defined as a set which contains all its limit points Therefore note that

supxisinΩ

∣u(x)∣ = maxxisinΩ

∣u(x)∣ (B15)

For example (01) is an open set in R [01] is a closed set and [01] is the closure of (01)

A linear space U is a complete space if every sequence un in U converges to u isin U In simpleterms the space must contain all limit points

A complete normed linear space is called a Banach space ie U +R sdot with a norm ∥sdot∥ andun rarr u isin U A complete inner product space is called a Hilbert space

Note that ∥sdot∥ = ⟨sdot sdot⟩12 defines a norm Hence every Hilbert space is also a Banach space (butnot the other way around)

As an example consider U = Pn (the space of all polynomial functions of order n isin N) This is alinear space which we equip with a norm eg the L2-norm It is complete since (an bn cn )rarr(a b c ) for a b c isin R And an inner product is defined via ⟨u v⟩ = intΩ uv dx With allthese definitions U is a Hilbert space

We can use these norms to define function spaces eg the L2-space of functions

L2(Ω) = u ∶ Ωrarr R ∶ intΩu2 dx ltinfin (B16)

We say L2(Ω) contains all functions that are square-integrable on Ω

145

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Examples

u ∶ Ωrarr R with u isin Pk(Ω) and ess supxisinΩ ∣u(x)∣ ltinfin Then u isin L2(Ω)

f ∶ Rrarr R with f(x) = xminus2 is not in L2(Ω) if 0 isin Ω

Piecewise constant functions u (with ess supxisinΩ ∣u(x)∣ ltinfin) are square-integrable and thusin L2

Note that we can write alternatively

L2(Ω) = u ∶ Ωrarr R ∶ ∥u∥L2(Ω) ltinfin (B17)

146

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

C Approximation Theory

Motivation in computational mechanics we seek approximate solutions uh(x) = sumNa=1 uaNa(x)eg a linear combination of basis functions Na(x) with amplitudes ua isin R

Questions How does uh(x) converge to u(x) if at all Can we find an error estimate ∥uh minus u∥What is the rate of convergence (how fast does it converge cf the truncation error argumentsfor grid-based direct methods)

Fundamental tools for estimating errors are the Poincare inequalities

(i) Dirichlet-Poincare inequality

inth

0∣v(x)∣2 dx le chint

h

0[vprime(x)]2

dx if v(0) = v(h) = 0 (C1)

with a constant ch gt 0 that depends on the interval size h

(ii) Neumann-Poincare (or Poincare-Wirtinger) inequality

inth

0∣v(x) minus v∣2 dx le chint

h

0[vprime(x)]2

dx with v = 1

hint

h

0u(x) dx (C2)

In 1D an optimal constant can be found ch = h2π2

(iii) extension

inth

0∣v(x)∣2 dx le h

2

π2[int

h

0[vprime(x)]2

dx + ∣v(x0)∣2] with x0 isin [0 h] (C3)

Now let us use those inequalities to find error bounds Suppose a general function u(x) isapproximated by a piecewise linear approximation uh(x) Letrsquos first find a local error estimate

Consider v(x) = uprimeh(x) minus uprime(x) and note that by Rollersquos theorem

uprimeh(x0) minus uprime(x0) = 0 for some x0 isin (0 h) (C4)

Next use inequality (iii)

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprimeh(x) minus u

primeprime(x)∣2 dx (C5)

but since uh(x) is piecewise linear we have uprimeprimeh(x) = 0 so that we arrive at the local errorestimate

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprime(x)∣2 dx (C6)

Now letrsquos seek a global error estimate by using

intb

a(sdot) dx =

n

sumi=0int

xi+1

xi(sdot) dx with x0 = a xn+1 = b xi+1 = xi + h (C7)

so that

intb

a∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 intb

a∣uprimeprime(x)∣2 dx (C8)

147

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Taking square roots we see that for Ω = (a b)

∥uprimeh minus uprime∥L2(Ω)

le hπ

∥uprimeprime∥L2(Ω)

(C9)

and hence that ∥uprimeh minus uprime∥L2(Ω)

rarr 0 as hrarr 0 linearly in h

We want to write this a bit more concise Let us define the Sobolev semi-norm

∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

or for short ∣u∣k = ∣u∣Hk(Ω) (C10)

where in 1D Dku = u(k) A semi-norm in general must satisfy the following conditions

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (like for a norm)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥ (like for a norm)

(iii) ∥u∥ ge 0 (a norm also requires ∥u∥ = 0 iff u = 0 not so for a semi-norm)

Examples in 1D

from before

∣u∣H1(ab) = [intb

a∣uprime(x)∣2 dx]

12

(C11)

analogously

∣u∣H2(ab) = [intb

a∣uprimeprime(x)∣2 dx]

12

(C12)

so that we can write (C8) as

∣uh minus u∣2H1(ab) leh2

π2∣u∣2H2(ab) rArr ∣uh minus u∣H1(ab) le

h

π∣u∣H2(ab) (C13)

Hence the topology of convergence is bounded by the regularity of u Convergence withh-refinement is linear

note the special case

∣u∣2H0 = intΩu(x)2 dx = ∥u∥2

L2 (L2-norm) (C14)

We can extend this to higher-order interpolation For example use a piecewise quadraticinterpolation uh From Poincare

inth

0∣uprimeh minus u

prime∣2 dx le h2

π2 inth

0∣uprimeprimeh minus u

primeprime∣2 dx le h4

π4 inth

0∣uprimeprimeprimeh minus uprimeprimeprime∣2 dx = h

4

π4 inth

0∣uprimeprimeprime∣2 dx (C15)

Extension into a global error estimate with quadratic h-convergence

∣uh minus u∣H1(ab) leh2

π2∣u∣H3(ab) (C16)

For a general interpolation of order k

∣uh minus u∣H1(ab) lehk

πk∣u∣Hk+1(ab) (C17)

148

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Why is the Sobolev semi-norm not a norm Simply consider the example u(x) = c gt 0 Allhigher derivatives vanish on R so that ∣u∣Hk(Ω) = 0 for Ω sub R and k ge 1 However that does notimply that u = 0 (in fact it is not)

Let us introduce the Sobolev norm (notice the double norm bars)

∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

or for short ∥u∥k = ∥u∥Hk(Ω) (C18)

For example in one dimension

∥u∥2H1(Ω) = ∣u∣20 + ∣u∣21 = int

Ωu(x)2 dx + int

Ω[uprime(x)]2

dx = ∥u∥2L2(Ω) + ∣u∣2H1(Ω) (C19)

Note that this also shows that more generally

∥u∥2Hk(Ω) ge ∣u∣2Hk(Ω) (C20)

Let us derive a final global error estimate one that involves proper norms ndash here for the exampleof a piecewise linear uh Start with Poincare inequality (i)

∥uh minus u∥2L2(ab)

= intb

a∣uh minus u∣2 dx le chint

b

a∣uprimeh minus u

prime∣2 dx = ch ∣uh minus u∣2H1(ab) (C21)

and from (C19)

∥uh minus u∥2H1(Ω) = ∥uh minus u∥2

L2(Ω) + ∣uh minus u∣2H1(Ω)

le (1 + ch) ∣uh minus u∣2H1(ab) le clowasth ∣u∣2H2(ab)

(C22)

which along with (C13) gives

∥uh minus u∥H1(ab) le ch ∣u∣H2(ab) le ch ∥u∥H2(ab) (C23)

Summary and Extension of Norms

Lp-norm ∥u∥Lp(Ω) = (intΩup dx)

1p

Sobolev semi-norm ∶ ∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

= ∣u∣k

Sobolev norm ∶ ∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

= ∥u∥k

generalization ∶ ∣u∣Wkp(Ω) = [intΩ∣Dku∣p dx]

1p

= ∣u∣kp

∥u∥Wkp(Ω) = (k

summ=0

∣u∣pWmp(Ω)

)1p

= ∥u∥kp

149

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

D Sobolev spaces

The Sobolev norm is used to define a Sobolev space

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥k ltinfin (D1)

which includes all functions whose kth-order derivatives are square-integrable

Examples

Consider a piecewise linear function u isin C0 defined on Ω = (02) Then u isin H1(Ω) sincethe first derivative is piecewise constant and therefore square-integrable

Consider the Heavyside step function H(x) isin Cminus1 defined on R Then eg h isin H0(Ω)with Ω = (minus11) since the first derivative (the Dirac delta function) is not square-integrableover (minus11)

Overall note that the above examples imply that

Hm(Ω) sub Ck(Ω) with m gt k (D2)

For example if a function has a kth continuous derivative then the (k + 1)th derivative isdefined piecewise and therefore square-integrable

Higher dimensions

To extend the above concepts to higher dimensions we need multi-indices A multi-index isan array of non-negative integers

α = (α1 αn) isin (Z+0)n (D3)

The degree of a multi-index is defined as

∣α∣ = α1 + + αn (D4)

This can be used to define a monomial for x isin Rn

xα = xα11 sdot sdot xαnn (D5)

For example we can now extend our definition of polynomials to higher dimensions

p(x) isin Pk(R2) rArr p(x) =k

sumβ=0

sum∣α∣=β

aαxα (D6)

Specifically the monomials above for x isin R2 are

for ∣α∣ = 0 ∶ x0y0 = 1for ∣α∣ = 1 ∶ x1y0 x1y0 = x yfor ∣α∣ = 2 ∶ x2y0 x1 y1 x0y2 = x2 xy y2

(D7)

so that

p(x) = a(00) + a(10)x1 + a(01)x2 + a(20)x21 + a(11)x1x2 + a(02)x2

2 + (D8)

150

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that this defines a complete polynomial of degree k

Now we can use multi-indices to define partial derivatives via

Dαu = part ∣α∣u

partxα11 sdot sdot partxαnn

and D0u = u (D9)

A common notation is

sum∣α∣=β

Dαu = sumα1αnst ∣α∣=β

part ∣α∣u

partxα11 sdot sdot partxαnn

(D10)

With the above derivatives we may redefine the inner product

⟨u v⟩Hm(Ω) = intΩ

m

sumβ=0

sum∣α∣=β

DβuDβu dx (D11)

and the Sobolev norm

∥u∥Hm(Ω) = ⟨uu⟩12Hm(Ω)

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

intΩ(Dαu)2 dx

⎤⎥⎥⎥⎥⎦

12

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

∥Dαu∥2L2(Ω)

⎤⎥⎥⎥⎥⎦

12

(D12)

Letrsquos look at some examples eg consider Ω = R2 and m = 1 Then we have

D0u = u and D1u = partupartx1

partu

partx2 (D13)

so that

⟨u v⟩H1(R2) = intR2(uv + partu

partx1

partv

partx1+ partu

partx2

partv

partx2) dx1 dx2 (D14)

and

∥u∥2H1(R2) = intR2

[u2 + ( partupartx1

)2

+ ( partupartx2

)2

] dx1 dx2 (D15)

Altogether we can now properly define a Sobolev space in arbitrary dimensions

Hm(Ω) = u ∶ Ωrarr R ∶ Dαu isin L2(Ω) forall α lem (D16)

This is the set of all functions whose derivatives up to mth order all exist and are square-integrable

As an example u isin H1(Ω) implies that u and all its first partial derivatives must be square-integrable over Ω because (D15) must be finite

Let us look at the example u(x) = ∣x∣ and take Ω = (minus11) Then we have uprime(x) = H(x) (theHeaviside jump function) and uprimeprime(x) = δ(x) (the Dirac delta function) Therefore

intb

au2(x) dx ltinfin rArr u isin L2(Ω) =H0(Ω)

intb

a(partupartx

)2

dx = intb

aH2(x)dx ltinfin rArr partu

partxisin L2(Ω) and u isinH1(Ω)

intb

a(part

2u

partx2)

2

dx = intb

aδ2(x)dx =infin rArr part2u

partx2notin L2(Ω) and u notinH2(Ω)

(D17)

151

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that one usually indicates the highest order k that applies (since this is what matters forpractical purposes) so here we thus conclude that u isinH1(Ω)

From the above we also see that

Hinfin sub subH2 subH1 subH0 = L2 (D18)

Notice that even though polynomials u isin Pk(Ω) are generally in Hinfin(Ω) for any bounded Ω sub Rdthey are not square-integrable over Ω = Rd Luckily in practical problems we usually consideronly finite bodies Ω To more properly address this issue let us introduce the support of acontinuous function u defined on the open set Ω isin Rd as the closure in Ω of the set of all pointswhere u(x) ne 0 ie

suppu = x isin Ω ∶ u(x) ne 0 (D19)

This means that u(x) = 0 for x isin Ω ∖ suppu We may state eg that functions u ∶ Ω rarr R witha finite support Ω sub Rd and ess supΩ ltinfin are square-integrable over Ω

Finally let us define by Ck0 (Ω) the set of all functions contained in Ck(Ω) whose support is abounded subset of Ω Also notice that

Ck0 (Ω) subHk0 (Ω) (D20)

and

Cinfin0 (Ω) = ⋂

kge0

Ck0 (Ω) (D21)

152

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

E Operators

Energies are often defined via operators Generally we call A an operator if

A ∶ u isin U rarr A(u) isin V (E1)

where both U and V are function spaces

A simple example is

A(u) = cdu

dx (E2)

which is a (linear differential) operator requiring u isin C1

An operator A ∶ U rarr V is linear if for all u1 u2 isin U and αβ isin R

A(α sdot u1 + β sdot u2) = α sdotA(u1) + β sdotA(u2) (E3)

For example L is a linear operator in

auxx + bux = c hArr L(u) = c with L(sdot) = a(sdot)xx + b(sdot)x (E4)

Operators (such as the inner product operator) can also act on more than one function Con-sider eg an operator B ∶ U times V rarr R where U V are Hilbert spaces B is called a bilinearoperator if for all uu1 u2 isin U and v v1 v2 isin V and αβ isin R

(i) B(α sdot u1 + β sdot u2 v) = α sdot B(u1 v) + β sdot B(u2 v)(ii) B(uα sdot v1 + β sdot v2) = α sdot B(u v1) + β sdot B(u v2)

An example of a bilinear operator is the inner product ⟨sdot sdot⟩ ∶ U times U rarr R for some Hilbert spaceU

An operator A ∶ U rarr V is called symmetric if

⟨A(u) v⟩ = ⟨uA(v)⟩ for all u v isin U (E5)

Furthermore the operator is positive if

⟨A(u) u⟩ ge 0 for all u isin U (E6)

An example of a symmetric operator is A(u) = Mu with u isin Rd and M isin Rdtimesd which ispositive if M is positive-semidefinite

153

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

F Uniqueness of solutions

One of the beauties of the above variational problem () is that a unique minimizer exists bythe Lax-Milgram theorem This is grounded in (assuming ∣Ω∣ lt infin and u v isin U with someHilbert space U)

boundedness of the bilinear form

∣B(u v)∣ le C ∥u∥ ∥v∥ for some C gt 0 (F1)

For a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by the Cauchy-Schwarzinequality (using L2-norms)

∣B(u v)∣ le C ∥Gradu∥L2(Ω) ∥Grad v∥L2(Ω) le C ∥Gradu∥H1(Ω) ∥Grad v∥H1(Ω) (F2)

coercivity of the bilinear form (ellipticity)

B(uu) ge c ∥u∥2 for some c gt 0 (F3)

Again for a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by Poincarersquos inequal-ity

B(uu) = ∥Gradu∥2L2(Ω) ge c ∥u∥

2L2(Ω) (F4)

These two requirements imply the well-posedness of the variational problem and thus imply theexistence of a unique solution (or that the potential has a unique global minimizer) In simpleterms the two conditions that the functional has sufficient growth properties (ie the bilinearform has upper and lower bounds)

154

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

G Vainbergrsquos theorem

The question arises whether or not a general form like (631) always exists for any set ofPDEsODEs as governing equations Vainbergrsquos theorem helps us answer this question Con-sider a weak form

G[u v] = 0 forall v isin U0(Ω) (G1)

Let us see if G derives from a potential I via its first variation That would imply that

G(u δu) =DδuI[u] = limεrarr0

d

dεI[u + δu] (G2)

Now recall from calculus that for any continuously differentiable function f(x y) we must haveby Schwartzrsquo theorem

part

party

partf

partx= part

partx

partf

party (G3)

We can use the same strategy to formulate whether or not a weak form derives from a potentialSpecifically we can take one more variation and state that

Dδu2G(u δu1) =Dδu1G(u δu2) if and only if I[u] exists (G4)

This is known as Vainbergrsquos theorem

We can easily verify this for the general form given in (631)

G(u δu1) =Dδu1I[u] = intΩ[λGradu Grad δu1 minus S δu1] dx minus int

partΩNQ δu1 dx

rArr Dδu1G(u δ2) = intΩλGrad δu2 Grad δu1 dx =Dδu2G(u δu1)

(G5)

In simple terms (and not most generally) Vainbergrsquos theorem holds if the potential obeyssymmetry This in turn implies that the governing PDE contains derivatives of even order (suchas linear momentum balance which is second-order in both spatial and temporal derivatives orthe equilibrium equations of beams which are fourth-order in space and second-order in time)If the PDEs are of odd order (such as eg the time-dependent diffusion or heat equation) thenno direct potential I exists ndash there are work-arounds using so-called effective potentials thatwill be discussed later in the context of internal variables

Of course knowing that a variational structure exists is beneficial but it does not reveal anythingabout the actual solution u which will be obtained by solving the above system of equations

155

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

H Energy norm

For many purposes it is convenient to introduce the so-called energy norm

∣sdot∣E =radicB(sdot sdot) (H1)

For example if we find an approximate solution uh for the displacement or temperature fieldthen the error can be quantified by

∣u minus uh∣E=radicB(u minus uh uuh) (H2)

Notice that unlike for eg the Euclidean norm ∥u minus uh∥E

does not necessarily imply uminusuh = 0so that strictly speaking the above energy norm is only a semi-norm To turn it into a propernorm we need to exclude solutions corresponding to rigid-body motion (ie solutions thatimply uniform translations or rotations of the u-field but without producing gradients in u) Ifwe assume that essential boundary conditions are chosen appropriately to suppress rigid bodymotion by seeking solutions

u isin U = u isinH1 ∶ u = u on partΩD (H3)

then for this space ∥sdot∥E is indeed a proper norm

156

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

I Gauss quadrature

A systematic way to deriving Gaussian quadrature rules involves the use of Legendre polyno-mials We here give a brief overview

We start by noticing that monomials 1 ξ ξ2 ξ3 although complete are not orthogonalbasis functions We can turn them into orthogonal polynomials Pn(ξ) by eg the Gram-Schmidt orthogonalization procedure To this end let us start with

P0(ξ) = 1 (I1)

and obtain the next basis function by starting with the linear momonial ξ and computing

P1(ξ) = ξ minus⟨1 ξ⟩⟨11⟩

1 = ξ (I2)

where we used the inner product

⟨u v⟩ = int1

minus1u(ξ)v(ξ)dξ (I3)

Similarly the next higher basis function is obtained by starting from ξ2 so that

P2(ξ) = ξ2 minus ⟨ξ ξ2⟩⟨ξ ξ⟩

ξ minus ⟨1 ξ2⟩⟨11⟩

1 = ξ2 minus 1

3 (I4)

Analogously one finds

P3(ξ) = ξ3 minus 3

5ξ (I5)

By continuing analogously we create a countably infinite set of orthogonal basis functions Pn(ξ)such that

int1

minus1Pn(ξ)Pm(ξ)dξ = 0 if n nem (I6)

These polynomials are known as Legendre polynomials Note that they are defined only upto a constant so one can renormalize them which is commonly done by enforcing that Pn(1) = 1for all n The result is the well known Legendre polynomials which can alternatively be definedvia

Pn(ξ) =1

2nn

dn

dξn[(ξ2 minus 1)n] (I7)

These polynomials have another interesting feature viz by orthogonality with P0(ξ) = 1 weknow that

int1

minus1Pn(ξ)dξ = ⟨1 Pn⟩ =

⎧⎪⎪⎨⎪⎪⎩

2 if n = 0

0 else(I8)

Pn(ξ) has exactly n roots in the interval [minus11] Also for n ne 0 we know that

Pn(ξ) = minusPn(minusξ) for odd n

Pn(ξ) = Pn(minusξ) for even n(I9)

157

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Moreover Pn(0) = 0 for odd n

With this new set of basis functions we can define the Gauss-Legendre quadrature rule toenforce

int1

minus1Pk(ξ)dξ

=nQPminus1

sumi=0

Wi Pk(ξi) k = 01 2nQP minus 1 (I10)

If nQP = 1 then the solution is simple because the above equations simplify to

W0 = 2 and 0 =W0P1(ξ0) (I11)

Therefore the weight is as before W0 = 2 and the quadrature point is the root of P1(ξ) vizξ0 = 0

If nQP = 2 then the four equations to be solved are

W0 +W1 = 2 and 0 =W0P1(ξ0) +W1P1(ξ1)0 =W0P2(ξ0) +W1P2(ξ1) and 0 =W0P3(ξ0) +W1P3(ξ1)

(I12)

By analogy we choose the quadrature points to be the roots of P2(ξ) so that

P2(ξ0) = P2(ξ1) = 0 rArr ξ0 =1radic3 ξ1 = minus

1radic3 (I13)

Using Pn(ξ) = minusPn(minusξ) the above equations reduce to

W0 =W1 = 1 (I14)

Further note that Pn(0) = 0 for odd n Therefore the same procedure can be continued asfollows For an arbitrary number of quadrature points nQP the Gauss-Legendre quadraturepoints and associated weights are defined by

PnQP (ξi) = 0 wi =2

(1 minus ξ2i )[P prime

nQP(ξi)]2

i = 0 nQP minus 1 (I15)

As a check take eg nQP = 1 so that P1(ξ) = ξ with root ξ0 = 0 The weight is computed as

w0 =2

(1 minus ξ20)[P prime

nQP(ξ)]2

= 2 (I16)

as determined above Similarly for nQP = 2 we have P2(ξ) = 12(3ξ

2 minus 1) with the above roots of

plusmn1radic

3 The associated weights are computed as

w0 =2

(1 minus ξ20)[P prime

2(ξ0)]2= 2

(1 minus ξ20)[3ξ0]2

= 223

32

3

= 1 = w1 (I17)

which agrees with our prior solution in Section 1621

158

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

J Quadrature error estimates

Using numerical quadrature to approximate an exact integral introduces a quadrature errorwhich is bounded as follows For a function f(ξ) isin C2nQP (Ω) we have that (without proof here)

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQPminus1

sumk=0

Wk f(ξk)RRRRRRRRRRRle Ch2nQP max

ξisin[minus11]∣f (2nQP )(ξ)∣ (J1)

with a constant C gt 0 This shows that as can be expected the quadrature error decreases withdecreasing mesh size h and with increasing smoothness of function f The rate of convergenceunder h-refinement also depends on the smoothness of the function

The exact error depends on the chosen quadrature rule For example for Gauss-Legendrequadrature an error estimate is given by

e =22nQP+1(nQP )4

(2nQP + 1)[(2nQP )]3maxξisin[minus11]

∥f (2nQP )(ξ)∥ (J2)

159

Index

L2-norm 144h-refinement 57hp-refinement 57n-dimensional space 47p-refinement 57r-refinement 57(proper) subset 1422-node bar element 592-node beam element 664-node bilinear quadrilateral 794-node tetrahedron 758-node brick element 848-node quadratic quadrilateral 839-node quadratic quadrilateral 83

ae 143acceleration field 7action 109action principle 109amplitude 117approximation error 134assembly 62assembly operator 95augmented finite elements 140average acceleration 124 125

backward-Euler 19balance of energy 10balance of linear momentum 9Banach space 145barycentric coordinates 72basis 54basis functions 28bijective 142bilinear form 42bilinear operator 153boundary 142boundary conditions 13Bubnov-Galerkin approximation 47

CFL condition 23chicken-wire mode 94class Ck(Ω) 45 143classical solution 41closure 145collocation method 29collocation points 29commercial codes 139

complete polynomial 151complete space 145complete up to order q 55completeness property 55condensation 105condition number 133conditionally stable 25conductivity matrix 132conjugate gradient 99consistent mass matrix 111Constant Strain Triangle 75constitutive relations 8continuous at a point x 143continuous over Ω 143convergence 145Courant-Friedrichs-Levy 23Courant-Friedrichs-Levy (CFL) condition 24CST 75cubature rules 86

damage and failure 141damped Newton-Raphson method 97damping matrix 120deformation gradient 128deformation mapping 128degree 150degrees of freedom 56Direct methods 18Dirichlet boundary 13Dirichlet boundary condition 70Dirichlet boundary conditions 69Dirichlet-Poincare inequality 147discrete problem 48discretization error 133discretization errors 12displacement field 7 128distance 144 145divergence of a vector 11domain 142dummy index 7dynamic 109

eigenfrequency 115eigenmode 115elasticity tensor 8element defect 92elements 56energy norm 156

160

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

equation of motion 111error estimate 135essential supremum 144Euclidean norm 144Euler-Bernoulli beam 65Eulerian 140excitation frequency 117explicit 19explicit time integration 121extensive 11external forces 101

Fast Inertial Relaxation Engine 99FE 56FEM 56finite differences 18finite element 56Finite Element Method 56finite-difference stability 23first fundamental error 133first Piola-Kirchhoff stress tensor 129first variation 39first-derivative central difference 18forced vibrations 114 117forward-Euler 19free vibrations 114full integration 90function 142function space 37functional 37

Gauss quadrature 86Gauss-Chebyshew 88Gauss-Hermite 88Gauss-Legendre 88Gauss-Legendre quadrature 87 158Gauss-Lobatto quadrature 88Gauss-Newton method 99geometric stiffness 140ghost node 21global 53 95global error estimate 147 148global stiffness matrix 62gradient flow method 99Gram-Schmidt orthogonalization 157

heat equation 11Hermitian polynomials 67HHT method 127HHT-α 127hierarchical interpolation 64higher-order interpolation 148

Hilbert space 145hourglass mode 94

identity mapping 142implicit 19 21implicit time integration 124incompressibility 140incremental stiffness matrix 77indirect methods 27initial boundary value problem 13initial conditions 13injective 142inner product 143inner product space 143instability 141integration point 86intensive 11internal energy 10inverse function theorem 73 74isomorphism 142isoparametric mapping 71isotropy 8

Jacobian 74Jacobian ratio 137

kinetic energy 109

L2-inner product 143L2-space of functions 145Lp-norm 144Lagrange polynomials 64Lagrangian 109Lagrangian interpolation 64Laplace equation 11large deformations 140Lax-Milgram theorem 42 154Lax-Richtmyer theorem 25least squares method 30Legendre polynomials 157line search method 98linear 153linear acceleration 124 125linear elasticity 8 49 50linear form 42linear operator 13linear strain triangle 78linear subspace 142linearvector space 142local 53local energy balance 11local error estimate 147

161

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

local stiffness matrix 62local-to-global map 62locking 93longest edge bisection 136LST 78lumped mass matrix 112

mapping 71 142material points 7mathematical domain of dependence 24maximizer 41mechanical instability 138mechanisms 108 138mesh 56mesh refinement algorithm 136mesh refinement criterion 136methods of weighted residuals 29minimizer 41mixed finite elements 140modal decomposition 118modeling errors 12 134monomial 150monomials 55multi-index 150multi-indices 55

natural frequency 115Navier equation 10neighborhood 145Neumann boundary 13Neumann-Poincare 147Newmark-β 124 125Newton-Cotes 86Newton-Raphson method 96nodes 56nominal strains 8nominal stresses 8nonlinear least squares 98norm 144normed linear space 144numerical damping 125numerical domain of dependence 23numerical integration 85numerical integration error 133

one-to-one 142onto 142open 145open set 142operator 153order of a PDE 13order reduction 119

ordered triad 142orthogonal 143over-integration 91

PkQl elements 140parasitic shear 93particle-mass lumping 112period contraction 127period elongation 127Petrov-Galerkin 47phase error analysis 23Poincare inequalities 147Poisson equation 12polynomial function space 32positive 153principle of stationary action 109principle of virtual work 34 46

Q4 79Q8 83Q9 83quadratic tetrahedron 78quadratic triangle 77quadrature error 159quadrature rules 86Quasi-Newton method 97quasistatics 109

range 142Rayleighrsquos quotient 119Rayleigh-Ritz 42reduced integration 91reference configuration 7residuals 28Riemann sum 85rigid-body mode 115rigid-body modes 107rigid-body motion 107

second-derivative central difference 18selective integration 94semi-discretization 110semi-norm 148serendipity element 83set 142shape function properties 53shape functions 47 53shear locking 93shear strains 8shear stresses 8simplex 72simplicial quadrature 91

162

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

singularities 140smoothing 135Sobolev norm 38 149Sobolev semi-norm 148Sobolev space 38 150 151solution error 133solution errors 12solver tolerance 134space of all second-order polynomial functions

142square-integrable 38 145 150static vs dynamic FEA 139statics 10stationarity condition 39stencil 20strain tensor 7stress tensor 8strong form 45 49subdomain method 29subparametric mapping 71substitution 105superparametric mapping 71support 53 152surjective 142symmetric 153

tangent matrix 96Taylor expansions 18temperature field 130thermal problem 130time delay 120total-Lagrangian 140trial functions 28triangle inequality 144truncation error 134

UEL 139UMAT 139unconditionally stable 26undeformed 7under-integration 91units 133update rule 19updated-Lagrangian 140

Vainbergrsquos theorem 47 155validation 12variation 39variational calculus 37variational structure 40velocity field 7verification 12

vibrations 114Voigt notation 52von Neumann analysis 23 25

wave equation 10weak form 46 110weak solution 46Weierstrass approximation theorem 54

XFEM 140

zero-energy mode 93zero-energy modes 107zeroth derivative 46 143ZZ error estimator 135

163

  • Preface
  • Introduction Continuum Mechanics and Notation
    • Kinematics
    • Kinetics
    • Computational Mechanics
    • (Initial) Boundary Value Problems
      • Dimensionless Forms
      • Direct Numerical Methods Finite Differences
      • Stability of Finite Difference Schemes
        • CFL Condition
        • von Neumann Analysis and Phase Error Analysis
        • Direct vs Indirect Methods
          • Methods of Weighted Residuals
            • Collocation Method
            • Subdomain Method
            • Method of Least Squares
            • Higher Dimensions
            • Galerkins Method
              • Variational Calculus
                • Functionals
                • Variations
                • Rayleigh-Ritz Method
                  • The weak form
                    • Classical and weak solutions
                    • Equivalence of strong and weak forms
                    • Approximate solutions
                      • The mechanical variational problem at small strains
                        • General case
                        • Linear elasticity
                          • Interpolation spaces
                            • Shape functions
                            • Approximation power and completeness
                            • Completeness in higher dimensions
                              • The Finite Element Method
                              • Finite element spaces polynomial shape functions in 1D
                                • 2-node bar element
                                • Problem assembly
                                • Polynomial interpolation of higher order
                                  • Lagrangian interpolation
                                  • Hierarchical interpolation
                                    • 2-node beam element
                                    • A note on beam elements and boundary conditions
                                      • Shape Functions in higher dimensions
                                      • Simplicial elements
                                        • Linear Triangle (T3)
                                        • Extension to three dimensions
                                        • Finite element implementation
                                          • Special case linear elasticity
                                          • General case of non-linear elastic materials
                                            • Higher-order triangles and tetrahedra
                                              • The bilinear quadrilateral element
                                              • Higher-order elements Q8 Q9 8-node brick
                                              • Numerical quadrature
                                                • Example Riemann sums
                                                • Gauss quadrature
                                                  • Gauss-Legendre quadrature
                                                  • Other Gauss quadrature rules
                                                    • Higher dimensions
                                                      • FEM which quadrature rule to use
                                                        • Integrals in the FE context
                                                        • Which quadrature rule to use
                                                          • Element defects shear locking and hourglassing
                                                          • Assembly
                                                          • Iterative solvers
                                                            • Netwon-Raphson (NR) method
                                                            • Damped Newton-Raphson (dNR) method
                                                            • Quasi-Newton (QN) method
                                                            • Line search method
                                                            • Nonlinear Least Squares
                                                            • Gradient flow method
                                                            • Conjugate Gradient (CG) method
                                                              • Boundary conditions
                                                                • Neumann boundary conditions
                                                                • Dirichlet boundary conditions
                                                                  • Substitution
                                                                  • Condensation
                                                                    • A note on Dirichlet boundary conditions in iterative solvers
                                                                    • Rigid body motion
                                                                      • Dynamics
                                                                      • Vibrations
                                                                        • Free undamped vibrations
                                                                        • Forced vibrations
                                                                        • Modal decomposition
                                                                        • Structural damping
                                                                          • Time-dependent transient solutions
                                                                            • Explicit time integration
                                                                            • A reinterpretation of finite differences
                                                                            • Implicit time integration
                                                                              • Newmark- method
                                                                                • HHT- method
                                                                                • Use of mass matrices
                                                                                  • Extensions
                                                                                    • Finite kinematics
                                                                                    • Thermal problems
                                                                                      • Error analysis and adaptivity common mistakes
                                                                                        • Finite element error analysis
                                                                                        • Smoothing and adaptivity
                                                                                        • Common errors
                                                                                          • FEM ndash Extensions amp Applications
                                                                                          • Appendices
                                                                                          • Vector Spaces
                                                                                          • Function Spaces
                                                                                          • Approximation Theory
                                                                                          • Sobolev spaces
                                                                                          • Operators
                                                                                          • Uniqueness of solutions
                                                                                          • Vainbergs theorem
                                                                                          • Energy norm
                                                                                          • Gauss quadrature
                                                                                          • Quadrature error estimates
                                                                                          • Index
Page 2: Computational Mechanics I { Introduction to FEA

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

These lecture notes are a concise summary of the topics covered in this course They are not acomplete textbook that could replace participating in lectures You are strongly encouraged to

take your own notes during lectures while using this set of notes for reference

2

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Contents

0 Preface 6

1 Introduction Continuum Mechanics and Notation 7

11 Kinematics 7

12 Kinetics 8

13 Computational Mechanics 12

14 (Initial) Boundary Value Problems 13

2 Dimensionless Forms 16

3 Direct Numerical Methods Finite Differences 18

4 Stability of Finite Difference Schemes 23

41 CFL Condition 23

42 von Neumann Analysis and Phase Error Analysis 24

43 Direct vs Indirect Methods 27

5 Methods of Weighted Residuals 28

51 Collocation Method 29

52 Subdomain Method 29

53 Method of Least Squares 30

54 Higher Dimensions 31

55 Galerkinrsquos Method 34

6 Variational Calculus 37

61 Functionals 37

62 Variations 39

63 Rayleigh-Ritz Method 42

7 The weak form 45

71 Classical and weak solutions 45

72 Equivalence of strong and weak forms 47

73 Approximate solutions 47

8 The mechanical variational problem at small strains 49

81 General case 49

82 Linear elasticity 51

9 Interpolation spaces 53

91 Shape functions 53

92 Approximation power and completeness 54

93 Completeness in higher dimensions 55

10 The Finite Element Method 56

11 Finite element spaces polynomial shape functions in 1D 59

111 2-node bar element 59

112 Problem assembly 62

3

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order 64

1131 Lagrangian interpolation 64

1132 Hierarchical interpolation 64

114 2-node beam element 65

115 A note on beam elements and boundary conditions 69

12 Shape Functions in higher dimensions 71

13 Simplicial elements 72

131 Linear Triangle (T3) 72

132 Extension to three dimensions 75

133 Finite element implementation 76

1331 Special case linear elasticity 77

1332 General case of non-linear elastic materials 77

134 Higher-order triangles and tetrahedra 77

14 The bilinear quadrilateral element 79

15 Higher-order elements Q8 Q9 8-node brick 83

16 Numerical quadrature 85

161 Example Riemann sums 85

162 Gauss quadrature 86

1621 Gauss-Legendre quadrature 87

1622 Other Gauss quadrature rules 88

163 Higher dimensions 88

17 FEM which quadrature rule to use 90

171 Integrals in the FE context 90

172 Which quadrature rule to use 90

18 Element defects shear locking and hourglassing 92

19 Assembly 95

20 Iterative solvers 96

201 Netwon-Raphson (NR) method 96

202 Damped Newton-Raphson (dNR) method 97

203 Quasi-Newton (QN) method 97

204 Line search method 98

205 Nonlinear Least Squares 98

206 Gradient flow method 99

207 Conjugate Gradient (CG) method 99

21 Boundary conditions 100

211 Neumann boundary conditions 100

212 Dirichlet boundary conditions 105

2121 Substitution 105

2122 Condensation 105

213 A note on Dirichlet boundary conditions in iterative solvers 106

4

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

214 Rigid body motion 107

22 Dynamics 109

23 Vibrations 114

231 Free undamped vibrations 114

232 Forced vibrations 117

233 Modal decomposition 118

234 Structural damping 120

24 Time-dependent transient solutions 121

241 Explicit time integration 121

242 A reinterpretation of finite differences 122

243 Implicit time integration 124

2431 Newmark-β method 124

244 HHT-α method 127

245 Use of mass matrices 127

25 Extensions 128

251 Finite kinematics 128

252 Thermal problems 130

26 Error analysis and adaptivity common mistakes 133

261 Finite element error analysis 133

262 Smoothing and adaptivity 135

263 Common errors 136

27 FEM ndash Extensions amp Applications 139

Appendices 142

A Vector Spaces 142

B Function Spaces 143

C Approximation Theory 147

D Sobolev spaces 150

E Operators 153

F Uniqueness of solutions 154

G Vainbergrsquos theorem 155

H Energy norm 156

I Gauss quadrature 157

J Quadrature error estimates 159

Index 160

5

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

0 Preface

Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientistsacross all disciplines Whether it is commercial software like Abaqusreg Ansysreg and LS-Dynareg

or open-source libraries such as fenics or FEAP ndash FEA techniques are available in variousflavors and have become an essential ingredient for the analysis of mechanical thermal andmulti-physics initial boundary value problems

The availability and ease of use of FEA tools comes with a risk though the ability to producecolorful plots by the push of a button does not obviate the userrsquos expert knowledge in deploy-ing FEA tools properly and responsibly (ultimately lives could be endangered and significanteconomic losses incurred if engineering design is flawed) What element types to use whatquadrature rules to use what stress components to plot how to interpolate or extrapolate andhow to present results those are questions to be answered by the FEA user and they requirea background knowledge on what the ldquoblack box FEArdquo does for us

To turn the black box into an versatile and understandable toolbox this course discusses thefundamentals of numerical methods and in particular the finite element method Rather thanstudying and using commercial software packages we study FEA from the basics and with thegoal in mind of understanding the theoretical underpinning and the details of numerical imple-mentations This of course requires us to review the underlying mechanical and mathematicaltheory and to discuss the wide variety of finite element types and choices to be made whenusing FEA

Since no course on computational methods would be effective without a computational compo-nent we will write our own finite element code (using MATLABreg) starting with simple barand beam elements for truss and frame problems and advancing to solid elements for static anddynamic analysis Throughout the course we will complete a total of five projects that buildupon each other and grow our finite element code over time in a modular fashion ndash ultimatelyproviding a simple but versatile FEA code that is no longer a black box but whose every singleline we will understand

In order to follow the course contents is assumed that you have a background in solid andstructural mechanics (equivalent to Mechanics 1-2 and Dynamics at ETH Zurich) as well asknowledge in analysis and linear algebra We will begin with a brief review of continuummechanics and an introduction to the notation used in this course after which we will dive intothe discussion of numerical methods

I apologize in advance for any typos that may have found their way into these lecture notesThis is a truly evolving set of notes which was started in the spring semester of 2019 and hasevolved significantly over time Note that this set of notes is not meant as a complete textbookand you are encouraged to take notes during lectures Though I made a great effort to ensurethese notes are free of essential typos I cannot rule out that some have remained If you spotany mistakes feel free to send me a highlighted PDF at the end of the semester so I can makesure those typos are corrected for future years

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

Dennis M KochmannZurich March 2021

6

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1 Introduction Continuum Mechanics and Notation

11 Kinematics

We describe a body Ω sub Rd with boundary partΩ as a collection of material points Each pointhas a position x isin Ω in a Cartesian coordinate system (x1 xd) in d dimensions with origin O

Points are described by vectors with respect to O which in turn are defined by components inthe Cartesian reference frame with basis e1 ed Therefore we write

x =d

sumi=1

xiei = xiei (11)

Here and in the following we use Einsteinrsquos summation convention which implies a summationover an index that appears twice in any product (for a thorough review of index notation seethe tensor notes available online) In the above example i is a dummy index and can bereplace by any other index For example an inner product of two vectors is written as

u sdot v = (d

sumi=1

uiei) sdot⎛⎝

d

sumj=1

vjej⎞⎠=

d

sumi=1

d

sumj=1

uivi(ei sdot ej) =d

sumi=1

uivi = uivi = ukvk (12)

Likewise the norm of a vector is

∥u∥ =radicu sdotu =

radicuiui (13)

The deformation and motion of a body Ω is described bya displacement field

u = u(x t) (14)

which to every undeformed point x isin Ω in its referenceconfiguration defines a unique deformed location y isin Rdsuch that

y(x t) = x +u(x t) (15)

x1

+

x2

x3

e1

e2

e3

+

x

WparaW

y

u

From the displacement field we may derive kinematic variables such as the velocity field

v(x t) = d

dtu(x t) (16)

and the acceleration field

a(x t) = d

dtv(x t) = d2

dt2u(x t) (17)

For convenience we also use dots to denote derivatives with respect to time so that v = u anda = v = u

Deformation is best described not by the displacement field (which would also include rigidbody motion) but by the strain tensor which is a second-order tensor with components

εij =1

2(partuipartxj

+partuj

partxi) = 1

2(uij + uji) rArr ε = 1

2[gradu + (gradu)T] (18)

7

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here used index notation again and to define the second-order tensor Specifically we usedthe gradient of a vector field defined as a second-order tensor with components

[gradu]ij =partuipartxj

= uij (19)

Here and in the following a comma in an index implies differentation with respect to the spatialx-component(s) following the comma

Recall that ε11 ε22 and ε33 are the nominal strains along in the three coordinate directionsof an infinitesimal cube of material εij (with i ne j) by contrast represent shear strains Bydefinition εij = εji or ε = εT ie the strain tensor is symmetric

12 Kinetics

In order to deform body Ω forces (or displacements) must be ap-plied Consider again an infinitesimal cube with (infinitesimal)force vectors dFi applied to each surface dAi normal to the xi-axis(positive in the +xi-direction negative in the minusxi-direction) Wedefine the components of the stress tensor σ as

σij =dFidAj

(110)

x1

x2

x3

s11

s21

s31

s22

s12s32

s13

s23

s33t1

-t1

t3

t2

Analogous to the strains components σ11 σ22 and σ33 represent nominal stresses (resultingin extension or compression of the cube along its axes) while σij (with i ne j) imply a shearstresses acting parallel to the surface that it is acting on (and resulting in angle changes withinthe cube) The complete (infinitesimal) force vector acting on a surface with normal n is givenby

t(n) = σn rArr [t(ei)] =⎛⎜⎝

t1t2t3

⎞⎟⎠=⎛⎜⎝

σ1i

σ2i

σ3i

⎞⎟⎠ (111)

ie the ith column of σ is the traction vector on a surface normal to ei Here and in thefollowing we use brackets to indicate vector (or tensor) components in the Cartesian frameNote that by angular momentum balance on the cube (and in close analogy to the strain tensor)we must have σ = σT (ie σ is symmetric)

Stresses and strains are linked by constitutive relations that depend on the material of whichbody Ω is made The simplest material model is linear elasticity for which stresses and strainsare linearly linked via the linear relation

σij = Cijklεkl hArr σ = Cε (112)

with a fourth-order elasticity tensor whose component Cijkl describes the linear dependenceof the stress component σij to the strain component εkl In principle C has d4 entries yetthe symmetry of both the stress and strain tensors as well as any existing material symmetriesreduce the number of independent material parameters required to describe C For the simplestcase of isotropy (ie the material behavior is the same in every direction) C can be describedby only two constants eg Youngrsquos modulus E and Poissionrsquos ratio ν or the Lame moduli λand micro

8

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

As a convenient alternative to defining the constitutive relation as a link between stresses andstrain we can encode the constitutive response in a strain energy density W = W (ε) whicheg for the case of linear elasticity reads

W = 1

2ε sdotCε hArr W = 1

2εijCijklεkl (113)

so that

σij =partW

partεij Cijkl =

partσij

partεkl (114)

Vector or tensor derivatives of the above type are to be understood component-wise (for detailsand a proper tensorial definition see the tensor notes available online)

In order to solve any mechanical problem we need governing equations that describe howstresses and strains vary over time and space These are given by the conservation or balancelaws First we consider the balance of linear momentum which for a macroscopic body Ωstates that

sumi

Fi =maCM (115)

which equates the sum of all forces applied externally to Ω to its total (constant) mass m andthe acceleration of its center of mass aCM Let us now consider body Ω as a deformable objectfor which we can write the above balance law using integrals over Ω Specifically (115) isequivalent to

intpartΩσn dS + int

ΩρbdV = int

Ωρa dV (116)

where the first term represents all external forces applied to the boundary partΩ of the bodythrough tractions σn the second term denotes external forces in the form of distributed bodyforces and the right-hand side stems from applying the definition of the center of mass and itsacceleration since

aCM = d2

dt2uCM = d2

dt2intΩ ρu dV

intΩ ρ dV= 1

mint

Ωρ

d2u

dt2dV = 1

mint

Ωρa dV (117)

Applying the divergence theorem to the first term in (116) viz

intpartΩσijnj dS = int

Ωσijj dV (118)

which defines the divergence of a second-order tensor as a vector with components

[divσ]i = σijj (119)

Rewriting the resulting equation gives

intΩ(divσ + ρb minus ρa) dV = 0 (120)

This relation must hold not only for the whole body Ω but also for any sub-body cut free fromΩ (as discussed in Mechanics 2 and 3) For the integral to vanish for any arbitrary subset of Ωwe must have

divσ + ρb minus ρa = 0 hArr divσ + ρb = ρa or σijj + ρbi = ρai (121)

which is the local form of the balance of linear momentum

9

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 11 One-dimensional elastic rod

Consider a long and slender rod that is deforming only along its x-axis The displacement field u = u(x t) describes the axial motionof each point on the rod so the associated acceleration field issimply a = a(x t) = u(x t) x

+

u(xt)

The only non-zero strain component is the axial strain εxx(x t) = ε(x t) = ux(x t) and theonly non-zero stress is the axial stress σxx(x t) = σ(x t) which for linear elasticity obeysσ(x t) = E(x)ε(x t) with Youngrsquos modulus E(x) that may vary with position x

Inserting all of this into the balance law of linear momentum gives

ρ(x)a(x t) = divσ(x t) rArr ρ(x)u(x t) = (σ(x t))x= (E(x)ux(x t))x (122)

For the special case of a constant density ρ(x) = ρ = const and constant modulus E(x) = E =const the above reduces to

ρu(x t) = Euxx(x t) hArr u(x t) = c2uxx(x t) with c =radic

E

ρ(123)

This is the one-dimensional wave equation governing the deformation and motion of the rodin one dimension and c is the longitudinal wave speed in the rod For the special case of staticswe have u(x t) = 0 for all x isin Ω and times t

mdashmdashmdashmdash

Example 12 Wave equation in higher dimensions

For the more general case of a body Ω undergoing linear elastic deformation over time thebalance law of linear momentum reads

ρ(x)a(x t) = divσ(x t) hArr ρ(x)ui(x t) = [Cijkl(x)ukl(x t)]j (124)

For the special case of a constant density ρ(x) = ρ = const and constant elastic modulus tensordsC(x) = C = const the above reduces to

ρui(x t) = Cijkl(x)ukjl(x t) (125)

This is sometimes referred to as the Navier equation governing the deformation and motionof a linear elastic body in higher dimensions As before for the special case of statics we haveu(x t) = 0 for all x isin Ω and for all times t

mdashmdashmdashmdash

The balance of energy provides another governing equation which is particularly of interst fornon-elastic problems as wel as for thermal problems The balance of energy states that thechange of internal energy E in a body Ω over time t balances the inward and outward flux ofenergy and the energy being produced inside the body (by some heat source density s) as wellas mechanical power P imposed on the body through mechanical work Mathematically thisimplies

d

dtE = int

Ωs dV minus int

partΩq sdotn dS + P (126)

We can use the divergence theorem to write

intpartΩq sdotn dS = int

partΩqini dS = int

Ωqii dS = int

Ωdivq dS (127)

10

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which defines the divergence of a vector as the scalar quantity

div(sdot) = (sdot)ii (128)

Energy is an extensive variable ie the total energy doubles when adding to bodies of thesame energy This is in contrast to intensive variables such as temperature or pressure whenadding to bosides having the same eg temperature Since energy is an extensive variable wecan introduce an energy density e and write

E = intΩe dV rArr d

dtE = int

Ωe dV (129)

The analogous applies to the mechanical work being a change in strain energy density so

P = d

dtint

ΩW dV = int

ΩW dV (130)

Rewriting the balance law of energy now yields

intΩe dV = int

Ωs dV minus int

Ωdivq dV + int

ΩW dV (131)

This can be rewritten as

intΩ(e minus s + divq minus W ) dV = 0 (132)

Since the balance of energy does not only have to hold for Ω but for any subbody ω sub Ω wemay conclude that the local energy balance equation is

e = W + s minus divq (133)

This is the local (ie pointwise) counterpart to the macroscopic energy balance and states thatat each point x isin Ω the rate of energy change (e) is given by the local production of heat (ρs)plus the local mechanical power supplied (W ) minus the heat lost by outward fluxes q awayfrom the point

Example 13 Heat conduction

Consider a purely thermal problem without mechanical energy (so W = 0) Thermally storedenergy is given by e = ρcvT with mass density ρ(x) constant specific heat capacity cv(x) andan unknown temperature field T = T (x t) Let us assume that heat conduction follows Fourierrsquoslaw ie

q(x t) = minusκ(x)gradT (x t) hArr qi(x t) = minusκ(x)Ti(x t) (134)

with a heat conductivity κ(x) The local energy balance equation then becomes

ρ(x)cv(x)T (x t) = [κ(x)Ti(x t)]i + s(x t) (135)

and for the special case of a homogeneous body with spatially constant material properties wearrive at the well-known heat equation (also known as the inhomogeneous Laplace equa-tion)

ρcvT (x t) = κnabla2T (x t) + s(x t) (136)

11

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

where we used the definition of the Laplacian viz Tii = nabla2T = ∆T Whenever we consider astatic problem we assume that the body is in equilibrium and the temperature field is constantwhich reduces the above to the Poisson equation

κ∆T = minuss (137)

Also for a 1D problem the heat equation with T = T (x t) reduces to

ρcvT (x t) = κTxx(x t) + s(x t) (138)

mdashmdashmdashmdash

13 Computational Mechanics

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

from reality to mathematical model a practical problem is turned into an abstractproblem by making a series of simplifications and assumptions thus introducing modelingerrors in order to define a proper mathematical problem

from mathematical model to numerical model if the mathematical model cannotbe solved analytically the sought infinite-dimensional solution is turned into a finite-dimensional solution by making approximations here discretizing the body Ω so that itsdescription involves a finite number of unknowns This incurrs discretization errors

from numerical model to results solving the numerical problem computationally gen-erally involves solution errors that stem from round-offfloating-point errors iterativesolution approaches etc

Ensuring that the results agree with the mathematical model (eg by comparing the numericalsolution to an analytical solution where available) is the step of verification while ensuringthat the obtained results properly reflects reality (eg by comparing the numerical solution toexperimental data) is the validation step

12

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 (Initial) Boundary Value Problems

So far we have seen how partial differential equations governthe thermal and mechanical behavior of solid bodies (and ofcourse those two can be coupled as well to describe the thermo-mechanical behavior of deformable bodies) In order to solve aproblem we need an initial boundary value problem (IBVP)which furnishes the above equations with appropriate boundaryconditions (BCs) and initial conditions (ICs)

To this end we subdivide the boundary partΩ of a body Ω into

t

u = u

W

paraWD

paraWN

partΩD equiv Dirichlet boundary prescribing the primary field (eg u T etc)

eg u(x t) = u(x t) on partΩD or T (x t) = T (x t) on partΩD (139)

partΩN equiv Neumann boundary prescribing derivatives of the primary field (eg εgradT etc)

eg t(x t) = σ(x t)n(x t) = t(x t) on partΩN or q(x t) = q(x t) on partΩN

(140)

Note that we may generally assume that

partΩD cup partΩN = partΩ and in most problems also partΩD cap partΩN = empty (141)

In addition all time-dependent problems require initial conditions eg

T (x0) = T0(x) forall x isin Ω

or u(x0) = u0(x) and v(x0) = v0(x) forall x isin Ω(142)

The number of required BCsICs depends on the order of a PDE eg

ρcvT = div(K gradT ) + ρs (143)

is first-order in time and therefore requires one IC eg T (x0) = T0(x) It is second-order inspace and hence requires BCs along all partΩ (eg two conditions per xi coordinate)

In summary we will have governing PDEs supplemented by ICs and BCs as required (egquasistatic problems of course do not require any initial conditions) Those need to be solvedfor the primary fields (eg temperature T or displacements u)

Any of the aforementioned PDEs can be written in an operator form introducing an operatorL For example we may abbreviate the 1D wave equation

u minus c2uxx = 0 rArr L[u] = 0 with L = part

partt2minus c2 part

partx2(144)

One key feature of all PDEs discussed so far (including the heat and wave equations) is thattheir operators are linear A linear operator L is characterized by

L[α1u1 + βu2] = α1L[u1] +α2L[u2] forall α1 α2 isin R and for all functions u1 u2 (145)

In the following we will need to be more specific about what we mean by all functions (since wemay need to classify admissible or useful classes of functions) but this is left for the examplesin the following sections A few examples involving linear operators are summarized here

13

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

wave equation in one dimension (second order in space and time)

L[u] = 0 with L = part

partt2minus c2 part

partx2hArr u = c2uxx (146)

heat equation in one dimension (second order in space first order in time)

L[T ] = s with L = ρcvpart

parttminus κ part

2

partx2hArr ρcvT = κTxx + s (147)

advection or transport equation (first order in space and time) with flow speed v

L[u] = 0 with L = part

partt+ v part

partxhArr u + v ux = 0 (148)

Similarly boundary conditions can also be expressed by linear operators For example for wemay define boundary operators for

boundary tractions of a one-dimensional bar

B[u] = t with B = E part

partxhArr Eux = t (149)

boundary flux in a one-dimensional rod

B[T ] = q with B = minusκ partpartx

hArr minus κTx = q (150)

Unfortunately analytical solutions (I)BVPs of the above type are hardly ever available ndash exceptfor relatively simple problems involving

simple geometries

simple material behavior

simple ICsBCs

For realistic geometries materials andor ICsBCs one usually requires numerical techniquesto obtain approximate solutions numerically

We point out that computing machines have two main shortcomings that require the discussionof topics in the following few sections

First computers do not know any units To this end any numerical technique must cope withthe intrinsic units present in physical problems This is commonly in done in one of two wayseither one defines a set of consistent units (eg only SI units) and tacitly implies that thoseunits are being used throughout (this is common practice in most commercial FEA codes) orone reduces the physical system to a dimensionless problem This will be discussed in Section 2

Second computers cannot deal with infinity For this reason any numerical technique has theobjective to turn an infinite-dimensional problem into a finite-dimensional one The exactsolution to any of the above systems of IBVPs lives within an inifinite-dimensional functionspace In other words we donrsquot know much about the sought function fields u(x t) or T (x t) a-priori so the problem is not to simply identify the coefficients of some known type of polynomialbut to find an arbitrary function (with some differentiability constraints) Numerical techniquesreduce such problems commonly to finite-dimensional ones Let us consider a few examples

14

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Any function can be expressed as an infinite Fourier series or as a polynomial series(those series have an infinite number of terms and hence coefficients) We can aim forapproximations by considering eg only the lowest n terms of such a truncated seriesand find the respective coefficients by some numerical method This way we have reducedthe infinite-dimensional problem to an n-dimensional one

Any computer stores and operates rational numbers (with infinite precision) with a finitenumber 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 isin Ω andfor all times we could set out to find solutions that are known only at certain discretepoints xi and possibly also at discrete time steps tα This defines the concept of finitedifferences which will be discussed in Section 3

15

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

2 Dimensionless Forms

Computer programming languages have no notion of units which is why one usually definesa set of units that are commonly agreed upon or as an elegant alternative one introducesdimensionless forms before solving problems numerically Let us illustrate the procedure throughan example

Example 21 Linear elastic spring vibration

Consider a particle of mass m attached to a linear elastic spring of stiffness k subjected toan external force F (t) The vibration of the particle is described by the equation of motionalong with an initial condition (here assuming that the spring is unstretched initially) Let u(t)denote the position of the mass then

mu(t) = minusku + F (t)u(0) = u0

(21)

We start by making the unknown displacement u dimensionless by the normalization

u = u

u0 (22)

Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0eg) but we could use any non-zero length for this normalization Insertion into the equationof motion and dividing by m yields

part2

partt2u = minus k

mu + F (t)

u0m

u(0) = 1

(23)

The first equation shows thatradicmk must have the units of time so we may define

t = tradicmk

= tradic

k

mrArr part2

partt2u = minusu + F (t)

ku0(24)

Finally introducing a dimensionless force as follows leads to the dimensionless form of theoriginal problem

f(t) =F (t

radicmk)

ku0rArr

part2

partt2u = minusu + f (t)

u(0) = 1

(25)

mdashmdashmdashmdash

Example 22 Heat equation

Let us consider the heat equation derived above as

ρcV T = sh + knabla2T for x isin Ω (26)

with some suitable boundary and initial conditions We start by introducing a reference lengthL (eg the size of the body) and a reference temperature T0 (eg the initial temperature ofthe body) and defining

x = xL

rArr part

partx= 1

L

part

partxand T = T

T0 (27)

16

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This turns the heat equation into

ρcV T0T = sh + kT0

L2nabla2T with nabla = ( part

partx1

part

partxd)

T

(28)

Next we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into

ρcV T0L2

kT0T = shL

2

kT0+nabla2

T (29)

Obviously the last term on the right-hand side is dimensionless which implies that also theremaining two terms must be dimensionless This allows us to make two more definitions ofdimensionless type viz

sh =shL

2

kT0and

ρcV T0L2

kT0

part

partt= part

partthArr t = kT0

ρcV T0L2t (210)

This finally leads to the dimensionless heat equation

T t = sh +nabla2T (211)

Note that in an analogous fashion the boundary and initial conditions can also be made dimen-sionless Dirichlet boundary conditions simply use the definition of the dimensionless temper-ature directly converting T = T T0 Neumann boundary conditions of the type q = minusknablaT = qcan be transformed according to

minuskT0

LnablaT = q rArr minusnablaT = q with q = qL

kT0 (212)

mdashmdashmdashmdash

Analogously any other problem can be made dimensionless by introducing proper normaliza-tions and rewriting the governing equations and any initial andor boundary conditions A moregeneral protocol for finding dimensionless definitions based on a given set of system parametersis given by Buckinghamrsquos Π-theorem which is not discussed In the following we typicallyassume that any given problem is dimensionless (even though not showing the normalizationspecifically)

17

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

3 Direct Numerical Methods Finite Differences

To numerically solve such ODEsPDEs we generally have so-called direct and indirect methods

Direct methods aim to solve the governing PDEsdirectly for example by approximating all spatial andtemporal derivatives using finite differences (FD)Consider eg an unknown scalar field u(x t) whosederivatives appear in the governing PDEs (for simplifictylet us consider only a 1D problem whose results caneasily be extended to higher dimensions by applying thederivatives component-wise)

We introduce a regular (∆x∆t)-grid with constant spac-ings ∆x = xi+1 = xi and ∆t = tα+1 minus tα and we define thesought field u only at the grid points writing

uαi = u(xi tα) (31)

x

tDx

Dt

xi xi+1xi-1

+at

a+1ta-1t

a(t x )i

In order to approximate derivatives at the grid points we use Taylor expansions eg inspace

u(xi+1 tα) = uαi+1 = uαi +∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

+ (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(32)

u(ximinus1 tα) = uαiminus1 = uαi minus∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

minus (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(33)

where O(sdot) denotes on the order of (sdot) Addition of the two equations leads to

uαi+1+uαiminus1 = 2uαi +(∆x)2 part2u

partx2∣xitα

+O(∆x4) rArr part2u

partx2(xi tα) =

uαi+1 minus 2uαi + uαiminus1

(∆x)2+O(∆x2)

(34)

This is the second-derivative central difference approximation (which is second-order ac-curate as evident from O(∆x2))

Analogously subtraction of the two equations gives the first-derivative central differenceapproximation (which is second-order accurate as well)

uαi+1 minus uαiminus1 = 2∆xpartu

partx∣xitα

+O(∆x3) rArr partu

partx(xi tα) =

uαi+1 minus uαiminus1

2∆x+O(∆x2) (35)

Of course the same can be carried out for derivatives in time yielding analogously eg

uα+1i minus uαminus1

i = 2∆tpartu

partt∣xitα

+O(∆t3) rArr partu

partt(xi tα) =

uα+1i minus uαminus1

i

2∆t+O(∆t2) (36)

Many other such finite-difference approximations of derivatives can be obtained in a similarfashion For example a simpler first-derivative stencil is obtained from the first Taylor equa-tion (32) alone

uα+1i minus uαi = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uα+1i minus uαi

∆t+O(∆t) (37)

18

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which is known as the (first-order accurate) first-derivative forward-Euler approximation

Analogously we use the second Taylor expansion (33) to obtain the first-derivative backward-Euler approximation (which is first-order accurate)

uαi minus uαminus1i = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uαi minus uαminus1i

∆t+O(∆t) (38)

In order to numerically solve a PDE directly we choose suitable finite-difference approximationsfor all appearing derivatives Of course an extension of the above to non-constant grid spacings∆tα and ∆xi is straight-forward Also when dealing with higher dimensions any chosen stencilis applied to each partial derivative

Example 31 Heat equation by finite differences in 1D

Consider the general form of the 1D heat equation

T (x t) = k Txx(x t) + r(x t) (39)

When using the second-order central-difference approximation for the spatial and the forward-Euler approximation for the temporal derivative in the heat equation the discretized governingequation becomes

Tα+1i minus Tαi

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (310)

which in the limit ∆t∆xrarr 0 is expected to converge towards the same solution as the governingequation (this is the requirement of consistency of the discretized equation) Notice that theright-hand side of (310) does not involve Tα+1

i nor any information at the new time tα+1 whichis found only on the left-hand side Such time-dependent finite-difference schemes are calledexplicit

As a key feature of explicit schemes one can easily solve for Tα+1i at the new time for known

values Tαi at the current time and Tαminus1i at the previous time without solving a system of

equations Specifically solving the above for Tα+1i yields the update rule

Tα+1i asymp Tαi + k∆t

(∆x)2(Tαi+1 minus 2Tαi + Tαiminus1) +∆t r(xi tα) (311)

By contrast when using the backward-Euler approximation we obtain

Tαi minus Tαminus1i

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (312)

which is a linear system to be solved for Tα+1i at the newest time step (which is here α) Such

a time-dependent finite-difference scheme which has unknown degrees of freedom at the newesttime step on both sides of the equation is called an implicit scheme

Let us rewrite the above implicit approximation of the heat equation as

minuscTαi+1 + (1 + 2c)Tαi minus cTαiminus1 asymp ∆t r(xi tα) + Tαminus1i with c = k∆t

(∆x)2 (313)

19

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The solution for a system of n grid points in space is obtained from solving

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

⋱⋱minusc 1 + 2c minusc

minusc 1 + 2c minuscminusc 1 + 2c minusc

⋱⋱

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

Tα1⋮⋮Tαi⋮⋮Tαn

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

∆t rα1 + Tαminus11

⋮⋮

∆t rαi + Tαminus1i

⋮⋮

∆t rαn + Tαminus1n

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

(314)

Note that suitable boundary conditions must be supplied For example if we have theessential boundary condition Tαi = Ti(tα) we may replace the equation for Tαi in the abovesystem (ie the αth row in (314)) by Tαi = Ti(tα) By contrast if we have a natural boundarycondition Tx(xi tα) = qi(tα) then we need to introduce a finite-difference stencil to Tx(xi tα)and again replace the respective equation in the above system

mdashmdashmdashmdash

Any of the above finite-difference schemes can be interpreted as a stencil (which may alsoreveal the required BCsICs) For example the explicit and implicit update rules given byrespectively (311) and (2430) have the stencils shown below revealing how information ispassed from time step to time step (and also revealing the explicit vs implicit nature of eachfinite-difference scheme)

i i +1i -1

Dx

Dt

a

a+1

a-1i i +1i -1

Dx

Dt

a

a+1

a-1

(a) explicit stencil (b) implicit stencil

Example 32 Bar under its own weight

Analogous finite difference approaches can be taken forquasistatic problems where a time-independent solutionis thought in one or several dimensions For exampleconsider a vertical elastic bar of constant Youngrsquos mod-ulus E and length L clamped at its top end deformingunder its own weight The unknown displacement field isu(x) as a function of the axial x-coordinate Gravity actsdownward In this case the governing equation is linearmomentum balance viz

divσ(x) + ρg = 0 rArr uxx = minusρg

E (315)

x

u(x) L

+

g

+

xi+1

xi

xi-1

ui

x0

xn

Dx

Boundary conditions are (assuming a free end at x = L)

u(0) = 0 and F (L) = EAux(L) = 0 hArr ux(L) = 0 (316)

We can easily find an analytical solution for this case by integrating (315) twice with respectto x and inserting the boundary conditions which yields

u(x) = ρg

2E(2L minus x)x (317)

20

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us discretize the bar into n+ 1 segments of equal lengths ∆x = L(n+ 1) so that the (n+ 1)grid points are located at xi = in for i = 0 n We may use a second-order central-differenceapproximation for the second derivative with respect to x leading to

ui+1 minus 2ui + uiminus1

(∆x)2= minusρg

Ewith u0 = 0 and

un+1 minus un∆x

= 0 (318)

where we introduced a ghost node at xn+1 = xn + ∆x to enforce the free traction boundarycondition via a first-order forward-Euler approximation and the central-difference stencil isapplied to update all nodes i = 1 n while nodes 0 and n + 1 are updated by the boundaryconditions u0 = 0 and un+1 = un This results in a linear system of equations

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

1 0 0 0 ⋱1 minus2 1

1 minus2 11 minus2 1

⋱1 minus2 1

minus1 1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

u0

⋮⋮ui⋮⋮unun+1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

0⋮ccc⋮c0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

with c = minusρgE

(∆x)2 (319)

Notice how we replaced the first and last row in the matrix and the respective entries in theright-hand-side vector in order to enforce the two boundary conditions This is a convenientstrategy to impose boundary conditions directly within the system to be solved (which we willalso exploit later in the context of finite elements) Solving the above linear systems yields theapproximate finite-difference solution

This is not a time-dependent problem hence our above definition of explicit vs implicit schemesdoes 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

Shown below is the solution obtained for n = 9 (green) n = 19 (purple) n = 29 (light blue)n = 49 (orange) and n = 99 (red) showing convergence with increasing number of grid pointstowards the exact solution u(x) which is included as the solid blue line (Results are normalizedsuch that u = uE

ρgL2 and x = xL) Note that convergence is from below ie the discretized bar

appears stiffer than it is in reality (a fact that we will get back to later)

02 04 06 08 10

01

02

03

04

05

x

u

mdashmdashmdashmdash

Notice that the above finite-difference approximation also admits a physical interpretation inthe following sense Imagine that we subdivide the bar into n bars each of length ∆x = Ln

21

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We can replace a bar by an elastic spring of effective stiffness k = EA∆x = nEAL At thesame time each bar carries a weight m = ρA∆x = ρALn which we may distribute evenly to itstwo ends As a result we arrive at a chain of n+1 masses (the inner ones being m the first andlast ones m2) connected by linear springs If we formulate the system of equations resultingfrom the static force equilibrium of eg the ith mass we obtain

nEA

L(ui minus uiminus1) minus

nEA

L(ui+1 minus ui) minus gρALn = 0 (320)

or (after some simplification)

ui+1 minus 2ui + uiminus1 = minusρgE(Ln)2 (321)

which is identical to (318) and (319) (for each inner mass while the first and last differ)

x

u(x) L

+

g+

xi+1

xi

xi-1

ui

x0

xn

Dx

+

ui

Dxmmm

mm2

m2

kkk

m2

m2kDx =

+ =

22

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

4 Stability of Finite Difference Schemes

So far we have derived first- and higher-order finite difference approximations in space and timeand discussed the explicit and implicit finite-difference schemes resulting from applying thoseapproximations to PDEs We still need to discuss the suitability of particular combinations offinite-difference combinations in space and time for a particular PDE This raises the questionof finite-difference stability which is classically associated with two names

the Courant-Friedrichs-Levy or CFL condition is a necessary condition for the sta-bility of a finite-difference scheme

von Neumann analysis yields a sufficient condition or the stability of a finite-differencescheme and is related to phase error analysis

We will discuss all three concepts at the example of the 1D wave equation below

41 CFL Condition

Every finite-difference stencil comes with a numerical domain of dependence For exampleconsider the 1D wave equation which when discretized by second-order central-difference ap-proximations in space and time becomes

uα+1i minus 2uαi + uαminus1

i

(∆t)2= c2u

αi+1 minus 2uαi + uαiminus1

(∆x)2 (41)

Drawing the stencil in the shape of a plus sign indicatesthat the solution for uα+1

i depends on information at theprevous time step specifically on uαi+1 uαi and uα+1

iminus1 (aswell as uαminus1

i from two time steps ago) When repeatingto apply this stencil on a large grid we may draw thenumerical domain of dependence as all those pointswhose information was affected the value uα+1

i For theabove example this turns into a triangular fan for whichany change to the value of u at a grid point interior tothe fan affects the value of uα+1

i whereas points outsidethe fan do not impact the value of uα+1

i The slope of thetwo curves limiting our fan in the x-t-diagram are simplyplusmn∆t∆x

Dx

Dt

mathematical domain of dependence

numerical domainof dependencec

We may also define the mathematical domain of dependence by studying the exact solution ofthe wave equation which we know is composed of characteristics of the type

u(x t) = f1(x + ct) + f2(x minus ct) (42)

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

x + ct = const and x minus ct = const (43)

are characteristics of the solution Now consider a grid point (xi tα) such that the character-istics through this point are defined by

x + ct = xi + ctα and x minus ct = xi minus ctα (44)

23

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The fan enclosed below these two lines is the mathematical domain of dependence sinceany point inside the fan can affect the solution on the bounding curves of the cone and hencecan affect u(xi tα) The latter does not apply to points outside the fan More mathematicallyspeaking we may invoke drsquoAlembertrsquos formula if the initial conditions are supplied as u(x t0) =u0(x) and u(x t0) = v0(x) then

u(xi tα) =u0(xi + ctα) + u0(xi minus ctα)

2+ 1

2cint

xi+ctα

ximinusctαv0(y)dy (45)

which again confirms that u(xi tα) depends only on information at time t0 = 0 contained withinxi minus ctα le x le xi + ctα

The Courant-Friedrichs-Levy (CFL) condition now states that convergence and thusstability requires that the mathematical domain of dependence is contained in the numericaldomain of dependence

For the above example of the 1D wave equation this implies that the fan of the mathematicaldomain of dependence must be enclosed by the fan of the numerical domain of dependencewhich ndash by comparing the slopes of the bounding lines ndash is equivalent to requiring that

minus∆x

∆tle c le ∆x

∆thArr minus 1 le c∆t

∆xle 1 hArr ∣c∆t

∆x∣ le 1 (46)

This is the CFL condition for the 1D wave equation which is only a necessary conditionof stability In order to determine the sufficient condition(s) of stability we need to discuss themethods described in the following

42 von Neumann Analysis and Phase Error Analysis

A sufficient condition of stability is obtained from so-called von Neumann analysis Sinceit is very closely related to phase error analysis we will discuss these two together Let usagain consider the stencil (41) for the 1D wave equation Losely speaking stability requiresthat small errors in the numerical solution uαi (which always occur due to round-off errors andmachine precision) remain bounded and do not grow over time when the finite-difference schemeis applied time and time again The latter would imply instability and result in exponentialgrowth of numerical noise over time

Let us assume that at any time t there is a small perturbation to the solution written as

uαj = ei(ωtαminuskxj) = ei(ωα∆tminusj∆xk) (47)

which is of harmonic type Note that any general noise function can always be decomposed asa Fourier series so if we can show that the above function does not grow over time for arbitraryω and k then any perturbation of the solution should remain stable Note that we deliberatelydid not include an amplitude since it does not affect the outcome of a linear PDE

Inserting (47) into (41) results in

ei(ω(α+1)∆tminusj∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ω(αminus1)∆tminusj∆xk)

= c2(∆t)2

(∆x)2[ei(ωα∆tminus(j+1)∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ωα∆tminus(jminus1)∆xk)]

(48)

Dividing by uαj = ei(ωα∆tminusj∆xk) yields

eiω∆t minus 2 + eminusiω∆t = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + eminusi∆xk] (49)

24

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or (dividing by 2 and using Eulerrsquos identity for the cosine)

cos(ω∆t) minus 1 = σ2 [cos(k∆x) minus 1] with σ = c∆t

∆x (410)

To establish a relation between ω and k we need to consider three cases

σ = 1 in this case we obtain cos(ω∆t) = cos(k∆x) or ω∆t = plusmnk∆x

∣σ∣ gt 1 in this case we have cos(ω∆t) = 1+σ2 [cos(k∆x) minus 1] and there are cases of k forwhich the right-hand side becomes lt minus1 meaning that there are solutions ω isin C Hencecertain wave vectors k cause instability in the form of expontential growth of solutions

∣σ∣ lt 1 in this case there are frequencies ω for which no k isin R exists (only solutions k isin C)This implies that waves at those frequencies vanish since they are damped out by thescheme

In summary the scheme is unstable if ∣σ∣ gt 1 or in other words the scheme is conditionallystable and stability requires that

∣σ∣ le 1 hArr ∣c∆t

∆x∣ le 1 hArr minus 1 le c∆t

∆xle 1 (411)

We also conclude that σ = 1 leads to no damping while ∣σ∣ lt 1 leads to numerical damping ofcertain frequencies

Classical von Neumann analysis is not interested in phase delays and therefore uses a slightlymodified approach writing z = eiω∆t so that

uαj = zαeminusikxj with z isin C (412)

This implies that for any grid point xj the solution from one time step to the next relates as

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

=uα+1j

uαj= z (413)

Stability hence requires that ∥z∥ le 1 since otherwise again exponential growth occurs over timeInsertion of (412) into the finite-difference approximated wave equation (41) and dividing byzα yields

z minus 2 + zminus1 = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + e+i∆xk] = 2σ2 [cos(k∆x) minus 1] (414)

Solving the above for z leads to

z = 1 + σ2 [cos(k∆x) minus 1] plusmn ∣σ∣radic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (415)

Now observe that if ∣σ∣ le 1 then the radicand is always non-positive and soradic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = iradicminus [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (416)

which leads to

∥z∥2 = (1 + σ2 [cos(k∆x) minus 1])2 minus σ2 [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = 1 (417)

Therefore ∣σ∣ le 1 implies a stable scheme Otherwise the scheme is unstable

Finally let us note that the Lax-Richtmyer theorem states that a finite-difference schemeconverges if and only if (1) the scheme is consistent (ie all truncation errors decay as∆x∆trarr 0) and (2) the scheme is stable

25

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 41 Advection equation by an implicit finite-difference scheme

As mentioned in Section 14 the advection equation governing eg fluid transport processesis given by

u(x t) + v ux(x t) = 0 (418)

here written for a 1D scenario for instructive purposes with a constant advection speed v isin RLet us introduce a regular grid in both space and time and introduce the dimensionless speed

c = v ∆t

∆x (419)

Let us discretize the advection equation by a backward-Euler approximation in time and afirst-order central difference approximation in space ie

u(xj tα) =uαj minus uαminus1

j

∆t+O(∆t) ux(xj tα) =

uαj+1 minus uαjminus1

2∆x+O(∆x2) (420)

Insertion into (418) leads to

uαj minus uαminus1j

∆t= minusv

uαj+1 minus uαjminus1

2∆xhArr uαj minus uαminus1

j = minus c2(uαj+1 minus uαjminus1) (421)

Note that this is an implicit stencil since it requires solving a system of equations for theunknown field u at time tα

Let us perform von Neumann stability analysis which starts by assuming an error of the type(note that wersquoll replace the spatial index i by j to not confuse it with i =

radicminus1)

uαj = zαeminusikxj with z isin C (422)

Insertion into uαj minus uαminus1j = minusc (uαj+1 minus uαjminus1) from (421) gives

zαeminusikxj minus zαminus1eminusikxj = minus c2(zαeminusikxj+1 minus zαeminusikxjminus1) (423)

Using that xjplusmn1 = xj plusmn∆x and dividing by zαeminusikxj results in

1 minus 1

z= minus c

2(eminusik∆x minus e+ik∆x) = c

2(eik∆x minus eminusik∆x) = c

22i sin(k∆x) = i c sin(k∆x) (424)

and isolating z isin C gives

1

z= 1 minus i c sin(k∆x) hArr 1

∥z∥2= 1 + c2 sin2(k∆x) (425)

and thus

∥z∥2 = 1

1 + c2 sin2(k∆x)le 1 (426)

We conclude that irrespective of k and ∆x the right-hand side is always less or equal to1 implying that ∥z∥ le 1 so that the scheme is unconditionally stable (not that this isindependent of the sign of v as may be expected) Unconditional stability is generally notobserved in explicit schemes and can be a significant advantage of an implicit scheme (if itapplies not every implicit scheme is unconditionally stable)

mdashmdashmdashmdash

26

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

43 Direct vs Indirect Methods

The above finite-difference schemes are powerful direct numerical techniques but they comewith significant disadvantages Problems associated with direct methods include the following

a regular grid is required (which is fine for many fluid mechanics problems but oftentimesproblematic for complex solid geometries especially when undergoing large deformation)

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 primaryfields and their errors are undefined between grid points) This can be problematic whenseeking approximate solutions that are ldquoglobally optimalrdquo Also the question needs toaddressed how BCsICs are applied in between grid points and how about moving BCsare imposed

stabilityefficiency issues arise due to the above stability restrictions choices of ∆t and∆x are not arbitrary but ndash aside from accuracy concerns ndash the stability of especially ofexplicit finite-difference schemes dictates the maximum step widths to be used (whichmay impose severe computational costs due to small steps sizes)

As an alternative indirect methods do not solve the ODEsPDEs directly but search forldquooptimalrdquo approximations Essentially one reduces the infinite-dimensional problem to a finite-dimensional problem by considering solutions uh(x t) asymp u(x t) that satisfy the BCs and ICsand approximate the exact solution as well as possible Particular questions to be addressedinclude

How do we choose uh(x t) For example are these globally or locally defined functionsWhich choices minimize the error

What does ldquooptimalrdquo mean in this context How do we quantify the error betweenapproximation and exact solution

What types of functions should be used for uh(x t) ndash eg polynomial or Fourier seriespiecewise-polynomial or maybe even piece-constant

We need a few more concepts to address those questions Note that in the following we willformulate most concepts in 1D with analogous generalizations possible for higher dimensionsunless specifically mentioned

27

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

5 Methods of Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh(x t) thatminimize the total error (which still needs to be defined) when comparing with the exact solutionu(x t) For simplicity let us drop the time dependence for now and only consider (quasi)staticproblems We will add dynamics later in the course for completeness but it is beneficial to firstdiscuss the instructive static scenario Also let us start with 1D problems seeking uh(x) andlater expand all concepts to higher dimensions as needed

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

uh(x) =n

suma=1

caφa(x) (51)

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-prioriExamples are polynomials ie φa(x) = xa or Fourier series with eg φa(x) = sin(πax)

ca are unknown coefficients to be determined

We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solvedfor n coefficients) Note that nrarrinfin yields the exact solution if a proper orthogonal set of basisfunctions is chosen (eg polynomials or Fourier series) while we deliberately choose n≪infin sothat the resulting finite-dimensional problem is computationally tractable

One constraint to be imposed is that the approximate function uh(x) must satisfy all Dirichlet(essential) boundary conditions (otherwise it does not qualify as a solution to the problem)One possible approach is to separate the boundary part from the interior part by defining

uh(x) = upartΩD(x) +

n

suma=1

caφa(x) with φa(x) = 0 on partΩD (52)

and upartΩD(x) satisfying all essential boundary conditions Alternatively one can impose the es-

sential boundary conditions onto the unknown coefficients as a direct constraint to be accountedfor while solving (we will use this latter strategy in most of the below examples)

As explored in Section 14 the general boundary value problem we aim to solve can be writtenin general as

find u(x) st L[u] = s for x isin Ω and Bj[u] = tj for x isin partΩj (j = 1 k) (53)

where L is a linear differential operator and Bj is a linear differential boundary operator Notethat we here account for the fact that we may have k different boundary conditions

We now insert our approximate solution uh(x) into the above set of PDEs knowing that itwill in general not satisfy those governing equations (otherwise we would have found an exactsolution) As a consequence we obtain residuals defined by

rΩ = L[uh] minus s and rpartΩj = Bj[uh] minus tj (54)

Unless we have found the exact solution we will have rΩ ne 0 and rpartΩj ne 0 and we seek coefficients

ca (a = 1 n) such that our approximate solution uh(x) satisfies rΩ asymp 0 and rpartΩj asymp 0 in somesense In order to find the n coefficients we need n equations

28

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

To this end the family of methods of weighted residuals defines n total residuals as

Ri = intΩrΩWidV + ξ2

k

sumj=1int

ΩrpartΩjwidS rArr Ri = 0 for i = 1 n (55)

where Wi and wi (i = 1 n) are weighting functions for the bulk and surface residualsrespectively which define ndash loosely speaking ndash the priority of where the residuals are to beevaluated ξ2 gt 0 is an in principle arbitrary constant introduced for unit compatibility (andwe write ξ2 instead of ξ to make sure the pre-factor in front of the second integral is positiveassuming ξ isin R) Now there are various ways to define the weights (each of different difficultyand accuracy levels) and this leads to the following methods of weighted residuals

51 Collocation Method

A straight-forward approach is to evaluate the residuals only at specific locations which resultsin the so-called collocation method

To this end we define

Wi = δ(x minus xi) for xi isin Ω i = 1 n minus kwi = δ(x minus xi) for xi isin partΩiminus(nminusk) i = n minus k + 1 n

(56)

so that the equations to be solved are

rΩ(xi) = 0 for i = 1 n minus krpartΩiminus(nminusk)(xi) = 0 for i = n minus k + 1 n

(57)W

+x1

+x2

+x3

+x4

+x5

t+

x6

Points xi (i = 1 n) are called collocation points This method is closest to the finite-difference techniques discussed before since it aims to minimize the error only at discretepoints (much like finite differences aimed to solve the PDE exactly only on a discrete grid)For convenience we here chose k collocation points on the k boundaries with natural boundaryconditions (one per boundary) while one could also choose this distribution differently as longas sufficiently many equations are available

52 Subdomain Method

The subdomain method is similar in spirit to the collocationmethod but instead of evaluating the residuals at specific colloca-tion points we subdivide the body and its boundary into subdo-mains and require the total residual to vanish on average over eachof the subdomains Therefore we define

Wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isinDi

0 elsefor i = 1 n minus k (58)

and

t

WD1

D2

D3

wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isin partΩiminus(nminusk)

0 elsefor i = n minus k + 1 n (59)

where Di sub Ω for i = 1 n minus k are (possibly overlapping) domains within the body whilepartΩi sub partΩ are the k boundary domains

29

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the n equations to be solved for the n coefficients ca are

intDirΩ dV = 0 for i = 1 n minus k

intpartΩi

rpartΩi dS = 0 for i = 1 k(510)

Keep in mind that we here aim to solve the PDE and boundary conditions only on averageacross the respective domains

53 Method of Least Squares

The least squares method is most intuitive and seeks to determine the unknown coefficientsby minimizing the bulk and boundary residuals To this end we introduce the total error

E = intΩr2

Ω dV + ξ2k

sumj=1intpartΩj

r2partΩj

dS (511)

and obtain the coefficients as the minimizers thereof ie

c1 cn = arg minE (512)

As before ξ2 gt 0 is an arbitrary (positive) parameter introduced for dimensional consistencyThe associated stationarity conditions become

partE

partca= 0 hArr int

ΩrΩpartrΩ

partcadV + ξ2

k

sumj=1intpartΩj

rpartΩj

partrpartΩj

partcadS = 0 for a = 1 n (513)

from which we realize by comparing to (55) that we have yet another method of weightedresiduals and that we have effectively chosen

Wa =partrΩ

partca and wa =

partrpartΩj

partcaon Neumann boundary partΩj (514)

Recalling our definitions and exploiting the properties of a linear operator we may write

uh(x) =n

suma=1

caφa(x) rArr rΩ = L[uh] minus s =n

suma=1

caL[φa(x)] minus s (515)

and

rpartΩj = Bj[uh] minus tj =

n

suma=1

caBj[φa(x)] minus tj (516)

so that

Wa =partrΩ

partca= L[φa(x)] wa =

partrpartΩj

partca= Bj[φa(x)] on Neumann boundary partΩj (517)

This turns the stationarity conditions (513) for a = 1 n into1

intΩ(n

sumb=1

cbL[φb(x)] minus s)L[φa(x)]dV

+ ξ2k

sumj=1intpartΩj

(n

sumb=1

cbBj[φb(x)] minus tj)Bj[φa(x)]dS = 0

(518)

1Here and everywhere in the following we will switch the summation index when multiplying to sums in orderto avoid duplicated indices and ambiguity eg rΩ

partrΩpartca

= (sumnb=1 c

bL[φb(x)] minus s)L[φa(x)] where summation index

b is used instead of a in parentheses in order to avoid ambiguity when multiplying by L[φa(x)]

30

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or after some re-arrangement (separating terms depending on cb from those independent of thecoefficients)

n

sumb=1

⎡⎢⎢⎢⎢⎣int

ΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS

⎤⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Kab

cb

= intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBi[φa(x)]dS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFa

for a = 1 n

(519)

This is a linear system of n equations which may be rewritten concisely as

n

sumb=1

Kabcb = F a for a = 1 n or Kc = F (520)

where we grouped all unknown coefficients into the vector

c = (c1 cn)T(521)

Matrix K and vector F are both constant and their components read respectively

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (522)

and

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (523)

We notice that K is by definition symmetric (Kab = Kba) For reasons to be explained laterwe here and in the following use the notation Kab for the matrix component associated withcoefficients a and b (instead of writing Kab) Let us accept this for now ndash we will get back to thisnotation when discussing higher dimensions where each coefficient ca isin Rd has d componentsso we need to find all cai with a = 1 n and i = 1 d and we will need matrices with Kab

ij

54 Higher Dimensions

Any of the above methods can be extended to higher spatial dimensions as needed (after all onlyfew real-world problems can be reduced to one dimension) In higher dimensions we generallyseek a function u(x) ∶ Ωrarr Rd and introduce the approximation

uh(x) = sumaisinT

caφa(x) (524)

where ca isin Rd are the unknown vector coefficients and φa(x) denote the basis functions Forexample we may again use polynomial or Fourier basis functions eg φa(x) = sin(πa sdotx) withappropriate choices of the vector set T Now we need d times n independent equations to solve forall components of the n coefficient vectors ca (d equations per any of the n coefficients) It issimplest to explain these concepts through practical examples which will follow later

31

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 51 Rotating bar with attached point mass

Consider a bar of length L constant Youngrsquos modulus E cross-sectional area A and mass density ρ which is hinged at the originand rotating about this hinge with a constant angular velocity ωIn addition a point mass m is attached at the free end of therotating bar

w

mEAr

L

xu(x)+

Let us first find the exact solution of the 1D displacement field u(x) inside the bar We considera co-rotating frame of reference with coordinate x running along the bar starting at the originLinear momentum balance with the centripetal acceleration a = minusω2x states that

divσ = ρa rArr (Eux)x = minusρω2x rArr uxx = minusρω2

Ex (525)

and the boundary conditions are (the force again coming from the cenitrpetal acceleration)

u(0) = 0 and F (L) = AEux(L) =mω2L (526)

Integration the ODE twice for u(x) and obtaining the two integration constants from the twoboundary conditions yields the exact solution

u(x) = minusρω2

6Ex3 + (mω

2L

EA+ ρω

2L2

2E)x (527)

Next let us find approximate solutions by the various methods of weighted residuals To thisend we first introduce an approximate solution with a polynomial basis φa(x) = xa such that

uh(x) =n

suma=0

caxa (528)

where we chose a polynomial function space of order n which is often abbreviated asuh(x) isin Pn The boundary condition u(0) = 0 requires that c0 = 0 Also for a practical example(which admits simple closed-form solutions) let us pick n = 3 Hence we in fact use

uh(x) =3

suma=1

caxa = c1x + c2x2 + c3x3 (529)

The bulk and surface residuals in this problem are written as respectively

rΩ(x) = Euhxx(x)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraL[uh]

+ ρω2xsup2minuss

for 0 le x le L

rpartΩ(x) = EAuhx(L)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraB[uh]

minusmω2Lacutesup1sup1sup1sup1cedilsup1sup1sup1sup1sup1paraminusF

(530)

Since there is only one Neumann boundary (viz the free end of the bar at x = L there is onlya single boundary residual and k = 1)

Collocation Method In order to use the collocation method we must choose a total of n = 3collocation points to obtain the same number of equations as we have unknown coefficients inthe approximation uh(x) isin P3 Since we have one boundary residual let us choose two pointsalong the bar (eg equally spaced) and one at the end x = L overall leading to

x1 = L3 x2 = 2L3 x3 = L (531)

32

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

With those collocation points the collocation method yields the three residuals that we set tozero

rΩ(x1) = E(2c2 + 2c3L) + ρω2L3 = 0

rΩ(x2) = E(2c2 + 4c3L) + 2ρω2L3 = 0

rpartΩ(x3) = EA(c1 + 2c2L + 3c3L2) minusmω2L = 0

(532)

In matrix form the above becomes the linear system of equations

⎡⎢⎢⎢⎢⎢⎣

0 2E 2EL0 2E 4ELEA 2EAL 3EAL2

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

minusρω2L3minus2ρω2L3mω2L

⎞⎟⎠ (533)

whose solution yields

c1 = mω2L

EA+ ρω

2L2

2E c2 = 0 c3 = minusρω

2

6E (534)

Insertion into (529) shows that

uh(x) = c1x + c2x2 + c3x3 = (mω2L

EA+ ρω

2L2

2E)x minus ρω

2

6Ex3 = u(x) (535)

is in fact the exact solution cf Eq (527) The chosen collocation points were chosen optimally(a different choice of the collocation points could have resulted in a different set of coefficientsand hence in a different solution)

Subdomain Method Let us repeat the above example using the subdomain method Tothis end we define two equally-sized subdomains in the bulk of the bar (simply by dividing thebar into two equal halfs)

D1 = x ∶ 0 le x le L2 D2 = x ∶ L2 le x le L (536)

and we have x = L as our third ldquodomainrdquo to satisfy the Neumann boundary condition Weinvite you to try this case as an exercise at home (you will again obtain the correct solutionuh(x) = u(x))

Least Squares Method Finally let us use the method of least squares for which we hadshown that the problem reduces to solving the linear system (520) with matrix components

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (537)

and vector components

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (538)

For this particular problem we have defined L[sdot] and B[sdot] in (530) which results in

Kab = intL

0L[xa]L[xb]Adx + ξ2[B[xa]B[xb]]

x=Lfor a b = 123 (539)

33

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = intL

0(minusρω2x)L[xa]Adx + ξ2mω2LB[xa]x=L (540)

We still need to choose an appropriate scaling parameter ξ such that the above forms make sensewith respect to their dimensions By comparison of the two terms we realize that ξ2 = (LA)minus1

(or any inverse volume in general) is a suitable choice

Carrying out the above integrals with L[sdot] and B[sdot] from (530) yields the linear system

⎡⎢⎢⎢⎢⎢⎣

AE2

L 2AE2 3AE2L2AE2 8AE2L 12AE2L2

3AE2L 12AE2L2 21AE2L3

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

Emω2

ELω2(2m minusALρ)EL2ω2(3m minus 2ALρ)

⎞⎟⎠ (541)

whose solution again recovers the exact solution (527) (the individual steps are left out herebut you are invited to solve the problem on your own at home)

mdashmdashmdashmdash

55 Galerkinrsquos Method

As introduced in basic mechanics and continuum mechanics courses (and therefore not discussedhere in detail) the equilibrium conditions of a mechanical boundary value problem can also bestated in terms of the principle of virtual work

intΩσijvij dV = int

ΩρbividV + int

ΩNtividS (542)

for any kinematically admissible virtual displacement field v(x) defined on the body Ω Inother words the virtual work done by the internal stresses equals the virtual work done bythe externally applied body forces and surface tractions Note that admissibility in particularrequires that v = 0 everywhere on partΩD since no virtual displacement can be applied to pointson the surface that are restrained from moving

Applying the divergence theorem to the first term in the principle of virtual work yields

intΩσijvij dV = int

partΩσijnjvidS minus int

ΩσijjvidV (543)

so that rewriting (542) leads to

intΩ(σijj + ρbi)vidV + int

partΩN(ti minus σijnj)vidS = 0 (544)

Since this equation must hold for all admissible virtual displacements v it is concluded that wemust have

σijj + ρbi = 0 in Ω and σijnj = ti on partΩN (545)

These are equivalent to the (static) balance of linear momentum and the associated tractionboundary condition so that (542) ndash when valid for all admissible virtual displacements v ndashindeed holds true and is an alternative expression of the balance of linear momentum and theassociated traction BCs as stated in (545)

Notice that the form of (544) is identical to the total residual (55) in the methods of weightedresiduals with the trial or weighting functions now being v(x) Hence the principle of virtual

34

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

work lends itself for a very natural way to formulate a total weighted residual (without the needto introduce a scaling parameter ξ and without having to pay separate attention to variousboundary terms) Note that v(x) is a continuous function so we here have in principle aninfinite-dimensional problem (and infinitely many admissible weighting functions v) Howeverwe can (and will) turn this problem into a finite-dimensional one by introducing approximateforms for both uh(x) asymp u(x) and vh(x) asymp v(x) which will form the basis of the finite elementformulation later

Example 52 Hanging bar under its own weight revisited

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

Euxx(x) + ρg = 0 with u(0) = 0 and F (L) = EAux(L) = F (546)

With σ = Eε = Eux the principle of virtual work here reads

intL

0σvxAdx = int

L

0ρgvAdx+F v(L) rArr int

L

0EuxvxAdx = int

L

0ρgvAdx+F v(L) (547)

Integration by parts on the first integral yields

[EuxvA]L0 minus intL

0EuxxvAdx = int

L

0ρgvAdx + F v(L) (548)

We exploit that v(0) = 0 (since u(0) = 0 is fixed virtual displacements at x = 0 must vanish)and re-arrange the integrals into

intL

0(Euxx + ρg) vAdx + [F minusEAux(L)] v(L) = 0 (549)

Since we want this equation to hold for any admissible function v(x) we thus conclude that thetwo terms in parentheses and brackets must vanish which in turn confirms that a function u(x)that satisfies (547) for any admissible virtual displacement v(x) is also a solution of (546)

Finally note that (547) can be rewritten as

R = intL

0EuxvxAdx minus int

L

0ρgvAdx minus F v(L) = 0 (550)

which is of the form (55) of the total residual discussed for the methods of weighted residualsand we can as before introduce a finite-dimensional representation for uh(x) asymp u(x) eg inthe form of a polynomial or a Fourier series and solve for the n unknown coefficients ca byintroducing n independent weight functions va(x) Since the residual R in (550) is linear inu(x) we would have to solve a linear system for the coefficients

mdashmdashmdashmdash

At the end of this section let us recap the basic principle of weighted residual methods discussedhere This indirect method set out to not solve the governing PDEs directly but instead tominimize the error made by an approximate solution as follows

(i) we first define an approximate solution space and an approximate solution uh(x) definedup to n unknown coefficients

35

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

(iii) we define a global residual R to be minimized and choose appropriate weighting functionsWi wi such as to produce n equations to be solved for the n unknown coefficients byminimizing the global residuals

(iv) we numerically solve the obtained linear system of equations

Although the methods of weighted residuals are handy simple and can be applied to in principleany physical problem of interest the solution depends significantly on the choice of the weightsand 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 thosechoices

It turns out that for most physical problems including the classical mechanical thermal and alsoelectromagnetic problems there is a more intuitive way to arrive at equations of the type (542)viz by considering the energetic (or so-called variational) basis of the underlying boundary valueproblems In simple terms we know that any physical system aims to minimize its energy ina stable equilibrium We will see that (542) is in fact nothing but the associated stationarityequation of such a minimization problem but to get there we first need to introduce some ofthe fundamentals of variational calculus

36

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

6 Variational Calculus

As a motivational example let us revisit a simple physics problem We knowfrom elementary physics that the energy stored in an elastic spring (stiffnessk) stretched by an amount ∆x is 1

2k(∆x)2 If a spring is hanging from the

ceiling and a weight mg is attached at its free end then the total energy is

I = 1

2kx2 minusmgx (61)

where x denotes the elongation of the spring and the second term enters asthe work done by the external force mg (or alternatively interpreted thepotential energy of the attached mass m)

m

k

x

In order to calculate the stretched equilibrium length of the spring we may minimize the totalenergy leading to

partI

partx= 0 = kx minusmg rArr x = mg

k (62)

Note that the stationarity equation kx =mg is nothing but (static) linear momentum balance(or Newtonrsquos second axiom) Hence we may minimize the total energy I in order to find theequilibrium solution and that solution is ensured to satisfy linear momentum balance

For the general continuum thermo-mechanical problems considered here we would like to havea similar concept at hand to turn equilibrium equations (such as the governing PDEs discussedabove) into energy minimization problems Unfortunately the situation is a bit more complexsince we here no longer seek to find equilibria described by variables (like x above) but by func-tions (such as the displacement field u(x)) We can intuitively imagine extending the conceptndash defining an energy I that depends on u(x) and being minimized by the exact solution How-ever we first need to verify some mathematical preliminaries related to the so-called functionalI and how to minimize a functional with respect to a function (we can no longer take simplederivatives to arrive at the stationarity conditions since we are minimizing not with respect toa set of variables but with respect to a function) The underlying mathematical concepts areknown as variational calculus

61 Functionals

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

I ∶ u isin U rarr I[u] isin R (63)

In simple terms a functional2 I is a ldquofunction of functionsrdquo ie a function whose argumentis another function you hand it a function u(x) and it returns a scalar I isin R (eg the energyassociated with u(x)) Functionals are to be distinguished from functions such as f(x) =x2 with f ∶ R rarr R+

0 Unlike a function which is a mapping from Rd rarr R a functional rsquosdomain is generally a function space U (eg all polynomial functions up to a certain degreen abbreviated as Pn or all continuously differentiable functions or all piecewise polynomialfunctions etc) For more information on vector and function spaces see Appendices A and B

When seeking solutions u(x) we typically seek solutions within a particular function space U For example a functional may impose constraints on the differentiability or integrability of

2To differentiate functionals from functions we will write I[u] with brackets instead of parantheses as in u(x)

37

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

function u(x) As an example consider the functional

I[u] = int1

0u2x(x) dx (64)

which is a functional requiring that u(x) is differentiable (ie possesses a first derivative ux)and that the first derivative squared can be integrated to yield a finite value as a counter-example a piecewise constant function u(x) would not be square-integrable (the first derivativeconsists of delta-functions which if squared yield infinity when integrated) Hence functionalI[u] in (64) restricts the function u(x) to belong to the function space

U = u ∶ (01)rarr R such that int1

0u2x(x) dx ltinfin (65)

In the following it will be important to define such spaces U of admissible functions

For convenience of notation let us introduce the Sobolev space3

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥Hk(Ω) ltinfin (66)

with the Sobolev norm (in 1D)

∥u∥Hk(Ω) =radicint

Ωu(x)2 dx + int

Ω[uprime(x)]2 dx + + int

Ω[u(k)(x)]2

dx (67)

In simple terms (and this is all we will need to remember in the following) Hk(Ω) denotes thespace of all functions whose derivatives up to kth order are square-integrable The aboveexample in (64) eg requires u isin U subH1(01) ie the first derivative of functions u(x) mustbe square-integrable on the interval (01) (Of course in this example u(x) need not be square-integrable itself (the functional only contains ux) yet there is no function u(x) which is notsquare-integrable while its first derivative is square-integrable)

Example 61 Energy of a strained bar

Consider bar of length L and with constant Youngrsquos modulus E and cross-sectional area A andstrain energy density W The total energy I of the bar as a function of the 1D displacementfield u(x) is

I[u] = intL

0W (ε)Adx = int

L

0

E

2[ux(x)]2 Adx (68)

where we used that W = E2 ε

2 and ε = ux Here we generally may want to impose the restrictionu isin H1(0 L) (unless when dealing with discontinuities such as cracks) to ensure that the firstderivative ux is square-integrable To replicate Example 52 of the hanging bar with an appliedend force F we have to append to the above energy by the work done by the external forcethus arriving at the total potential energy functional

I[u] = intL

0

E

2[ux(x)]2 Adx minus F u(L) (69)

Minimizing this functional with respect to the unknown function u(x) is expected to yield thesought solution Unfortunately we still do not know how to minimize a functional with respectto a function which will be discussed next

mdashmdashmdashmdash

3Though not needed for our purposes here more information on Sobolev norms and spaces is available inAppendix D

38

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

62 Variations

Consider a functional I ∶ U rarr R such as the potential energy Analogous to the stationaritycondition of classical optimization problems a necessary condition for an extremum of I is thatthe first variation of I vanishes ie δI[u] = 0 (this is the stationarity condition) Like infunctional analysis we are going to compute the analog of a derivative to identify maxima andminima of the functional To this end we perturb the functional around a point by a smallvariation and verify if the functional increases or decreases Complicating is the fact that aldquopointrdquo is now in fact a function and a perturbation must be a variation of that function Tothis end we define the following

A variation δu(x) is an arbitrary function that represents admissi-ble changes of u(x) If Ω sub Rd is the domain of u isin U with boundarypartΩ and we seek solutions

u isin U = u isinHk(Ω) ∶ u = u on partΩD (610) x

u

0+L

uu+du

+

du

then the variation must satisfy

δu isin U0 = δu isinHk(Ω) ∶ δu = 0 on partΩD (611)

k can be determined from the specific form of I[u] (and δu and u must lie in the same functionspace since we want to be able to compute I[u + δu]) The fact that variations δu must vanishon the Dirichlet boundary partΩD stems from the need for perturbations that allow the perturbedfunction 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 partΩD

With this we define the first variation of I (ie the analog of a first derivative) as

δI[u] = limεrarr0

I[u + ε δu] minus I[u]ε

= d

dεI[u + ε δu]∣

εrarr0

(612)

Analogously higher-order variations are defined recursively via

δkI[u] = δ (δkminus1I) for k ge 2 (613)

Note that a Taylor expansion of a functional I can now be written as

I[u + δu] = I[u] + δI[u] + 1

2δ2I[u] + 1

3δ3I[u] + (614)

The following are helpful relations (which follow directly from the definition of variations) Forany functions u v isin U functionals Ii ∶ U rarr R and constants αi isin R we have the following rules

δ (α1I1 + α2I2) = α1 δI1 + α2 δI2

δ(I1I2) = (δI1)I2 + I1(δI2)

δdu

dx=

d

dxδu (assuming differentiability of u)

δ intΩ u dx = intΩ δu dx (assuming Ω is independent of u)

δI[u v ] =d

dεI[u+ε δu v+ε δv ]εrarr0 (for functionals depending on several functions)

39

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 62 Calculation of variations

Let us consider

I[u] = int1

0u2 dx so that we seek u isin U =H0(01) (615)

The first second and k-th variations respectively follow as

δI = limεrarr0

d

dεint

1

0(u + ε δu)2 dx = lim

εrarr0int

1

02(u + ε δu)δu dx = 2int

1

0uδu dx

δ2I = limεrarr0

δI[u + ε δu] = limεrarr0

d

dεint

1

02(u + ε δu) δu dx = 2int

1

0(δu)2 dx

δkI = 0 for all k gt 2

(616)

Notice that we automatically recover the Taylor series

I[u + δu] = int1

0(u + δu)2 dx = int

1

0u2 dx + int

1

02uδu dx + int

1

0(δu)2 dx

= I[u] + δI[u] + 1

2δ2I[u]

(617)

mdashmdashmdashmdash

The above gives the formal definition of variations which can always be applied to derivevariations of arbitrary order As a practical shortcut note that for a functional

I[u] = intΩf(unablaunabla2u ) dx (618)

we may write

I[u] = d

dεint

Ωf(u + ε δunablau + ε δnablaunabla2u + ε δnabla2u ) dx∣

εrarr0

= intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx

(619)

so that we may use from now on that

δI[u] = intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx (620)

The analogous of course also applies in higher dimensions ndash which will become important inour later boundary value problems For example if we seek a displacement field u(x) ∶ Ωrarr Rdthe functional becomes

I[u] = intΩf(ui uij uijk ) dV (621)

so we can write

I[u] = intΩf(unablau ) dx rArr δI[u] = int

Ω( partfpartui

δui +partf

partuijδuij ) dV (622)

using classical index notation

Now that we have established the basics of variational calculus let us exploit the variationalstructure of our boundary value problems ie their solutions u isin U can be interpreted asextremal points over U of a functional I[u]

40

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 63 Hanging bar under its own weight revisited (again I know)

Once more let us consider a bar of length L (Youngrsquos modulus E cross-sectional area Adensity ρ) that is hanging from the ceiling and deforming under its own weight (gravitationalacceleration g) with a constant force F applied to its free end at x = L u(x) denotes the 1Ddisplacement field where x runs from top to bottom of the bar The total potential energy isthus the total strain energy of the elastic bar minus the work done by the graviational bodyforces and the constant end force

I[u] = intL

0

E

2u2x(x)Adx minus int

L

0ρg u(x)Adx minus F u(L) (623)

and

u(x) isin U = u isinH1(0 L) ∶ u(0) = 0 (624)

The first variation yields

δI[u] = 0 = intL

0Eux(x) δux(x)Adx minus int

L

0ρg δu(x)Adx minus F δu(L)

= minusintL

0[Euxx(x) + ρg] δu(x)Adx +EAux(L) δu(L) minusEAux(0) δu(0) minus F δu(L)

(625)

where we used integration by parts of the first integral to arrive at the final form Noting thatδux(0) = 0 because of essential boundary condition the above reduces to

intL

0[Euxx(x) + ρg] δu(x)Adx minus [F minusEAux(L)] δu(L) = 0 forall δu isin U0 (626)

As we noted above recall that (626) must vanish for all variations δu isin U0 This implies thatwe must in fact have

Euxx(x) + ρg = 0 and EAux(L) = F (627)

These are exactly the governing equation and traction boundary condition that the bar needsto satisfy cf Eq (546) Hence we have shown that rendering (623) stationary with respectto u(x) isin U is equivalent to solving (627) with u(0) = 0 That is we have a strategy to replacethe solution of a differential equation by an optimization problem and we would in both casesobtain the exact or classical solution

To see if the solution is a maximizer or minimizer of I let us compute the second variation

δ2I[u] = intL

0Eδux δuxA dx = int

L

0E(δux)2 dV ge 0 forall δux (628)

Hence δ2I[u] gt 0 in general (unless δu equiv 0) and as in classical functional analysis we concludethat the extremum is a minimizer We thereby tactily assume that E gt 0 E lt 0 would lead tosolutions being unstable energy maxima which implies that E gt 0 is a (necessary and sufficient)stability condition

Finally notice that the first line here is exactly the principle of virtual work discussed beforecf Eq (547) if we replace δu by v Thus our variations here are the same as virtual displace-ments in the principle of virtual work and we obtain the latter automatically from the energyfunctional as the first variation

mdashmdashmdashmdash

41

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us revisit the hanging bar problem once more to observe a particular structure of theproblem that will come handy shortly For the hanging bar (assuming that E = const) noticethat we can rewrite the energy functional for short as

I[u] = 1

2B[uu] minusL[u] (629)

where we introduced a bilinear form B and a linear form L defined as

B[a b] = intΩE(grada)(grad b) dV and L[a] = int

Ωρga dV minus int

partΩD

ta dS (630)

where we included tractions t applied to the surface ΩD

The above is in fact a recipe for a more general class of variational problems (the same structureapplies to heat conduction electrostatics or mechanical equilibrium as discussed later) Let usconsider an energy functional of the general form (629) Taking variations shows that

I[u] = 1

2B[uu] minusL[u] rArr δI[u] = B[u δu] minusL[δu] (631)

For example in the hanging bar problem compare the energy functional (623) and the firstvariation (625) to confirm the above relation

For convenience let us adopt the following notation found in various textbooks on finite ele-ments the first variation is usually abbreviated as an operator acting on both the unknownfield u and its variation δu ie we write G ∶ U times U0 rarr V sub R with

G[u δu] = limεrarr0

d

dεI[u + δu] (632)

Without proof we just note that one of the beauties of the above variational problem (631)(based on a bilinear and a linear form) is that a unique minimizer exists by the Lax-Milgramtheorem (for more information see Appendix F) Recall that for the linear heat problem abovewe already showed that the solution is a unique (global) minimizer if E gt 0

63 Rayleigh-Ritz Method

One way to exploit the above variational structure right away is the so-called Rayleigh-Ritzapproach which introduces an approximation uh(x) asymp u(x) eg a polynomial series

uh(x) =n

suma=0

caxa (633)

with unknown coefficients ca isin R Any choice of (linearly independent) ansatz functions ispermissible including eg Fourier series of cosine or sine terms as long as they satisfy anyexisting essential boundary conditions and the differentiabilityintegrability requirements ofthe problem (eg a piecewise linear guess for uh(x) would not be permissible if its derivativesmust be square-integrable etc) For example for the hanging bar problem we need to enforcec0 = 0 because of the boundary condition u(0) = 0

Next we insert uh(x) into the total energy functional I which then depends only on the coef-ficients ca as the only unknowns We know that the exact equilibrium solution u(x) minimzies

42

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

the total potential energy I[u] Therefore we conclude that we may want to minmize I[uh]with respect to ca giving a system of equations

0 = partI[uh]

partcaforall a = 0 n (634)

Recall that we had expressed the energy functional in operator form so that

I[uh] = 1

2B[uh uh] minusL[uh] = 1

2B[

n

suma=0

caxan

sumb=0

cbxb] minusL[n

suma=0

caxa]

= 1

2

n

suma=0

n

sumb=0

cacbB[xa xb] minusn

suma=0

caL[xa](635)

where we exploited the (bi)linear nature of the two forms B[sdot sdot] and L[sdot] This leads to

partI[uh]partca

=n

sumb=0

cbB[xa xb] minusL[xa] = 0 forall a = 0 n (636)

This is a linear system of equations to be solved for the unknown coefficients cb (with b = 0 n)which we abbreviate as

n

sumb=0

Kabcb = F a for a = 1 n or Kc = F (637)

with K isin Rntimesn and F c isin Rn having components

Kab = B[xa xb] F a = L[xa] and c = (c0 cn)T (638)

Notice that this is fully analogous to (520) 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 problemwhich is more physical)

Example 64 Hanging bar by Rayleigh-Ritz

For the problem of the freely hanging bar (no end force applied here for brevity) the totalenergy potential with the approximate solution uh(x) from (633) becomes

I[uh] = intL

0

E

2(uhx)2(x)Adx minus int

L

0ρg uh(x)Adx with uh(x) =

n

suma=1

caxa (639)

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

partI[uh]partca

= 0 for a = 1 n (640)

As we know from (636) the resulting system of stationarity equations is Kc = F with

Kab = B[xa xb] = intL

0E(xa)x(xb)xAdx

= intL

0Eaxaminus1bxbminus1Adx = abEAint

L

0xa+bminus2 dx = abEA La+bminus1

a + b minus 1

(641)

43

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = L[xa] = intL

0ρg xaAdx = ρgAint

L

0xadx = ρgAL

a+1

a + 1 (642)

Solving the linear system Kc = F for any n ge 2 (feel free to try this as an exercise at home)yields

c1 = ρgEL c2 = minus ρg

2E and ca = 0 for all a gt 2 (643)

which is in fact the exact solution see Eq (317)

u(x) = ρg

2E(2L minus x)x (644)

This could have been expected since we chose polynomial ansatz functions in (633) takinguh(x) isin Pn The exact solution is a polynomial of order 2 If we choose uh(x) isin Pn withn ge 2 the exact solution is contained in the solution space within which we are looking for theoptimal solution As a consequence the Rayleigh-Ritz approach recovers the exact solution asthe energy minimizer Choosing any Pn with n gt 2 does not affect the solution since P2 sub Pnfor n gt 2 so the solution is still contained in the solution space and therefore found

mdashmdashmdashmdash

44

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

7 The weak form

In the previous sections we have seen how indirect methods aim to find approximate solutionsto boundary value problems by introducing an approximate (finite-dimensional) solution spaceand solving for the unknowns describing the sought approximate solution by enforcing thestrong form in some average sense (rather than at every grid point as in finite differences)We have also seen how this ldquoaverage senserdquo can be defined in various ways eg by enforcingthe governing PDE only at collocation points on average over subdomains or by minimizingthe total error made across the entire body Finally we have seen how most boundary valueproblems can be linked to a variational structure implying that the strong form is in fact thestationarity condition of an energy minimization problem This in turn allowed us to replacethe strong form by an optimization problem which was exploited eg by the Rayleigh-Ritzapproach It is important to keep in mind that the variational approach gave us something evenmore powerful it gave us the stationarity conditions of the minimization problem which wewill call the weak form Those stationarity conditions combined with an approximate functionspace where shown to guide us to a linear system of equations to be solved for the unknowncoefficients of the approximate solution Here we would like to explore the underlying structurefurther and finally come to the general mechanical boundary value problem to be solved bymethods such as the finite element technique

71 Classical and weak solutions

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

(E ux)x + s = 0 in Ω

u = u on partΩD

Eux = t on partΩN

(71)

This general strong form applies to the mechanical problem (where u is the displacement field EYoungrsquos modulus s = ρb body forces u is a prescribed displacement and t a prescribed surfacetraction) as well as to electrical problems (where u denotes the electric voltage potential E isthe 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 andt 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 tothe above problem let us define that a function u is of class Ck(Ω) (or in the function spaceCk(Ω)) with an integer k ge 0 if it is k times continuously differentiable over Ω (ie u possessesderivatives up to the kth order and these derivatives are continuous functions) Hence thestrong form (71) imposes the requirement

u isin C2(Ω) (72)

That is we require the function to be twice continuously differentiable in order for the strongform to make sense4

4To be exact the strong form in fact requires that u isin C2(Ω) cap C0

(Ω) ie functions u must be twicecontinuously differentiable within Ω and at least continuous up to the boundary partΩ But this detail is of minorimportance here and in the following

45

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 71 Ck-continuity

Any kth-order polynomial u(x) with k ge 0 is generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks or shocks (or discontinuities in the BCsICs)we usually assume that the classical solution fields are Cinfin(Ω) so we may take derivativesotherwise derivatives exist almost everywhere (ae)

mdashmdashmdashmdash

As we showed previously the solution u can alternatively be found by using a variationalapproach viz as the minimizer of I[u] within a function space U which we write as

u = arg minI[u] ∶ u isin U with I[u] = 1

2B[uu] minusL[u] (73)

whose stationarity condition is

δI[u] = G[u δu] = B[u δu] minusL[δu] = 0 for all δu isin U0(Ω) (74)

Therefore we can reformulate the problem (71) (without in principle knowing anything aboutvariational calculus) as

find u isin U st G[u v] = B[u v] minusL[v] = 0 for all v isin U0(Ω) (75)

This is called Galerkinrsquos weak form and the resulting solution u is called weak solutionThis terminology has the following origin Notice that we no longer seek solutions u isin C2(Ω)but instead we seek solutions u within

U = u isinH1(Ω) ∶ u = u on partΩD (76)

which satisfy (75) for all v isin U0(Ω) There is one essential difference between the weak andstrong form solutions u of the weak form are required to be u isin H1(Ω) whereas the strongform required solutions u to be u isin C2(Ω) The latter is a considerably stronger constraintThus we have weakenedrelaxed the conditions on the family of solutions which is why theabove is called the weak form

To see this take eg functions u that are piecewise-linear (like a zig-zag curve) The firstderivative is piecewise-constant and is therefore square-integrable (we can easily integrate apiecewise-constant function) hence u satisfies u isin H1(Ω) By contrast if you take a secondderivative differentiating the piecewise-constant first derivative leads to a sum of delta functions(which are certainly not continuous functions) so u notin C2(Ω) Such a function does not qualifyas a solution to the strong form as the governing PDE makes little sense with sums of deltafunctions Hence piecewise-linear functions qualify as approximate solutions of the weak formbut not necessarily of the strong form Thus we have relaxed the requirements on our function

Recall that if v is interpreted as a virtual displacement field then (75) is equivalent to theprinciple of virtual work and the form agrees with (542) (or (547) for the 1D bar problem)This is important because even if no variational basis exists we could still formulate the weakform by starting from the principle of virtual work Whether or not a variational structure

46

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

exists for a given strong form can be verified by the use of Vainbergrsquos theorem summarizedin Appendix G

Computationally solving the weak form is usually preferable over the strong form for (at least)two reasons First u isin H1(Ω) is simpler to satisfy than u isin C2(Ω) (eg piecewise linearinterpolation is sufficient in the weak form but not in the strong form) Second as we showedalready for the Rayleigh-Ritz approach the weak form boils down to solving a system of algebraicequations (rather than solving PDEs)

72 Equivalence of strong and weak forms

We now have two equivalent principles for finding the solution of the BVP described by (71)

Given a function space

U = u isinHk(Ω) ∶ u = u on partΩD (77)

a functional I ∶ U rarr R and the associated bilinear form B(sdot sdot) and linear form L(sdot) both definedon functions u isin U we seek to

(A) find u isin U st u = arg min I[u] (78)

(B) find u isin U st B[u v] = L[v] for all v isin U0 (79)

We know that the two have a unique connection since δI = B[u δu]minusL[δu] Thus we also knowthat

(A)hArr (B) (710)

with a unique solution for this particular type of problem (if it is stable ie if E gt 0)

73 Approximate solutions

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

Uh sub U (711)

in which we seek a solution uh where h stands for the discretization size

An n-dimensional space Uh is defined by a set of n basis or shape functions N1 Nnalong with the approximate functions

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (712)

When we use the same approximation space for uh and vh we make the so-called the Bubnov-Galerkin approximation Alternatively one can choose different function spaces for theapproximations uh and vh which leads to the so-called Petrov-Galerkin method The lattergains importance when solving overunderconstrained problems since it allows us to control thenumber of equations by the choice of the dimension of the space of vh

47

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Assume that the approximation space is chosen wisely so the the exact solution can be attainedwith infinite refinement ie we assume that

for all u isin U there exists uh(v) isin Uh such that limhrarr0

∥uh(v) minus u∥ = 0 (713)

Then we can formulate the discrete problem

(C) find uh isin Uh st B[uh vh] = L[vh] for all vh isin Uh0 (714)

It is a relatively simple exercise to verify that the above form reduces again to a linear systemof equations to be solved To this end insert the approximations (712) into (714) to obtain

B [n

suma=1

uaNan

sumb=1

vbN b] = L [n

sumb=1

vbN b] for all vb (715)

Exploiting that B is bilinear and L is linear lets us transform the above into

n

sumb=1

vb (n

suma=1

uaB [NaN b] minusL [N b]) = 0 for all vb (716)

Since this must hold for all (admissible) vb we conclude that

n

suma=1

uaB [NaN b] = L [N b] for b = 1 n (717)

This is a linear system to be solved for ua (a = 1 n) Comparison to Eq (636) shows thatthe linear equations are identical to those derived for the Rayleigh-Ritz method This is in factnot surprising for the Rayleigh-Ritz method we inserted the approximate solution uh directlyinto I and minimized I[uh] with respect to the unknown coefficients ca Here we first obtainedthe stationarity equation G[u v] = 0 from I[u] exactly and then inserted uh and vh Yet if wechoose the very same function space for uh and vh then both methods lead to the very samesystem of equations Thus we may also re-interpret the Bubnov-Galerkin scheme as computingthe coefficients ua as the minimizers of I[uh]

As before let us define a vector of all unknown coefficients

Uh = u1 unT (718)

Further we define a (symmetric) matrix K isin Rntimesn and vector F isin Rn with components

Kab = B [NaN b] F b = L [N b] (719)

Then the linear system reads

KUh = F hArr Kabub = F a (720)

Note that this system of equations is identical to (638) which was derived by the Rayleigh-Ritzmethod

48

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

8 The mechanical variational problem at small strains

81 General case

After all those precursors let us analyze the mechanical variational problem and start with thesimplest problem quasistatics in linearized kinematics Here the strong form is

σijj + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(81)

and in the special case of linear elasticity (using σij = Cijklεkl = Cijklukl) the above strongform reduces to

(Cijklukl)j + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(82)

From this we see that classical solutions must satisfy u isin C2(Ω)

In the following let us first treat the general case ndash based on (81) ndash and then study linearelasticity ndash given by (82) ndash as a special case The total potential energy functional associatedwith (81) is

I[u] = intΩW (ε) dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parainternal stored energy

minus [intΩρb sdotu dV + int

partΩNt sdotu dS]

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parawork by external forces

(83)

and we seek displacement field solutions

u = arg minI[u] ∶ u = u on partΩD (84)

For the special case of linear elasticity we know that the strain energy density takes the form

W (ε) = 1

2εijCijklεkl =

1

2uijCijklukl (85)

from which we may conclude that the variational problem seeks solutions u isin U subH1(Ω)

We compute the first variation defining sym(sdot) = 12(sdot + sdot

T)

δI[u] = intΩ

partW

partεijsym(δuij) dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS

= intΩσijδuij dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS = 0 forall δu isin U0

(86)

where we used σij = partW partεij and σij = σji (by angular momentum balance) This form isindeed equivalent to the principle of virtual work if we replace δui by vi see Eq (542)

Application of the divergence theorem to the first term above proves the equivalence of the twoforms since

δI[u] = 0 = intpartΩN

(σijnj minus ti)δuidS minus intΩ(σijj + ρbi)δuidV forall δu isin U0 (87)

49

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since this must hold for all arbitrary variations δu isin U0 the two terms in brackets must vanishwhich yields indeed the strong form (81)

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

G(uv) = A(uv) minusL(v) = 0 forall v isin U0 (88)

with

A[uv] = intΩσijvij dV and L[v] = int

ΩρbividV + int

partΩNtividS (89)

Note that the dependence of A on u is not directly obvious but the stresses depend throughthe strains on the displacement field ie σij = σij(ε) and εij = ( sym(uij)) A(sdot sdot) is thereforein general not a bilinear operator while L(sdot) is a linear operator

In the special case of linear elasticity

σij = Cijklεkl = Cijklukl rArr σijvij = Cijkluklvij = Cijkluijvkl (810)

exploiting the symmetries Cijkl = Cijlk = Cklij This leads to

A[uv] = intΩσijvij dV = int

ΩCijkluijvkl = B[uv] (811)

Thus we see that for linear elasticity A is indeed a bilinear operator

Next we introduce the discrete weak form A(uhvh) minus L(vh) = 0 with the Bubnov-Galerkinapproximation

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (812)

so that we arrive at (in component form)

n

suma=1

vai [intΩσij(nablauh)Na

j dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para[F int]

ai

minusintΩρbiN

adV minus intpartΩN

tiNadS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraminus[F ext]

ai

] = 0 for all adm va (813)

which is equivalent to

Fint(Uh) minusFext = 0 with Uh = u1 unT (814)

where we introduced FintFext isin Rdsdotn with components

F ainti = intΩσij(nablauh)Na

j dV and F aexti = intΩρbiN

adV + intpartΩN

tiNadS (815)

As mentioned above for the special case of linear elasticity we have a bilinear form describingthe weak form Inserting the approximate fields (815) then becomes

F ainti = intΩCijkluhklN

aj dV =

n

sumb=1int

ΩCijklubkN

blN

aj dV =

n

sumb=1

ubk intΩCijklNa

jNbl dV

=n

sumb=1

Kabik u

bk with Kab

ik = intΩCijklNa

jNbl dV

(816)

50

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so we arrive at a linear problem to be solved for the unknown coefficients Uh = u1 un

Fint =KUh rArr KUh minusFext = 0 rArr Uh =Kminus1Fext if detK ne 0 (817)

As before matrix K isin Rdsdotntimesdsdotn is by definition symmetric and positive definite as long as theelastic modulus tensor C is strongly elliptic (ie for stable elastic moduli)

For computational purposes notice that vectors Uh isin Rdsdotn and FintFext isin Rdsdotn eg in 3D arerespectively (dropping the superscripts on F for universality)

[Uh] =⎛⎜⎝

u1

un

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

u11

u12

u13

un1un2un3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

[F ] =⎛⎜⎝

F 1

F n

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

F 11

F 12

F 13

Fn1Fn2Fn3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(818)

Here we used 1-index notation like in Matlab (ie we sum over a = 1 n and not a =0 n minus 1 as eg in CC++) so that

uai is the (d sdot (a minus 1) + i)th component of vector Uh in d dimensions (819)

Similarly we apply the same rule to the rows and columns of matrix K so that

Kabik is the component at (d sdot (aminus 1)+ i d sdot (bminus 1)+ k) of matrix K in d dimensions (820)

Note that we now use super- and subscripts on K and F since our unknown coefficients arevector-valued here Any superscript a refers to the a-th coefficient while a subscript i refers tothe i-th component of the coefficient

82 Linear elasticity

In the simplified framework of linear elasticity (already introduced above) the governing equa-tions are oftentimes written in a more condensed version that allows for a simple extraction ofmatrix K We here start with

uh(x) =n

suma=1

uaNa(x) rArr εhij =1

2(uhij + uhji) =

1

2

n

suma=1

[uaiNaj(x) + uajNa

i(x)] (821)

which allows us to write (eg in 3D)

[ε] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

ε11

ε22

ε33

2ε23

2ε13

2ε12

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

N11 0 0 N2

1 0 0 Nn1 0 0

0 N12 0 0 N2

2 0 0 Nn2 0

0 0 N13 0 0 N2

3 0 0 Nn3

0 N13 N1

2 0 N23 N2

2 0 Nn3 Nn

2

N13 0 N1

1 N23 0 N2

1 Nn3 0 Nn

1

N12 N1

1 0 N22 N2

1 0 Nn2 Nn

1 0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

B

Uh (822)

where we introduced the matrix B isin R3ntimes6 in 3D (and analogously B isin R2nsdot3 in 2D) in order towrite for short

ε(x) =B(x)Uh (823)

51

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here use Voigt notation to condense the strain tensor into a strain vector with only uniquecomponents Since ε is symmetric one usually stores only the six independent components ina vector which leads to the above Voigt notation The factor 2 in the shear strain componentsin Voigt notation (which is not found in the stresses) is required so the energy density isconveniently given by W = 1

2σijεij =12 ε sdot σ

Hence we may define the stress vector σ in Voigt notation and the associated linear elasticconstitutive law as (again in in 3D)

σ = (σ11 σ22 σ33 σ23 σ13 σ12)T rArr σ = E ε rArr σ = EBUh (824)

where E denotes an elastic stiffness matrix whose components are deduced from C and followfrom the definitions of stresses and strains For example for an isotropic linear elastic materialcharacterized by Youngrsquos modulus E and Poissonrsquos ratio ν the E-matrix in 3D reads

[E3D] = E

(1 + ν)(1 minus 2ν)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 minus ν ν ν 0 0 0ν 1 minus ν ν 0 0 0ν ν 1 minus ν 0 0 0

0 0 0 1minus2ν2 0 0

0 0 0 0 1minus2ν2 0

0 0 0 0 0 1minus2ν2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(825)

while the 2D version depends on the plane stress vs plane strain scenario

[Eplane stress] =E

1 minus ν2

⎛⎜⎝

1 ν 0ν 1 0

0 0 1minusν2

⎞⎟⎠ [Eplane strain] =

E

(1 + ν)(1 minus 2ν)

⎛⎜⎝

1 minus ν ν 0ν 1 minus ν 0

0 0 1minus2ν2

⎞⎟⎠

(826)

Analogous matrices can be derived for other elasticities eg for general linear elastic anisotropicmedia

Altogether we thus arrive at the stored internal energy

I int = intΩW dV = int

Ω

1

2σ sdot ε dV = int

Ω

1

2ε sdotE ε dV = 1

2Uh sdot int

ΩBTEB dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraK

Uh (827)

so that we observe that

I int = 1

2Uh sdotKUh rArr F int = partI

int

partUh=KUh (828)

and the matrix K can be computed quickly as

K = intΩBTEB dV (829)

with B from (822) and E depending on the material model (note that B contains only ba-sistrial function derivatives so that ndash once a basis Na for a = 1 n has been chosen ndash B isknown and can be compted)

52

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

9 Interpolation spaces

So far we have assumed that the approximate solution uh (or uh in higher dimensions) is basedon a choice of basisshape functions Na(x) with a = 1 n Before discussing particular suchbasis functions it is important to consider what conditions those shape functions Na(x) mustsatisfy We have seen already that polynomial or Fourier series may lead to simpler integralswhen computing matrixK and right-hand-side vector F Yet this is only an observation and norigorous constraint on the basis functions Let us here discuss the requirements of appropriateinterpolation spaces

91 Shape functions

We consider approximations uh isin Uh of the type

uh(x) =n

suma=1

uaNa(x) (91)

which are defined through the shape functions Na(x)

In general there are two possible choices for the nature of Na(x)

global shape functions are defined everywhere in Ω ie ∣suppNa∣ sim ∣Ω∣eg polynomials Na(x) = xa or trigonometric polynomials Na(x) = cos (π(a minus 1)x)

local shape functions are defined only locally ∣suppNa∣ ≪ ∣Ω∣eg picewise linear shape functions

Here we introduced the support of a continuous function f ∶ Ω rarr R as the set of all points5

where f(x) ne 0 ie

supp f = x isin Ω ∶ f(x) ne 0 (92)

This means that f(x) = 0 for all points outside the support ie for x isin Ω supp f

x

x

Na Na

suppNa suppNa

local shape functions global shape functions

Irrespective of global or local shape function choices for any set of shape functions the followingshape function properties must be satisfied

(I) For any x isin Ω there must be at least one a with 1 le a le n such that Na(x) ne 0 (iethe whole domain must be covered) Otherwise no approximation would exist in certainregions or at certain points in the body

5To be more specific the support is the closure in Ω of the set of all points with non-zero f(x) Yet this isof minor importance here so we will not make that differentiation

53

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(II) The chosen shape functions Na should allow us in some ldquosimplerdquo manner to satisfy anyDirichlet boundary conditions where required (recall that uh should satisfy the essentialBCs)

(III) All shape functions must be linearly independent ie

n

suma=1

uaNa = 0 hArr ua = 0 for all a = 1 n (93)

In other words given any function uh isin Uh there exists a unique set of parametersu1 un such that

uh =n

suma=1

uaNa (94)

Linear independence is important since it avoids ill-posed problems For example takeUh = P2 and N1N2N3 = 1 x x2 so that uh = u1N1 + u2N2 + u3N3 Hence if eguh = a+bx then we immediately conclude that u1 = a u2 = b u3 = 0 uniquely By contrastif we chose the not linearly independent functions N1N2N3 = 1 x1+x there wouldbe no unique choice of the coefficients since uh = a + bx in this case would have solutionsu1 = a minus s u2 = b minus s u3 = s for arbitrary s isin R

More generally if there existed a set α1 αn ne 0 such that sumna=1 αaNa = 0 then this

set of parameters could be added on top of any solution u1 un such that

uh =n

suma=1

uaNa =n

suma=1

(ua + αa)Na = uhα (95)

which means both uh and uhα are solutions (hence the problem is not well-posed)

For these reasons we must define shape functions that are linearly independent If func-tions N1 Nn are indeed linearly independent then we call them a basis of Uh

(IV) The shape functions Na must satisfy the differentiabilityintegrability requirements of theweak form (this depends on the problem to be solved as discussed before in the contextof the weak form in Section 7)

(V) The shape functions must possess ldquosufficient approximation powerrdquo In other wordsconsider uh isin Uh sub U we should ensure that uh = sumna=1 u

aNa rarr u as n rarr infin Thisrequirement is important and will be discussed below in Section 93

92 Approximation power and completeness

Condition (V) above tells us that for an approximation uh to converge to u we must pick anapproximate function space Uh which gives the solution uh ldquoa chance to convergerdquo to u Forexample assume you aim to approximate a high-order polynomial u isin Pn (with n ≫ 1) by anapproximation uh using shape functions 1 x x2 x3 xn This is expected to converge asnrarrinfin because the coefficients of u will approach the coefficients of uh However choosing thebasis functions poorly as 1 x x3 xn (notice the x2-term is omitted) will never converge asnrarrinfin If all terms are present and none is omitted then polynomials are expected to convergeby the following theorem

Weierstrass approximation theorem Given a continuous function f ∶ [a b] sub R rarr R andany scalar ε gt 0 then there exists a polynomial

pn(x) isin Pinfin such that ∣f(x) minus pn(x)∣ lt ε for all x isin [a b] (96)

54

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This means every continuous function u can be approximated by a polynomial approximiationuh isin Pn to within any level of accuracy Therefore N i = 1 x x2 x3 ie the polynomialsin R is a suitable choice for the shape functions that satisfy the so-called completenessproperty (and we have shown their linear independence)

Note that as discussed above one cannot omit any intermediate-order terms from the set

1 x x2 x3 (97)

As an extension the Weierstrass approximation theorem also applies to trigonometric poly-nomials (cf Fourier series)

93 Completeness in higher dimensions

When going to higher dimensions we need to specify what complete polynomials are A poly-nomial approximation in Rd is complete up to order q if it contains independently allmonomials xα with ∣α∣ = α1 + + αd le q ie using multi-indices we write

uh =q

sumβ=0

sum∣α∣=β

cαxα (98)

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

1D For d = 1 the above reduces to

uh =q

sumβ=0

sumα=β

cαxα =

q

sumβ=0

cβxβ (99)

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 93

2D for d = 2 with coordinates x1 and x2 we use the above definition of complete polynomialsFrom the above definition we conclude

uh =q

sumβ=0

sumα1+α2=β

c(α1α2)xα11 xα2

2 (910)

This results in the following bases for increasing q-values

q = 0 ∶ 1q = 1 ∶ 1 x1 x2q = 2 ∶ 1 x1 x2 x

21 x1x2 x

22

q = 3 ∶ 1 x1 x2 x21 x1x2 x

22 x

31 x

21x2 x1x

22 x

32

(911)

The number of independent monomials in 2D is (q + 1)(q + 2)2

The same definition can be extended to higher dimensions

55

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

10 The Finite Element Method

All of the shape functions discussed in previous sections were global ie they were defined overthe entire body Ω This is quite disadvantageous for (at least) two reasons First using globalshape functions such as polynomials xa (for a = 0 n) results in a dense matrix K whenforming the linear system to be solved for the unknown coefficients by the various methodsintroduced before That is because integrals of the type B[NaN b] ne 0 in general The denseK-matrix creates high computational costs (by contrast a sparse matrix admits more efficientsolving of the system of equations) Second global shape functions are problematic when itcomes to Dirichlet BCs imagine eg prescribing the displacements at both ends of a 1D barEnforcing uh(0) = 0 is simple whereas setting uh(0) = 0 and uh(L) = ∆u is more involved asthe latter leads to a condition involving all unknown coefficients

uh(x) =n

suma=0

uaNa(x) rArr uh(0) = u0 = 0 uh(L) =n

suma=1

uaNa(L) = ∆u (101)

Such global coefficient constraints as given by the latter form are especially cumbersome whendealing with multiple essential BCs in higher dimensions The motivation for the finite elementmethod was hence to construct local shape functions that admit the relatively easy implemen-tation of essential BCs (while also resulting in sparse matrices)

The main idea is to introduce a discretization Th which splits Ωinto a finite number of subdomains Ωe the so-called elementssuch that

Ωe sube Ω Ω =⋃e

Ωe partΩ sube⋃epartΩe (102)

The discretization Th is defined by the collection of nodes andelements it is called a mesh

nodeelement

mesh

Mathematically (and computationally) a finite element (FE) is an object that has

(i) a (sub)domain Ωe sube Ω

(ii) a space of shape functions Nae (defined within Ωe and suppNa

e = Ωe)

(iii) a set of degrees of freedom (dofs) viz the uae-coefficients associated with those Nae

The Finite Element Method (FEM) defines continuous piecewise-polynomial shape func-tions such that

Na(xb) = δab for all a b isin 1 n (103)

In other words each shape function Na is 1 when evaluated at exactly one node a and itvanishes at all other nodes This is the defining relation that determines the shape functionsNotice that if we evaluate the approximation uh(x) at one of the nodes xb then

uh(xb) =n

suma=1

uaNa(xb) =n

suma=1

uaδab = ub (104)

That is the coefficient ub can now be identified as the value of approximate function uh atnode b This makes for a very beneficial interpretation of the (yet to be determined) shapefunction coefficients

56

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us check if FE shape functions satisfying (103) also satisfy the requirements for shapefunctions discussed in Section 91

(I) is automatically satisfied if x isin Ω then we must have x isin Ωe for some element e Conse-quently there must be element shape functions Na(x) ne 0

(II) can be satisfied (approximately) by fixing those degrees of freedom associated with theboundary nodes (while leaving the entire nodes unaffected and vice-versa) For example ifour 1D bar is discretized into n nodes and nminus1 elements such that uh(x) = sumna=1 u

aNa(x)then imposing uh(0) = 0 and uh(L) = ∆u is simply enforced by fixing the coefficientsu1 = 0 and un = ∆u

(III) Linear independence can be shown by contradiction assume that uh(x) = 0 for all x isin Ωwhile there is indeed some ua ne 0 for 1 le a le n Now evaluate uh at any node b

0 = uh(xb) =n

suma=1

uaNa(xb) = ub rArr ub = 0 forall b = 1 n (105)

which contradicts the assumption that some ua ne 0 Thus (103) ensures that we havelinearly independent shape functions

(IV) Integrabilitydifferentiability requirements depend on the variational problem to be solvedand must be ensured For example for the mechanical BVP we have seen that Uh sub H1ie 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 onthe type of piecewise-polynomial interpolation functions to be used

(V) Completeness requires uh rarr u (and thus Uh rarr U) to within desirable accuracy In the FEmethod one commonly enriches Uh by one of the following methods (shown below)

h-refinement refining the discretization Th while keeping the polynomial interpo-lation order within elements fixed (ie decreasing the element size while using thesame type of shape functions)

p-refinement increasing the polynomial interpolation order within a fixed dis-cretization Th (ie keeping the elements but using higher-order polynomial shapefunctions)

hp-refinement a combination of the two above (ie increasing the number ofelements while also increasing the polynomial order of shape functions)

r-refinement repositioning of nodes while keeping the discretization and interpo-lation order fixed (eg moving nodes into regions requiring higher accuracy)

element element element

element

original mesh h-refinement p-refinement r-refinement

linear interpol

linear interpol

quadratic interpolation

linear interpol

When using either of these refinement techniques appropriately within the FE context wemay expect that Uh rarr U and hence that the approximate solution uh converges to the exactsolution u

57

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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 isin Ω so that within a small h-neighborhood of x(and h being interpretable as the element size) we may expand

u(x + h) = u(x) + huprime(x) + 1

2h2uprimeprime(x) + + 1

qhqu(q)(x) +O(hq+1) (106)

Assume that Uh contains all polynomials complete up to degree q (ie Uh = Pq) then thereexists

uh isin Uh such that u(x) = uh(x) +O(hq+1) (107)

Let p denote the highest derivative in the weak form then

dpu

dxp= dpuh

dxp+O(hq+1minusp) (108)

For the solution to converge as h rarr 0 we need the errors to be at least of order O(h) whichimplies that we must have q + 1 minus p ge 1 Thus we must ensure that

q ge p (109)

For example for the mechanicalthermalelectromagnetic variational problem discussed previ-ously we had the requirement uuh isinH1(Ω) since the energy and resulting weak form containedfirst derivatives of u only Hence we have p = 1 and interpolations must satisfy q ge p = 1 There-fore shape functions to be used for solving mechanical BVPs require at least piecewise-linearshape functions

58

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

11 Finite element spaces polynomial shape functions in 1D

Let us start with the simplest of all choices continuous piecewise-polynomial interpolation func-tions As explained above we need q ge 1 since p = 1 for the mechanicalthermalelectromagneticvariational problem ie we need at least linear interpolation within elements

111 2-node bar element

The simplest example for our discussion of shape functions is the2-node bar element in 1D Since the element has only two nodes(which we call nodes 1 and 2) we employ shape functions for theinterpolation of the element dofs Ue = u1

e u2e so that

uhe(x) = N1e (x)u1

e +N2e (x)u2

e (111)

and we must have uhe(0) = u1e and uhe(∆x) = u2

e for an elementdefined on x isin [0∆x] as shown on the right

1 2

Dx

1u 2u

x

2N 1Ne e

e e

We know that the shape functions must be linear polynomials (q = 1) so that uhe(x) = c1e + c2

ex(we have only two nodes and therefore must have an interpolation with two coefficients)

Imposing those two constraints implies

uhe(0) = c1e = u1

e uhe(∆x) = c1e + c2

e∆x = u2e hArr c2

e =u2e minus c1

∆x= u

2e minus u1

e

∆x(112)

and hence

uhe(x) = c1e + c2

ex = (1 minus x

∆x)u1

e +x

∆xu2e (113)

Comparison with (111) yields the element shape functions (plotted above) as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (114)

Notice that these functions automatically satisfy (103) ie each shape function a is 1 at nodea and 0 at the respective other node

Differentiating the above linear shape functions yields

N1ex(x) =

d

dx(1 minus x

∆x) = minus 1

∆x N2

ex(x) =d

dx

x

∆x= 1

∆x (115)

so that the (only non-zero) axial strain inside the bar element is constant since

εhxx = uhex(x) =n

sumi=1

uieNiex(x) = u1

eN1ex(x) + u2

eN2ex(x) =

u2e minus u1

e

∆x= const (116)

If we assume a linear elastic bar so σ = E ε we obtain from (815)

F ainte = intΩσxx(εhxx)Na

xdV = int∆x

0Eu2e minus u1

e

∆xNaxA dx = EA

∆x(u2

e minus u1e)int

∆x

0Naxdx (117)

and inserting the constant shape function derivatives finally yields

F 1inte =

EA

∆x(u2

e minus u1e) (minus

1

∆x)∆x = minusEA

∆x(u2

e minus u1e) and F 2

int = minusF 1int (118)

59

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The components of the element stiffness matrix Ke follow as

[Ke] = [partF iint

partuje] = EA

∆x( 1 minus1minus1 1

) (119)

which has the typical form known from 1D assemblies of linear springs of effective stiffnessk = EA∆x We could alternatively have used our definition obtained from the linear elasticmechanical weak form

Kab = intΩeB[NaN b] dV = int

∆x

0ENa

exNbexAdx = EA∆xNa

exNbex =

EA

∆x

⎧⎪⎪⎨⎪⎪⎩

1 if a = bminus1 else

(1110)

where inserting the constant shape function derivatives again led to (119)

Note that the two nodal forces F 1inte and F 2

inte depend linearly on the nodal displacements (ascan be expected from a linear elastic bar) so that

[Finte] = (F1int

F 2int

) = EA∆x

( 1 minus1minus1 1

)(u1e

u2e) hArr Finte =KeUe (1111)

Further we realize that indeed

Ie(Ue) = int∆x

0

E

2(εhxx)

2Adx = 1

2Ue sdotKeUe so Finte =

partIepartUe

(1112)

So far we have only considered axial (ie 1D) deformation of the bar element In general thebar may be part of a 2D or 3D structure so it is important to generalize the above frameworkto higher dimensions This can be achieved by projecting the 2D or 3D displacements of theelement nodes onto the orientation of the bar element as follows

In d dimensions the nodal displacements of the bar element are

Ue = (u1eu

2e)

Twith uae = (uae1 uaed)

T (1113)

That is in 2D we deal with four nodal dofs (viz the u1- and u2-displacement components ofeach of the two nodes in the x1- and x2-directions respectively) while in 3D we have six nodaldofs (the u1- u2- and u3-displacement components of each of the two nodes)

We obtain the orientation of the bar element in space from its

nodal coordinates in the reference configuration Xe = (x1ex

2e)

T

such that ∆xe = ∥x2e minusx1

e∥ In 2D the angle with the x1-axis isobtained from geometry as

ϕe = arctan⎛⎝x2e2 minus x1

e2

x2e1 minus x1

e1

⎞⎠ (1114)

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

1(xe1

1 x )e2

2(xe1

2 x )e2

Dxe

The projection of the nodal displacements Ue onto the bar axis identifies the axial displacementsUe of the two nodes (written with a tilde to avoid ambiguity) as

(u1e

u2e) = (cosϕe sinϕe 0 0

0 0 cosϕe sinϕe)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[R(ϕe)]

⎛⎜⎜⎜⎜⎝

u1e1

u1e2

u2e1

u2e2

⎞⎟⎟⎟⎟⎠

hArr Ue =R(ϕe)Ue (1115)

60

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice further that the resulting axial forces acting at the two nodes Finte = (F 1inte F

2inte)

T

can be decomposed into the nodal forces in 2D Finte = (F 1inte1 F

1inte2 F

2inte1 F

2inte2)

T via

⎛⎜⎜⎜⎜⎝

F 1inte1

F 1inte2

F 2inte1

F 2inte2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

cosϕe 0sinϕe 0

0 cosϕe0 sinϕe

⎞⎟⎟⎟⎠(F 1

inte

F 2inte

) hArr Finte =RT(ϕe)Finte (1116)

Recall that we showed

Finte =KeUe rArr RT(ϕe)Finte =KeRT(ϕe)Ue hArr Finte =R(ϕe)KeR

T(ϕe)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

=Ke

Ue

with the axial stiffness matrix determined above as

[Ke] =EA

∆xe( 1 minus1minus1 1

) (1117)

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

R(ϕe)KeRT(ϕe) = Ke hArr Ke =RT(ϕe)KeR(ϕe) (1118)

Without derivation we mention that the same relations apply in 3D with the rotation matrix

R = ( l m n 0 0 00 0 0 l m n

) (1119)

where l m and n are respectively the direction cosines with the x1- x2- and x3-axes iel = cosang(xe1) where x is the unit vector pointing along the bar axis m = cosang(xe2) etc

Example 111 Truss consisting of three bars in 2D

Consider a truss consisting of three linear elastic bars connected byhinges and supported by a rigid impenetrable ground as shownon the right Loading the truss by a vertical force F we seek thedisplacements of the three nodal hinges

We first compute the stiffness matrix of each bar element individ-ually accounting for two displacement dofs per node By reusingthe stiffness matrix derived in (1117) and (1118) the horizontalbar (bar 1 connecting nodes 1 and 2) with ϕe = 0 has

L L

L1 2

3

F

sbquoƒ

EA

[K1] =RT(0)KeR(0) = EAL

⎛⎜⎜⎜⎝

1 0 minus1 00 0 0 0minus1 0 1 00 0 0 0

⎞⎟⎟⎟⎠ (1120)

Similarly bar 2 on the right (connecting nodes 2 and 3) with ϕe = 2π3 has

[K2] =RT(2π3 )KeR(2π

3 ) = EA4L

⎛⎜⎜⎜⎜⎝

1 minusradic

3 minus1radic

3

minusradic

3 3radic

3 minus3

minus1radic

3 1 minusradic

3radic3 minus3 minus

radic3 3

⎞⎟⎟⎟⎟⎠

(1121)

61

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly bar 3 on the left (connecting nodes 1 and 3) with ϕe = π3 has

[K3] =RT(π3 )KeR(π3 ) =EA

4L

⎛⎜⎜⎜⎜⎝

1radic

3 minus1 minusradic

3radic3 3 minus

radic3 minus3

minus1 minusradic

3 1radic

3

minusradic

3 minus3radic

3 3

⎞⎟⎟⎟⎟⎠

(1122)

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 barrsquosreference axis with the x1-axis with the first node being the center of rotation)

mdashmdashmdashmdash

112 Problem assembly

In order to solve the above truss problem we need to formulate the system of equations tobe solved This requires an important step known as the assembly of the global stiffnessmatrix Each of the above stiffness matrices represents a local stiffness matrix ie each ofthe matrices K1 K2 and K3 are each valid only for one particular element and the matricesare therefore associated with the displacements of the nodes of the respective elements In orderto solve the truss problem we need to formulate the global system of equations for the unknowndisplacements U = (u1

1 u12 u

21 u

22 u

31 u

32)T of the three nodes

Notice that to this end we need to differentiate between local and global dofs eg beamelement 2 (on the right) locally links its two nodes with dofs (u1

e1 u1e2) and (u1

e1 u1e2) However

taking the global view it is linking the global nodes 2 and 3 Hence local node 1 correspondsto the global node 2 and local node 2 corresponds to the global node 3 This local-to-globalmap is an essential book-keeping task within the FEM To avoid confusion we introduced thesubscripts e for local element-internal quantities For example for element 2 we have u1

e = u2

and u2e = u3 For element 3 we have analogously u1

e = u1 and u2e = u3 etc

Example 112 Three-bar truss in 2D (continued)

Let us continue Problem 111 using the above local-to-global map Now that we have understoodhow local nodes (1 and 2 for each beam element) are linked to global nodes (1 2 and 3) wecan assemble the global system All we must do is add the components of the local stiffnessmatrices to the right spots in the global stiffness matrix For example K1 (linking nodes 1 and2) in the global system with U = (u1

1 u12 u

21 u

22 u

31 u

32)T becomes

[K1]global =EA

L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 minus1 0 0 00 0 0 0 0 0minus1 0 1 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1123)

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

[K2]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 0 0 0 0 0

0 0 1 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

0 0 minus1radic

3 1 minusradic

3

0 0radic

3 minus3 minusradic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1124)

62

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

1radic

3 0 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

0 0 0 0 0 00 0 0 0 0 0

minus1 minusradic

3 0 0 1radic

3

minusradic

3 minus3 0 0radic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1125)

Now we obtain the global stiffness matrix simply from the assembly of the local matrices ie

[K] = [K1]global+[K2]global+[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

5radic

3 minus4 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

minus4 0 5 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

minus1 minusradic

3 minus1radic

3 2 0

minusradic

3 minus3radic

3 minus3 0 6

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1126)

In order to solve for the deformation of the truss in Problem 111 we may now use the assembledstiffness matrix (1126) but we must impose proper boundary conditions First we have anexternal force F applied vertically downwards at node 3 The global external force vector(collecting all external forces applied to the truss) reads

[Fext] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

000minusF

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1127)

where we left question marks for the two unknown support reactions in the vertical directionof the two sliders on the ground The natural boundary conditions (here the force F ) are thusimposed through the external force vector Fext

When it comes to essential BCs we must constrain nodes 1 and 2 from moving off the groundso we have u1

2 = 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 wefurther impose arbitrarily u3

1 = 0 (which will result in symmetric deformation)

Let us impose the essential BCs by eliminating the respective rows and columns from the systemConsequently we only retain rows and colums 1 3 and 6 of K and analogously we only retainrows 1 3 and 6 of Fext (which automatically removes the question marks in the external forcevector) Overall we arrive at the linear system

EA

4L

⎛⎜⎝

5 minus4 minusradic

3

minus4 5radic

3

minusradic

3radic

3 6

⎞⎟⎠

⎛⎜⎝

u11

u21

u32

⎞⎟⎠=⎛⎜⎝

00minusF

⎞⎟⎠

rArr⎛⎜⎝

u11

u21

u32

⎞⎟⎠= FL

4radic

3EA

⎛⎜⎝

minus11

minus3radic

3

⎞⎟⎠

(1128)

Hence we see that the truss deforms indeed symmetrically as u11 = minusu2

1 and the top node movesdownwards under the applied load while the bottom nodes move outwards Note that we canalso compute the unknown nodal reactions from Fext = Fint =KU

mdashmdashmdashmdash

63

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order

So far we have only considered linear shape functions When going to higher-order polynomialinterpolation (as required eg for p-refinement but also for BVPs with higher-order derivativesin the weak form) various choices are possible for the definition of the element shape functionsWe here discuss two such approaches

1131 Lagrangian interpolation

The above scenario is a special case (ie the simplest case possible) of Lagrangian interpo-lation in 1D which can be extended to higher orders as follows Assume an interpolation upto degree q ie 1 x x2 xq such that

uhe(x) =q+1

suma=1

Nae (x)uae = a0 + a1x + a2x

2 + + aqxq (1129)

In general shape functions Nae (x) for a = 1 q + 1 can be determined by solving the q + 1

equations

uhe(xi) = ui for all i = 1 q + 1 (1130)

for the q + 1 coefficients ai (i = 0 q) Then rearranging the resulting polynomial allows toextract the shape functions Na

e (x) by comparison of the coefficients of uae cf (113) for the 1Dbar element

Alternatively we can solve

Nae (xb) = δab for all nodes b = 1 q + 1 (1131)

The solution to this problem is quite intuitive

Nae (x) =

(x minus x1) sdot sdot (x minus xaminus1) sdot (x minus xa+1) sdot sdot (x minus xq+1)(xa minus x1) sdot sdot (xa minus xaminus1) sdot (xa minus xa+1) sdot sdot (xa minus xq+1)

(1132)

so that Nae (x) is by definition 1 if x = xa and it vanishes at all

other nodes Hence one can readily verify that Nae (xb) = δab

These shape functions are called Lagrange polynomials Thedenominator is known and depends only on the nodal locationswhile the numerator is indeed a polynomial of order q

Shown on the right is an example of quadratic shape functionsinterpolating the displacement field in a bar element with threenodes

1 2

Dx

1u 2u

x

2N 1Ne e

e e33ue

3Ne

1132 Hierarchical interpolation

An alternative to the above Lagrangian interpolation is so-called hierarchical interpolationHere we construct higher-order interpolations based on lower-order shape functions For ex-ample we start with a 2-node bar element

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (1133)

64

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us enrich the interpolation to reach q = 2 by defining

uhe(x) = N1e (x)u1

e +N2e (x)u2

e + N3e (x)αe (1134)

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

N3e (x) = a0 + a1x + a2x

2 (1135)

which is associated with the newly introduced dof α To identify the coefficients ai recall thatwe must have

N3e (0) = N3

e (∆x) = 0 rArr N3e (x) = c

x

∆x(1 minus x

∆x) (1136)

with some arbitrary non-zero constant c ne 0 (which is to be chosen)

Note that αe does not have to be continuous across elements and can hence be determinedlocally (ie given u1

e and u2e αe can be determined internally for each element which allows

for condensation of the αe-dof with efficiency advantages)

114 2-node beam element

A practical example of elements with higher-order interpolation are beam element Unlikethe 2-node bar element (which only captures stretching of the bar see Section 111) beamelements account for bending (and can be superposed with the bar element to result in generalelements ready for stretching and bending) The linear elastic Euler-Bernoulli beam isthe most common structural element for this purpose whose deformation is defined by thedeflection w(x) Let us first review the underlying governing equations

Consider a continuous linear elastic beam of length L (constant Young modulus E and areamoment Iy) loaded by a distributed transverse load q(x) as well as bending moments My (aboutthe y-axis) and transverse forces Fz (in the positive z-direction) applied at its two ends Thestrong form of this problem (assuming EIy = const) reads

EIywxxxx(x) = q(x) with x isin (0 L) (1137)

with the boundary conditions (flipped signs at the negative cut)

minusF 1z = minusE Iy wxxx(0) minusM1

y = minusEIywxx(0)F 2z = minusEIywxxx(L) M2

y = minusEIywxx(L)(1138)

wxz 1F

z

2F

y

2My

1ML

z

q

The potential energy functional for the variational problem with deflection w(x) is

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1139)

where the plus-signs in the terms involving bending moments result from May being against

the rotation direction of wx The first variation yields the weak form (which must hold for alladmissible v(x))

G[w v] = intL

0[EIywxxvxx minus qv] dxminusF 1

z v(0)minusF 2z v(L)+M1

y vx(0)+M2y vx(L) = 0 (1140)

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

w isin U = w isinH2(0 L) ∶ w = w on partΩD (1141)

65

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Following our definitions from Section 7 we identify from (1140) the bilinear form

B[w v] = intL

0EIywxxvxxdx (1142)

and the linear boundary operator

L[v] = intL

0q vdx + F 1

z v(0) + F 2z v(L) minusM1

y vx(0) minusM2y vx(L) (1143)

such that

G[w v] = B[w v] minusL[v] = 0 forall v isin Uh0 = v isinH2(0 L) ∶ v = 0 on partΩD (1144)

As shown in Section 73 introducing an approximate solution

wh(x) =n

suma=1

waNa(x) (1145)

transforms the continuous problem into a linear problem for the n unknown coefficients wa andthe stiffness matrix associated with the linear problem has components

Kab = B[NaN b] = intL

0EIyN

axxN

bxxdx (1146)

To identify suitable shape functions Na(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 beamelement We know from the weak form that q ge 2 so the simplest admissible interpolation forthe unknown deflection w(x) would be based on 1 x x2 However this would introduce onlythree unknown coefficients (for two nodes) which is why we deliberately go one order higherand choose the basis 1 x x2 x3 This leads to the approximate deflection

whe (x) = c0 + c1x + c2x2 + c3x

3 for x isin [0 Le] (1147)

Since the four coefficients ci are hard to interpret physically in general we instead assign toeach node a deflection w and a deflection angle θ = wx and we use those as the four unknownsdefining the element interpolation The four coefficients ci are thus uniquely defined by thenodal conditions (shown below schematically)

whe (0) = w1e whe (Le) = w2

e whex(0) = θ1e whex(Le) = θ2

e (1148)

In order to clearly associate the shape functions with the nodal dofs let us alternatively writethe element interpolation as

whe (x) =2

suma=1

[Nae (x)wae +Ma

e (x)θae ] (1149)

with the four shape functions N1e and N2

e (associated with the nodal deflections) as well as M1e

and M2e (associated with the nodal rotations)

1 2

Le

1w2w

x

ee

2qe1qe

66

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Inserting the interpolation (1149) into the four conditions (1148) we obtain four equations tosolve for the unknown shape functions The resulting shape functions are known as Hermitianpolynomials which for a beam with x isin [0 Le] evaluate to

N1e (x) = 1 minus 3( x

Le)

2

+ 2( xLe

)3

N2e (x) = 3( x

Le)

2

minus 2( xLe

)3

M1e (x) = x(1 minus x

Le)

2

M2e (x) =

x2

Le( xLe

minus 1) (1150)

We can easily verify that eg N1e (0) = 1 while N2

e (0) = 0 and analogously N1e (Le) = 0 while

N2e (Le) = 1 Further we need to have N1

ex(0) = N1ex(Le) = N2

ex(0) = N2ex(Le) = 0 as well

as M1e (0) = M1

e (Le) = M2e (0) = M2

e (Le) = 0 Note the difference in units between N ie and

M ie because they multiply deflections and deflection angles respectively in the interpolation

(1149) Shown below are the four shape functions

02 04 06 08 10

02

04

06

08

10

02 04 06 08 10

-015

-010

-005

005

010

015

xLe

xLe

2N 1Ne

e

1M Lee

2M Dxee

1 1

Note that this approximation is only one possible choice we could also define alternative nodesand nodal values However the above choice ensures that both deflection and angle are contin-uous across elements (since nodal values are shared by neighboring elements)

Having established the shape functions we proceed to deriving the resulting element stiffnessmatrix where we follow the analogous procedure as for the bar element in Section 111 we firstcompute Ke the stiffness matrix for a beam element that is horizontal and then generalize theformulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke

Let us sort the nodal dofs as Ue = (w1e θ

1e w

2e θ

2e)

T Using (1146) with N1

e M1e N2

e and M2e

(in that order to comply with the nodal dof sorting) we obtain

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠ (1151)

and the nodal reactions (including transverse forces F az and bending moments May conjugate to

the deflections wae and deflection angles θae respectively) are

Finte = KeUe with Finte = (F 1inteM

1inte F

2inteM

2inte)

T (1152)

Here forces and moments have the same directions as the conjugate deflections and rotationangles In conclusion the nodal dofs and the nodal reactions are related linearly via

⎛⎜⎜⎜⎜⎝

F 1inte

M1inte

F 2inte

M2inte

⎞⎟⎟⎟⎟⎠

=2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

w1e

θ1e

w2e

θ2e

⎞⎟⎟⎟⎠ (1153)

67

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Next let us generalize the beam element discussed above by considering a beam in 2D whose

nodal dofs are Ue = (u1e1 u

1e2 θ

1 u2e1 u

2e2 θ

2)T ie each node is now displacing in 2D and

rotating Since the above beam formulation only considers bending let us superimpose the barelement from Section 111 so that the resulting element can stretch and bend (otherwise thenodal dofs would not be independent as the length of the bar would have to remain unchangedwithout the ability of the element to stretch axially)

Consider a horizontal 2-node beam with nodal dofs Ue = (u1e w

1e θ

1 u2e w

2e θ

2)T so that wie

and θi describe the beam deflection while u2e minus u1

e defines the change in length of the beamelement 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 beamelements yielding

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 6 3Le 0 minus6 3Le0 3Le 2L2

e 0 minus3Le L2e

0 0 0 0 0 00 minus6 minus3Le 0 6 minus3Le0 3Le L2

e 0 minus3Le 2L2e

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

+ EALe

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 0 minus1 0 00 0 0 0 0 00 0 0 0 0 0minus1 0 0 1 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1154)

Note that we must carefully associate the stiffness matrix components with the correct nodaldofs as done above for the bending and stretching contributions

Now we can apply a coordinate transformation to generalize the above to beams with arbitraryorientation in 2D with ϕe denoting the angle of the beam elementrsquos reference orientation againstthe horizontal axis (see the schematic below where we flipped the directions of both deflectionsand rotation angles for consistency) as defined in (1114)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e

w1e

θ1

u2e

w2e

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraR(ϕe)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e1

u1e2

θ1

u2e1

u2e2

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Ue =R(ϕe)Ue (1155)

By using the same argument as for the 2-node bar element thestiffness matrix of the generally oriented 2-node beam element isthus obtained as

Ke =RT(ϕe)KeR(ϕe) (1156)

with R(ϕe) and Ke from (1155) and (1154) respectively Ofcourse the same can also be extended to beams in 3D where anappropriate transformation matrix R based on direction cosines isintroduced

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

L

2we~

1we~

1qe

2qe

The key difference between bar and beam elements lies in the deformation modes capturedby each Bars only undergo axial stretching and bar networks are hinged (ie bars carryno transverse forces nor bending moments) The above beam element supports both axial andbending deformation and beam networks are rigidly connected at nodes (angles between beamsat nodal junctions remain constant)

68

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

115 A note on beam elements and boundary conditions

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

The potential energy functional for the variational problem of an Euler-Bernoulli beam withthe deflection field w(x) was given by

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1157)

so that the first variation reads (dropping the dependence on x in the integral for brevity)

δI = intL

0[EIywxxδwxx minus q δw] dxminusF 1

z δw(0)minusF 2z δw(L)+M1

y δwx(0)+M2y δwx(L) (1158)

In order to recover the strong form (whose PDE is EIywxxxx minus q = 0) we integrate the firstterm by parts to obtain

δI = minusintL

0EIywxxxδwxdx + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1159)

and integrating the first term by parts again finally gives

δI = intL

0EIywxxxxδwdx minus [EIywxxxδw]L0 + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1160)

Re-arranging the above leads to the stationarity condition

δI = 0 = intL

0(EIywxxxx minus q) δw dx

minus [F 1z minusEIywxxx(0)] δw(0) minus [F 2

z +EIywxxx(L)] δw(L)minus [minusM1

y +EIywxx(0)] δwx(0) + [M2y +EIywxx(L)] δwx(L) forall δw isin U0

(1161)

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

EIywxxxx minus q = 0 for 0 lt x lt L (1162)

Furthermore the remaining four terms in (1161) must also vanish individually (since we can inprinciple choose the variations at the ends individually and δI = 0 must hold for all admissiblevariations) For example we must have

[F 1z minusEIywxxx(0)] δw(0) = 0 (1163)

which means that either F 1z minus EIywxxx(0) = 0 (ie a transverse force F 1

z is imposed at theend x = 0) or δw(0) = 0 (which implies that w(0) = w1 must be an essential BC) Likewise[minusM1

y +EIywxx(0)] δwx(0) means that either M1y = EIywxx(0) (ie a bending moment is

imposed at x = 0) or δwx = 0 (which implies that wx(0) = θ1 must be an essential BC)Therefore the above form of the first variation (in which the integral term matches the PDEof the strong form) reveals all possible boundary conditions both natural and essential (ieNeumann and Dirichlet respectively)

69

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We thus also need to revise our definition of a Dirichlet boundary condition not neces-sarily every derivative of the primary field u imposed implies a Neumann boundary conditionInstead we extract the notion of Dirichlet vs Neumann boundary conditions from the firstvariation of a variational problem As a rule of thumb essentialDirichlet BCs imposethe function itself as well as derivatives up to order (pminus 1) where p is half the order ofthe PDE in the strong form or the matching order of u and v in weak form (eg for a beamthe PDE is of fourth-order the matching-order weak form contains second derivatives essentialBCs impose the deflection itself or its first derivative)

70

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

12 Shape Functions in higher dimensions

So far we have used polynomial shape functions for element interpolations in 1D and we sawthat the shape functions depend on the element size ∆xe or Le In higher dimensions it wouldbe quite cumbersome to define polynomial shape functions on the actual shape of the elementthus depending on the nodal locations and the geometry of the element in space unless oneuses regular structured meshes (eg grids where all elements have the same shape) In generalall elements have different shapes and it is beneficial to define shape functions independent ofthe specific element shape

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 shapefunctions in the reference configuration to those in real physical space

To this end we introduce a (bijective) mapping φ from a reference domain (with referencecoordinates ξ = ξ η ζ) onto the physical domain (with coordinates x = x1 x2 x3) of anelement e

x = φ(ξ) ie in 3D for i = 123 xi = xi(ξ η ζ) (121)

A schematic of the parametric mapping concept is shown below in 2D for a quadrilateral (bi-linear) element which will be introduced soon The mapping links the element in its referenceconfiguration or space described by coordinates (ξ η) to the elementrsquos representation in realphysical space described by Cartesian coordinates (x1 x2) in 2D

For simplicity we reuse the interpolation concepts from before

so far we used uhe =n

sumi=1

N ie(x)uie

now we use uhe =n

sumi=1

N ie(ξ)uie and x =

m

sumi=1

N ie(ξ)xie

(122)

where we have three options for the mapping

(i) isoparametric mapping n =m and N ie = N i

e (same interpolation of positionsdofs)

(ii) subparametric mapping n gtm (lower-order interpolation of positions)

(iii) superparametric mapping n ltm (higher-order interpolation of positions)

The strategy is now to define N ie(ξ) in the reference configuration We will first discuss this

concept for simplicial elements in the next section before proceeding to more general classes ofpolynomial element interpolations

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

4 4 3

1 2

mapping

element in physical space element in its reference space

71

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

13 Simplicial elements

The probably simplest type of finite element are so-called simplicial elements (and we havealready seen one) These are characterized by having the minimum number of nodes possible ina given dimension Mathematically speaking a simplex of order k is a k-dimensional polytopewhich is the convex hull of its k + 1 vertices

In plain English a simplex in d dimensions is a convex body made up of d + 1 nodes

in 1D a 2-node bar whose interpolation basis is 1 x

in 2D a 3-node triangle (T3) whose interpolation basis is 1 x1 x2

in 3D a 4-node tetrahedron (T4) whose interpolation basis is 1 x1 x2 x3

Overall this shows that the element interpolation in each case is of degree q = 1 (linear) andthe space of shape functions is complete up to linear order for a simplicial element in everydimension

Although one could in principle derive the shape functions for any arbitrary element geometrythis turns out to be cumbersome in general Consider eg a simplicial element in 2D (a triangle)whose three nodes are equipped with some nodal dofs u1 u2 and u3 One could now write

uh(x) =n

suma=1

uaNa(x) (131)

and enforce the conditions uh(xa) = ua to solve the resulting system of equations for the shapefunctions Na(x) as done at the beginning of Section 111 However such an approach isinconvenient as the resulting shape functions will inevitably depend on the nodal locationsxa in a complex manner and therefore vary from element to element based on the elementlocation and geometry As a remedy one resorts to the concept of isoparametric mappings(see Section 12) to introduce general shape functions whose definition does not depend on theelement geometry For simplices one commonly introduces so-called barycentric coordinates

131 Linear Triangle (T3)

In order to derive the shape functions and resulting element inter-polation for a 3-node triangular element (T3) in 2D one definesthe barycentric coordinates

lae(x) =Aae(x)Ae

for a = 123 (132)

where Ae = ∣Ωe∣ is the total area of the triangular element and Aae isthe sub-area opposite from node a when splitting the triangle intothree parts by connecting the nodes to point x (see the schematicon the right) Consequently we have A1

e +A2e +A3

e = Ae 1

23

x

A1

A3A2

Note that by finite element convention we always number the local nodes of an element in 2Dcounter-clockwise

We now have two ways to describe a point inside the triangular element we either use itscoordinate x or the three barycentric coordinates lae to describe the point and there is a uniquerelation (a mapping) between (x1 x2) harr (l1a l2a l3a) In general we need only two coordinates

72

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

to describe a point in 2D space and here we notice that indeed we need only two of thebarycentric coordinates to uniquely describe a point in space (if two of the lae are known thenthe third is known as well since l1e + l2e + l3e = 1) For example we may define

ξ = l1e and η = l2e (133)

as the two coordinates (ξ η) to uniquely describe points within the triangle

Furthermore notice that the barycentric coordinates also satisfy the relation

lae(xb) = δab (134)

(eg if x is one of the nodal locations then two of the three areas Aae are zero and one areaequals Ae) This indicates that the three barycentric coordinates also qualify as shape functionsie we may choose Na(x) = lae(x) Note that also 0 le lie le 1 and sum3

i=1 lie(x) = 1 for all x isin Ωe

The shape functions associated with the three nodes now become

N1e (ξ η) = ξ N2

e (ξ η) = η N3e (ξ η) = 1 minus ξ minus η (135)

The beauty of these shape functions lies in the fact that in the above form they are independentof the element geometry In addition computing shape function derivatives with respect to (ξ η)is obviously trivial N1

eξ = 1 N1eη = 0 etc

We still need to find the link between the Cartesian coordinates (x1 x2) and the barycentriccoordinates (ξ η) To this end let us exploit that we know Na(xb) = δab and further the factthat the shape functions introduced above define a linear interpolation across the element in 2DThe latter is easy to realize when eg moving from one node a to another ndoe b and realizingthat the barycentric coordinates linearly vary between 0 and 1 between these two nodes (Na

e

will decrease from 1 to 0 while N be 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 Asa consequence we may introduce the isoparametric mapping

x(ξ η) =3

suma=1

Nae (ξ η)xae (136)

which applies the interpolation rules (classically used for the dofs) to the nodal locations of theelement Given the nodal locations x1

e x2e and x3

e the above mapping uniquely assigns a pointx in real space to any barycentric coordinates (ξ η) (136) thus presents the link the mappingbetween (x1 x2) and (ξ η)

Of course we may exploit the same interpolation for any nodal degrees of freedom (thus usingan isoparametric mapping) so

uh(ξ η) =3

suma=1

Nae (ξ η)uae (137)

A difficulty arises though when using this interpolation in the finite element context because weneed to compute shape function derivatives Na

xi in real space (needed eg for the calculationof Ke or Fint) It is easy to compute Na

ξ and Naη but that is not what we need (136) defines

(x1 x2) in terms of (ξ η) but not the other way around

Instead of inverting (136) let us use a mathematical shortcut known as the inverse functiontheorem To exploit this relation let us formally write x1 = x1(ξ η) and x2 = x2(ξ η) so thechain rule gives

( uhξuhη

) = ( uhx1x1ξ + uhx2

x2ξ

uhx1x1η + uhx2

x2η) = (x1ξ x2ξ

x1η x2η)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[J]

( uhx1

uhx2

) = [J] ( uhx1

uhx2

) (138)

73

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

with the Jacobian6 matrix

[J] = (x1ξ x2ξ

x1η x2η) (139)

and its determinant

J = detJ = partx1

partξ

partx2

partηminus partx1

partη

partx2

partξ (1310)

Note that like for the deformation mapping F = Gradϕ in continuum mechanics for theisoparametric mapping to be invertible we need to have J gt 0 This implies that elementscannot be distorted (inverted for simplicial elements or non-convex for general elements later)

By substituting our isoparametric mapping (136) for x1 and x2 in (139) we obtain

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξx

a1e

3

sumi=1

Naeξx

a2e

3

suma=1

Naeηx

a1e

3

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

(1311)

This solves the problem as we may now use (138) to switch between derivatives in the referenceconfiguration and in real space As discussed we need to have J gt 0 Thus we can invert J toarrive at (by the inverse function theorem)

( uhx1

uhx2

) = [J]minus1 ( uhξuhη

) = [J]minus1

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξu

ae

3

suma=1

Naeηu

ae

⎞⎟⎟⎟⎟⎠

but also ( uhx1

uhx2

) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naex1

uae

3

suma=1

Naex2

uae

⎞⎟⎟⎟⎟⎠

(1312)

By equating these two and comparing the coefficients of uae we thus obtain

(Naex1

Naex2

) = [J]minus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (1313)

where for brevity we summarized the barycentric coordinates into ξ = (ξ η)T Relation (1313)is generally applicable for any isoparametric mapping and will be valuable in the future

Applying the inverse function theorem to the specific shape functions (135) yields the Jacobianmatrix

[J] = (xξ x2ξ

xη x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naerx

a1e

3

suma=1

Naeξx

a2e

3

suma=1

Naesx

a1e

3

suma=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= (x11e minus x3

1e x12e minus x3

2e

x21e minus x3

1e x22e minus x3

2e) = const (1314)

and

J = detJ = (x11e minus x3

1e)(x22e minus x3

2e) minus (x21e minus x3

1e)(x12e minus x3

2e) = 2Ae = const (1315)

6The Jacobian in mathematics is usually defined as the transpose of J defined in (139) In the FE contextour definition is chosen for convenience so that we do not need a transpose in (1313) while J = detF remainsthe same

74

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice that J and hence J are constant and do not depend on (ξ η)

Further we have

(Naex1

Naex2

) = [J]minus1 (Naeη

Naeξ

) (1316)

As we had seen from (135) that all shape function derivatives Naξ and Na

η are constant (minus1+1 or 0) and since J = const as well we may also conclude that

Naex1

= const Naex2

= const and also dA = dx1 dx2 = J dξ dη = 2Aedξ dη (1317)

The constant shape function derivatives have an important consequence they indicate that allderivatives partuhpartxj within the triangular element are constant

For example for a mechanical boundary value problem we have two nodal dof components in2D uae = (uae1 uae2) and the interpolation of the displacement field reads

uh =3

suma=1

uaeNae (ξ) or uhi =

3

suma=1

uaeiNae (ξ) for i = 12 (1318)

The resulting strains are

εhij =1

2(uhij + uhji) =

1

2

3

suma=1

(uaeiNaxj + u

aejN

axi) = const (1319)

Consequently all strain components are constant within the element This is why the 3-nodetriangular element is also called the Constant Strain Triangle or CST element It also hasthe important consequence that integration of force vectors or stiffness matrices can easily beperformed exactly since the integrands (for the element energy nodal forces and stiffness) areconstant across the element

In case of higher-order triangular elements the following relation is helpful for evaluating inte-grals over the triangular element (shown without proof)

intΩeξαηβ dA = αβ

(α + β + 2)2Ae (1320)

132 Extension to three dimensions

The extension to three dimensions is straight-forward and results in the 4-node tetrahedron(constant strain tetrahedron) with reference coordinates (ξ η ζ) and shape functions

N1e (ξ η ζ) = ξ N2

e (ξ η ζ) = η N3e (ξ η ζ) = ζ N4

e (ξ η ζ) = 1minusξminusηminusζ (1321)

Here the barycentric coordinates are defined via the ratios of the partial tetrahedron volumes(obtained by splitting the tetrahedral element into four tetrahedra based on the location ofpoint x analogous to the above procedure in 2D) Like in 2D the resulting interpolated strainsare constant in the linear tetrahedron and dV = 6Vedξ dη dζ

The following relation is analogous to (1320)

intΩeξαηβζγ dA = αβγ

(α + β + γ + 2)2Ae (1322)

75

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

133 Finite element implementation

When using the above simplicial elements (like any finite element based on an isoparametricformulation) the finite element implementation can make use of the isoparametric mappingSpecifically for the simplicial elements we showed that

nablaxNae = Jminus1nablaξNa

e = const and Je = detJ = 2Ae (1323)

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

εhij = const rArr σij = σij(εh) = const (1324)

The key integrals to be evaluated (eg in 2D with an element thickness t) following Section 8now become

F aintei = intΩeσijN

aexj dV = int

ΩeσijN

aexj tdA = sum

r=ξη

σijJminus1jr N

aer

Jet

2 (1325)

where the classical summation convention (here over j is implied and not written out for concise-ness) Note that if we pre-compute and store the following constant quantities for each elemente (which only depend on the reference element geometry and not on its degrees of freedom)viz

we =Jet

2= const and Na

exj = sumr=ξη

Jminus1jr N

aer = const (1326)

then the calculation of the nodal force vectors reduces to

F aintei = σij(εh)Naexjwe (1327)

where only the stresses must be recomputed each time for given strains (which do depend onthe nodal dofs) Similarly we compute the element energy as

Ie = intΩeW (εh)dV = int

ΩeW (εh) tdA =W (εh)we (1328)

The analogous definition of a B-matrix as introduced in Section 82 can be applied here asfollows 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 straincomponents in Voigt notation using (1314) are computed as

[εh] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

uh11uh22

uh12 + uh21

⎞⎟⎠=⎛⎜⎝

sumea=1 uae1N

aex1

sumea=1 uae2N

aex2

sumea=1 [uae1Naex2

+ uae2Naex1

]

⎞⎟⎠

= 1

2Ae

⎛⎜⎝

y23e 0 y31

e 0 y12e 0

0 x32e 0 x13

e 0 x21e

x32e y23

e x13e y31

e x21e y12

e

⎞⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[B]

Ue with

xije = xie1 minus xje1

yije = xie2 minus xje2

2Ae = x21e y

31e minus x31

e y21e

(1329)

Note that we exploited J = const and we defined Ue = (u1e1 u

1e2 u

2e1 u

2e2 u

3e1 u

3e2)

T Fur-

thermore (xae1 xae2) denotes the 2D-location of the elementrsquos node a

76

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1331 Special case linear elasticity

For the special case of linear elasticity we may write

εh =BUe rArr σ = Eεh = EBUe (1330)

and the same relations apply as in Section 82 (see the definition of the elastic E-matrix there)Consequently we have the element stiffness matrix nodal internal force vector and internalenergy of element e as respectively

Ke = intΩeBTEBdV =BTEBtAe Finte =KeUe Ie =

1

2Ue sdotKeUe (1331)

where we exploited that BTEB = const and the volume of element e is ∣Ωe∣ = tAe for a 2DCST element Even though not wise for reasons of memory consumption the element stiffnessmatrices Ke can be computed and stored a-priori for each element for faster calculation of forcesand stiffness matrices during simulations

1332 General case of non-linear elastic materials

For the more general case of a material that is not linear elastic we may still write

W =W (ε) rArr σ = partWpartε

= σ(ε) C = partσpartε

= C(ε) (1332)

so that

Ie = intΩeW (εh)dV (1333)

and the internal force vector follows as

Finte =partI int

e

partUe= int

ΩeBTσ dV =BTσ(εh)tAe (1334)

while the incremental stiffness matrix (the analog of the stiffness matrix for nonlinearmaterial behavior) becomes

Te =partF int

e

partUe= int

ΩeBTCB dV =BTC(εh)B tAe (1335)

Note that if σ = Eε the above equations recover the linear elastic definitions with C = E = const

134 Higher-order triangles and tetrahedra

Following the above recipe for the simplicial elements one can also define higher-order triangularand tetrahedral elements based on the barycentric coordinates introduced here For examplethe quadratic triangle (T6) element has six nodes so that the interpolation function space is1 x1 x2 x

21 x1x2 x

22 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

With the same barycentric reference coordinates (ξ η) as for the T3 element the shape functionscan be found as

N1e (ξ η) = ξ(2ξ minus 1) N2

e (ξ η) = η(2η minus 1) N3e (ξ η) = θ(2θ minus 1)

N4e (ξ η) = 4ξη N5

e (ξ η) = 4ηθ N6e (ξ η) = 4ξθ with θ = 1 minus ξ minus η

(1336)

77

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since derivatives of the above shape functions are linear strains (and thus stresses) also varylinearly 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 curvedwhereas those of the CST element remained straight during deformation due to the linearinterpolation A schematic T6LST element is shown below

1

23

4

5

6

1

2

3

4

1

2

3

4

56

79

108

LST (T6) CST (T4) LST (T10)

Analogously the quadratic tetrahedron (T10 also shown above) has four corner nodes andsix nodes at edge midpoints resulting in linear strains within the element By our definitionboth T6 and T10 elements make use of a subparametric mapping since displacements areinterpolated based on higher-order polynomials while the mapping of positions between referenceand real space relies on the same linear interpolation based on barycentric coordinates

The same concepts can be extended to higher dimensions and to higher-order interpolation

78

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 The bilinear quadrilateral element

The above simplicial elements are simple to implement and their constant strains within el-ements admit an exact integration of the element energy nodal forces and stiffness matrixHowever the constant fields within the simplicial elements may not be ideal eg fine FEmeshes may be required to achieve the sought accuracy especially in regions with spatiallystrongly 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 elementsas well as elements in 3D

For the same reason as for the simplicial elements (where we aimed for shape function definitionsindependent 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 quadrilateralelement by definition the reference configuration is Ωe = [minus11]2 and node numbering starts inthe bottom left corner and is counterclockwise

Shape functions must satisfy the FE relation Nae (ξb) = δab in the reference configuration with

nodal positions ξb (b = 1 4) In fact these shape functions can be obtained from the 2-nodebar (whose shape functions we derived in Section 111) by scaling the linear scaling of the shapefunctions up to 2D Consider a 2-node bar whose nodes are positioned7 at ξ = plusmn1 whose shapefunctions are

N1e (ξ) =

1

2(1 minus ξ) N2

e (ξ) =1

2(1 + ξ) (141)

It can easily be verified that N1e (minus1) = 1 N1

e (1) = 0 and N2e (minus1) = 0 N2

e (1) = 1

The 2D quadrilateral element in its reference configuration is Ωe = [minus11]2 ie a square whosecorners are located at ξ = (plusmn1plusmn1) The shape functions can thus be obtained by combining theabove 1D bar shape functions independently in the ξ- and η-directions

N1e (ξ η) = N1

e (ξ)N1e (η) =

1

4(1 minus ξ)(1 minus η)

N2e (ξ η) = N2

e (ξ)N1e (η) =

1

4(1 + ξ)(1 minus η)

N3e (ξ η) = N2

e (ξ)N2e (η) =

1

4(1 + ξ)(1 + η)

N4e (ξ η) = N1

e (ξ)N2e (η) =

1

4(1 minus ξ)(1 + η)

(142)

One can easily verify that Nae (ξb ηb) = δab and sum4

a=1Nae (ξ η) = 1 for all ξ = (ξ η)

1 2x

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

44 3

1 2

mapping

Q4 element in physical spaceQ4 element in its reference space

-1 1

2-node bar in itsreference space

7We note that this choice of ξ isin [minus11] for the bar in the reference configuration is arbitrary one could alsohave chosen eg ξ isin [01]

79

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The isoparametric mapping here implies that the (x1 x2)-coordinates are interpolated across theelement using the same shape functions (viz the above ones) as those used for the interpolationof the fields of interest Therefore we have

x1 =4

suma=1

Nae (ξ η)xae1 x2 =

4

suma=1

Nae (ξ η)xae2 (143)

Notice that this implies straight edges (in the reference configuration) remain straight (in theactual mesh) For example take the bottom edge (characterized by η = minus1) the interpolationalong this edge is

x =4

suma=1

Nae (ξminus1)xae =

1 minus ξ2x1e +

1 + ξ2x2e =

x1e +x2

e

2+ x

2e minusx1

e

2ξ (144)

which is a linear interpolation in ξ Therefore the bottom edge in the real mesh in physicalspace is a linear interpolation between the two adjacent nodes Similar arguments hold for alledges so that this element has only straight edges in physical space

Looking at the shape functions we notice that completeness of the polynomial interpolationis up to q = 1 (even though the interpolation basis 1 ξ η ξη contains the bilinear term it isnot complete up to quadratic order see Section 93) This means we must be able to representlinear solutions of the type

uh(x1 x2) = c0 + c1x1 + c2x2 (145)

exactly As simple check reveals that this is indeed the case since our interpolation based onthe four nodal values uae = uh(xae) recovers the exact solution

uh(x1 x2) =4

suma=1

Nae u

ae =

4

suma=1

Nae u

h(xae1 xae2) =4

suma=1

Nae (c0 + c1x

ae1 + c2x

ae2)

= (4

suma=1

Nae ) c0 + c1

4

suma=1

Nae x

ae1 + c2

4

suma=1

Nae x

ae2 = c0 + c1x1 + c2x2

(146)

Hence we know that the chosen isoparametric element interpolation is capable of representinglinear solutions exactly

Furthermore notice that this interpolation scheme ensures that uh is continuous across ele-ments To see this recall from (144) that on any element edge only those two shape functionsare non-zero whose nodes are adjacent to that edge while the other shape functions are zeroThis implies that the interpolated field uh on any edge is simply a linear interpolation betweenthe 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 adjacentelements As a further consequence the above interpolation also ensures integrability in theweak form as a continuous piecewise polynomial field uh guarantees that uh isinH1(Ω)

As for the simplicial element computing shape function derivatives requires the use of theinverse function theorem first introduced in Section 131 In analogy to the simplicial elementwe use x = x(ξ η) and y = y(ξ η) so the inverse function theorem states

(Naex

Naey

) = Jminus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (147)

By contrast to the simplicial elements we no longer have that J nor nablaξNa are constant becauseof the bilinear term ξη in the shape functions Therefore strains and stresses will no longer beconstant within an element

80

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 141 2-node bar revisited

As a simple example recall the 2-node bar element whose shape functions we computed as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (148)

For a reference bar element with nodes at ξ = plusmn1 the analogous shape functions in 1D read

N1e (ξ) =

1 minus ξ2

N2e (ξ) =

1 + ξ2

(149)

It is simple to verify that these indeed evaluate to 0 and 1 at ξ = plusmn1 Applying the inversefunction theorem to this 1D problem gives the scalar Jacobian

J = partxpartξ

= partN1e

partξx1e +

partN2e

partξx2e =

x2e minus x1

e

2= ∆x

2(1410)

and further the relation between the shape function derivatives in physical and reference spaceas

Naex = Jminus1Na

eξ =2

∆xeNaeξ with N1

eξ = minus1

2 N2

eξ =1

2 (1411)

so that we obtain correctly

N1ex = minus

1

2

2

∆xe= minus 1

∆xe N1

ex =1

2

2

∆xe= 1

∆xe (1412)

mdashmdashmdashmdash

When applying the inverse function theorem and the above relations to the bilinear quadrilateral(Q4) element we obtain the Jacobian

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

4

suma=1

Naeξx

a1e

4

sumi=1

Naeξx

a2e

4

suma=1

Naeηx

a1e

4

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= 1

4(minus(1 minus η) (1 minus η) (1 + η) minus(1 minus η)minus(1 minus ξ) minus(1 + ξ) (1 + ξ) (1 minus ξ) )

⎛⎜⎜⎜⎜⎝

x1e1 x1

e2

x2e1 x2

e2

x3e1 x3

e2

x4e1 x4

e2

⎞⎟⎟⎟⎟⎠

(1413)

and J = detJ We notice that J indeed is not constant across the element but varies with ξand η For convenience let us define

[Γ] = [Jminus1] = (Γ11 Γ12

Γ21 Γ22) (1414)

Towards the FE implementation let us also introduce the B-matrix notation To this end wewrite

[ε] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

(1415)

81

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We further exploit the inverse function theorem viz

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

(1416)

Finally we also have

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

Ue (1417)

with the element dofs Ue = (u1e1 u

1e2 u

4e1 u

4e2)

T Altogether this shows that ε =BUe with

B =⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

(1418)

which defines theB-matrix for the Q4 element Again note thatB =B(ξ) ie theB-matrix isnot constant within an element but depends on ξ and η (through the shape function derivativesas well as through Γ = Jminus1 which are both not constant)

Analogous to the simplicial element a useful relation to evaluate area integrals over theelement in the following is (e1e2 being reference unit vectors)

dA = dx times dy = (partxpartξ

dξ e1 +partx

partηdη e2) times (party

partξdξ e1 +

party

partηdη e2) = J dξ dη e1 times e2 (1419)

so that

dA = ∣dA∣ = J dξ dη (1420)

Like for the simplicial elements the above can be used to compute the element energy

Ie = intΩeW (εh)dV (1421)

the internal force vector

Finte =partI int

e

partUe= int

ΩeBTσ dV (1422)

and the incremental stiffness matrix

Te =partF int

e

partUe= int

ΩeBTCB dV (1423)

For the special case of linear elasticity the above reduces to

Ke = intΩeBTEBdV Finte =KeUe Ie =

1

2Ue sdotKeUe (1424)

82

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

15 Higher-order elements Q8 Q9 8-node brick

The bilinear quadrilateral (Q4) element discussed in the previous section was the simplestexample of a (non-simplicial) element in 2D Of course the same concepts can be extended tomore complex elements using higher-order interpolation as well as to 3D elements Here wewould 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 whichinstead uses quadratic interpolation It derives its shape functions from applying the 1D shapefunctions of the 3-node bar (using Lagrangian interpolation) to the 2D case For example thefirst few shape functions are defined as

N1e (ξ η) =

ξ(1 minus ξ)η(1 minus η)4

N2e (ξ η) = minus

ξ(1 + ξ)η(1 minus η)4

N3e (ξ η) =

ξ(1 + ξ)η(1 + η)4

(151)

and all other shape functions follow analogously Overall the resulting interpolation uses thebasis (ie the above shape functions include these monomials)

1 ξ η ξη ξ2 η2 ξ2η ξη2 ξ2η2 (152)

which is complete up to order q = 2 (quadratic)

We notice that the above interpolation apparently includes far more monomials terms thanrequired for a quadratic interpolation (specifically ξ2η ξη2 and ξ2η2 are not required for acomplete quadratic interpolation) Therefore one can also construct elements with less nodesthat still provide a complete quadratic interpolation

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 consequenceshape functions are constructed in a different way than defined by (151) One starts by definingthose shape functions associated with the mid-edge nodes 5 6 7 and 8

N5e (ξ η) =

(1 minus η)(1 minus ξ2)2

N6e (ξ η) =

(1 minus η2)(1 + ξ)2

N7e (ξ η) =

(1 + η)(1 minus ξ2)2

N8e (ξ η) =

(1 minus η2)(1 minus ξ)2

(153)

and concludes the remaining four shape functions (serendipitously) as combinations of the aboveeg

N1e (ξ η) =

(1 minus η)(1 minus ξ)4

minus 1

2(N5+N8) N2

e (ξ η) =(1 minus η)(1 + ξ)

4minus 1

2(N5+N6) etc (154)

Both the Q8 and Q9 element are schematically shown below in their reference configurations

x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q9 in its reference space

5

6

7

8 9x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q8 in its reference space

5

6

7

8

83

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We may also extend the above construction of elements to three dimensions The simplestexample in 3D was the Constant-Strain Tetrahedron already discussed in Section Here wemay introduce further 3D elements by extending eg the definition of the bilinear quadrilateral(Q4) element into 3D

This results in the so-called 8-node brick element Here the 3D reference configuration isdescribed by coordinates (ξ η ζ) and the shape functions are a direction extension of (142)now to 3D which gives

N1e (ξ η ζ) =

1

8(1 minus ξ)(1 minus η)(1 minus ζ) N2

e (ξ η ζ) =1

8(1 + ξ)(1 minus η)(1 minus ζ)

N3e (ξ η ζ) =

1

8(1 + ξ)(1 + η)(1 minus ζ) etc

(155)

The link between the reference and actual configuration is again given by an isoparametricmapping so that shape function derivatives again follow from the inverse function theorem as

nablaxNae = Jminus1nablaξNa

e (156)

and volume integrals make use of

dV = J dξ dη dζ (157)

x

h

(-1-1-1) (1-1-1)

(111)

41 2

brick element in its reference space

z

3

85 6

7

(11-1)

84

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

16 Numerical quadrature

The Q4 Q8 Q9 and brick element are perfect examples to motivate the concepts discussed inthis section viz the use of numerical quadrature Recall that in order to perform finite elementsimulations we may need to compute the element energy nodal forces andor tangent matrix

Ie = intΩeW (εh)dV Finte = int

ΩeBTσ dV Te = int

ΩeBTCB dV (161)

each of which requires computing an integral over the element Ωe In general (unlike for thespecial case of simplicial elements) the integrands are not constant but may be complex func-tions of position (even in the linear elastic case) As a consequence the above integrals cannoteasily be calculated analytically which is why we make use of numerical integration schemes

As a clean mathematical example we start by considering an integral in 1D eg

I[u] = intb

au(x) dx (162)

which can later be extended to higher dimensions For convenience let us introduce the coor-dinate transformation

ξ = 2x minus ab minus a

minus 1 rArr ξ(x = a) = minus1 ξ(x = b) = 1 dξ = 2 dx

b minus a (163)

so that

I[u] = int1

minus1f(ξ) dξ where f(ξ) = b minus a

2u(x(ξ)) (164)

with

x = ξ + 1

2(b minus a) + a (165)

Instead of considering general integrals of the type (162) we concentrate on integrals of thetype (164) (and we have seen that we can transform one into the other) The goal is now toapproximate the integral (164) numerically

161 Example Riemann sums

As an example for numerical integration consider a partition of the range from minus1 to 1 into nsegments separated by n + 1 nodes

P = [ξ0 ξ1] [ξ1 ξ2] [ξnminus1 ξn] such that minus1 = ξ0 lt ξ1 lt ξ2 lt lt ξn = 1 (166)

The Riemann sum is probably the simplest approach to computing the above integral numer-ically by simply summing the contributions from all segments thus defining the approximateintegral S as

I asymp S =n

sumi=1

f(ξlowasti )(ξi minus ξiminus1) with ξiminus1 le ξlowasti le ξi (167)

Here the choice of ξlowasti within each interval is in principle arbitrary It should be somehowrepresentative of the function f within the interval [ξiminus1 ξi]

85

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Different choices of ξlowasti lead to different definitions of S eg including

(i) the left Riemann sum ξlowasti = ξiminus1

(ii) the right Riemann sum ξlowasti = ξi(iii) the middle Riemann sum ξlowasti =

12(ξiminus1 + ξi)

(iv) the trapezoidal sum average of left and right

(v) the upper Riemann sum ξlowasti st g(ξlowasti ) = supξisin[ξiminus1ξi] g(ξ)(vi) the lower Riemann sum ξlowasti st g(ξlowasti ) = infξisin[ξiminus1ξi] g(ξ)

More refined formulations can be found in the so-called Newton-Cotes formulas (the trape-zoidal rule is the Newton-Cotes formula of degree 1) While these Riemann and Newton-Cotesformulas are indeed viable schemes to carry out integration numerically they are rather ineffi-cient as they require the breaking down of the integrand into many segments in general Thefollowing concept of Gaussian quadrature aims to circumvent those computational expenses

x-1 +1

f(x)

xx0

f(x )i

xnxi-1xi

xx0

f(x )i

xi-1 +1

exact integral (middle) Riemann sum quadrature rule

162 Gauss quadrature

An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-ture rules in 3D) which are best suited for integrating polynomial functions The idea is toapproximate the integral by a weighted sum over integration points (as shown in the schematicabove on the right) ie we define

I[u] = int1

minus1f(ξ) dξ asymp

nQPminus1

sumi=0

Wi f(ξi) (168)

The challenge now is to choose the number of integration points nQP as well as the weightsW0 WnQPminus1 and locations ξ0 ξnQPminus1 of all each integration point That choiceshould depend on the function to be integrated (more specifically on its smoothness one caneasily imagine that smooth polynomials require few integration points while strongly fluctuat-ing functions require larger numbers of integration points) For the FE context most functionsof interest will be of polynomial type since our shape functions are commonly defined as poly-nomials

We say a quadrature rule is exact of order q if it integrates exactly all polynomial functionsg isin Pq([minus11]) Gauss quadrature generally chooses nQP quadrature points and associatedweights such that the quadrature rule is exact of order q = 2nQP minus 1 Let us find the optimalweights and integration points for Gaussian quadrature

86

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1621 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mo-ments micro are computed exactly In other words we find the weights and locations by requiringthat

microk = int1

minus1ξkdξ

=nQPminus1

sumi=0

Wi ξki k = 01 2nQP minus 1 (169)

These are 2nQP equations for the 2nQP free parameters (Wi ξi) for i = 0 nQP minus 1 Theequations are generally nonlinear and thus hard to solve analytically Yet we can find solutionsfor the lowest few orders in 1D as follows

a single quadrature point ie nQP = 1 approximates the integral by evaluating the func-tion only at a single location ξ0 isin [minus11]The two equations for the two unknowns (the weight W0 and location ξ0) are obtainedfrom requiring the any constant function f(ξ) = ξ0 and any linear function f(ξ) = ξ1must be integrated exactly This implies that

int1

minus1ξ0 dξ = 2

=W0 ξ00 =W0 and int

1

minus1ξ1 dξ = 0

=W0 ξ10 =W0ξ0 (1610)

From these two equations the first-order quadrature rule follows with

W0 = 2 ξ0 = 0 (1611)

That is only a single quadrature point at location ξ0 = 0 is required to integrate any linearfunction exactly Hence since linear functions are integrated exactly this quadrature ruleis exact to order q = 1

two quadrature points ie nQP = 2 require the calculation of the two weights and asso-ciated quadrature point locations

In close analogy to the above case we now have four unknowns (two weights W0 andW1 and two integration point locations ξ0 and ξ1) and construct the four equations tosolve for those by requiring that any constant linear quadratic or cubic function mustbe integrated exactly

int1

minus1ξ0 dξ = 2

=W0 +W1 int1

minus1ξ1 dξ = 0

=W0 ξ0 +W1 ξ1

int1

minus1ξ2 dξ = 2

3

=W0 ξ20 +W1 ξ

21 int

1

minus1ξ3 dξ = 0

=W0 ξ30 +W1 ξ

31

(1612)

While this is a nonlinear system of equations a simple solution can be found by assumingsymmetric quadrature points with respect to the origin ie ξ0 = minusξ1 In this case wemay conclude that

W0 =W1 = 1 ξ0 = minus1radic3 ξ1 =

1radic3 (1613)

Since this quadrature rule integrates cubic polynomials exactly it is exact to order q = 3

higher-order quadrature rules

Quadrature weights and points for arbitrary orders can be obtained in analogous fashionand most importantly can be found in numerous look-up tables (cf the classical FEMtextbooks) A more systematic way to compute Gauss-Legendre quadrature weights andpoints is given in Appendix I

87

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1622 Other Gauss quadrature rules

Note that for general functions f (which are not necessarily of polynomial type) one cansometimes find a decomposition f(ξ) = w(ξ)g(ξ) where w(sdot) is a known weighting function andg(ξ) is (approxiately) polynomial so that a more suitable quadrature rule may be found via

I[u] = int1

minus1f(ξ)dξ = int

1

minus1w(ξ) g(ξ)dξ asymp

nQPminus1

sumi=0

w(ξi) g(ξi) (1614)

Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type whichare obtained form a weighting function w(ξ) = (1 minus ξ2)minus12 and the quadrature points are theroots of Chebyshew polynomials Gauss-Hermite quadrature uses a weighting function w(ξ) =exp(minusξ2) (and the integral is taken over the entire real axis) Gauss-Legendre quadrature isincluded 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 degree2nQP minus 3 viz

I[u] = int1

minus1f(ξ) dξ asymp 2

nQP (nQP minus 1)[f(minus1) + f(1)] +

nQPminus1

sumi=2

Wi f(ξi) (1615)

163 Higher dimensions

Like the polynomial shape functions the above quadrature rules can easily be extended to 2Dand 3D eg

int1

minus1int

1

minus1f(ξ η)dξ dη = int

1

minus1[Nminus1

sumi=0

Wi f(ξi η)] dη =Nminus1

sumj=0

Wj [Nminus1

sumi=0

Wi f(ξi ηj)]

=nQPminus1

sumk=0

W lowastk f(ξk)

(1616)

with the combined weights W lowastk = WiWj and points ξk = (ξi ηj) obtained from the individual

quadrature rules in each direction By symmetry we choose N = radicnQP so that N2 = nQP

For example consider the Q4 element By using the 1D Gauss-Legendre weights and pointswe now have

first-order quadrature (q = 1) as in 1D has only a single quadrature point (nQP = 1)

W0 = 22 = 4 and (ξ0 η0) = (00) (1617)

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

third-order quadrature (q = 3) now has four quadrature points in 2D (nQP = 22 = 4)

W0 =W1 =W2 =W3 = 1 and (ξi ηi) = (plusmn 1radic3 plusmn 1radic

3) (1618)

Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly

88

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly in 3D the brick element may use Gauss-Legendre quadrature resulting in thefollowing schemes

first-order quadrature (q = 1) still has a single quadrature point (nQP = 1)

W0 = 23 = 8 and (ξ0 η0 ζ0) = (000) (1619)

third-order quadrature (q = 3) now has eight quadrature points (nQP = 23 = 8)

Wi = 1 and (ξi ηi ζi) = (plusmn 1radic3 plusmn 1radic

3 plusmn 1radic

3) (1620)

higher-order schemes follow analogously

Shown below are schematics of the quadrature point locations for Gauss-Legendre quadratureof orders q = 1 and q = 3 in both 1D and 2D

xx0

f(x )0

-1 +1

q = 1 in 1D

xx0

f(x )0

-1 +1x

x0

f(x )0

-1 +1x1

f(x )1

x

h

-1

-1

+1

+1

x0x1

x2x3

q = 3 in 1D

x

h

-1

-1

+1

+1

x0

q = 1 in 2D q = 3 in 2D

Ultimately the choice of a specific quadrature rule in any dimension depends on the functionf(ξ) to be integrated If the latter is of polynomial type then we may choose a Gaussianquadrature rule that leads to exact integration Else we may choose a quadrature rule basedon the smoothness of the function (Appendix J shows that the error introduced by a numericalquadrature rule strongly depends on the smoothness of function f) In general the choice of aquadrature rule is often a compromise between accuracy and efficiency

89

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

17 FEM which quadrature rule to use

171 Integrals in the FE context

The key integrals to be evaluated numerically within the FE context are (eg for a 2D quadri-lateral element with out-of-plane element thickness t) the element energy

Ie = intΩeW (εh)dV = int

1

minus1int

1

minus1W (εh(ξ))J(ξ)tedξdη asymp

nQPminus1

sumk=0

WkW (εh(ξk))J(ξk)te

as well as the nodal force vectors

F aintei = intΩeσij(εh)Na

j dV = int1

minus1int

1

minus1σij(εh(ξ))Na

j(ξ)J(ξ)tedξdη

asympnQPminus1

sumk=0

Wk σij(εh(ξk))Naj(ξk)J(ξk)te

(171)

Fruther we compute the element tangent matrix as

(Te)abik = intΩe

Cijkl(εh(ξk))NajN

bldV = int

1

minus1int

1

minus1Cijkl(εh(ξk))Na

j(ξ)N bl(ξ)J(ξ)tedξ dη

asympnQPminus1

sumk=0

WkCijkl(εh(ξk))Naj(ξk)N b

l(ξk)J(ξk)te(172)

Recall that in those relations the shape function derivatives and the strains are computed asrespectively

nablaxNa = Jminus1nablaξNa and εhij(ξ) =1

2suma

(uaeiNaej(ξ) + uaejNa

ei(ξ)) (173)

Of course the above can also be reformulate in terms of the B-matrix For example for a linearelastic element in 2D we have seen that

Te =Ke = intΩeB(ξ)TEB(ξ)dV asymp

nQPminus1

sumk=0

WkBT(ξk)EB(ξk)J(ξk)te (174)

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

172 Which quadrature rule to use

In all of the above integrals the required quadrature rule depends on the smoothness (orpolynomial order) of the integrands Since stresses shape function derivatives Jacobians andB-matrices are not necessarily smooth polynomials one often cannot (or due to computationalexpenses is not willing to) achieve exact integration for each element For example for the Q4element we have seen that J is linear in ξ hence Γ = Jminus1 is a fractional polynomial and Binvolves both Γ and nablaξNa

e As a consequence BTEB is some fractional polynomial that ishard to integrate exactly in general Therefore we introduce a minimum requirement forthe 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 anglesare preserved or in other words if J = const

90

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 171 Full integration for various element types

Let us determine full integration for the element types discussed before

The 4-node bilinear quadrilateral (Q4) is undistorted if the physical element has theshape of a rectangle (side lengths a and b) so that

J = ab4= const (175)

Then for a linear elastic Q4 element we have

F aintei = int1

minus1int

1

minus1Cijkl εhkl(ξ)N

aj(ξ)

ab

4tedξ dη = abte

4Cijkl int

1

minus1int

1

minus1εhkl(ξ)N

aj(ξ)dξ dη

(176)

where εh = sym(nablaxuh) is at most linear (since the interpolation of uh is bilinear) nablaxNa

is also at most linear for the same reason Overall the integrand is at most a quadraticpolynomial so that we need integration order q ge 2 Recall that in 1D we showed thatq = 2nQP minus 1 so that full integration of the Q4 element in 2D requires nQP = 2 times 2 = 4quadrature points

Full integration of the quadratic 2D elements Q8Q9 requires nQP = 32 = 9 quadraturepoints (the derivation is analogous to the above and is therefore omitted here)

Full integration of the 8-node brick element requires nQP = 8 quadrature points

For simplicial elements we showed that strains and stresses are constant across anelement so that a single quadrature point (nQP = 1) at an arbitrary location inside theelement is sufficient to integrate exactly Usually one chooses the element center whichgives

W0 = 1 ξ0 = η0 =1

3(in 2D) and ξ0 = η0 = ζ0 =

1

4(in 3D) (177)

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 simplicialquadrature rules (instead of Gaussian quadrature rules) whose weights and quadraturepoint locations can be found in look-up tables

mdashmdashmdashmdash

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 elementtangent matrix we make the same observation (ie those are integrated exactly as well) Forexample the energy reads

Ie = intΩeW dV = abte

4

1

2Cijkl int

1

minus1int

1

minus1εhij(ξ)εhkl(ξ)dξ dη

(Te)abij =abte

4Cijkl int

1

minus1int

1

minus1Naj(ξ)N b

l(ξ)dξ dη

(178)

where both Naj(ξ) and N b

l(ξ) are linear in ξ so that the resulting integrand is a quadraticpolynomial for the Q4 element in analogy to the above discussion of the nodal forces

Using an integration rule less than full integration is called under-integration or reducedintegration the opposite is called over-integration Which integration order to use dependsvery much on the element type the material model etc Sometimes under-integration can evenbe beneficial (eg to avoid locking) we will discuss one such example in Section 18

91

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

18 Element defects shear locking and hourglassing

The bilinear Q4 element is a classical example for an element type which displays a so-called element defect ie a spurious numerical artifact when using full integration in certainscenarios ndash specifically when used to simulate beam bending To demonstrate this we considera rectangular element having side lengths a and b in the x1- and x2-directions If bendingmoments M are applied to the two vertical edges then the element is expected to undergo purebending

In an actual (slender) Euler-Bernoulli beam we know from elastic beam theory that the stressesin the beam vary linearly across the thickness and that the only non-zero stress component isthe axial stress Therefore we may write (for an element of size a times b as shown below)

σ11 = minusx2

b2σmax σ22 = σ12 = 0 (181)

where σmax is the maximum tensile stress reached on the surface of the beam (at x2 = plusmnb2)From Hookersquos law in 1D we obtain

ε11 = minusσ11

E= minusx2σmax

Eb2 ε22 = minusν

σ11

E= ν x2σmax

Eb2 ε12 = 0 (182)

Let us try to find this solution using a single Q4 element To this end we apply horizontalforces to all four nodes of the element obtained from lumping the distributed beam stresses tothe nodes according to relation (815) found for the externally applied forces

Fext1 = intpartΩe

σ11N1e dS = minusint

1

minus1(minus x2

b2σmax)N1

e (ξ = minus1 η) t b2

= int1

minus1η σmax

(1 minus (minus1))(1 minus η)4

tb

2dη = minusσmaxtb

6= minusF with F = σmaxtb

6

(183)

(Note the minus stems from the negative cut so the traction at the left edge of the elementresponsible for the forces is in fact minusσ11) Analogously one obtains

Fext2 = F Fext3 = minusF Fext4 = F (184)

That is the bottom edge is stretched while the top edge is compressed (as in beam bending)

a

x1

x2

b MyMy

a

x1

x2

smax

smaxsmax

smax

x

hF

F

F

F

x

hU

U

U

U

beam loaded in bending stress distribution due tothe applied moments

Q4 element with equivalent nodal forces

elastic Q4 element deformedby the nodal forces

1 2

3 4

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 outhere for brevity but assume the exact stiffness matrix)

KeUhe = Fext =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusF0F0minusF0F0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Uhe =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusU0U0minusU0U0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

with U = aσmax

E

(1 + ν)(1 minus 2ν)2(1 minus ν) + (ab)2(1 minus 2ν)

92

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(185)

where we evaluated the element forces and stiffness matrix exactly (since the element is undis-torted we can easily reach full integration with 2 times 2 quadrature points)

The resulting strains within the element are evaluated as

εh11 = minusU

aη εh22 = 0 εh12 = minus

U

bξ (186)

While the axial strain component εh11 is physically reasonable (and the lack of a transverse shearεh22 ndash worst case ndash makes the element too soft against bending) the presence of a non-zero shearstress εh12 is problematic This so-called parasitic shear is not physical but a numerical artifact(elastic Euler beams produce no shear stresses cf (182)) This parasitic shear contributes tothe energy of the element so that ndash when minimizing the potential energy in a boundaryvalue problem ndash this shear component introduces artificial stiffness This becomes apparentwhen calculating eg the angle of bending θ of the beam in the above problem Comparingthe exact one (obtained form beam theory) to the approximate one (obtained from the aboveconstruction) one finds

θapprox

θexact=

1 minus ν2

1 +1 minus ν

2(a

b)

2 (187)

Notice that as the Q4 element becomes more and more slender (ab rarr infin) the numericallyobtained angle approaches 0 That is the element shows what is known as locking or morespecifically shear locking in case of long and slender elements (ab≫ 1) the high shear strainand associated elastic energy prevents the element from deformting it ldquolocksrdquo

MyMy

FF

F F

qapprox qexact

Next let us use numerical quadrature to evaluate the element quantities of interest For exam-ple for the energy we have

Ie = intΩe

1

2εh sdotCεhdV asymp t

2

nQPminus1

sumk=0

Wk εh(ξk) sdotCεh(ξk)J(ξk) (188)

We showed before that full integration requires nQP = 2 times 2 quadrature points (and we havedemonstrated above that exact integration leads to element locking under bending)

If instead we use reduced integration with only a single quadrature point (nQP = 1) locatedat ξ0 = 0 then notice that the strain fields in (186) vanish at the quadrature point locationξ = η = 0 Therefore the strains in this case produce no energy In other words any strain fieldof the form (186) can appear without causing any energy and therefore also without causingany resistance from the element in terms of nodal forces This is a zero-energy mode ofthe under-integrated Q4 element and a serious defect The resulting deformation of elements

93

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

undergoing alternating strains (186) is a numerical artifact and often referred to as hourglassmode or chicken-wire mode because of its appearance

Note that note only the underintegrated Q4 element has such a zero-energy mode For examplethe Q8Q9 elements have a similar zero-energy mode with curved element edges

+ + + +

+ + + +

+ + + +

++

++

underintegrated Q4 mesh showing hourglassing zero-energy mode of anunderintegrated Q8 element

simulation example with hourglassing

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 a2times 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with asingle quadrature point at ξk = 0 for the shear strain εh12 removes the spurious shear contributionwhile 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 deformationmodes) and should hence be used with caution

Overall take-home messages are (i) to not use Q4 elements to simulate beam bending (andinstead chose another type of element) and (ii) to be careful with reduced integration as zero-energy modes can appear as spurious deformation modes in the obtained solution

94

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

19 Assembly

Irrespective of the particular finite element type that is being used to solve a boundary valueproblem its solution requires the assembly of global vectors and matrices Specifically recallthat shape functions associated with a node a are non-zero only in elements adjacent to nodea in the FE context When computing eg the total energy E of a body (not accounting forexternal work) discretized into ne non-overlapping elements we may exploit that

E = intΩW (εh)dV =

ne

sume=1int

ΩeW (εh)dV =

ne

sume=1

Ie (191)

ie the total energy is the sum over all element energies When computing the global forcevectors and incremental stiffness matrices the situation is more complex which is why onecommonly introduces an assembly operator A such that

Fint =neAe=1Finte T =

neAe=1Te (192)

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 andglobal node numbering (and it is the reason elements must have ldquoknowledgerdquo of their node IDs)

Similarly the inverse operator extracts local element quantities from the global vector

Ue = Ae

minus1(U) (193)

For practical purposes it is helpful to recall that entry Uai (where a = 1 n is the node numberand i = 1 d refers to the coordinate) is located at position (a minus 1) sdot d + i in the assembledglobal vector Uh (using MATLAB notation with 1-indexed lists) For example consider a 2Dproblem using 2-node bar elements If an element connecting nodes 1 and 3 computes the nodalforce vectors F 1

inte and F 3inte then those are to be added onto the global force vector as

Fint =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+ F 1inte1

+ F 1inte2

sdotsdot

+ F 3inte1

+ F 3inte2

sdotsdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(194)

Analogously if the element connecting nodes 1 and 3 computes a stiffness matrix K13e then its

components must be added onto the global tangent stiffness matrix as

T =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+K1311 +K13

12 sdot sdot +K1313 +K13

14 sdot sdotK13

21 +K1322 sdot sdot +K13

23 +K1324 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdotsdot sdot sdot sdot sdot sdot sdot sdot

K1331 +K13

32 sdot sdot +K1333 +K13

34 sdot sdotK13

41 +K1342 sdot sdot +K13

43 +K1344 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(195)

Note that because nodes have non-zero FE shape functions only in adjacent elements the abovematrix is generally sparse (which comes with significant computational advantages)

95

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

20 Iterative solvers

The solution of linear elastic problems is easily found by solving a linear system of equations vizKU = Fext so that U = Kminus1Fext (assuming that rigid-body modes have been suppressed) Incase of nonlinear problems ndash such as those arising from more complex material models and fromthe geometric nonlinearity stemming from large deformations ndash an iterative solution method isrequired to solve the generally nonlinear system Fint(U) = Fext(U) (the external forces may ormay not depend on the deformation) Here we discuss a few common examples of such iterativesolvers the most important one being Newton-Raphson iteration

The problem to be solved can be written in the general form

f(U) = Fint(U) minusFext(U) = 0 (201)

where in many cases we assume that Fext is independent of U This however is not generallytrue ndash consider eg nodes attached to elastic springs so the nodal force depends on the positionof the node or a so-called follower force whose direction depends on the bodyrsquos deformation

All iterative solvers start with an initial guess U0 (eg U0 = 0) which is then corrected to find

Un+1 = Un +∆Un (202)

repeatedly until convergence is achieved An iterative scheme converges8 if ∆Un rarr 0 as nrarrinfinor equivalently f(Un) rarr 0 as n rarrinfin The various solution methods discussed in the followingdiffer primarily in the way ∆Un is computed based on a given vector Un

201 Netwon-Raphson (NR) method

The Newton-Raphson method (introduced by Newton in 1669 and generalized by Raphsonin 1690) is the most common technique for solving nonlinear systems of the above type Itstarts with a Taylor expansion assuming a small correction ∆Un

0 = f(Un+1) = f(Un +∆Un)

= f(Un) +partf

partU(Un)∆Un +O (∣∆Un∣2)

(203)

If we neglect higher-order terms then the above can be solved for the increment

∆Un = minus [T (Un)]minus1 f(Un) where T (Un) =partf

partU(Un) (204)

is the tangent matrix Note that we have thus broken the nonlinear problem (which is hardto solve) into many incremental linear problems (that are easy to solve)

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

T abik (Uhn ) =

partF aipartubk

(Un) =part

partubk(int

ΩσijN

aj dV minus F aexti)

= intΩ

partσij

partεhklN blN

aj dV minus

partF aexti

partubk

= intΩCijklNa

jNbldV minus

partF aexti

partubk

(205)

8The fact that an iterative solver converges does not necessarily imply that it converges to the correct equi-librium solution For the special case of linear elasticity indeed unique solution exists

96

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

We note that in general C = C(ε) ie for nonlinear problems the incremental tangent dependson the current state of deformation and hence on the nodal displacements U Only for thespecial case of linear elasticity is C a constant tensor containing the elastic moduli and beingindependent of deformation As shown before we can also write for each element e

Te(U) = intΩeBTCBdV (206)

where C is again the incremental stiffness matrix of the material model In the special caseof linear elasticity we saw that C = E = const and Te = intΩe

BTEB dV = Ke is the constantelement stiffness matrix

The Newton-Raphson solver requires that detT ne 0 in order to find a soltion which is guaranteedin linear elasticity if no rigid body mode exists as discussed in Section 214 (ie the linearizedsystem has no zero-energy mode so that U sdot T U ne 0 for all admissible U ne 0)

For linear elastic problems with constant external forces the Newton-Raphson solver convergesin only a single step since Fint =KU and therefore T =K = const so that

Un+1 = Un +∆Un = Un minus T minus1 [Fint minusFext]= Un minusKminus1 [KUn minusFext]= Un minusUn +Kminus1Fext

=Kminus1Fext

(207)

Let us close by mentioning the (dis)advantages of the Newton-Raphson scheme On thedownside the Newton-Raphson method requires the tangent matrix which may be expensiveto compute it may not always be available analytically and it may require significant com-puter memory (based on the matrix size for a mesh having n nodes in d dimensions we haveT isin Rndtimesnd) In addition the tangent matrix in nonlinear problems is not guaranteed to beinvertible this is particularly problematic in case of problems involving mechanical instabilityOn the plus side the Newton-Raphson method generally displays quadratic convergencewhile iterating which is why it is favorable for the solution of nonlinear problems (and it alsosolves linear problems in one step as shown above) If Newton-Raphson is not a viable optionthen the following techniques offer alternatives

202 Damped Newton-Raphson (dNR) method

A slight modification of the Newton-Raphson method the damped Newton-Raphson methodis beneficial eg when the NR method tends to overshoot (eg in case of oscillatory energylandscapes or multiple minima such as in large-strain elasticity)

The iterative scheme is identical to the classical NR method described above except that

Un+1 = Un + α∆Un with α isin (01) (208)

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

203 Quasi-Newton (QN) method

The Quasi-Newton method is the same as the classical NR method with the exception thatone does not use the actual tangent matrix T for computational simplicity or efficiency Its goal

97

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

is hence to avoid the expensive computation of T (U) and its inversion at each iteration stepTo this end one introduces a matrix Bn and updates its inverse directly

The general algorithm is as follows

(1) start with an initial guess U0 and matrix B0 = T (U0)(2) compute ∆Un = minusBminus1

n f(Un) and Un+1 = Un +∆Un and

Bminus1n+1 =Bminus1

n minus(Bminus1

n zn minus∆Un)otimes∆UnBminus1n

∆Un sdotBminus1n zn

with zn = f(Un+1)minus f(Un) (209)

We omit the full derivation of the update for Bminus1n+1 here for brevity The idea is that Bminus1

n+1 andBminus1n are approximately rank-one-connected using the Sherman-Morrison formula The added

benefit is that not only does T not have to be recomputed exactly but also can the inversion orlinear solver be skipped since the updated inverse is computed explicitly

204 Line search method

The line search method can be used as an improvement for other nonlinear iterative solversSimilar to the damped Newton-Raphson scheme updates are made according to

Un+1 = Un + β∆Un (2010)

where unlike in Section 202 β is not a constant but chosen such that f(Un+1) = 0 Forexample we may find β from solving

∆Un sdot f(Un + β∆Un) = 0 (2011)

This is generally a nonlinear but scalar problem to be solved for β isin R which can be solved bybisection regula falsi secant and other methods

Notice that (2011) is in fact the stationarity condition of the minimization problem

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

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

205 Nonlinear Least Squares

The family of methods based on nonlinear least squares aim to minimize

r(U) = ∥f(U)∥2 = f(U) sdot f(U) (2013)

which results in the stationarity condition

partr

partU(U) = 0 (2014)

This approach is helpful eg in case of over-constrained systems since the formulation ofthe residual r does not require as many equations as U has unknowns Application of theNewton-Raphson technique to this nonlinear system of stationarity equations leads to

∆U = minus [ part

partU

partr

partU]minus1

Un

partr

partU(Un)

= minus [TT(Un)partf

partU(Un)f(Un) +

partTT

partU(Un)f(Un)]

minus1

TT(Un)f(Un)(2015)

98

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

∆U = minus [TT(Un)T (Un)]minus1TT(Un)f(Un) (2016)

This latetr form is known as the Gauss-Newton method Note that this reduces to Newton-Raphson for standard problems (ie those with as many equations as unknowns) HoweverGauss-Newton can also be applied to overdetermined systems (ie more equations than un-knowns)

206 Gradient flow method

Although not necessarily with a proper physical meaning the gradient flow method (alsoknown as gradient descent) has become popular as an iterative solver for quasistatic problems

The idea is to replace the equation

0 = f(Un+1) (2017)

by a dynamic evolution equation

CUn+12 = minusf(Un) and Un+1 = Un +∆t Un+12 (2018)

with eg C = cI with c gt 0 It is obvious that as f rarr 0 we have Un+12 rarr 0 and thus themethod converges Although there is no guarantee to reach an extremum the method is popularbecause it does not require a tangent matrix and is quite robust

For example using a simple backward-Euler discretization for the time derivative and C = cIwe obtain

Un+1 = Un minus1

cf(Un) (2019)

207 Conjugate Gradient (CG) method

The conjugate gradient method follows the idea of iterating into the direction of steepestdescent in order to minimize the total potential energy (as a variation it can also be applied tothe nonlinear least squares problem)

Here the update is

Un+1 = Un + αnSn (2020)

where both the direction Sn and increment αn are determined in an optimal way as follows

The conjugate direction is updated according to

Sn = minusf(Un) + βnSnminus1 (2021)

with β computed from the current solution Un and the previous solution Un according to one ofseveral options (Polak-Ribiere Fletcher-Reeves etc) Then the scalar increment αn is obtainedfrom a line search to find

αn = arg min r (Un + αSn) (2022)

A benefit of the conjugate gradient technique is that as for gradient flow no tangent matrixis required A variation of this scheme originally developed for atomistics but also applicableto the FE method (and oftentimes converging faster than CG) is the so-called Fast InertialRelaxation Engine (FIRE)

99

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

21 Boundary conditions

We recall that the solving a mechanical boundary value problem by the finite element methodreduces to solving the global system of equations given by

Fint(U) = Fext(U) (211)

for the vector of all nodal dofs U If the material is linear elastic then Fint(U) = KU andsystem (211) is linear In general (ie for anything but linear elastic behavior) the system ofequations in (211) is nonlinear In Section 20 we discussed solution strategies for the abovesystem of equations but we still need to turn our attention to boundary conditions which hehave not discussed in detail so far This includes both Neumann boundary conditions (leadingto the specific form of Fext(U)) and Dirichlet boundary conditions (imposing restraints on thedegrees of freedom) These will be discussed in the following

211 Neumann boundary conditions

The right-hand side vector Fext in (211) includes the combined effects of externally appliedbody forces ρb and surface tractions t in general Of course if forces are applied only to FEnodes 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 nodalforces first

In Section 8 we derived the components of the external force vector as

F aexti = intΩρbiN

adV + intpartΩtiN

adS =sume

(intΩeρbiN

adV + intpartΩe

tiNadS) (212)

These integrals can be computed in the same fashion as all FE quantities (such as eg nodalforces and stiffness matrices) and it is convenient to use numerical quadrature to approximatethe above integrals in general For example for a 2D quadrilateral element (such as the Q4 Q8or Q9) we may write the contribution from element e to nodal force component F aexti due tobody forces as

F aextei = intΩeρbiN

adV = int1

minus1int

1

minus1ρbi(ξ)Na

e (ξ)J(ξ)tdξ dη asympnQPminus1

sumk=0

Wk ρbi(ξk)Nae (ξk) tJ(ξk)

(213)

Analogously surface tractions result in an external force on node a in direction i again for a2D isoparametric element e given by

F aextei = intpartΩe

tiNadS = int

1

minus1ti(ζ)Na

e (ζ)Jζ(ζ)tdζ asympnQPminus1

sumk=0

Wk ti(ζk)Nae (ζk) tJ(ζk) (214)

Note that the surface traction term integrates over the boundary of the element (ζ stands foreither ξ or η depending on the orientation of the surface on which the tractions are acting) soin d dimensions we can use a quadrature rule for d minus 1 dimensions (eg for a 2D element weuse 1D quadrature rule on an element edge)

Like for internal forces the global external force vector Fext results from assembling all elementcontributions ie from adding the contributions of all external element force vectors onto theglobal external force vector (see Section 19)

100

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

When using a variational formulation we may interpret external forces also in a variationalsense Specifically we can formulate the work done by the external force on element e as

Wexte = intΩeρb sdotu dV + int

partΩet sdotu dS (215)

The resulting force vector F aexte = partWextepartua acting on node a is given by the sum of (213)

and (214) We note that if t and ρb are independent of the nodal displacements ie Fext isindependent of U then the right-hand side of the system of equations to be solved is constantOtherwise Fint(U) minus Fext(U) = 0 is to be solved where the external forces also depend ondisplacements

Several examples of typical external forces in the FEM context are given below

P

PMy

k

n

au

Dx au

ll0

constant forceconstant moment

linear spring(linearized deform)

linear spring(nonlinear deform)

pressure loading(Q4 elements)

p

p

n2

n1

L1

L2

pL 22

pL 22

pL 21

pL 21

Before we dive into specific examples we point out one important aspect with regards to theimplementation and assembly of the overall problem So far we have primarily consideredproblems with context external forces so that we had to solve Fint(U) = Fext When theexternal forces also depend on the nodal unknowns (as eg in Examples 213 and 213 below)then the problem to be solved is in fact

f(U) = Fint(U) minusFext(U) = 0 (216)

Here we can still establish a variational structure exploiting that

I(U) = E(U)minusW (U)rarrminU

with E(U) = Anee=1Ie(Ue) W (U) = Anee=1Wexte(Ue)

(217)

so that

f(U) = partI

partU(U) = partE

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFint

minus partWpartU

(U)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFext

= Fint(U) minusFext(U) (218)

Here iterative solvers (discussed in Secion 20) need the complete tangent matrix (includingboth those contributions from internal and external forces) so that

T (U) = partf

partU(U) = partFint

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraTint from before

minus partFext

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraText∶ new contribution

= Tint(U) minus Text(U) (219)

Therefore when discussing the specific examples in the following we will define the work done bythe external force Wext along with the resulting external nodal forces F a

ext and the associatedexternal stiffness matrix contribution Text as introduced above When assembling the globalsystem both contributions ndash from internal and external forces ndash must be considered

101

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 211 Constant force

Consider a constant force P applied to a particular node b whose position is displacing with ubThe work done by this external force vector is

Wext = P sdotub (2110)

Therefore the resulting external force vector on any node a is

F aext =

partWext

partua= P δab (2111)

ie the constnat external force P is applied only to node b We note that the associated stiffnessmatrix (which would be needed for iterative solution schemes) vanishes since

T abext =partF a

ext

partub= 0 (2112)

Finally we note that the analogous formulation holds for applying a constant external bendingmoment My in case of beam elements with rotational dofs eg to node b in 2D

Wext =Myθb rArr Ma

ext =partWext

partθa=Myδab (2113)

mdashmdashmdashmdash

Example 212 Linear spring undergoing small deformations

Consider a linear elastic spring (stiffness k) attached to a node a along the n-direction (withunit vector ∣n∣ = 1 pointing in the direction of stretching the spring) which undergoes onlysmall deformations so that linearized kinematics can be used (the change of length ∆x of thespring is given by the projection of the displacement ua onto n) In this case the spring energyas a function of the displacement ua is

Espring =k

2∆x2 = k

2(ua sdotn)2 (2114)

To compute the nodal force vectors we need to be careful since Espring is the spring energyand not the work Wext performed by the spring Therefore one would add Espring to thepotential energy functional instead of substracting it as external work Recalling concepts fromundergraduate dynamics we know that the work done by the spring on the body must equalthe potential difference so Wext = Espring0 minus Espring where Espring0 = 0 in our case since thespring is initially unstretched Hence we have Wext = minusEspring The resulting force vector onnode a (all other nodal forces being zero) thus follows as

F aext =

partWext

partua= minus

partEspring

partua= minusk(ua sdotn)n (2115)

where the minus sign enters due to the use of E instead of Wext (and it makes sense physicallyif node a is displaced along the positive n direction the spring is stretched and hence the forceon node a must be acting in the opposite direction since the spring is pulling node a back)

The spring is an example where the external force vector does indeed depend on the nodaldisplacement ua The associated tangent stiffness matrix has the only non-zero component(sub)matrix T aaext and in general

T abext =partF a

ext

partub= minusknotimesn δab = const (2116)

mdashmdashmdashmdash

102

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 213 Linear spring undergoing large deformations

For comparison if the linear elastic spring from the previous example undergoes large defor-mations then the elastic energy in the spring ndash accounting for the nonlinear exact change inlength of the spring ndash is

E = k2( ∣xa +ua minusx0∣ minus ∣xa minusx0∣ )

2

(2117)

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 ie its anchor point and xa + ua with displacement ua is thedeformed position of node a (so that xa minus x0 is the undeformed spring length) External forcevector and stiffness matrix follow as before by differentiation

mdashmdashmdashmdash

Example 214 Pressure in linearized kinematics

A uniform pressure p is a common boundary condition in engineering applications (from pressurevessels to structures under snow loads etc) In this case the pressure p acting on a surface partΩwithin linearized kinematics results in tractions t = minuspn where n is the outward surface normal(with ∣n∣ = 1) Such a boundary condition is realized rather easily via (214) Specifically for asingle element surface partΩe with outward normal n the work done by a uniform pressure p is

Wexte = intpartΩe

t sdotuhdS = intpartΩe

(minusp)n sdotn

suma=1

uaeNae dS = minusp

n

suma=1

uae sdot intpartΩe

nNae dS (2118)

and the external force contribution from element e (associated with node a) follows as

F aexte =

partWexte

partuae= minuspint

partΩenNa

e dS (2119)

For example for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edgesare straight so that the normal n is constant along each element edge Further assume thatpressure p acts only on one edge partΩprime

e of length Le (and an out-of-plane thickness t) In thisspecial case the above simplifies to

F aext = minuspint

partΩprimee

nNae dS = minuspn

2intpartΩprime

e

Nae dS = minuspLet

2n (2120)

where we exploited that the shape function Na (varying linearly between 0 and 1 on the edgeif a is a node on the edge) integrates to 12 The total external force on node a due to pressureagain follows from summing over all element contributions so

F aext = sum

eisinNa

pLet

2(minusne) (2121)

where we need to sum over all elements adjacent to node a (here denoted by the set Na)pLet2 is nothing but the magnitude of the resultant force due to the uniform pressure p overthe element edge of length Le which is evenly distributed to the two nodes on that edge Notethat each edge has its own surface normal ne so that the above implies the net effect summedover all adjacent elements to node a One such example is shown in the rightmost graphicabove

We close by noting that the external forces are constant only because of the assumption ofsmall deformations If we considered large deformations then the force on the element edge

103

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

would change with deformation (as the surface area increases due to deformation so doesthe resultant force due to a uniform pressure) Therefore the finite-deformation scenario isconsiderably more complex and the work done by a constant external pressure acting on abody of deformed volume v = v(U) is Wext = pv

mdashmdashmdashmdash

Example 215 Linearly and quadratically varying surface tractions

In case of a linearly varying surface traction t(x) acting on the edge of an element e thecorresponding nodal forces can be obtained form the above equations Assume eg a (bi-)linear element in 2D (such as the CST or Q4) with straight edges for which a linearly varyingpressure p(x) (which varies between pa and pb see below) applied to an edge of length Le (andout-of-plane thickness t) translates into the two nodal forces

(Faexte

F bexte) = Let

6(2 1

1 2)(p

a

pb) (2122)

Similarly having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadraticelement (such as the LST Q8 Q9) leads to the equivalent nodal forces

⎛⎜⎝

F aexte

F bexte

F cexte

⎞⎟⎠= Let

30

⎛⎜⎝

4 2 minus12 16 2minus1 2 4

⎞⎟⎠

⎛⎜⎝

pa

pb

pc

⎞⎟⎠ (2123)

We note that of course one can also apply higher-order tractions to lower-order elements (ega quadratically varying load to a linearly interpolated edge) In this case however the workdone Wext is approximated by the FE discretization In the above two examples (which areshown schematically below) the equivalence is exact

pa

Le Le

a F

pb

a

bb F

pa

LeLe

a F

pc

a

bb F

c

pb

c F

linearly varying pressureon a linear element edge

quadratically varying pressureon a quadratic element edge

For more complex element types or more complex loading integration over the element edgeor surface can again be carried out using numerical quadrature on the element boundary (eachelement boundary normal ne is computed from the nodal locations) Again forces and stiffnessmatrix follow by differentiation (forces are constant and the stiffness matrix vanishes)

104

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

212 Dirichlet boundary conditions

Essential boundary conditions of the type uai = uai must be imposed onto the system of equationsFint(U) = Fext This is usually accomplished computationally in one of the two ways discussedin the following9 We here limit our discussion to linear elastic examples we will later reconsiderthe procedure for nonlinear systems when discussing iterative solvers in Section 213

2121 Substitution

Brute-force substitution is a simple method (which we already used in in Exercise 4) wereplace the respective equation for uai in the system KU = Fext by uai = uai eg if we wantu3 = u3 (using an example with only a single dof per node) then we replace the correspondingequation (ie the entries in the stiffness matrix and external force vector) resulting in

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 sdot sdotsdot sdot sdot sdot sdot0 0 1 0 0sdot sdot sdot sdot sdotsdot sdot sdot sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

u3

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

(2125)

2122 Condensation

The substitution method discussed above is simple to implement However it can be quiteexpensive computationally since the number of equations remains the same when imposingessential boundary conditions (this becomes a concern when a significant fraction of the dofsis constraint by essential boundary conditions) The condensation method removes from thelinear system to be solved those equations imposing essential boundary conditions

To understand this let us rewrite the above system of equations (2125) by moving the thirdcolumn to the right-hand side and inserting u3 = u3

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 0 K14 sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

F 3ext

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

minus

⎛⎜⎜⎜⎜⎜⎜⎝

K13

K23

K33

K43

K53

⎞⎟⎟⎟⎟⎟⎟⎠

u3 (2126)

so that we can eliminate the third row and column from the system

⎛⎜⎜⎜⎝

K11 K12 K14 sdotsdot sdot sdot sdotsdot sdot sdot sdotsdot sdot sdot K55

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

u1

u2

u4

u5

⎞⎟⎟⎟⎠=⎛⎜⎜⎜⎝

F 1ext

F 2ext

F 4ext

F 5ext

⎞⎟⎟⎟⎠minus⎛⎜⎜⎜⎝

K13

K23

K43

K53

⎞⎟⎟⎟⎠u3 (2127)

9We mention that similar techniques can also be employed to impose more complex conditions such as con-straints of the general type

f(uaub ) = 0 (2124)

which become important eg when enforcing rigid links between nodes (∣xa+uaminus(xb+ub)∣ = const) or systemsof bodies including rigid bodies (ie rigid links plus rigid angles) or imposing deformationmotion of a nodealong an inclined surfaces (ua = uan with fixed known unit vector n) Such constraints can be implemented ina similar fashion but are not discussed here further (we refer to the rich FEM literature)

105

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which we must solve for the unknowns (u1 u2 u4 u5) so that U = (u1 u2 u3 u4 u5)T

The clear advantage of this method is the reduction in size of the system to be solved Thedisadvantage is that it is computationally more involved (indeed it can be even more expensivethan the substitution technique when a small number of essential boundary conditions must beapplied to a large system)

x1

x2

x3

e1

e2

e3

+

x

paraW

u( p

P

g

paraWe

au p

P

g

x)

paraWe

au

1F

2F

3F

1P

2P

continuous BVP FE-discretized body FE-discretized BVP

213 A note on Dirichlet boundary conditions in iterative solvers

We would like to briefly re-assess the enforcement of Dirichlet boundary conditions in the contextof iterative solvers where we do not solve a simple linear system but we use iterative techniquesto solve a nonlinear system in incremental linear steps In order to impose uai = uai we discusstwo implementation strategies

Strategy I To impose uai = uai we can include this Dirichlet boundary condition directly in theinitial guess (ie make sure that uai = uai within vector U) and subsequently iterate accordingto

Un+1 = Un +∆Un (2128)

where the system of equations is modified such that ∆uain = 0 for all iterative steps n Thelatter can be accomplished in the same fashion as we imposed essential boundary conditionsearlier For example when using a Newton-Raphson solver we must solve

T (Un)∆Un = minusf(Un) (2129)

where we now modify the row of the tangent stiffness matrix T (Un) and right-hand-side vectorf(Un) such that ∆uain = 0 is enforced (see Section 212)

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 212) itcomes with one disadvantages when we enforce the boundary condition uai = uai directly in theinitial guess U0 (while using eg the solution from a previous load step as the initial guessfor all remaining dofs in U0) the resulting initial guess U0 may include a rather strong localdeformation 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 nonlinearproblems

Strategy II As a remedy to the above problems we may alternatively choose to not set uai = uaiin the initial guess and simply chose U0 as eg the solution from the previous load step (or

106

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

any other more or less sophisticated guess) In subsequent iterations we then solve

T (Un)∆Un = minusf(Un) (2130)

where we modify both T (Un) and f(Un) to enforce

∆uain = uai minus uain (2131)

so that the incremental update at iteration step n

Un+1 = Un +∆Un rArr uain+1 = uain +∆uain = uain + (uai minus uain) = uai (2132)

imposes uai = uai in a more natural incremental fashion without modifying the initial guess

214 Rigid body motion

For the linear elastic case the stiffness matrix K (and in the general nonlinear case the tan-gent matrix T ) has as many zero eigenvalues as it has rigid-body modes or zero-energymodes Ulowast This can easily be understood by recalling that the total potential energy of theFE-discretized body with global stiffness matrix K and in the absence of any external forcesreads

I = 1

2U sdotKU (2133)

If a particular global vector of the nodal displacements Ulowast ne 0 corresponds to rigid-bodymotion (ie 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 energyConsequently we must have

Ulowast sdotKUlowast = 0 (2134)

This in turn implies that Ulowast is an eigenvector of K with a corresponding zero eigenvalue(KUlowast = 0 which we also understand physically since rigid-body modes cause no nodal forcesso Fint = KUlowast = 0) Hence K has (at least) one zero eigenvalue and is thus not invertibleSince this holds true for each rigid-body mode Ulowast K has as many zero eigenvalues as rigidbody modes If such rigid-body modes exist then no unique solution can be found since bothU and U + Ulowast could be a solution (since K(U + Ulowast) = KU +KUlowast = KU = Fext) Thismanifests in K not being invertible so trying to find U =Kminus1Fext fails We saw this problemarise in Example 112

Therefore we must suppress each rigid body mode via appropriate essential boundary conditionsbefore solving a boundary value problem In 2D we need three essential boundary conditionsto suppress rigid-body translations and rotations in 3D we need a total of six (assuming thatnodes carry only displacement dofs) as shown below

107

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

rigid-body modes in 2D

rigid-body modes in 3D

We close by mentioning that when considering large nonlinear deformation mechanisms instructures may also constitute zero-energy modes (eg a pinned-pinned buckled beam has twostable equilibria and the displacement from one to the other is a so-called mechanism ie azero-energy body which is not rigid-body motion)

Finally if nodes carry further dofs beyond displacements (eg in case of beam elements orcoupled problems) the situation must be reassessed to make sure all possible rigid modes aresuppressed

108

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

22 Dynamics

Our discussion of mechanical boundary value problems so far has been limited to quasistaticsThe term quasistatics refers to the assumption of negligible inertial effects This does notnecessary 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 ofthe type σ = σ(ε ε) which clearly depend on the loading rate and hence on time irrespectiveof 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 eg vibrationsThis is intimately tied the boundary conditions of a problem and creates an initial boundaryvalue problem Static loading is generally time-independent Dynamic loads are time-dependentones for which inertial effects are not negligible Quasistatic loading is time-dependent but issufficiently slow such that inertial effects can be safely ignored

Here we will consider the extension of the mechanical boundary value problem discussed pre-viously to dynamic problems where inertial effects matter In an extension of the (quasi-)staticversion of Section 8 the strong form of the dynamic problem in linearized kinematics reads

⎡⎢⎢⎢⎢⎢⎢⎣

σijj + ρ bi = ρ ui in Ω

ui(x t) = ui(x t) on partΩD

σijnj(x t) = t(x t) on partΩN

(221)

with suitable initial conditions Now we have u ∶ ΩtimesRrarr Rd (ie the displacement field u(x t)varies with position x isin Ω and time t isin R) and it requires sufficient differentiability in bothspace and time Notice that the quasistatic case is easily recovered by neglecting the inertialterm ρu ie if the mass density ρ or the acceleration a(x t) = u(x t) vanish

Analogous to the quasistatic case we can cast the above strong form into a variational structureby making use of the so-called action principle To this end we define the action

A[u] = intt2

t1L[u]dt (222)

with the Lagrangian

L[u] = T [u] minus I[u] (223)

where I is the potential energy functional introduced in Section 6 and T denotes the kineticenergy functional

T [u] = intΩ

ρ

2∣u∣2 dV (224)

For a variational material model with energy density W and assuming that body forces ρb andsurface tractions t are imposed we thus arrive at the action

A[u] = intt2

t1[int

Ω(ρ

2∣u∣2 minusW (ε)) dV + int

Ωρb sdotu dV + int

partΩNt sdotu dS] dt (225)

The action principle (also known as the principle of stationary action10) states that thesolution u(x t) renders A stationary under suitable initial conditions ie

u = arg statA[u] ∶ st ICs (226)

10Various references call this dynamic variational principle the ldquoprinciple of least actionrdquo which is in generalnot correct since the solution must not necessarily be a minimizer of A it is merely guaranteed to be a stationarypoint

109

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This condition is analogous to the minimization of the total potential energy we used so far inthe quasistatic context Here we no longer minimize the total potential energy but we renderthe total action stationary with respect to the displacement field

Taking the first variation of the action A with respect to u (again using the divergence on thestress-term as done in quasistatic) we obtain the stationarity condition

δA[u] = intt2

t1[int

Ω(ρ ui δui minus σijδuij) dV + int

Ωρbiδui dV + int

partΩNtiδuidS] dt = 0 (227)

The dynamic weak form is thus given by

G[uv] = intt2

t1[int

Ω(ρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (228)

Let us for simplicity of the derivation assume that instead of giving two initial conditionsper point (eg imposing initial displacements and velocities) we seek a stationary solutionu(x t) which satisfies the conditions u(x t1) = u1(x) and u(x t2) = u2(x) (ie we assume thedisplacements are known at the initial and final times t1 and t2 respectively) Of course thisis hardly ever the case in reality ndash and the derived concepts apply equally to the case of knowninitial displacements and velocities yet this assumption simplifies our derivation significantly

The above weak form indicates the space of solutions and it particularly lets us conclude that

v isin U0 = v isinH1(Ω) timesH1(R) ∶ v = 0 on partΩD and at t = t1 or t = t2 (229)

where the last two conditions stem from our assumption of u(x t1) = u1(x) and u(x t2) =u2(x) being known

To remove the time derivative v we integrate by parts in time (the ldquoboundary termrdquo vanishessince v = 0 at t = t1 and t = t2)

G[uv] = minusintt2

t1[int

Ω(ρ uivi + σijvij) dV minus int

Ωρbivi dV minus int

partΩNtividS] dt = 0 (2210)

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

Since in the dynamic problem the displacement field depends on time we here introduce a semi-discretization ie we discretize the solution in space but not (yet) in time This implies thatwe introduce shape functions for the interpolation in space where ndash now ndash the nodal unknownsua become functions of time

uh(x t) =n

suma=1

ua(t)Na(x) and vh(x t) =n

suma=1

va(t)Na(x) (2211)

This also allows us to calculate time derivatives eg the approximate velocity and accelerationfields

uh(x t) =n

suma=1

ua(t)Na(x) and uh(x t) =n

suma=1

ua(t)Na(x) (2212)

Insertion into (2210) results in the semi-discrete weak form

G[uhvh] = minusintt2

t1

n

sumb=1

vbi [n

suma=1

uai intΩρNaN bdV + int

ΩσijN

bj dV

minusintΩρbiN

b dV minus intpartΩN

tiNbdS] dt = 0

(2213)

110

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which must hold for all vb(t) histories that vanish at t1 and t2 Because it must hold for allvb(t) histories we may conclude that the term in brackets must vanish vor all b = 1 n andi = 1 d (n being the number of nodes d the number of dimensions) These n times d equationsare discretized equations of motion

Analogous to before we collect all (now time-dependent) nodal dofs in the vector

U(t) = u1(t) un(t) (2214)

so that solving (2213) for all vb(t) is equivalent to solving the equation of motion

MU +Fint(U) minusFext(t) = 0 (2215)

with

Mabij = δij int

ΩρNaN bdV F binti = int

ΩσijN

bj dV F bexti = int

ΩρbiN

b dV +intpartΩN

tiNbdS

(2216)

Matrix M is called the consistent mass matrix and we write Fext = Fext(t) to indicate thatexternal forces are likely to depend on time (and they may also depend on displacements asdiscussed before)

Example 221 Consistent mass matrix of the 2-node bar element

The consistent mass matrix for a 2-node bar element (using theisoparametric formulation) is computed from its shape functions

N1(ξ) = 1 minus ξ2

N2(ξ) = 1 + ξ2

with ξ isin [minus11] (2217)

1 21

u 2ux

Specifically we have (with the total bar element mass me = ρALe)

Mab = intΩρNaN bdV = int

1

minus1ρNaN bA

Le2

dξ rArr Mbar1D = me

6(2 1

1 2) (2218)

Note that this is the consistent mass matrix for 1D motion ieU = (u1 u2)T If each node moves in 2D and hence has two dofsper node in the plane ie U = (u1

1 u12 u

21 u

22)T then each pair of

dofs (horizontal and vertical) is linked by the above mass matrixso that the total consistent mass matrix in 2D becomes

1 22u

x

1u1

1u

1u2u

1

2

2u

Mbar2D = me

6

⎛⎜⎜⎜⎝

2 0 1 00 0 0 01 0 2 00 0 0 0

⎞⎟⎟⎟⎠+ me

6

⎛⎜⎜⎜⎝

0 0 0 00 2 0 10 0 0 00 1 0 2

⎞⎟⎟⎟⎠= me

6

⎛⎜⎜⎜⎝

2 0 1 00 2 0 11 0 2 00 1 0 2

⎞⎟⎟⎟⎠ (2219)

mdashmdashmdashmdash

Example 222 Consistent mass matrix of the CST element

The consistent mass matrix of the constant-strain triangular element is computed analogouslyby integration of the shape functions Again starting with a single dof per node ie U =(u1 u2 u3)T the consistent mass matrix is obtained as (with element area Ae thickness te)

MCST1D = me

12

⎛⎜⎝

2 1 11 2 11 1 2

⎞⎟⎠

with me = ρAete (2220)

111

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The extension to 2D motion with dofs U = (u11 u

12 u

21 u

22 u

31 u

32)T follows from apply in the 1D

mass matrix to the horizontal and vertical dofs independently leading to

MCST2D = me

12

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

2 0 1 0 1 00 2 0 1 0 11 0 2 0 1 00 1 0 2 0 11 0 1 0 2 00 1 0 1 0 2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

with me = ρAete (2221)

mdashmdashmdashmdash

For all other elements the consistent mass matrix can be evaluated analogously or computedby numerical quadrature

Mab1D = int

ΩeρNaN bdV asymp

nQPminus1

sumk=0

WkρNa(ξk)N b(ξk)J(ξk) (2222)

We note that irrespective of the element type the (approximate) kinetic energy of an elementis computed as follows

T = intΩ

ρ

2∥uh∥2

dV = intΩ

ρ

2

n

suma=1

uaNa sdotn

sumb=1

ubN bdV = 1

2

n

suma=1

n

sumb=1

ua sdot ubintΩρNaN bdV (2223)

which can be conveniently recast into

T = 1

2U sdotM U (2224)

From the above examples we observe that the consistent mass matrix leads to a dynamiccoupling between the dofs ie the consistent mass matrix is not diagonal but includes significantoff-diagonal terms From a numerical perspective this is rather inconvenient as it may requireinverting M (as will be discussed soon) Therefore one often resorts to the so-called lumpedmass matrix which is an approximation that is diagonal

One such approach is the so-called particle-mass lumping which aims toevenly distribute the element mass me among its nodes and therefore simplyassumes that for an arbitrary element having ne nodes with d dofs per nodeMlumped isin Rnedtimesned is given by

Mlumpede =me

neI (2225)

m 2e m 2e

m 3e m 3e

m 3e

Example 223 Lumped mass matrix of the 2-node bar element

For example by using particle-mass lumping for a 2-node bar element one distributes the massme evenly to the two nodes resulting in

Mlumped1De =me

2(1 0

0 1) Mlumped2De =

me

2

⎛⎜⎜⎜⎝

1 0 0 00 1 0 00 0 1 00 0 0 1

⎞⎟⎟⎟⎠ (2226)

112

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that a comparison of the kinetic energies (eg in 1D) reveals

Tlumped =1

2Ue sdotMlumpedeUe =

me

4[(u1

e)2 + (u2e)2] (2227)

and

Tconsistent =1

2Ue sdotMconsistenteUe =

me

6[(u1

e)2 + (u2e)2 + u1

eu2e] (2228)

Hence using the lumped mass matrix implies an approximation of the kinetic energy (which isgenerally not exact)

mdashmdashmdashmdash

If defined properly then the solutions obtained from using either the consistent or lumpedmass matrix in the finite element context converge under h-refinement (As the element sizedecreases the differences between the two formulations also decrease so that in the limit ofinfinitely 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 matrixboth at the element and at the global level As a consequence all assembly operationsintroduced 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 androtational inertia must be considered (which is not discussed here in detail and no uniquesolution exists for the lumped mass matrix but various proposed approximations can be used ndashwhich either approximate the kinetic energy or the mass moments of inertia of the beam)

113

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

23 Vibrations

As shown in the previous section treating the dynamic mechanical problem in linearized kine-matics by the finite element method leads to the semi-discretized equations of motion

M U +Fint(U) = Fext(t) (231)

which are to be solved for the time-dependent vector of nodal dofs U = U(t) This solution isusually obtained in one of two ways we either solve for a time-continuous solution U(t) or wediscretize not only in space but also in time and introduce finite differences in time to solve forUα = U(tα) at discrete intervals tα = α∆t Time-continuous solutions in analytical form canusually be found only for special cases ndash vibrations are one such case discussed in the following

For our purposes vibrations are small-amplitude oscillations about a stable equilibrium con-figuration If a body is freely vibrating without any external excitation we speak of free vibra-tions otherwise (eg if harmonic forces or displacement boundary conditions are applied) weconsider forced vibrations In both cases we assume small amplitudes which leads to linearwaves and we consider oscillations about a stable equilibrium defined by nodal displacementsU0 (eg the undeformed configuration U0 = 0 is one such stable equilibrium)

231 Free undamped vibrations

Starting with the general nonlinear equations of motion (231) we linearize about a stableequilibrium configuration U0 with constant external forces Fext(t) = Fext = const such that thestatic equilibrium satisfies

Fint(U0) = Fext (232)

Next consider a small time-varying perturbation V (t) such that insertion of

U(t) = U0 +V (t) rArr U(t) = V (t) (233)

into the equations of motion leads to

MV +Fint(U0 +V ) = Fext (234)

Expanding the above for small ∣V ∣ ≪ ∣U0∣ to leading order gives

MV +Fint(U0) +partFint

partU(U0)V + hot = Fext (235)

or invoking equilibrium (232) and dropping all higher-order terms

MV + T (U0)V = 0 (236)

When considering free vibrations about the undeformed configuration of an elastic body theabove reduces to

MU +KU = 0 (237)

In general the form of the linearized equations of motion for free vibrations without externalforcing and without damping is

MU + TU = 0 (238)

114

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The general type of solution of the above ODE is of the harmonic form11

U = Ulowast exp(iωt) with ω isin R Ulowast isin Cdn (239)

Insertion into (238) leads to (exploiting that the equation must hold for all times t)

(T minus ω2M) U = 0 (2310)

which is an eigenvalue problem to be solved for the unknown ω isin R known as the eigen-frequency and the corresponding eigenvector U isin R known as the associated eigenmodeWe point out that M is positive-definite by definition (both for the consistent and lumpedmass matrix) and T = part2IpartU2(U0) is also positive-semi-definite because it is the tangent stiff-ness matrix associated with a stable equilibrium U0 As a consequence Mminus1T has only realeigenvalues ω determined from

det (T minus ω2M) = 0 (2311)

Further Ulowast = U isin Rnd is also real-valued (which is why we omitted the asterisk in (2310))Finally if ω is a solution of (2310) then so is minusω Since the sign if of minor importance herewe only consider the positive frequencies

For a FE discretization with ntimes d degrees of freedom (n nodes in d dimensions) the eigenvalueproblem (2310) has n times d eigenfrequencies ωj and associated eigenmodes Uj It is commonconvention to label the eigenfrequencies (and associated modes) in ascending order

0 le ω0 le ω1 le le ωntimesdminus1 (2312)

Recall that each rigid-body mode of the FE problem corresponds to a zero eigenfrequencyTherefore a 2D (3D) free vibration problem without essential BCs to suppress rigid-bodymotion has three (six) zero eigenfrequencies When all zero-energy modes have been removedthe lowest non-zero eigenfrequency is known as the natural frequency

Due to the linear nature of the ODE system the complete solution to the free-vibrationproblem is a superposition of the type

U(t) =ntimesd

sumj=1

clowastj Uj exp(iωjt) clowastj isin C for j = 1 n times d (2313)

for whose coefficients clowastj we must solve for a given set of initial conditions Recall that for amechanical initial boundary value problem we have two initial conditions per node and perdegree of freedom (eg imposing an initial displacement and velocity vector for each node)This provides the 2timesntimesd equations from which the coefficients clowastj isin C can be found (since thoseare complex we have in fact 2 times n times d unknowns viz the real and imaginary parts of each ofthe ntimesd coefficients) Roughly speaking free vibrations are characterized by the superpositionof vibrations at all eigenfrequencies with their respective eigenmodes

Example 231 Free vibration of a bar

Let us study the example of a freely vibrating linear elastic 2-node bar which we use to assessthe influence of the different types of mass matrices Consider a 2-node bar element with only

11The solution can alternatively be written in terms of trigonometric functions We here use the exponentialformulation U = Ulowast exp(iωt) for notational simplicity which by Eulerrsquos identity exp(iωt) = cos(ωt) + i sin(ωt)can be transformed into trigonometric solutions to obtain U = U1 cos(ωt) + U2 sin(ωt) To avoid confusion weuse the asterix lowast here and in the following to denote complex-valued variables

115

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

axial displacements in 1D so that each node has only a single dof ua The mass matrices andthe stiffness matrix for this case were derived previously as

Mconsistent =m

6(2 1

1 2) Mlumped =

m

2(1 0

0 1) K = EA

L( 1 minus1minus1 1

) (2314)

For each of the two mass matrices we compute the two eigenfrequencies and eigenmodes bysolving the eigenvalue problem

(K minus ω2M)U = 0 rArr det (K minus ω2M) = 0 (2315)

Insertion of the stiffness and consistent mass matrix results in the two solutions

ωconsistent0 = 0 ωconsistent

1 =radic

12EA

mL= 2

radic3

radicEA

mLasymp 3464

radicEA

mL (2316)

The corresponding eigenvectors follow from insertion of the eigen-frequencies into the eigenvalue problem giving

U consistent0 = (1

1) U consistent

1 = ( 1minus1

) (2317)

1 2

1 2

U0

U1

As expected we have one zero eigenfrequency associated with rigid body translation and onenon-zero eigenfrequency

When repeating the above procedure with the lumped mass matrix we instead obtain

ωlumped0 = 0 ωlumped

1 = 2

radicEA

mL (2318)

and

U lumped0 = (1

1) U lumped

1 = ( 1minus1

) (2319)

Hence the two cases yield the same eigenmodes U0 and U1 but they differ significantly in thefundamental frequency ωconsistent

1 vs ωlumped1

For comparison let us compute the exact solution by studying the free vibration of a continuoushomogeneous linear elastic bar Linear momentum balance ie

Euxx = ρu (2320)

admits the separable solution

u(x t) = u(x) exp(iωt) rArr Euxx(x) = minusω2ρ u(x) (2321)

Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L so that

ux(0) = ux(L) rArr u(x) = A cos(nπxL

) (2322)

with an integer n isin Z and a constant A isin R Insertion into (2320) leads to

minusE (nπL

)2

= minusω2ρ rArr ωn = nπradic

EA

mL (2323)

116

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the lowest two eigenfrequencies are obtained as

ω0 = 0 ω1 = πradic

EA

mL (2324)

Comparison with the above two approximate formulations reveals that

ωlumped1 le ω1 le ωconsistent

1 (2325)

mdashmdashmdashmdash

We can generalize the above observation to vibrational problems (here without proof) Theeigenfrequencies obtained from the consistent mass matrix generally over-estimate theeigenfrequencies while the lumped mass matrix usually provides under-estimates of theeigenfrequencies (the latter is not rigorous though since it depends on the choice of the lumpedmass matrix)

232 Forced vibrations

As defined above forced vibrations result from small-amplitude harmonic excitation of astructure We again start with the linearized governing equations

MU + TU = Fext(t) (2326)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext(t) = Fext cos(Ωt) (2327)

with an excitation frequency Ω isin R and an amplitude vector Fext isin Rdn (2326) showsthat the solution vector generally consists of a homogeneous solution and a particular solutionaccording to

U(t) = Uhom(t) +Upart(t) = Uhom(t) + U cos(Ωt) where U isin Rdn (2328)

The homogeneous solution corresponds to a free vibration (see Section 231) and is usuallyof little interest (any realistic system has a minimum amount of damping which makes thehomogeneous solution of a free vibration decay over time while the particular solution of theforced vibration assumes a steady state) Insertion of the particular solution into (2326) gives

(minusΩ2M + T ) U = Fext (2329)

which is a linear system of equations to be solved for the displacement amplitude vector U Specifically if

det (minusΩ2M + T ) ne 0 hArr Ω is not an eigenfrequency of the system (2330)

then

U = (minusΩ2M + T )minus1Fext rArr Upart(t) = (minusΩ2M + T )minus1

Fext cos(Ωt) (2331)

Hence the system responds to a harmonic excitation ndash at steady state ndash with a harmonicvibration at the excitation frequency As the excitation frequency approaches an eigenfrequency(Ω rarr ωj) the above matrix becomes singular and the displacement amplitude vector U tendsto infinity (this is characteristic of resonant effects)

117

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

233 Modal decomposition

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations thentime-continuous solutions are usually hard to find and one may resort to finite-difference schemes(as discussed next in Section 24) Alternatively one may find time-continuous solutions by themethod of modal decomposition which is based on the above eigenfrequency analysis

The starting point of the concept of modal decomposition is to express the unknown time historyof the vector of nodal dofs through a carefully chosen basis viz

U(t) =ntimesd

sumi=1

zi(t) Ui (2332)

where we use the (somehow normalized) eigenvectors Ui 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 ndash for which to understand we need toinclude a somewhat longer derivation By considering the eigenvalue problem for two distincteigenmodeseigenfrequencies i and j we may write

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0

(T minus ω2jM) Uj = 0 rArr Ui sdot (T minus ω2

jM) Uj = 0(2333)

where we pre-multiplied each of the two equations by the respective other eigenvector Sub-traction of the two equations (using that T is by definition symmetric) results in

(ω2i minus ω2

j ) Ui sdotM Uj = 0 hArr ωi = ωj or Ui sdotM Uj = 0 (2334)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ui sdotM Uj If weassume that we have only distinct eigenfrequencies12 then we may conclude that

Ui sdotM Uj = 0 if i ne j (2335)

We can normalize the eigenvectors in the following fashion

Ui larrUiradic

Ui sdotM UirArr Ui sdotM Ui = 1 (2336)

so that overall

Ui sdotM Uj = δij (2337)

Next if we start with

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0 (2338)

then we may also conclude that by invoking (2337)

Uj sdot T Ui = 0 if i ne j (2339)

12Theoretically we may surely have repeated eigenvalues and hence duplicated eigenfrequencies However anumerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (andrigid-body modes are usually removed unless the simulated response requires rigid-body motion) In case of anyduplicated eigenfrequencies one could still introduce eg Gram-Schmid orthonormalization to produce a set ofeigenmodes that do satisfy the below condition

118

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly by pre-multiplying by the respective same eigenvector ie

Ui sdot (T minus ω2iM) Ui = 0 (2340)

we solve for ω2i and obtain Rayleighrsquos quotient which here simplifies due to the normalization

(no summation over i implied)

ω2i =

U(i) sdot T U(i)

U(i) sdotMU(i)

= U(i) sdot T U(i) rArr Ui sdot T Uj =⎧⎪⎪⎨⎪⎪⎩

ω2i if i = j

0 else(2341)

Let us now return to the modal decomposition of a linearized elastic system using the Fourierrepresentation

U(t) =ntimesd

sumi=1

zi(t) Ui (2342)

where U1 Un 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 scalarcoefficients that are continuous functions of time (maintaining the semi -discretization)

We substitute (2342) into the linearized equations of motion with external forces Eq (2326)or MU + TU = Fext so we arrive at

ntimesd

sumi=1

[zi(t)MUi + zi(t)T Ui] = Fext(t) (2343)

Pre-multiplying by Uj gives

ntimesd

sumi=1

[zi(t) Uj sdotMUi + zi(t)Uj sdot T Ui] = Uj sdotFext(t) (2344)

and exploiting the above orthogonality relations leads to

zj(t) + ω2j zj(t) = Uj sdotFext(t) for j = 1 n times d (2345)

This equation is quite remarkable as it is a scalar linear ODE for each unknown function zj(t)Moreover the system of equations for the n times d unknown functions zi(t) (with i = 1 n times d)has decoupled into n times d uncoupled scalar ODEs to be solved independently for the zi(t) Thestrategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes Uj so that thecoefficients and right-hand sides in (2345) are known The resulting system of decoupled linearODEs can relatively inexpensively be solved for the functions zj(t)

For many practical problems only a limited number of modes are important so we may restrictthe representation (2342) to include only the lowest m lt n times d modes (corresponding to the mlowest eigenfrequencies) Therefore significant numerical efficiency can be gained by truncatingthe Fourier sum and only using the m lowest modes which is referred to as order reduction

U(t) =m

sumi=1

zi(t) Ui m lt n times d (2346)

119

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

234 Structural damping

In structural dynamics (ie in the analysis of structures involving bars beams plates etc)one often includes velocity-proportional damping in an approximate average sense by the intro-duction of a damping matrix C such that the equations of motion (2215) become

MU +CU +Fint(U) minusFext(t) = 0 (2347)

This is the higher-dimensional analog to the classical 1D system consisting of masses springsand dashpots as discussed in undergraduate Dynamics The C-matrix serves as the analog ofthe dashpot which provides velocity-proportional damping The most common form of C usedin structural FEA is mass- and stiffness-proportional damping which assumes

C = αM + βK α β isin R+ (2348)

That is C is a combination of the mass and stiffness matrices M and K respectively Thechoice of parameter α ge 0 controls low-frequency vibration attenuation while parameter β ge 0suppresses high-frequency vibrations We skip the detailed derivation here and refer to FEAliterature on structural damping

If damping is included in a problem of free or forced vibrations then the above strategies andrelations ndash in principle ndash still apply As a major difference solutionsU = U(t) will include a timedelay implying that the energy dissipation due to damping results in forces and displacementsnot being ldquoin syncrdquo anymore but the bodyrsquos deformation lagging behind any applied forces thatcause the deformation This is best captured by starting with an ansatz

U(t) = Ulowast exp(iωlowastt) with ωlowast isin C and Ulowast isin Cdn (2349)

solving for the complex valued solutions and finally extracting the displacement solution as thereal part ie U(t) = Re [Ulowast exp(iωlowastt)]

For example for a forced vibration with structural damping we now have

Upart(t) = Re [(minusΩ2M + iΩC + T )minus1Fext] cos(Ωt) (2350)

120

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

24 Time-dependent transient solutions

If the time-dependent solution for the nodal variables U(t) cannot be obtained in a continuousmanner (eg as discussed above for free vibrations or via modal decomposition) then one usu-ally seeks solutions in a time-discretized fashion (eg by using finite-difference approximationsin time) This turns the previously introduced semi -discretization of our fields of interest intoa proper discretization in both space and time

As discussed in Section 3 at the beginning of this course finitedifferences are a convenient technique when the discretization isapplied to a regular grid with uncomplicated boundary conditions(such as when choosing constant time increments ∆t with knowninitial conditions) We here re-use those techniques introduced backin Section 3 for the discretization in time Specifically we define aconstant time increment ∆t gt 0 and seek solutions at discrete timeintervals writing

∆t = tα+1 minus tα ua(tα) = uaα Uα = U(tα) forall α ge 0

and arbitrarily choosing t0 = 0

au

au

au

au

Dt

t

In order to solve the equations of motion we must choose between explicit and implicit inte-gration schemes ndash which come with all the advantages and disadvantages discussed in generalin Section 3 Let us first turn to the simpler case of explicit time integration13

241 Explicit time integration

The most frequent choice ensuring quadratic convergence while maintaining small finite-differencestencils is the use of central-difference approximations in time which turn the nodal velocityand acceleration vectors into respectively

U(tα) = Uα+1 minusUαminus1

2∆t+O(∆t2) U(tα) = U

α+1 minus 2Uα +Uαminus1

(∆t)2+O(∆t2) (241)

Insertion into the equations of motion (2347) (here including damping for completeness anddropping higher-order terms) leads to the time-discretized equations of motion

MUα+1 minus 2Uα +Uαminus1

(∆t)2+CU

α+1 minusUαminus1

2∆t+Fint(Uα) minusFext(tα) = 0 (242)

which can be reorganized into

[ M

(∆t)2+ C

2∆t]Uα+1 = 2M

(∆t)2Uα + [ C

2∆tminus M

(∆t)2]Uαminus1 minusFint (Uα) +Fext(tα) (243)

This is an update rule for Uα+1 resulting in a scheme of explicit time integration (ie vectorUα+1 can be computed directly from the known previous solutions Uα and Uαminus1 We note theabove relation indicates that solving for Uα+1 still requires the solution of a linear system (dueto the matrix in brackets in front of Uα+1) Yet all nonlinearity that is possibly inherent inFint (U) is irrelevant to the solution procedure as the internal forces in (243) depend only onthe previous known solution Uα

13We note that similar concepts can also be applied when the time increment ∆t is not constant or is adaptivelymodified during the course of a simulation However we here restrict our discussion to constant time steps ∆t

121

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Stability generally limits the choice of the time step ∆t in explicit schemes as discussed inSection 3 This also applies to the dynamic FE formulation described above Without proof wemention that stability requires

∆t le ∆tmax =2

ωmax (244)

with ωmax being the highest eigenfrequency of the FE problem (see Section 231) It is importantto realize that the highest eigenfrequency generally scales inversely with the size of the smallestelement in the mesh ie

ωmax prop1

hmin (245)

For example we showed in Example 231 that the fundamental frequency of a two-node barwas of the form ω1 prop 1

L

radicEρ with L being the element size

Despite the explicit scheme being straight-forward to implement and inexpensive to solve atthe time-step level the above stability constraint has unfortunate consequences The maximumallowed time step ∆tmax decreases with decreasing mesh size ie dynamic FE problems thatare already expensive because of high mesh resolution are even more expensive when usingexplicit time integration due to the required small time step size Moreover what matters isthe absolute smallest element size hmin and not the average element size Therefore the smallestelement in a FE mesh generally dictates the critical step size ∆tmax (even if the average elementsize is considerably larger)

242 A reinterpretation of finite differences

Instead of introducing finite-difference schemes in time as discussed above we could alterna-tively introduce interpolations in time analogous to the interpolation in space introduced withinthe FE context based on shape functions and nodal values We here aim to show that such aninterpolation in time is indeed feasible and that in fact the above explicit central-differencediscretization can be re-interpreted as such an interpolation

To start consider a discretization in time which evaluates U at discrete time intervals ∆t andthen uses a quadratic interpolation in time to define U(t) at all times t ge 0 ie we define

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t) for t isin [tα minus ∆t2 t

α + ∆t2 ] (246)

Shape functions Nα(t) interpolate in time and analogous to thespatial discretization of the FE method we define Nα(tβ) = δαβThe resulting quadratic shape functions are

Nα+1(t) = (t minus tα)(t minus tαminus1)2(∆t)2

Nα(t) = (tα+1 minus t)(t minus tαminus1)(∆t)2

and

Nαminus1(t) = (tα+1 minus t)(tα minus t)2(∆t)2

(247) Dt

t

aN

a+1N

a-1N

at +Dt2

at -Dt2

at

a+1t

a-1t

This piecewise-quadratic interpolation with the above range of validity ensures that U(t) istwice differentiable (as needed for the acceleration) It further guarantess that not only is U(t)continuous over time but also

part

parttNα+1(tα minus ∆t

2 ) = 0 andpart

parttNαminus1(tα + ∆t

2 ) = 0 (248)

122

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that U(t) is continuous as well Consequently the acceleration

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t)

= Uα+1

(∆t)2minus 2

(∆t)2+ U

αminus1

(∆t)2= U

α+1 minus 2Uα +Uαminus1

(∆t)2for t isin [tα minus ∆t

2 tα + ∆t

2 ](249)

is piecewise-constant and recovers the second-order central-difference scheme in time cf (241)

The approximate displacement field now discretized in both space and time has become

uh(x t) =n

suma=1

α+1

sumγ=αminus1

uaγNγ(t)Na(x) for t isin [tα minus ∆t2 t

α + ∆t2 ] x isin Ωh (2410)

where uaγ = uh(xa tγ) is the displacement of node a at time tγ The acceleration field followsas the piecewise-constant (in time) approximation

uh(x t) =n

suma=1

uaα+1 minus 2uaα +uaαminus1

(∆t)2Na(x) for t isin [tα minus ∆t

2 tα + ∆t

2 ] x isin Ωh (2411)

Next we must insert the discretization into the weak form (2210) which also requires a choicefor the trial function vh(x t) We can either choose a Bubnov-Galerkin scheme where vh(x t)is discretized in the same fashion as uh(x t) the consequence is that we arrive at an implicitsystem in time to solve for all nodal unknowns (ie one cannot simply march forward in timebut has to solve for the nodal solution at all times at once) Alternatively we may choose aPetrov-Galerkin scheme in time and ndash having in mind that we wish to evaluate informationonly at the discrete time steps ndash define the trial function (assuming nt time steps) as

vh(x t) =n

sumb=1

vb(t)N b(x) =n

sumb=1

nt

sumα=1

vbαN b(x)δ(t minus tα) (2412)

This approximation of collocation type leads to the weak form being reduced to only the discretetime steps When this choice of vh along with uh is inserted into the weak form (2210) ie

G[u v] = intt2

t1[int

Ω(minusρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (2413)

the integration over time reduces the delta functions to the simple form

nt

sumb=1

vbi

⎡⎢⎢⎢⎢⎣int

Ω

⎛⎝minusρuaα+1i minus 2uaαi + uaαminus1

i

(∆t)2NaN b minus σij(εhα)N b

j

⎞⎠

dV

+intΩρbi(tα)N b dV + int

partΩNti(tα)N bdS] = 0

(2414)

for each time step α (0 le tα le nt∆t) and for all admissible choices of vbi The latter implies thatthe above terms in brackets must vanish or that we must have

intΩρNaN b dV

uaα+1i minus 2uaαi + uaαminus1

i

(∆t)2+ int

Ωσij(εhα)N b

j dV

minus intΩρbi(tα)N b dV minus int

partΩNti(tα)N bdS = 0

(2415)

When inserting our definitions of the consistent mass matrix and the internalexternal forcevectors (cf (2216)) the above is equivalent to

MUα+1 minus 2Uα +Uαminus1

(∆t)2+Fint(Uα) minusFext(tα) = 0 (2416)

which was derived above for a second-order finite-difference time discretization see (242) Ofcourse the same procedure can also be applied to other choices of vh which leads to differenttime discretization schemes

123

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

243 Implicit time integration

Following the above explicit schemes we proceed to discuss implicit time integration whichuses the same discretization in time but requires solving a generally nonlinear system of equa-tions for Uα+1 Various techniques exist the most prominent ones of which we summarize inthe following

2431 Newmark-β method

The most popular scheme for mechanical problems is the so-called Newmark-β method (itwas originally developed for problems in structural mechanics in 1959 by Nathan M Newmarkof the University of Illinois at UrbanandashChampaign after whom it was later named)

We start with the mean value theorem which tells as that

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2417)

and analogously

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2418)

Particular schemes now differ by how U(t) is defined during an interval (tα tα+1) so that theabove two equations can be integrated to find U(t) and U(t)

The so-called average acceleration method eg assumes that the acceleration is piecewiseconstant between two time steps and specifically that

U(t) = Uα+1 + Uα

2= const for t isin (tα tα+1) (2419)

Insertion into (2418) along with U(tα) = Uα leads to

U(t) = Uα + (Uα+1 + Uα) t minus tα

2 (2420)

and inserting this into (2417) with U(tα) = Uα gives

U(t) = Uα + Uα(t minus tα) + (Uα+1 + Uα) (t minus tα)2

4 (2421)

Finally evaluating (2420) and (2421) at the new time step α + 1 yields respectively

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + Uα) (∆t)2

4

(2422)

This is apparently an implicit definition of the new velocity and displacement vectors sincethey involve the unknown acceleration Uα+1 at the new time

As an alternative the linear acceleration method assumes a linear interpolation instead of apiecewise-constant one thus starting with

U(t) = Uα + (Uα+1 minus Uα) t minus tα

∆tfor t isin (tα tα+1) (2423)

124

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Carrying out the same substitutions and integrations as above for the average accelerationscheme we here arrive at

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + 2Uα) (∆t)2

6

(2424)

which is yet another implicit definition of the new velocity and displacement vectors

We note that we can also cast our explicit central-difference scheme from before into theabove framework if we assume a piecewise-constant acceleration

U(t) =⎧⎪⎪⎨⎪⎪⎩

Uα for t isin (tα tα+tα+1

2 )Uα+1 for t isin ( tα+tα+1

2 tα+1) (2425)

The Newmark-β method generalizes the above cases into a single framework which definesthe new displacements and velocities as

Uα+1 = Uα +∆t Uα + (∆t)2

2[2β Uα+1 + (1 minus 2β)Uα] (2426a)

Uα+1 = Uα +∆t [γUα+1 + (1 minus γ)Uα] (2426b)

where 0 le β le 1 and 0 le γ le 1 are parameters to be chosen The above schemes are included asspecial cases

β = 14 γ = 1

2 leads to the most popular average acceleration scheme (which turns outto be unconditionally stable and to have no numerical damping)

β = 16 γ = 1

2 is the linear acceleration scheme (which is conditionally stable and showsnumerical damping)

β = 0 γ = 12 recovers the explicit central-difference scheme (241)

As a major benefit of the Newmark schemes for linear structural problems the method canprovide unconditional stability Specifically

γ ge 12 and β ge γ2 guarantees that the method is unconditionally stable

γ ge 12 and β lt γ2 leads to methods being conditionally stable where as discussed before∆tcr prop ωminus1

max

For γ = 12 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-differencemethods introduce artificial numerical damping (see the discussion in Section 42 on phaseerror analysis) Whenever γ gt 12 the Newmark family of methods produces numerical damp-ing The average acceleration scheme (β = 1

4 γ = 12) 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 definitionsof velocities and displacements (2426a) into a form that allows us to perform algorithmic timestepping To this end let us first solve (2426a) for the acceleration at the new time tα+1

Uα+1 = 1

β(∆t)2(Uα+1 minusUα minus∆t Uα) minus 1 minus 2β

2βUα (2427)

125

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Insertion into (2426b) yields

Uα+1 = Uα +∆t(1 minus γ)Uα + γ

β∆t(Uα+1 minusUα +∆t Uα) minus γ∆t

1 minus 2β

2βUα

= (1 minus γβ) Uα + γ

β∆t(Uα+1 minusUα) minus∆t( γ

2βminus 1) Uα

(2428)

Next inserting both velocity (2427) and acceleration (2428) into the equation of motion atthe new time tα+1

MUα+1 +CUα+1 +Fint(Uα+1) minusFext(tα+1) = 0 (2429)

leads ndash after some rearrangement ndash to

( 1

β(∆t)2M + γ

β∆tC)Uα+1 +Fint(Uα+1) minusFext(tα+1)

=M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2430)

The right-hand side of (2430) is fully known as it only involves Uα Uα and Uα from theprevious time step The left-hand side is generally nonlinear and requires an iterative solverunless the problem is linear elastic in which case Fint(Uα+1) =KUα+1 and the above left-handside is linear in Uα+1

Note that the implementation is quite similar to that of the quasistatic problem using eg theNewton-Raphson solver discussed in Section 201 Specifically we now have

f(Uα+1) =MlowastUα+1 +Fint(Uα+1) minusF lowastext(tα+1Uα Uα Uα) = 0 (2431)

where

Mlowast = 1

β(∆t)2M + γ

β∆tC = const (2432)

and

F lowastext(tα+1Uα Uα Uα) = Fext(tα+1) +M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2433)

Note that Mlowast is constant while F lowastext is fully known from the previous time step and the applied

external forces Therefore the problem is quite similar to the quasistatic problem The tangentmatrix used for iterations is

T lowast =Mlowast + T = 1

β(∆t)2M + γ

β∆tC + T (2434)

Boundary conditions can be implemented in the same fashion as for the quasistatic solversdiscussed in Section 213

In the special case of a linear elastic problem the nonlinear system of equations turns into alinear one viz

f(Uα+1) =MlowastUα+1 +KUα+1 minusF lowastext(tα+1Uα Uα Uα) = 0 (2435)

126

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that

Uα+1 = (Mlowast +K)minus1F lowast

ext(tα+1Uα Uα Uα) (2436)

The algorithmic structure is as follows At each time step we solve (2430) for Uα+1 (usingan iterative solver such as Newton-Raphson for nonlinear problems) based on the informationfrom the previous time step Uα Uα and Uα along with information about the applied externalforces Fext(tα+1) This implies we must store vectors Uα Uα and Uα after each converged timestep Once the new solution Uα+1 has been found we compute Uα+1 from (2427) and Uα+1

from (2428) store all of those vectors and move on to the next time step

244 HHT-α method

The HHT method (also known as the HHT-α method) is a modification of the above implicitNewmark scheme It is named after its inventors Hilber Hughes and Taylor and has gainedpopularity in commercial codes The idea is to use the same Newmark relations (2426a) and(2426b) but to modify the equations of motion into which they are inserted viz assuming

MUα+1 +C [(1 minus α)Uα+1 + α Uα] + (1 minus α)Fint(Uα+1) + αFint(Uα)= (1 minus α)Fext(tα+1) + αFext(tα)

(2437)

with a newly introduced parameter α (using the overline to avoid confusion with our timestep α) α = 0 recovers the Newmark-β scheme If one chooses

0 le α le 1

3 β = (1 + α)2

4 γ = 1

2+ α (2438)

then the HHT method is unconditionally stable and at least second-order accurate Increas-ing α decreases the simulated displacements at high frequencies (thus removing high-frequencynoise from simulated dynamics problems) which can be beneficial in structural dynamics

245 Use of mass matrices

Let us close this section by discussing the use of consistent vs lumped mass matrices in thecontext of explicitimplicit time stepping Recall that for free vibrations we had observedthat the consistent mass matrix generally overpredicts eigenfrequencies while the lumped massmatrix tends to underpredict those Unfortunately we do not have the time here but we coulddo a careful phase error analysis for the explicit and implicit time-stepping schemes derivedabove (recall that we discussed phase error analysis in the context of finite differences see Sec-tion 42) The outcome is that implicit schemes generally introduce numerical error in the formof so-called period elongation ie using implicit schemes like the average-acceleration one(although having no numerical damping) leads to vibrational frequencies being underestimatedHence combining implicit schemes with consistent mass matrices compensates for the errorsintroduced by the two Likewise explicit schemes like the central-difference one tend to exhibitperiod contraction hence compensating for the error introduced by lumped mass matricesThis shows that it is therefore recommended to use

explicit schemes with lumped mass matrices

implicit schemes with consistent mass matrices

This choice is also computationally beneficial lumped mass matrices may allow for solving theexplicit update rule (243) without the need for iterations whereas consistent mass matricescan be conveniently used in the implicit update rule (2430) where a system of equations mustbe solved anyways

127

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

25 Extensions

Many of the finite element tools we have discussed so far (from discretization principles andfunction spaces to elements types and quadrature rules and beyond) apply not only to theframework of small-strain mechanics problems but they extend to a much broader contextwhere they may be conveniently used In this section let us briefly summarize two extensionsof the theory developed so far towards common engineering applications

251 Finite kinematics

When going beyond small strains we need to work with a theory of large (finite) strains whichis commonly referred to as finite kinematics Classical examples are the simulation of rubberymaterials or of biological tissues which generally undergo large strains Here we do not onlyneed to introduce more complex constitutive laws (going well beyond linear elasticity) but wemust 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 strainsHere one typically introduces a deformation mapping of the type

ϕ(X t) ∶ Ω timesRrarr Rd such that x = ϕ(X t) (251)

which assignes to each undeformed point X isin Ω in the undeformed body Ω a point x isin ϕ(Ω)within the deformed body ϕ(Ω) For simplicity we assume that the two points are linked inthe same fashion as in small strains meaning we define a displacement field u ∶ Ω timesR rarr Rdsuch that

x(X t) =X +u(X t) (252)

To describe finite strains inside the deformed body one usually does not resort to ε but insteadintroduces the deformation gradient which is a second-order tensor

F = partx

partXhArr Fij =

partxipartXj

(253)

When inserting the relation (252) we notice that

Fij =partxipartXj

= δij + uij hArr F = I +nablau (254)

This strain measure is frequently used in finite-strain continuum mechanics (besides variousother strain measures that we do not want to introduce here for brevity)

Starting with quasistatics the variational problem in this finite-deformation setting is analogousto the small-strain version The functional of the total potential energy is

I[u] = intΩW (F ) dV minus int

Ωρ0b sdotu dV minus int

partΩNt sdotu dS (255)

where W is still the strain energy density (now depending on F ) ρ0 denotes the mass densityin the undeformed reference configuration (and we integrate over the reference configuration)We seek solutions

u isin U = u isinH1(Ω) ∶ u = u on partΩD such that u = arg min I[u] (256)

128

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The first variation follows as

δI[u] = intΩ

partW

partFijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS

= intΩPijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS = 0

(257)

where we introduced the first Piola-Kirchhoff stress tensor with components

Pij =partW

partFij (258)

which generally differs from the Cauchy stress tensor σ and is furthermore not symmetric Atfinite strains there exists a variety of stress measures we here simply make this choice becauseit emerges naturally from the variation Be alerted that commercial FEA software uses all sortsof strain and stress measures (absolute and incremental ones as well as rates) Only in the limitof small (infinitesimal) strains all stress measures tend to coincide and Pij rarr σij

The above form of the first variation looks quite similar to the small-strain version cf (86)Consequently applying a finite element discretizatio of Bubnov-Galerkin type leads to an FEgoverning equation analogous to (815) That is we again arrive at

Fint(Uh) minusFext = 0 (259)

this time with

F ainti = intΩPij(F h)Na

j dV and F aexti = intΩρ0biN

adV + intpartΩN

tiNadS (2510)

In a nutshell the linearized and finite variational problems result in the same system of equa-tions (259) For the special case of linearized kinematics we have Pij rarr σij so that we recoverthe small-strain version (815) Otherwise the above problem is generally nonlinear (even whenconsidering 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 significantnonlinearity and dependence on U In the above variational formulation we assumed that t =const ie that the externally applied forces are constant and do not depend on deformation Asdiscussed in Section 211 that may not always be the case and especially in finite deformationsit is oftentimes not the case eg consider pressure loading t = pn where n is the deformedsurface normal depending on the deformation and hence on U In such cases one needs torevise the external force term appropriately (For pressure loading eg we know the work doneby pressure is Wext = pv which must replace the traction term in the above total potentialenergy)

Despite all the above differences between large and small strains the key take-home messageis that the general finite element setup is fully analogous between both formulations In bothcases we seek displacement field solutions within the same function space and the governingequations are analogous In fact the above description of quasistatics can be extended todynamics again arriving at

MU +Fint(Uh) minusFext = 0 (2511)

with the consisten mass matrix M now having components

Mabij = δij int

Ωρ0N

aN bdV (2512)

Since the overall setup is equivalent this also implies that all finite element concepts discussedso far can be applied to finite-deformation problems That is all element types quadraturerules solvers etc are fully applicable here as well

129

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

252 Thermal problems

The second extension we would like to discuss aims at solving a thermal problem To this endlet us neglect mechanical boundary value problems and instead discuss how temperature evolvesin a body with heat sources and sinks heat conduction and heat fluxes across its boundaryTo give the punchline right away we will again observe that we can repurpose all our finiteelement tools to this new setting which admits the numerical solution of thermal problems Thereason is that as mentioned before mechanical thermal and also electromagnetic variationalproblems have a common structure of their governing equations (see Section 71)

For a thermal problem in d dimensions we aim to find the generally time-dependent temper-ature field

T = T (x t) (2513)

by solving the strong form

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

κnabla2T + ρs = ρcvT in Ω

T = T on partΩD

q = minusκnablaT sdotn = q on partΩN

T = T0 at t = 0

(2514)

with the following variables

κ equiv thermal conductivity (assuming Fourierrsquos law of heat conduction)

ρ equiv mass density

s equiv heat source (or sink) per mass

cv equiv specific heat

T equiv Dirichlet boundary conditions (imposing a temperature field on the boundary)

q equiv Neumann boundary conditions (imposing a heat flux across the boundary)

q equiv heat flux

n equiv outward unit normal vector on a surface

(2515)

Let us first consider the time-independent problem for simplicity (ie we take ρcvT rarr 0) Inthis case the resulting steady-state problem has a variational structure with the total potentialenergy defined by the functional I ∶ U rarr R with

I[T ] = intΩ(κ

2∥nablaT ∥2 minus ρsT) dV + int

partΩNq T dS (2516)

This functional indicates that we need to weak seek solutions T = T (x) from within the space

U = T isinH1(Ω) ∶ T = T on partΩD and U0 = δT isinH1(Ω) ∶ δT = 0 on partΩD (2517)

which is analogous to the mechanical problem ie we seek solutions from within the samefunction space (except that we now look for a scalar-value field T instead of the vector-valueddisplacement field u which simplifies relations even)

We know that the solution must render I[T ] stationary so we compute the first variation as

δI[T ] = intΩ(κTiδTi minus ρs δT ) dV + int

partΩNq δT dS = 0 for all δT isin U0 (2518)

130

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and we read out the weak form

G[T v] = intΩ(κTivi minus ρs v) dV + int

partΩNq v dS = 0 for all v isin U0 (2519)

Notice that the last term (due to the work by external fluxes) has a plus instead of the usualminus sign in the mechanical problem This arises because of the minus sign in the definitionof fluxes q = minusκnablaT To see this let us apply the divergence theorem to the first term andrearrange terms (with δT = 0 on partΩD) to reformulate the first variation as

δI[T ] = minusintΩ(κTii + ρs) δT dV + int

partΩN(κTini + q) δT dS = 0 for all δT isin U0 (2520)

This must hold for all admissible variations δT isin U0 Therefore (2520) is equivalent to stating

κnabla2T + ρs = 0 in Ω minusκnablaT sdotn = q on partΩN and T = T on partΩD (2521)

Ergo the signs are correct as we recover the (time-independent) strong form (2514) We henceconclude that extremal points T isin U of (2516) are indeed guaranteed to satisfy the governingequations (2514) and are thus classical solutions Differently put functional (2516) is thecorrect energy functional corresponding to the (static) strong form given by (2514) We canfurther show that the solution is a minimizer of I since the second variation is

δ2I[T ] = intΩκδTi δTidV = int

Ωκ ∥δnablaT ∥2 dV ge 0 for all δT isin U0 (2522)

The energy functional (2516) and the resulting weak form (2519) are quite similar to thoseof the mechanical boundary value problem To visualize this we rewrite functional I for thethermal problem for short as

I[T ] = 1

2B(TT ) minusL(T ) (2523)

with the bilinear form B and the linear form L defined by respectively

B(a b) = intΩκnablaa sdot nablab dV and L(a) = int

ΩρsadV minus int

partΩNq a dS (2524)

This form is analogous to eg that of the mechanical problem of a bar whose energy functionalwas derived as (631)

The weak form can be expressed using the above forms as

G[T v] = B[T v] minusL[v] = 0 for all δT isin U0 (2525)

Let us define a spatial finite element discretization of Bubnov-Galerkin-type viz

T h(x) =n

sumb=1

T bN b(x) vh(x) =n

suma=1

vaNa(x) (2526)

Insertion into the weak form (2525) which must hold for all choices of va allows us to deducethe governing equations as

(intΩκNa

iNbj dV )T b

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraQaint(T )

minus [intΩρsNadV minus int

partΩN

qNadS]acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Qaext

= 0 for all a = 1 n (2527)

131

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This implies a system of equations that is quite similar and fully analogous to that of linearelastic mechanical boundary value problems Specifically (2527) balances the internal heat fluxQaint(T ) due to heat conduction with the external heat flux Qaext due to heat sources and due toheat flux across the surface ndash for each node a This is of course the analog of the mechanicalsystem Fint(U) = Fext

When introducing the global vector of the unknown nodal temperatures as T = T 1 Tnthe above system conveniently shows that

Qint(T ) =KT with Kab = intΩκNa

iNbj dV (2528)

denoting the components of a conductivity matrix Note that like in linear elasticity weobserve a linear relation between Qint(T ) and vector T (which is a consequence of the assump-tion of Fourierrsquos law of heat conduction which is linear itself) This results in a linear systemof equations KT =Qext to be solved for the nodal temperatures

When considering time-dependent thermal problems we must extend the above to includetime dependence in the temperature field T = T (x t) Without showing all details (one canderive this form eg from the principle of virtual work) we arrive at the governing equation

CT +Qint(T ) minusQext(t) = 0 (2529)

with a matrix C that is similar to the mass matrix and has components

Cab = intΩρcvN

aN bdV (2530)

The time derivative can be approximated eg by using finite differences which leads to atime-incremental problem as in the dynamic FEA formulation of Section 22

We close by pointing out that (2529) bears great similarity to the dynamic mechanical FEgoverning equations of Section 22 and we seek solutions from within the same function space(except replacing vector-valued displacements by scalar-valued temperatures) As a conse-quence all element types quadrature rules solvers etc that we derived for mechanical (initial)boundary value problems are fully applicable here as well We may thus conveniently re-purposeour FE tools for the analysis of thermal problems

Shown below is an example of solution of the steady-state heat equation illustrating the tem-perature field in a pump casing model (more information can be found online)

132

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

26 Error analysis and adaptivity common mistakes

Having discussed the finite element method the equations to be solved the ways in which acontinuous problem is turned into a discrete one and the various choices of element typesquadrature rules solvers etc to be made it is important to understand the potential errorsources and ways to reduce errors In this section we first discuss the numerical error sourcesinherent in the finite element method then introduce mesh adaptivity and error estimates andfinally review common pitfalls in FE analysis

261 Finite element error analysis

Solving (initial) boundary value problems by the finite element method introduces numeroussources of errors that one should be aware of

(i) The discretization error (also known as the first fundamental error) arises fromdiscretizing the domain into elements of finite size h As a result the body Ω is notrepresented correctly and the model (eg the outer boundary) may not match the trueboundary partΩ (eg think of approximating a circular domain Ω by CST or Q4 elementswith straight edges) This error can be reduced by mesh refinement (and we discussedr-refinement h-refinement p-refinement and hp-refinement in Section 10)

(ii) The numerical integration error results from the application of numerical quadraturefor the evaluation of element force vectors and stiffness matrices in general as discussedin Section 17 (unless in exceptional cases like the simplicial elements integration can becarried out exactly)

intΩef(ξ)dξ cong

nQP

sumq=1

Wqf(ξq) (261)

For an integrand f isin Ck+1(Ω) the error in 1D is bounded by

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQP

sumq=1

Wq f(ξq)RRRRRRRRRRRle C ∥Ω∥hk+1 max

ξisin[minus11]∣α∣=k+1

∥Dαf(ξ)∥ (262)

with an element-dependent constant C gt 0 In other words the error due to numericalquadrature grows with element size h as hk+1 The error is smaller the smoother thefunction f to be integrated (The extension to higher dimensions is analogous) Hencethe numerical integration error depends on the smoothness of the integrand and calls fora proper choice of the integration order

(iii) The solution error stems from numerically solving linear systems TUh = F In generalthe accuracy of the solution depends on the condition number of the matrix

κ = ∥T ∥ sdot ∥T minus1∥ = ∣λmax

λmin∣ (263)

with λmax (λmin) being the largest (smallest) eigenvalue of T The higher the conditionnumber the larger the numerical errorA 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 alinear elastic simulation it is advisable to normalize elastic constants by 1 GPa insteadof assigning eg E = 210 sdot 109 (instead use E = 21 and know that your results will be in100 GParsquos)

133

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(iv) An approximation error is introduced by approximating the functional space U (inwhich to find the solution u(x)) by a finite-dimensional subspace Uh sub U As an example consider an exact solution u(x) in 1D which is approximated by a piece-wise linear polynomial function uh(x) The bar hanging from the ceiling under its ownweight was one such example for which the solution was found to be exact at the nodeswith an error e(x) = u(x)minus uh(x) arising within elements Therefore we can find a pointz within each element such that

parte

partx(z) = 0 for xi le z le xi+1 (264)

Consequently we can expand the error to find the solution at a node as

e(xi) = 0 = e(z) + (xi minus z)parte

partx(z) + (xi minus z)2

2

part2e

partx2(z) +O((xi minus z)3) (265)

Using (264) we find that

e(z) = minus(xi minus z)2

2

part2e

partx2(z) +O(h3) (266)

Note that

(xi minus z)2 le (xi+1 minus xi2

)2

= h2

4 (267)

where h denotes the nodal spacing Altogether we have thus shown that the maximumerror in an element is bounded by

∣e(x)∣max leh2

8max

xilexlexi+1

∣part2u

partx2∣ (268)

As shown in Appendix C the above error bound can be significantly generalized Forpolynomial shape functions of order k and u isinHk+1(Ω) we have

∣uh minus u∣H1(Ω) lehk

πk∣u∣Hk+1(Ω) and ∥uh minus u∥H1(Ω) le ch

k ∣u∣Hk+1(Ω) (269)

using Sobolev norms In simple terms the error is again determined by the smoothnessof the function to be interpolated and it is expected to decrease with decreasing elementsize (as hrarr 0) ndash the faster the higher the interpolation orderNote that special caution is required if stress concentrations of any kind are to be rep-resented (eg imagine a linear elastic fracture problem and the issues arising from usingpolynomial-type elements to capture the stress singularity near the crack tip)

(v) A truncation error is made by every computer when storing and operating numericvalues with only a finite number of digits (eg floats doubles etc) This is unavoidableand one should be aware of what this error is (especially when choosing eg solvertolerances) Choosing a solver tolerance ε in itself produces truncation error becausewe contend with a solution U that satisfies ∣Fint(U) minusFext∣ le ε (instead of being zero)

(vi) Finally no simulation is free of modeling errors which refers to the large collectionof errors made by the selection of the analytical model to be solved (before starting anynumerical approximation) For example we make choices about an appropriate materialmodel choose material parameters boundary conditions and geometric simplificationsincluding reductions to lower dimensions (eg plane strain or plane stress instead of a 3Dsimulation) Any such decision is prone to introducing errors

The sum of all of the above error sources makes up the numerical error inherent in everysimulation

134

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

262 Smoothing and adaptivity

Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (egthe stress and strain fields in case of simplicial elements) and computes a smooth approximationdefined by smoothed nodal values of the discontinuous quantities

In case of simplicial elements the stresses and strains are constantwithin elements Here one can define nodal quantities eg as

(εa)lowast =sumnnbj=1 εejVejsumnnbj=1 1Vej

(2610)

where the element quantities εe of all nnb neighboring elementsmeeting at a node a are weighted by the respective element volumeVe This weighting results in smaller elements (whose quadraturepoints are closer to the node) having a larger weight than largeelements (where quadrature points are far from the node)

a (e )

ee5+

+

++

+ee1

ee2ee3

ee4

In case of higher-order elements such as eg the Q4 element one can extrapolate elementquantities that are defined at the quadrature points ξk to the nodes For example for the Q4element there are four nodes and four quadrature points so that one can uniquely solve forthe four nodal values Once the smoothed nodal values are known one again uses a smooth-ing relation like (2610) with the element quantities εej replaced by the nodal value εae fromthe respective element and element volume Ve replaced by the nodal weight (obtained fromextrapolating the quadrature point weights WqJqt to the nodes)

When performing adaptive mesh refinement we need an error norm where as an example wediscuss the ZZ error estimator named after its inventors Zienkiewicz and Zhu If we usea smoothing scheme like the above we can define smoothed continuous strains εlowast which iscontrasted with the approximate solution εh so that one may define the error per element e byusing the energy norm viz

∥ε minus εlowast∥2e = int

ΩeW (εlowast minus ε)dV (2611)

Note that this definition is not unique and one could also use the L2-norm

∥ε minus εlowast∥2e = int

Ωe∥εlowast minus ε∥2

dV (2612)

or any other sensible norm These norms indicate the quality of a solution εh (if the solutionto be found is smooth or if the mesh is very fine then the piecewise constant solution εh canbe expected to be close to the interpolated smoothed solution εlowast)

In order to define an element-wise error estimate it makes senseto introduce the normalization

ηe =∥ε minus εlowast∥e

∥ε minus 0∥e + ∥ε minus εlowast∥e (2613)

ie the error is divided by the energy in the element so as to notover- or underestimate element errors based on element sizes as wellas in case of vast differences in element strain energies (the abovedenominator may be interpreted as an expansion for small errorsand avoids division by zero)

he

e

e

he

135

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The mesh refinement criterion states that an element e is refined if

ηe gt ηtol (2614)

with some tolerance ηtol determined as a compromise between accuracy and efficiency Basedon the above refinement criterion a set of elements flagged for refinement is identified after asolution uh has be found The elements of highest error ηe are refined and the error estimatesare re-evaluated until sufficiently low element errors are achieved

Needed next is a mesh refinement algorithm For example a frequent choice for triangularelements is longest edge bisection which identifies the longest edge in an element to berefined and inserts a new node at this edgersquos midpoint followed by an update of the elementconnectivity (thus replacing two existing elements by four new elements as schematically shownbelow) Note that this involves some book-keeping since adjacent elements flagged for refinementinterfere so that one needs an algorithmic decision about which elements to refine first and howto handle adjacent elements identified for refinement etc

element to be refined new node inserted atlongest-edge midpoint

new elements createdby connecting nodes

263 Common errors

As Cook Malkus Plesha and Wit put it in their FEA textbook man-made errors in FEAanalysis usually result from unfamiliarity of the user with (i) the physics of the problem (ii) theelement type and its behavior (iii) the limitations of the chosen analysis method and (iv) thesoftware being used Although it is difficult to list all possible error sources in FE analysis letus mention a few common pitfalls to be avoided

poor mesh quality is a very frequent error source The mesh size must be appropriatelyfine (eg one cannot hope to accurately represent stress concentrations near notches orcorners by a few large elements as was done in the Sleipner A oil platform examplediscussed at the very beginning see the mesh shown below) Gradients in mesh sizeshould be smooth rather than abrupt for improved accuracy of solutions Caution isrequired when mixing element types While this is generally possible there must not beany ldquohangingrdquo or unconnected nodes or element edges with different numbers of nodeswhen seen from both adjacent elements One should also avoid large element distortionssince this can lead (through the Jacobian J) to a considerable loss in accuracy Distortionsinclude large aspect ratios poorly shaped elements strongly curved or warped elementsetc For the same reason one should avoid warping of elements in 3D Several examplesare shown below

poor mesh (strong constrast)

better mesh (smooth gradient)poor mesh used in the

Sleipner A study

136

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

poor aspect ratio

ab

near-triangle Q4 off-centered mid-nodes

highly skewed element near-triangle Q4 strongly curved edge

warped Q8 element

Q8

CST

bad element combination

Many codes define the so-called Jacobian ratio j in order to quantify the distortion ofan element When using numerical quadrature all fields of interest are only evaluatedat the quadrature points (q = 0 nQP minus 1) which is where one needs to calculate theJacobian J(ξq) = detF (ξq) The Jacobian ratio of an element e is thus defined as

je =maxq J(ξq)minq J(ξq)

(2615)

ie we compare the minimum to the maximum value of the Jacobian within an elemente Ideally for an undistorted element we have J(ξq) = conts and hence maxq J(ξq) =minq J(ξq) or je = 1 If je ne 1 then the element is distorted ndash the more the further je isaway from 1

wrong element types are a common reason for trouble (eg us-ing structural vs solid elements or using 2D vs 3D elements) 2Delements can effectively be used only if the problem is plane-strainor plane-stress (and the element thickness must be set correctly)Structural elements are significantly more efficient than solid el-ements but they come with strong limitations and eg cannotaccurately represent stress concentrations encountered near sharpcorners (as shown on the right)

solid model beam model

stress concentration

linear vs nonlinear analysis are deformations expected to be large or small (so thatfinite or infinitesimal strains can be used respectively) Is the material model linearelastic or should a finite-deformation model be used

boundary conditions must be chosen appropriately (at the right locations of the righttype and magnitude) If symmetries can be exploited only a reduced system can bemodeled efficiently but boundary conditions must be chosen correctly and it must beensured that the solution is indeed symmetric (eg when studying buckling problemsthe assumption of symmetry automatically rules out asymmetric buckling modes thesame applies to vibrational eigenmodes)

step sizes (ie the load step size in quasistatic studies and the time step size ∆t indynamic studies) must be chosen to ensure convergence and stability of the solver

units must be chosen properly and entered consistently (eg always stick to SI units ndashbut bare in mind the problems associated with large numbers cf Section 261)

the interpretation of results requires caution Are color plots of fields of interest theraw data or smoothed fields Are the units correct are global or local coordinates being

137

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

used for eg the definition of tensor components Can a simple test case be comparedto an analytical or simplified solution

All commercial FEA codes have internal sanity checks which eg for an implicit analysisverify that the tangent or stiffness matrix has no zero diagonal entries The occurrence of suchwould imply eg nodes that are not connected to any element duplicated nodes or materialmoduli 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(eg a Riks path-following or line-search solver rather than a Newton-Raphson-type solver)The same applies to structures with mechanisms (ie zero-energy modes that are not rigid-body modes) For example discretizing a long bar into several 2-node bar elements leads tomechanisms since the 2-node bar element has only axial stiffness To identify the cause of zeroeigenvalues of the stiffness matrix it may be insightful to visualize the corresponding eigenmode

138

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

27 FEM ndash Extensions amp Applications

Through this Introduction to FEA we have discussed the foundations of the finite elementmethod and its applications particularly for solid and structural analysis within the frameworkof linearized kinematics (small strains) and primarily within linear elasticity with extensionsto (small-strain) inelastic behavior In this final section we would like to briefly point outextensions of the basics introduced so far along with practical hints

commercial codes most commercially available FE codes follow a similar structure tothe one discussed here in class as well as during exercises The FEM software providestools for assembling and solving boundary value problems further implementations ofthe most common element types and material models If the user cannot use existingimplementations then there is the common option to implement onersquos own element (so-called user element or UEL) or onersquos own material model (so-called user material modelor UMAT) The UMAT is usually the simpler and most often used option It is of utmostimportance to adhere to the exact strain and stress measures used in the code sinceconfusion thereof leads to nonsensical results In addition most commercial codes do nothave a variational basis and instead define the constitutive law as a relation between strainand stress rates (σ vs ε) or increments ( dσ vs dε) Especially at large strains it isagain essential to adhere to the correct rates or increments (there is a myriad of alternatedefinitions that can be used) improper use of non-conjugate rates is a common pitfall ofcommercial codes14

static vs dynamic FEA if at all possible a quasistatic implicit solution of mechanicalboundary value problems is generally preferable as it ensures that an equilibrium solutionhas been found However this may not always be possible eg because no consistenttangent T is available (because the material model lacks an analytical form of Cijkl orbecause the element implementation does not permit the analytical calculation of thetangent matrix T ) or because the tangent matrix is so large that its calculation and storageis disadvantageous if not impossible computationally We note that an approximatetangent matrix can always be compute numerically by employing finite differences

T abij (U) =partF ainti

partubj(U) asymp

F ainti(U + δebj) minus F ainti(U)δ

(271)

with vector ebi = (0 010 0)T of the length of U with a 1 placed at the locationof component ubj and 0 lt δ ≪ 1 This procedure has the disadvantage that it is compu-tationally expensive (the numerical calculation of T requires perturbing each and everyentry 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 replacethe static simulation to solve for U by a dynamic one to solve for U(t) including sufficientdamping leads to solutions that converge over time to a steady-state Uinfin = limtrarrinfinU(t)and it is expected that this steady state coincides with the static solution ie Uinfin = U Such solvers must be used with caution First it is important to check if the solution hasindeed converged over time (if vibrations or waves are still present in the solution thosemay over- or under-predict local strains and stresses by considerable amounts) Secondunless in a static linear elastic study (which surely should not be solved dynamically butstatically since an analytical tangent is available) the dynamic solver may converge toone of many equilibrium solutions and depending on the initial conditions may take onequite far from the sought solution

14Studies of errors resulting from improper use of rates can be found here and here

139

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

large deformations in this course we focused on linearized kinematics (commonly re-ferred to as ldquosmall strainsrdquo and valid up to at the very most a few percent strain)When larger deformations are to be considered one must employ a finite-strain formu-lation (eg working with deformation and velocity gradients as well as finite-kinematicsstress measures) As a consequence nodal element forces depend not only on the stressesinside the element but also the current deformed state of the element This in turn leadsto the tangent matrix T containing both material stiffness and as a new contributiongeometric stiffness Therefore even when assuming linear elastic material behaviorthe resulting problem is not linear and T is not constant in general As a further conse-quence one may experience mechanical instability and bifurcation which is problematicfor numerical solvers (as also discussed further below for damage and failure)

total-Lagrangian vs updated-Lagrangian so far we only discussed finite elementswhose initial geometry remains unchanged during a simulation For example even thoughloads vary with time we always use the same reference configuration of an element This iscalled a total-Lagrangian formulation By contrast we could also update the referenceconfiguration after each solution step ie once U(tα) has been found we update all nodalpositions xa(tα)larr xa(tα)+ua(tα) recompute the shape functions and ndash at the next timestep tα+1 solve for U(tα+1) based on the new reference configuration This approach isemployed to avoid large mesh distortions and is referred to as updated-LagrangianWhile both have their advantages and disadvantages one computational challange of theupdated-Lagrangian implementation is the accummulation of numerical errors over timeA further alternative generally used in fluid mechanics is the Eulerian formulation inwhich all governing equations are formulated in the currentdeformed configuration

incompressibility especially in large deformations the assumption of incompressibility(ie of zero volume change) is common when modeling eg problems of rubber elastic-ity or generally of soft matter such as tissues and polymers but also in metal plasticityModeling incompressibility is not straight-forward since it imposes a constraint on thedeformation within elements (the nodal dofs of an element are no longer independentsince the element must maintain a constant volume under incompressible deformation)This case calls for a special type of element that can handle incompressibility such asthe so-called family of augmented finite elements or mixed finite elements whichhave mixed dofs including both displacements and the pressure inside the element Theseelements are often referred to as PkQl elements where k denotes the order of interpo-lation of the displacement field while l stands for the polynomial interpolation order ofpressure (and one generally seeks l le k) Common choices of lowest order are eg P1Q0and P1Q1

singularities the FE method is based on polynomial shape functions to interpolateall fields of interest When boundary value problems involve singularities (such as themechanical fields around a crack tip or a sharp notch or the thermal fields around apoint heat source) then the polynomial interpolation inherently cannot lead to a goodapproximate solution As a consequence results are usually mesh-dependent the smallerthe elements (eg at the crack tip) the higher the calculated stress values within thoseelements adjacent to the crack tip It is for this reason that classical FEM is problematicwhen dealing with fracture problems (or generally any problem involving singularities)and results must be interpreted with utmost care An h-convergence study usually revealsthe diverging solution quickly

As a remedy techniques like the extended FE method (XFEM) have been introducedwhich enrich the interpolation space Uh by singularities of the expected type For examplefor fracture problems within linearized kinematics the stress is expected to diverge as

140

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1radicr at the crack tip with r gt 0 being the distance from the tip Hence including shape

functions of this type allows the interpolation to capture the diverging mechanical fieldsthus removing the singularity and yielding reasonable solutions

damage and failure when a material model includes damage or failure it generallysoftens under increasing loads (as the material suffers from damage its stiffness ultimatelytends to zero under increased loading) Such behavior also causes numerical difficultiesbecause the softening branch of the stress-strain response leads to instability (eg mostiterative solvers fail when the tangent matrix T is no longer positive-definite which isgenerally the case during mechanical softening) This manifests not only in solver failurebut also in mesh-dependence (again a study of h-convergence should reveal such issues)

141

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

A Vector Spaces

We define a set Ω as a collection of points X isin Ω

We further say Ω is a (proper) subset of all space if Ω sube Rd in d dimensions (proper if Ω sub Rd)

We usually take Ω to be an open set ie Ω cap partΩ = empty with boundary partΩ

Deformation and motion are described by a mapping

ϕ ∶ X isin Ωrarr ϕ(X) isin Rd or ϕ ∶ Ωrarr Rd (A1)

where Ω is the domain and Rd the range of ϕ The mapped (current) configuration of Ω isϕ(Ω)

Every function f(x) ∶ Rrarr R is a mapping from R to R

We call a mapping injective (or one-to-one) if for each x isin ϕ(Ω) there is one unique X isin Ωsuch that x = ϕ(X) In other words no two points X isin Ω are mapped onto the same positionx A mapping is surjective (or onto) if the entire set Ω is mapped onto the entire set ϕ(Ω)ie for every X isin Ω there exists at least one x isin ϕ(Ω) such that x = ϕ(X) If a mapping is bothinjective and surjective (or one-to-one and onto) we say it is bijective A bijective mapping isalso called an isomorphism

For example ϕ ∶ Ωrarr Rd is injective whereas ϕ ∶ Ωrarr ϕ(Ω) would be bijective

For time-dependent problems we have ϕ ∶ ΩtimesRrarr Rd and x = ϕ(X t) This describes a familyof configurations ϕ(Ω t) from which we arbitrarily define a reference configuration Ω for whichϕ = id (the identity mapping)

A linearvector space Ω+R sdot is defined by the following identities For any uvw isin Ωand αβ isin R it holds that

(i) closure α sdotu + β sdot v isin Ω

(ii) associativity wrt + (u + v) +w = u + (v +w)(iii) null element exist 0 isin Ω such that u + 0 = u(iv) negative element for all u isin Ω exist minusu isin Ω such that u + (minusu) = 0

(v) commutativity u + v = v +u(vi) associativity wrt sdot (αβ) sdotu = α(β sdotu)

(vii) distributivity wrt R (α + β) sdotu = α sdotu + β sdotu(viii) distributivity wrt Ω α sdot (u + v) = α sdotu + α sdot v

(ix) identity 1 sdotu = u

examples

Rd is a vector space By contrast Ω sub Rd is not a vector space since ndash in general ndash itviolates eg (i) closure and (iv) null element

P2 = ax2+bx+c ∶ a b c isin R is the space of all second-order polynomial functionsor an ordered triad (a b c) isin R3 More generally Pk(Ω) is the space of all kth-orderpolynomial functions defined on Ω Pk(Ω) is a linear space

We call P2 a linear subspace of Pk with k ge 2 and we write P2 sube Pk

142

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

B Function Spaces

Consider a function u(x) ∶ Ωrarr R and Ω sub R

u is continuous at a point x if given any scalar ε gt 0 there is a r(ε) isin R such that

∣u(y) minus u(x)∣ lt ε provided that ∣y minus x∣ lt r (B1)

A function u is continuous over Ω if it is continuous at all points x isin Ω

u is of class Ck(Ω) with an integer k ge 0 if it is k times continuously differentiable over Ω (ieu possesses derivatives up to the kth order and these derivatives are continuous functions)

Examples

Functions u(x) isin Pk with k ge 0 are generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks shocks etc (or discontinuities in the BCsICs) weusually assume the solution fields are Cinfin(Ω) so we may take derivatives otherwise derivativesexist almost everywhere (ae)

To evaluate the global errors of functions we need norms

Consider a linear space U +R sdot A mapping ⟨sdot sdot⟩ ∶ U times U rarr R is called inner product onU times U if for all u vw isin U and α isin R

(i) ⟨u + vw⟩ = ⟨uw⟩ + ⟨vw⟩(ii) ⟨u v⟩ = ⟨v u⟩

(iii) ⟨α sdot u v⟩ = α ⟨u v⟩(iv) ⟨uu⟩ ge 0 and ⟨uu⟩ = 0hArr u = 0

A linear space U endowed with an inner product is called an inner product space

Examples

⟨uv⟩ = uivi = u sdot v defines an inner product for uv isin Rd

The L2-inner product for functions u v isin U with domain Ω

⟨u v⟩L2(Ω) = intΩu(x) v(x)dx and often just ⟨u v⟩ = ⟨u v⟩L2(Ω) (B2)

Note that if ⟨u v⟩ = 0 we say u and v are orthogonal

Examples

Legendre polynomials

pn(x) =1

2nn

dn

dxn(x2 minus1)n so that p0 = 1 p1 = x p2 =

1

2(3x2 minus1) (B3)

orthogonality on Ω = (minus11)

int1

minus1pn(x)pm(x)dx = 2

2n + 1δmn (B4)

143

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

trigonometric functions

pn(x) = cos(πnxL

) (B5)

orthogonality on Ω = (minusLL)

intL

minusLpn(x)pm(x)dx =

⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩

2L if m = n = 0

L if m = n ne 0

0 else

(B6)

Now we are in place to define the distance between x1 and x2

d(x1 x2) =radic

⟨x1 minus x2 x1 minus x2⟩ (B7)

We need this concept not only for points in space but also to define the closeness or proximityof functions

Consider a linear space U +R sdot A mapping ∥sdot∥ ∶ U rarr R+ is called a norm on U if for allu v isin U and α isin R

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (triangle inequality)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥(iii) ∥u∥ ge 0 and ∥u∥ = 0 hArr u = 0

A linear space Ω endowed with a norm is called a normed linear space (NLS)

Examples of norms

Consider the d-dimensional Euclidean space so x = x1 xdT Then we define

ndash the 1-norm ∥x∥1 = sumdi=1 ∣xi∣

ndash the 2-norm ∥x∥2 = (sumdi=1 ∣xi∣2)12

(Euclidean norm)

ndash the n-norm ∥x∥n = (sumdi=1 ∣xi∣n)1n

ndash the infin-norm ∥x∥infin = max1leilen ∣xi∣

Now turning to functions the Lp-norm of a function u ∶ Ωrarr R

∥u∥Lp(Ω) = (intΩup dx)

1p

(B8)

The most common norm is the L2-norm

∥u∥L2(Ω) = ⟨uu⟩12L2(Ω)

= (intΩu2(x)dx)

12

(B9)

Furthermore notice that

∥u∥Linfin(Ω) = ess supxisinΩ

∣u(x)∣ (B10)

where we introduced the essential supremum

ess supxisinΩ

∣u(x)∣ =M with the smallest M that satisfies ∣u(x)∣ leM for ae x isin Ω (B11)

144

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Now that we have norms we can generalize our definition of the distance If un u isin U equippedwith a norm ∥sdot∥ ∶ U rarr R then we define the distance as

d(un u) = ∥un minus u∥ (B12)

Now we are in place to define the convergence of a sequence of functions un to u in U wesay un rarr u isin U if for all ε gt 0 there exists N(ε) such that d(un u) lt ε for all n gt N

Examples

Consider un isin U = P2(Ω) with L2-norm and Ω sub R

un(x) = (1 + 1

n)x2 rarr u(x) = x2 since d(un minus u) =

1

nint x2 dx (B13)

with u isin U = P2(Ω) For example for d(un minus u) lt ε we need n gt N = intΩ x2 dxε

Fourier series

u(x) =infin

sumi=0

ci xi rArr un(x) =

n

sumi=0

ci xi such that un rarr u as nrarrinfin (B14)

Given a point u in a normed linear space U a neighborhood Nr(u) of radius r gt 0 is definedas the set of points v isin U for which d(u v) lt r Now we can define sets properly

A subset V sub U is called open if for each point u isin V there exists a neighborhood Nr(u) whichis fully contained in V The complement V of an open set V is by definition a closed set Theclosure V of an open set V is the smallest closed set that contains V In simple terms a closedset is defined as a set which contains all its limit points Therefore note that

supxisinΩ

∣u(x)∣ = maxxisinΩ

∣u(x)∣ (B15)

For example (01) is an open set in R [01] is a closed set and [01] is the closure of (01)

A linear space U is a complete space if every sequence un in U converges to u isin U In simpleterms the space must contain all limit points

A complete normed linear space is called a Banach space ie U +R sdot with a norm ∥sdot∥ andun rarr u isin U A complete inner product space is called a Hilbert space

Note that ∥sdot∥ = ⟨sdot sdot⟩12 defines a norm Hence every Hilbert space is also a Banach space (butnot the other way around)

As an example consider U = Pn (the space of all polynomial functions of order n isin N) This is alinear space which we equip with a norm eg the L2-norm It is complete since (an bn cn )rarr(a b c ) for a b c isin R And an inner product is defined via ⟨u v⟩ = intΩ uv dx With allthese definitions U is a Hilbert space

We can use these norms to define function spaces eg the L2-space of functions

L2(Ω) = u ∶ Ωrarr R ∶ intΩu2 dx ltinfin (B16)

We say L2(Ω) contains all functions that are square-integrable on Ω

145

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Examples

u ∶ Ωrarr R with u isin Pk(Ω) and ess supxisinΩ ∣u(x)∣ ltinfin Then u isin L2(Ω)

f ∶ Rrarr R with f(x) = xminus2 is not in L2(Ω) if 0 isin Ω

Piecewise constant functions u (with ess supxisinΩ ∣u(x)∣ ltinfin) are square-integrable and thusin L2

Note that we can write alternatively

L2(Ω) = u ∶ Ωrarr R ∶ ∥u∥L2(Ω) ltinfin (B17)

146

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

C Approximation Theory

Motivation in computational mechanics we seek approximate solutions uh(x) = sumNa=1 uaNa(x)eg a linear combination of basis functions Na(x) with amplitudes ua isin R

Questions How does uh(x) converge to u(x) if at all Can we find an error estimate ∥uh minus u∥What is the rate of convergence (how fast does it converge cf the truncation error argumentsfor grid-based direct methods)

Fundamental tools for estimating errors are the Poincare inequalities

(i) Dirichlet-Poincare inequality

inth

0∣v(x)∣2 dx le chint

h

0[vprime(x)]2

dx if v(0) = v(h) = 0 (C1)

with a constant ch gt 0 that depends on the interval size h

(ii) Neumann-Poincare (or Poincare-Wirtinger) inequality

inth

0∣v(x) minus v∣2 dx le chint

h

0[vprime(x)]2

dx with v = 1

hint

h

0u(x) dx (C2)

In 1D an optimal constant can be found ch = h2π2

(iii) extension

inth

0∣v(x)∣2 dx le h

2

π2[int

h

0[vprime(x)]2

dx + ∣v(x0)∣2] with x0 isin [0 h] (C3)

Now let us use those inequalities to find error bounds Suppose a general function u(x) isapproximated by a piecewise linear approximation uh(x) Letrsquos first find a local error estimate

Consider v(x) = uprimeh(x) minus uprime(x) and note that by Rollersquos theorem

uprimeh(x0) minus uprime(x0) = 0 for some x0 isin (0 h) (C4)

Next use inequality (iii)

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprimeh(x) minus u

primeprime(x)∣2 dx (C5)

but since uh(x) is piecewise linear we have uprimeprimeh(x) = 0 so that we arrive at the local errorestimate

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprime(x)∣2 dx (C6)

Now letrsquos seek a global error estimate by using

intb

a(sdot) dx =

n

sumi=0int

xi+1

xi(sdot) dx with x0 = a xn+1 = b xi+1 = xi + h (C7)

so that

intb

a∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 intb

a∣uprimeprime(x)∣2 dx (C8)

147

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Taking square roots we see that for Ω = (a b)

∥uprimeh minus uprime∥L2(Ω)

le hπ

∥uprimeprime∥L2(Ω)

(C9)

and hence that ∥uprimeh minus uprime∥L2(Ω)

rarr 0 as hrarr 0 linearly in h

We want to write this a bit more concise Let us define the Sobolev semi-norm

∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

or for short ∣u∣k = ∣u∣Hk(Ω) (C10)

where in 1D Dku = u(k) A semi-norm in general must satisfy the following conditions

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (like for a norm)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥ (like for a norm)

(iii) ∥u∥ ge 0 (a norm also requires ∥u∥ = 0 iff u = 0 not so for a semi-norm)

Examples in 1D

from before

∣u∣H1(ab) = [intb

a∣uprime(x)∣2 dx]

12

(C11)

analogously

∣u∣H2(ab) = [intb

a∣uprimeprime(x)∣2 dx]

12

(C12)

so that we can write (C8) as

∣uh minus u∣2H1(ab) leh2

π2∣u∣2H2(ab) rArr ∣uh minus u∣H1(ab) le

h

π∣u∣H2(ab) (C13)

Hence the topology of convergence is bounded by the regularity of u Convergence withh-refinement is linear

note the special case

∣u∣2H0 = intΩu(x)2 dx = ∥u∥2

L2 (L2-norm) (C14)

We can extend this to higher-order interpolation For example use a piecewise quadraticinterpolation uh From Poincare

inth

0∣uprimeh minus u

prime∣2 dx le h2

π2 inth

0∣uprimeprimeh minus u

primeprime∣2 dx le h4

π4 inth

0∣uprimeprimeprimeh minus uprimeprimeprime∣2 dx = h

4

π4 inth

0∣uprimeprimeprime∣2 dx (C15)

Extension into a global error estimate with quadratic h-convergence

∣uh minus u∣H1(ab) leh2

π2∣u∣H3(ab) (C16)

For a general interpolation of order k

∣uh minus u∣H1(ab) lehk

πk∣u∣Hk+1(ab) (C17)

148

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Why is the Sobolev semi-norm not a norm Simply consider the example u(x) = c gt 0 Allhigher derivatives vanish on R so that ∣u∣Hk(Ω) = 0 for Ω sub R and k ge 1 However that does notimply that u = 0 (in fact it is not)

Let us introduce the Sobolev norm (notice the double norm bars)

∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

or for short ∥u∥k = ∥u∥Hk(Ω) (C18)

For example in one dimension

∥u∥2H1(Ω) = ∣u∣20 + ∣u∣21 = int

Ωu(x)2 dx + int

Ω[uprime(x)]2

dx = ∥u∥2L2(Ω) + ∣u∣2H1(Ω) (C19)

Note that this also shows that more generally

∥u∥2Hk(Ω) ge ∣u∣2Hk(Ω) (C20)

Let us derive a final global error estimate one that involves proper norms ndash here for the exampleof a piecewise linear uh Start with Poincare inequality (i)

∥uh minus u∥2L2(ab)

= intb

a∣uh minus u∣2 dx le chint

b

a∣uprimeh minus u

prime∣2 dx = ch ∣uh minus u∣2H1(ab) (C21)

and from (C19)

∥uh minus u∥2H1(Ω) = ∥uh minus u∥2

L2(Ω) + ∣uh minus u∣2H1(Ω)

le (1 + ch) ∣uh minus u∣2H1(ab) le clowasth ∣u∣2H2(ab)

(C22)

which along with (C13) gives

∥uh minus u∥H1(ab) le ch ∣u∣H2(ab) le ch ∥u∥H2(ab) (C23)

Summary and Extension of Norms

Lp-norm ∥u∥Lp(Ω) = (intΩup dx)

1p

Sobolev semi-norm ∶ ∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

= ∣u∣k

Sobolev norm ∶ ∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

= ∥u∥k

generalization ∶ ∣u∣Wkp(Ω) = [intΩ∣Dku∣p dx]

1p

= ∣u∣kp

∥u∥Wkp(Ω) = (k

summ=0

∣u∣pWmp(Ω)

)1p

= ∥u∥kp

149

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

D Sobolev spaces

The Sobolev norm is used to define a Sobolev space

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥k ltinfin (D1)

which includes all functions whose kth-order derivatives are square-integrable

Examples

Consider a piecewise linear function u isin C0 defined on Ω = (02) Then u isin H1(Ω) sincethe first derivative is piecewise constant and therefore square-integrable

Consider the Heavyside step function H(x) isin Cminus1 defined on R Then eg h isin H0(Ω)with Ω = (minus11) since the first derivative (the Dirac delta function) is not square-integrableover (minus11)

Overall note that the above examples imply that

Hm(Ω) sub Ck(Ω) with m gt k (D2)

For example if a function has a kth continuous derivative then the (k + 1)th derivative isdefined piecewise and therefore square-integrable

Higher dimensions

To extend the above concepts to higher dimensions we need multi-indices A multi-index isan array of non-negative integers

α = (α1 αn) isin (Z+0)n (D3)

The degree of a multi-index is defined as

∣α∣ = α1 + + αn (D4)

This can be used to define a monomial for x isin Rn

xα = xα11 sdot sdot xαnn (D5)

For example we can now extend our definition of polynomials to higher dimensions

p(x) isin Pk(R2) rArr p(x) =k

sumβ=0

sum∣α∣=β

aαxα (D6)

Specifically the monomials above for x isin R2 are

for ∣α∣ = 0 ∶ x0y0 = 1for ∣α∣ = 1 ∶ x1y0 x1y0 = x yfor ∣α∣ = 2 ∶ x2y0 x1 y1 x0y2 = x2 xy y2

(D7)

so that

p(x) = a(00) + a(10)x1 + a(01)x2 + a(20)x21 + a(11)x1x2 + a(02)x2

2 + (D8)

150

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that this defines a complete polynomial of degree k

Now we can use multi-indices to define partial derivatives via

Dαu = part ∣α∣u

partxα11 sdot sdot partxαnn

and D0u = u (D9)

A common notation is

sum∣α∣=β

Dαu = sumα1αnst ∣α∣=β

part ∣α∣u

partxα11 sdot sdot partxαnn

(D10)

With the above derivatives we may redefine the inner product

⟨u v⟩Hm(Ω) = intΩ

m

sumβ=0

sum∣α∣=β

DβuDβu dx (D11)

and the Sobolev norm

∥u∥Hm(Ω) = ⟨uu⟩12Hm(Ω)

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

intΩ(Dαu)2 dx

⎤⎥⎥⎥⎥⎦

12

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

∥Dαu∥2L2(Ω)

⎤⎥⎥⎥⎥⎦

12

(D12)

Letrsquos look at some examples eg consider Ω = R2 and m = 1 Then we have

D0u = u and D1u = partupartx1

partu

partx2 (D13)

so that

⟨u v⟩H1(R2) = intR2(uv + partu

partx1

partv

partx1+ partu

partx2

partv

partx2) dx1 dx2 (D14)

and

∥u∥2H1(R2) = intR2

[u2 + ( partupartx1

)2

+ ( partupartx2

)2

] dx1 dx2 (D15)

Altogether we can now properly define a Sobolev space in arbitrary dimensions

Hm(Ω) = u ∶ Ωrarr R ∶ Dαu isin L2(Ω) forall α lem (D16)

This is the set of all functions whose derivatives up to mth order all exist and are square-integrable

As an example u isin H1(Ω) implies that u and all its first partial derivatives must be square-integrable over Ω because (D15) must be finite

Let us look at the example u(x) = ∣x∣ and take Ω = (minus11) Then we have uprime(x) = H(x) (theHeaviside jump function) and uprimeprime(x) = δ(x) (the Dirac delta function) Therefore

intb

au2(x) dx ltinfin rArr u isin L2(Ω) =H0(Ω)

intb

a(partupartx

)2

dx = intb

aH2(x)dx ltinfin rArr partu

partxisin L2(Ω) and u isinH1(Ω)

intb

a(part

2u

partx2)

2

dx = intb

aδ2(x)dx =infin rArr part2u

partx2notin L2(Ω) and u notinH2(Ω)

(D17)

151

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that one usually indicates the highest order k that applies (since this is what matters forpractical purposes) so here we thus conclude that u isinH1(Ω)

From the above we also see that

Hinfin sub subH2 subH1 subH0 = L2 (D18)

Notice that even though polynomials u isin Pk(Ω) are generally in Hinfin(Ω) for any bounded Ω sub Rdthey are not square-integrable over Ω = Rd Luckily in practical problems we usually consideronly finite bodies Ω To more properly address this issue let us introduce the support of acontinuous function u defined on the open set Ω isin Rd as the closure in Ω of the set of all pointswhere u(x) ne 0 ie

suppu = x isin Ω ∶ u(x) ne 0 (D19)

This means that u(x) = 0 for x isin Ω ∖ suppu We may state eg that functions u ∶ Ω rarr R witha finite support Ω sub Rd and ess supΩ ltinfin are square-integrable over Ω

Finally let us define by Ck0 (Ω) the set of all functions contained in Ck(Ω) whose support is abounded subset of Ω Also notice that

Ck0 (Ω) subHk0 (Ω) (D20)

and

Cinfin0 (Ω) = ⋂

kge0

Ck0 (Ω) (D21)

152

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

E Operators

Energies are often defined via operators Generally we call A an operator if

A ∶ u isin U rarr A(u) isin V (E1)

where both U and V are function spaces

A simple example is

A(u) = cdu

dx (E2)

which is a (linear differential) operator requiring u isin C1

An operator A ∶ U rarr V is linear if for all u1 u2 isin U and αβ isin R

A(α sdot u1 + β sdot u2) = α sdotA(u1) + β sdotA(u2) (E3)

For example L is a linear operator in

auxx + bux = c hArr L(u) = c with L(sdot) = a(sdot)xx + b(sdot)x (E4)

Operators (such as the inner product operator) can also act on more than one function Con-sider eg an operator B ∶ U times V rarr R where U V are Hilbert spaces B is called a bilinearoperator if for all uu1 u2 isin U and v v1 v2 isin V and αβ isin R

(i) B(α sdot u1 + β sdot u2 v) = α sdot B(u1 v) + β sdot B(u2 v)(ii) B(uα sdot v1 + β sdot v2) = α sdot B(u v1) + β sdot B(u v2)

An example of a bilinear operator is the inner product ⟨sdot sdot⟩ ∶ U times U rarr R for some Hilbert spaceU

An operator A ∶ U rarr V is called symmetric if

⟨A(u) v⟩ = ⟨uA(v)⟩ for all u v isin U (E5)

Furthermore the operator is positive if

⟨A(u) u⟩ ge 0 for all u isin U (E6)

An example of a symmetric operator is A(u) = Mu with u isin Rd and M isin Rdtimesd which ispositive if M is positive-semidefinite

153

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

F Uniqueness of solutions

One of the beauties of the above variational problem () is that a unique minimizer exists bythe Lax-Milgram theorem This is grounded in (assuming ∣Ω∣ lt infin and u v isin U with someHilbert space U)

boundedness of the bilinear form

∣B(u v)∣ le C ∥u∥ ∥v∥ for some C gt 0 (F1)

For a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by the Cauchy-Schwarzinequality (using L2-norms)

∣B(u v)∣ le C ∥Gradu∥L2(Ω) ∥Grad v∥L2(Ω) le C ∥Gradu∥H1(Ω) ∥Grad v∥H1(Ω) (F2)

coercivity of the bilinear form (ellipticity)

B(uu) ge c ∥u∥2 for some c gt 0 (F3)

Again for a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by Poincarersquos inequal-ity

B(uu) = ∥Gradu∥2L2(Ω) ge c ∥u∥

2L2(Ω) (F4)

These two requirements imply the well-posedness of the variational problem and thus imply theexistence of a unique solution (or that the potential has a unique global minimizer) In simpleterms the two conditions that the functional has sufficient growth properties (ie the bilinearform has upper and lower bounds)

154

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

G Vainbergrsquos theorem

The question arises whether or not a general form like (631) always exists for any set ofPDEsODEs as governing equations Vainbergrsquos theorem helps us answer this question Con-sider a weak form

G[u v] = 0 forall v isin U0(Ω) (G1)

Let us see if G derives from a potential I via its first variation That would imply that

G(u δu) =DδuI[u] = limεrarr0

d

dεI[u + δu] (G2)

Now recall from calculus that for any continuously differentiable function f(x y) we must haveby Schwartzrsquo theorem

part

party

partf

partx= part

partx

partf

party (G3)

We can use the same strategy to formulate whether or not a weak form derives from a potentialSpecifically we can take one more variation and state that

Dδu2G(u δu1) =Dδu1G(u δu2) if and only if I[u] exists (G4)

This is known as Vainbergrsquos theorem

We can easily verify this for the general form given in (631)

G(u δu1) =Dδu1I[u] = intΩ[λGradu Grad δu1 minus S δu1] dx minus int

partΩNQ δu1 dx

rArr Dδu1G(u δ2) = intΩλGrad δu2 Grad δu1 dx =Dδu2G(u δu1)

(G5)

In simple terms (and not most generally) Vainbergrsquos theorem holds if the potential obeyssymmetry This in turn implies that the governing PDE contains derivatives of even order (suchas linear momentum balance which is second-order in both spatial and temporal derivatives orthe equilibrium equations of beams which are fourth-order in space and second-order in time)If the PDEs are of odd order (such as eg the time-dependent diffusion or heat equation) thenno direct potential I exists ndash there are work-arounds using so-called effective potentials thatwill be discussed later in the context of internal variables

Of course knowing that a variational structure exists is beneficial but it does not reveal anythingabout the actual solution u which will be obtained by solving the above system of equations

155

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

H Energy norm

For many purposes it is convenient to introduce the so-called energy norm

∣sdot∣E =radicB(sdot sdot) (H1)

For example if we find an approximate solution uh for the displacement or temperature fieldthen the error can be quantified by

∣u minus uh∣E=radicB(u minus uh uuh) (H2)

Notice that unlike for eg the Euclidean norm ∥u minus uh∥E

does not necessarily imply uminusuh = 0so that strictly speaking the above energy norm is only a semi-norm To turn it into a propernorm we need to exclude solutions corresponding to rigid-body motion (ie solutions thatimply uniform translations or rotations of the u-field but without producing gradients in u) Ifwe assume that essential boundary conditions are chosen appropriately to suppress rigid bodymotion by seeking solutions

u isin U = u isinH1 ∶ u = u on partΩD (H3)

then for this space ∥sdot∥E is indeed a proper norm

156

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

I Gauss quadrature

A systematic way to deriving Gaussian quadrature rules involves the use of Legendre polyno-mials We here give a brief overview

We start by noticing that monomials 1 ξ ξ2 ξ3 although complete are not orthogonalbasis functions We can turn them into orthogonal polynomials Pn(ξ) by eg the Gram-Schmidt orthogonalization procedure To this end let us start with

P0(ξ) = 1 (I1)

and obtain the next basis function by starting with the linear momonial ξ and computing

P1(ξ) = ξ minus⟨1 ξ⟩⟨11⟩

1 = ξ (I2)

where we used the inner product

⟨u v⟩ = int1

minus1u(ξ)v(ξ)dξ (I3)

Similarly the next higher basis function is obtained by starting from ξ2 so that

P2(ξ) = ξ2 minus ⟨ξ ξ2⟩⟨ξ ξ⟩

ξ minus ⟨1 ξ2⟩⟨11⟩

1 = ξ2 minus 1

3 (I4)

Analogously one finds

P3(ξ) = ξ3 minus 3

5ξ (I5)

By continuing analogously we create a countably infinite set of orthogonal basis functions Pn(ξ)such that

int1

minus1Pn(ξ)Pm(ξ)dξ = 0 if n nem (I6)

These polynomials are known as Legendre polynomials Note that they are defined only upto a constant so one can renormalize them which is commonly done by enforcing that Pn(1) = 1for all n The result is the well known Legendre polynomials which can alternatively be definedvia

Pn(ξ) =1

2nn

dn

dξn[(ξ2 minus 1)n] (I7)

These polynomials have another interesting feature viz by orthogonality with P0(ξ) = 1 weknow that

int1

minus1Pn(ξ)dξ = ⟨1 Pn⟩ =

⎧⎪⎪⎨⎪⎪⎩

2 if n = 0

0 else(I8)

Pn(ξ) has exactly n roots in the interval [minus11] Also for n ne 0 we know that

Pn(ξ) = minusPn(minusξ) for odd n

Pn(ξ) = Pn(minusξ) for even n(I9)

157

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Moreover Pn(0) = 0 for odd n

With this new set of basis functions we can define the Gauss-Legendre quadrature rule toenforce

int1

minus1Pk(ξ)dξ

=nQPminus1

sumi=0

Wi Pk(ξi) k = 01 2nQP minus 1 (I10)

If nQP = 1 then the solution is simple because the above equations simplify to

W0 = 2 and 0 =W0P1(ξ0) (I11)

Therefore the weight is as before W0 = 2 and the quadrature point is the root of P1(ξ) vizξ0 = 0

If nQP = 2 then the four equations to be solved are

W0 +W1 = 2 and 0 =W0P1(ξ0) +W1P1(ξ1)0 =W0P2(ξ0) +W1P2(ξ1) and 0 =W0P3(ξ0) +W1P3(ξ1)

(I12)

By analogy we choose the quadrature points to be the roots of P2(ξ) so that

P2(ξ0) = P2(ξ1) = 0 rArr ξ0 =1radic3 ξ1 = minus

1radic3 (I13)

Using Pn(ξ) = minusPn(minusξ) the above equations reduce to

W0 =W1 = 1 (I14)

Further note that Pn(0) = 0 for odd n Therefore the same procedure can be continued asfollows For an arbitrary number of quadrature points nQP the Gauss-Legendre quadraturepoints and associated weights are defined by

PnQP (ξi) = 0 wi =2

(1 minus ξ2i )[P prime

nQP(ξi)]2

i = 0 nQP minus 1 (I15)

As a check take eg nQP = 1 so that P1(ξ) = ξ with root ξ0 = 0 The weight is computed as

w0 =2

(1 minus ξ20)[P prime

nQP(ξ)]2

= 2 (I16)

as determined above Similarly for nQP = 2 we have P2(ξ) = 12(3ξ

2 minus 1) with the above roots of

plusmn1radic

3 The associated weights are computed as

w0 =2

(1 minus ξ20)[P prime

2(ξ0)]2= 2

(1 minus ξ20)[3ξ0]2

= 223

32

3

= 1 = w1 (I17)

which agrees with our prior solution in Section 1621

158

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

J Quadrature error estimates

Using numerical quadrature to approximate an exact integral introduces a quadrature errorwhich is bounded as follows For a function f(ξ) isin C2nQP (Ω) we have that (without proof here)

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQPminus1

sumk=0

Wk f(ξk)RRRRRRRRRRRle Ch2nQP max

ξisin[minus11]∣f (2nQP )(ξ)∣ (J1)

with a constant C gt 0 This shows that as can be expected the quadrature error decreases withdecreasing mesh size h and with increasing smoothness of function f The rate of convergenceunder h-refinement also depends on the smoothness of the function

The exact error depends on the chosen quadrature rule For example for Gauss-Legendrequadrature an error estimate is given by

e =22nQP+1(nQP )4

(2nQP + 1)[(2nQP )]3maxξisin[minus11]

∥f (2nQP )(ξ)∥ (J2)

159

Index

L2-norm 144h-refinement 57hp-refinement 57n-dimensional space 47p-refinement 57r-refinement 57(proper) subset 1422-node bar element 592-node beam element 664-node bilinear quadrilateral 794-node tetrahedron 758-node brick element 848-node quadratic quadrilateral 839-node quadratic quadrilateral 83

ae 143acceleration field 7action 109action principle 109amplitude 117approximation error 134assembly 62assembly operator 95augmented finite elements 140average acceleration 124 125

backward-Euler 19balance of energy 10balance of linear momentum 9Banach space 145barycentric coordinates 72basis 54basis functions 28bijective 142bilinear form 42bilinear operator 153boundary 142boundary conditions 13Bubnov-Galerkin approximation 47

CFL condition 23chicken-wire mode 94class Ck(Ω) 45 143classical solution 41closure 145collocation method 29collocation points 29commercial codes 139

complete polynomial 151complete space 145complete up to order q 55completeness property 55condensation 105condition number 133conditionally stable 25conductivity matrix 132conjugate gradient 99consistent mass matrix 111Constant Strain Triangle 75constitutive relations 8continuous at a point x 143continuous over Ω 143convergence 145Courant-Friedrichs-Levy 23Courant-Friedrichs-Levy (CFL) condition 24CST 75cubature rules 86

damage and failure 141damped Newton-Raphson method 97damping matrix 120deformation gradient 128deformation mapping 128degree 150degrees of freedom 56Direct methods 18Dirichlet boundary 13Dirichlet boundary condition 70Dirichlet boundary conditions 69Dirichlet-Poincare inequality 147discrete problem 48discretization error 133discretization errors 12displacement field 7 128distance 144 145divergence of a vector 11domain 142dummy index 7dynamic 109

eigenfrequency 115eigenmode 115elasticity tensor 8element defect 92elements 56energy norm 156

160

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

equation of motion 111error estimate 135essential supremum 144Euclidean norm 144Euler-Bernoulli beam 65Eulerian 140excitation frequency 117explicit 19explicit time integration 121extensive 11external forces 101

Fast Inertial Relaxation Engine 99FE 56FEM 56finite differences 18finite element 56Finite Element Method 56finite-difference stability 23first fundamental error 133first Piola-Kirchhoff stress tensor 129first variation 39first-derivative central difference 18forced vibrations 114 117forward-Euler 19free vibrations 114full integration 90function 142function space 37functional 37

Gauss quadrature 86Gauss-Chebyshew 88Gauss-Hermite 88Gauss-Legendre 88Gauss-Legendre quadrature 87 158Gauss-Lobatto quadrature 88Gauss-Newton method 99geometric stiffness 140ghost node 21global 53 95global error estimate 147 148global stiffness matrix 62gradient flow method 99Gram-Schmidt orthogonalization 157

heat equation 11Hermitian polynomials 67HHT method 127HHT-α 127hierarchical interpolation 64higher-order interpolation 148

Hilbert space 145hourglass mode 94

identity mapping 142implicit 19 21implicit time integration 124incompressibility 140incremental stiffness matrix 77indirect methods 27initial boundary value problem 13initial conditions 13injective 142inner product 143inner product space 143instability 141integration point 86intensive 11internal energy 10inverse function theorem 73 74isomorphism 142isoparametric mapping 71isotropy 8

Jacobian 74Jacobian ratio 137

kinetic energy 109

L2-inner product 143L2-space of functions 145Lp-norm 144Lagrange polynomials 64Lagrangian 109Lagrangian interpolation 64Laplace equation 11large deformations 140Lax-Milgram theorem 42 154Lax-Richtmyer theorem 25least squares method 30Legendre polynomials 157line search method 98linear 153linear acceleration 124 125linear elasticity 8 49 50linear form 42linear operator 13linear strain triangle 78linear subspace 142linearvector space 142local 53local energy balance 11local error estimate 147

161

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

local stiffness matrix 62local-to-global map 62locking 93longest edge bisection 136LST 78lumped mass matrix 112

mapping 71 142material points 7mathematical domain of dependence 24maximizer 41mechanical instability 138mechanisms 108 138mesh 56mesh refinement algorithm 136mesh refinement criterion 136methods of weighted residuals 29minimizer 41mixed finite elements 140modal decomposition 118modeling errors 12 134monomial 150monomials 55multi-index 150multi-indices 55

natural frequency 115Navier equation 10neighborhood 145Neumann boundary 13Neumann-Poincare 147Newmark-β 124 125Newton-Cotes 86Newton-Raphson method 96nodes 56nominal strains 8nominal stresses 8nonlinear least squares 98norm 144normed linear space 144numerical damping 125numerical domain of dependence 23numerical integration 85numerical integration error 133

one-to-one 142onto 142open 145open set 142operator 153order of a PDE 13order reduction 119

ordered triad 142orthogonal 143over-integration 91

PkQl elements 140parasitic shear 93particle-mass lumping 112period contraction 127period elongation 127Petrov-Galerkin 47phase error analysis 23Poincare inequalities 147Poisson equation 12polynomial function space 32positive 153principle of stationary action 109principle of virtual work 34 46

Q4 79Q8 83Q9 83quadratic tetrahedron 78quadratic triangle 77quadrature error 159quadrature rules 86Quasi-Newton method 97quasistatics 109

range 142Rayleighrsquos quotient 119Rayleigh-Ritz 42reduced integration 91reference configuration 7residuals 28Riemann sum 85rigid-body mode 115rigid-body modes 107rigid-body motion 107

second-derivative central difference 18selective integration 94semi-discretization 110semi-norm 148serendipity element 83set 142shape function properties 53shape functions 47 53shear locking 93shear strains 8shear stresses 8simplex 72simplicial quadrature 91

162

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

singularities 140smoothing 135Sobolev norm 38 149Sobolev semi-norm 148Sobolev space 38 150 151solution error 133solution errors 12solver tolerance 134space of all second-order polynomial functions

142square-integrable 38 145 150static vs dynamic FEA 139statics 10stationarity condition 39stencil 20strain tensor 7stress tensor 8strong form 45 49subdomain method 29subparametric mapping 71substitution 105superparametric mapping 71support 53 152surjective 142symmetric 153

tangent matrix 96Taylor expansions 18temperature field 130thermal problem 130time delay 120total-Lagrangian 140trial functions 28triangle inequality 144truncation error 134

UEL 139UMAT 139unconditionally stable 26undeformed 7under-integration 91units 133update rule 19updated-Lagrangian 140

Vainbergrsquos theorem 47 155validation 12variation 39variational calculus 37variational structure 40velocity field 7verification 12

vibrations 114Voigt notation 52von Neumann analysis 23 25

wave equation 10weak form 46 110weak solution 46Weierstrass approximation theorem 54

XFEM 140

zero-energy mode 93zero-energy modes 107zeroth derivative 46 143ZZ error estimator 135

163

  • Preface
  • Introduction Continuum Mechanics and Notation
    • Kinematics
    • Kinetics
    • Computational Mechanics
    • (Initial) Boundary Value Problems
      • Dimensionless Forms
      • Direct Numerical Methods Finite Differences
      • Stability of Finite Difference Schemes
        • CFL Condition
        • von Neumann Analysis and Phase Error Analysis
        • Direct vs Indirect Methods
          • Methods of Weighted Residuals
            • Collocation Method
            • Subdomain Method
            • Method of Least Squares
            • Higher Dimensions
            • Galerkins Method
              • Variational Calculus
                • Functionals
                • Variations
                • Rayleigh-Ritz Method
                  • The weak form
                    • Classical and weak solutions
                    • Equivalence of strong and weak forms
                    • Approximate solutions
                      • The mechanical variational problem at small strains
                        • General case
                        • Linear elasticity
                          • Interpolation spaces
                            • Shape functions
                            • Approximation power and completeness
                            • Completeness in higher dimensions
                              • The Finite Element Method
                              • Finite element spaces polynomial shape functions in 1D
                                • 2-node bar element
                                • Problem assembly
                                • Polynomial interpolation of higher order
                                  • Lagrangian interpolation
                                  • Hierarchical interpolation
                                    • 2-node beam element
                                    • A note on beam elements and boundary conditions
                                      • Shape Functions in higher dimensions
                                      • Simplicial elements
                                        • Linear Triangle (T3)
                                        • Extension to three dimensions
                                        • Finite element implementation
                                          • Special case linear elasticity
                                          • General case of non-linear elastic materials
                                            • Higher-order triangles and tetrahedra
                                              • The bilinear quadrilateral element
                                              • Higher-order elements Q8 Q9 8-node brick
                                              • Numerical quadrature
                                                • Example Riemann sums
                                                • Gauss quadrature
                                                  • Gauss-Legendre quadrature
                                                  • Other Gauss quadrature rules
                                                    • Higher dimensions
                                                      • FEM which quadrature rule to use
                                                        • Integrals in the FE context
                                                        • Which quadrature rule to use
                                                          • Element defects shear locking and hourglassing
                                                          • Assembly
                                                          • Iterative solvers
                                                            • Netwon-Raphson (NR) method
                                                            • Damped Newton-Raphson (dNR) method
                                                            • Quasi-Newton (QN) method
                                                            • Line search method
                                                            • Nonlinear Least Squares
                                                            • Gradient flow method
                                                            • Conjugate Gradient (CG) method
                                                              • Boundary conditions
                                                                • Neumann boundary conditions
                                                                • Dirichlet boundary conditions
                                                                  • Substitution
                                                                  • Condensation
                                                                    • A note on Dirichlet boundary conditions in iterative solvers
                                                                    • Rigid body motion
                                                                      • Dynamics
                                                                      • Vibrations
                                                                        • Free undamped vibrations
                                                                        • Forced vibrations
                                                                        • Modal decomposition
                                                                        • Structural damping
                                                                          • Time-dependent transient solutions
                                                                            • Explicit time integration
                                                                            • A reinterpretation of finite differences
                                                                            • Implicit time integration
                                                                              • Newmark- method
                                                                                • HHT- method
                                                                                • Use of mass matrices
                                                                                  • Extensions
                                                                                    • Finite kinematics
                                                                                    • Thermal problems
                                                                                      • Error analysis and adaptivity common mistakes
                                                                                        • Finite element error analysis
                                                                                        • Smoothing and adaptivity
                                                                                        • Common errors
                                                                                          • FEM ndash Extensions amp Applications
                                                                                          • Appendices
                                                                                          • Vector Spaces
                                                                                          • Function Spaces
                                                                                          • Approximation Theory
                                                                                          • Sobolev spaces
                                                                                          • Operators
                                                                                          • Uniqueness of solutions
                                                                                          • Vainbergs theorem
                                                                                          • Energy norm
                                                                                          • Gauss quadrature
                                                                                          • Quadrature error estimates
                                                                                          • Index
Page 3: Computational Mechanics I { Introduction to FEA

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Contents

0 Preface 6

1 Introduction Continuum Mechanics and Notation 7

11 Kinematics 7

12 Kinetics 8

13 Computational Mechanics 12

14 (Initial) Boundary Value Problems 13

2 Dimensionless Forms 16

3 Direct Numerical Methods Finite Differences 18

4 Stability of Finite Difference Schemes 23

41 CFL Condition 23

42 von Neumann Analysis and Phase Error Analysis 24

43 Direct vs Indirect Methods 27

5 Methods of Weighted Residuals 28

51 Collocation Method 29

52 Subdomain Method 29

53 Method of Least Squares 30

54 Higher Dimensions 31

55 Galerkinrsquos Method 34

6 Variational Calculus 37

61 Functionals 37

62 Variations 39

63 Rayleigh-Ritz Method 42

7 The weak form 45

71 Classical and weak solutions 45

72 Equivalence of strong and weak forms 47

73 Approximate solutions 47

8 The mechanical variational problem at small strains 49

81 General case 49

82 Linear elasticity 51

9 Interpolation spaces 53

91 Shape functions 53

92 Approximation power and completeness 54

93 Completeness in higher dimensions 55

10 The Finite Element Method 56

11 Finite element spaces polynomial shape functions in 1D 59

111 2-node bar element 59

112 Problem assembly 62

3

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order 64

1131 Lagrangian interpolation 64

1132 Hierarchical interpolation 64

114 2-node beam element 65

115 A note on beam elements and boundary conditions 69

12 Shape Functions in higher dimensions 71

13 Simplicial elements 72

131 Linear Triangle (T3) 72

132 Extension to three dimensions 75

133 Finite element implementation 76

1331 Special case linear elasticity 77

1332 General case of non-linear elastic materials 77

134 Higher-order triangles and tetrahedra 77

14 The bilinear quadrilateral element 79

15 Higher-order elements Q8 Q9 8-node brick 83

16 Numerical quadrature 85

161 Example Riemann sums 85

162 Gauss quadrature 86

1621 Gauss-Legendre quadrature 87

1622 Other Gauss quadrature rules 88

163 Higher dimensions 88

17 FEM which quadrature rule to use 90

171 Integrals in the FE context 90

172 Which quadrature rule to use 90

18 Element defects shear locking and hourglassing 92

19 Assembly 95

20 Iterative solvers 96

201 Netwon-Raphson (NR) method 96

202 Damped Newton-Raphson (dNR) method 97

203 Quasi-Newton (QN) method 97

204 Line search method 98

205 Nonlinear Least Squares 98

206 Gradient flow method 99

207 Conjugate Gradient (CG) method 99

21 Boundary conditions 100

211 Neumann boundary conditions 100

212 Dirichlet boundary conditions 105

2121 Substitution 105

2122 Condensation 105

213 A note on Dirichlet boundary conditions in iterative solvers 106

4

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

214 Rigid body motion 107

22 Dynamics 109

23 Vibrations 114

231 Free undamped vibrations 114

232 Forced vibrations 117

233 Modal decomposition 118

234 Structural damping 120

24 Time-dependent transient solutions 121

241 Explicit time integration 121

242 A reinterpretation of finite differences 122

243 Implicit time integration 124

2431 Newmark-β method 124

244 HHT-α method 127

245 Use of mass matrices 127

25 Extensions 128

251 Finite kinematics 128

252 Thermal problems 130

26 Error analysis and adaptivity common mistakes 133

261 Finite element error analysis 133

262 Smoothing and adaptivity 135

263 Common errors 136

27 FEM ndash Extensions amp Applications 139

Appendices 142

A Vector Spaces 142

B Function Spaces 143

C Approximation Theory 147

D Sobolev spaces 150

E Operators 153

F Uniqueness of solutions 154

G Vainbergrsquos theorem 155

H Energy norm 156

I Gauss quadrature 157

J Quadrature error estimates 159

Index 160

5

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

0 Preface

Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientistsacross all disciplines Whether it is commercial software like Abaqusreg Ansysreg and LS-Dynareg

or open-source libraries such as fenics or FEAP ndash FEA techniques are available in variousflavors and have become an essential ingredient for the analysis of mechanical thermal andmulti-physics initial boundary value problems

The availability and ease of use of FEA tools comes with a risk though the ability to producecolorful plots by the push of a button does not obviate the userrsquos expert knowledge in deploy-ing FEA tools properly and responsibly (ultimately lives could be endangered and significanteconomic losses incurred if engineering design is flawed) What element types to use whatquadrature rules to use what stress components to plot how to interpolate or extrapolate andhow to present results those are questions to be answered by the FEA user and they requirea background knowledge on what the ldquoblack box FEArdquo does for us

To turn the black box into an versatile and understandable toolbox this course discusses thefundamentals of numerical methods and in particular the finite element method Rather thanstudying and using commercial software packages we study FEA from the basics and with thegoal in mind of understanding the theoretical underpinning and the details of numerical imple-mentations This of course requires us to review the underlying mechanical and mathematicaltheory and to discuss the wide variety of finite element types and choices to be made whenusing FEA

Since no course on computational methods would be effective without a computational compo-nent we will write our own finite element code (using MATLABreg) starting with simple barand beam elements for truss and frame problems and advancing to solid elements for static anddynamic analysis Throughout the course we will complete a total of five projects that buildupon each other and grow our finite element code over time in a modular fashion ndash ultimatelyproviding a simple but versatile FEA code that is no longer a black box but whose every singleline we will understand

In order to follow the course contents is assumed that you have a background in solid andstructural mechanics (equivalent to Mechanics 1-2 and Dynamics at ETH Zurich) as well asknowledge in analysis and linear algebra We will begin with a brief review of continuummechanics and an introduction to the notation used in this course after which we will dive intothe discussion of numerical methods

I apologize in advance for any typos that may have found their way into these lecture notesThis is a truly evolving set of notes which was started in the spring semester of 2019 and hasevolved significantly over time Note that this set of notes is not meant as a complete textbookand you are encouraged to take notes during lectures Though I made a great effort to ensurethese notes are free of essential typos I cannot rule out that some have remained If you spotany mistakes feel free to send me a highlighted PDF at the end of the semester so I can makesure those typos are corrected for future years

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

Dennis M KochmannZurich March 2021

6

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1 Introduction Continuum Mechanics and Notation

11 Kinematics

We describe a body Ω sub Rd with boundary partΩ as a collection of material points Each pointhas a position x isin Ω in a Cartesian coordinate system (x1 xd) in d dimensions with origin O

Points are described by vectors with respect to O which in turn are defined by components inthe Cartesian reference frame with basis e1 ed Therefore we write

x =d

sumi=1

xiei = xiei (11)

Here and in the following we use Einsteinrsquos summation convention which implies a summationover an index that appears twice in any product (for a thorough review of index notation seethe tensor notes available online) In the above example i is a dummy index and can bereplace by any other index For example an inner product of two vectors is written as

u sdot v = (d

sumi=1

uiei) sdot⎛⎝

d

sumj=1

vjej⎞⎠=

d

sumi=1

d

sumj=1

uivi(ei sdot ej) =d

sumi=1

uivi = uivi = ukvk (12)

Likewise the norm of a vector is

∥u∥ =radicu sdotu =

radicuiui (13)

The deformation and motion of a body Ω is described bya displacement field

u = u(x t) (14)

which to every undeformed point x isin Ω in its referenceconfiguration defines a unique deformed location y isin Rdsuch that

y(x t) = x +u(x t) (15)

x1

+

x2

x3

e1

e2

e3

+

x

WparaW

y

u

From the displacement field we may derive kinematic variables such as the velocity field

v(x t) = d

dtu(x t) (16)

and the acceleration field

a(x t) = d

dtv(x t) = d2

dt2u(x t) (17)

For convenience we also use dots to denote derivatives with respect to time so that v = u anda = v = u

Deformation is best described not by the displacement field (which would also include rigidbody motion) but by the strain tensor which is a second-order tensor with components

εij =1

2(partuipartxj

+partuj

partxi) = 1

2(uij + uji) rArr ε = 1

2[gradu + (gradu)T] (18)

7

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here used index notation again and to define the second-order tensor Specifically we usedthe gradient of a vector field defined as a second-order tensor with components

[gradu]ij =partuipartxj

= uij (19)

Here and in the following a comma in an index implies differentation with respect to the spatialx-component(s) following the comma

Recall that ε11 ε22 and ε33 are the nominal strains along in the three coordinate directionsof an infinitesimal cube of material εij (with i ne j) by contrast represent shear strains Bydefinition εij = εji or ε = εT ie the strain tensor is symmetric

12 Kinetics

In order to deform body Ω forces (or displacements) must be ap-plied Consider again an infinitesimal cube with (infinitesimal)force vectors dFi applied to each surface dAi normal to the xi-axis(positive in the +xi-direction negative in the minusxi-direction) Wedefine the components of the stress tensor σ as

σij =dFidAj

(110)

x1

x2

x3

s11

s21

s31

s22

s12s32

s13

s23

s33t1

-t1

t3

t2

Analogous to the strains components σ11 σ22 and σ33 represent nominal stresses (resultingin extension or compression of the cube along its axes) while σij (with i ne j) imply a shearstresses acting parallel to the surface that it is acting on (and resulting in angle changes withinthe cube) The complete (infinitesimal) force vector acting on a surface with normal n is givenby

t(n) = σn rArr [t(ei)] =⎛⎜⎝

t1t2t3

⎞⎟⎠=⎛⎜⎝

σ1i

σ2i

σ3i

⎞⎟⎠ (111)

ie the ith column of σ is the traction vector on a surface normal to ei Here and in thefollowing we use brackets to indicate vector (or tensor) components in the Cartesian frameNote that by angular momentum balance on the cube (and in close analogy to the strain tensor)we must have σ = σT (ie σ is symmetric)

Stresses and strains are linked by constitutive relations that depend on the material of whichbody Ω is made The simplest material model is linear elasticity for which stresses and strainsare linearly linked via the linear relation

σij = Cijklεkl hArr σ = Cε (112)

with a fourth-order elasticity tensor whose component Cijkl describes the linear dependenceof the stress component σij to the strain component εkl In principle C has d4 entries yetthe symmetry of both the stress and strain tensors as well as any existing material symmetriesreduce the number of independent material parameters required to describe C For the simplestcase of isotropy (ie the material behavior is the same in every direction) C can be describedby only two constants eg Youngrsquos modulus E and Poissionrsquos ratio ν or the Lame moduli λand micro

8

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

As a convenient alternative to defining the constitutive relation as a link between stresses andstrain we can encode the constitutive response in a strain energy density W = W (ε) whicheg for the case of linear elasticity reads

W = 1

2ε sdotCε hArr W = 1

2εijCijklεkl (113)

so that

σij =partW

partεij Cijkl =

partσij

partεkl (114)

Vector or tensor derivatives of the above type are to be understood component-wise (for detailsand a proper tensorial definition see the tensor notes available online)

In order to solve any mechanical problem we need governing equations that describe howstresses and strains vary over time and space These are given by the conservation or balancelaws First we consider the balance of linear momentum which for a macroscopic body Ωstates that

sumi

Fi =maCM (115)

which equates the sum of all forces applied externally to Ω to its total (constant) mass m andthe acceleration of its center of mass aCM Let us now consider body Ω as a deformable objectfor which we can write the above balance law using integrals over Ω Specifically (115) isequivalent to

intpartΩσn dS + int

ΩρbdV = int

Ωρa dV (116)

where the first term represents all external forces applied to the boundary partΩ of the bodythrough tractions σn the second term denotes external forces in the form of distributed bodyforces and the right-hand side stems from applying the definition of the center of mass and itsacceleration since

aCM = d2

dt2uCM = d2

dt2intΩ ρu dV

intΩ ρ dV= 1

mint

Ωρ

d2u

dt2dV = 1

mint

Ωρa dV (117)

Applying the divergence theorem to the first term in (116) viz

intpartΩσijnj dS = int

Ωσijj dV (118)

which defines the divergence of a second-order tensor as a vector with components

[divσ]i = σijj (119)

Rewriting the resulting equation gives

intΩ(divσ + ρb minus ρa) dV = 0 (120)

This relation must hold not only for the whole body Ω but also for any sub-body cut free fromΩ (as discussed in Mechanics 2 and 3) For the integral to vanish for any arbitrary subset of Ωwe must have

divσ + ρb minus ρa = 0 hArr divσ + ρb = ρa or σijj + ρbi = ρai (121)

which is the local form of the balance of linear momentum

9

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 11 One-dimensional elastic rod

Consider a long and slender rod that is deforming only along its x-axis The displacement field u = u(x t) describes the axial motionof each point on the rod so the associated acceleration field issimply a = a(x t) = u(x t) x

+

u(xt)

The only non-zero strain component is the axial strain εxx(x t) = ε(x t) = ux(x t) and theonly non-zero stress is the axial stress σxx(x t) = σ(x t) which for linear elasticity obeysσ(x t) = E(x)ε(x t) with Youngrsquos modulus E(x) that may vary with position x

Inserting all of this into the balance law of linear momentum gives

ρ(x)a(x t) = divσ(x t) rArr ρ(x)u(x t) = (σ(x t))x= (E(x)ux(x t))x (122)

For the special case of a constant density ρ(x) = ρ = const and constant modulus E(x) = E =const the above reduces to

ρu(x t) = Euxx(x t) hArr u(x t) = c2uxx(x t) with c =radic

E

ρ(123)

This is the one-dimensional wave equation governing the deformation and motion of the rodin one dimension and c is the longitudinal wave speed in the rod For the special case of staticswe have u(x t) = 0 for all x isin Ω and times t

mdashmdashmdashmdash

Example 12 Wave equation in higher dimensions

For the more general case of a body Ω undergoing linear elastic deformation over time thebalance law of linear momentum reads

ρ(x)a(x t) = divσ(x t) hArr ρ(x)ui(x t) = [Cijkl(x)ukl(x t)]j (124)

For the special case of a constant density ρ(x) = ρ = const and constant elastic modulus tensordsC(x) = C = const the above reduces to

ρui(x t) = Cijkl(x)ukjl(x t) (125)

This is sometimes referred to as the Navier equation governing the deformation and motionof a linear elastic body in higher dimensions As before for the special case of statics we haveu(x t) = 0 for all x isin Ω and for all times t

mdashmdashmdashmdash

The balance of energy provides another governing equation which is particularly of interst fornon-elastic problems as wel as for thermal problems The balance of energy states that thechange of internal energy E in a body Ω over time t balances the inward and outward flux ofenergy and the energy being produced inside the body (by some heat source density s) as wellas mechanical power P imposed on the body through mechanical work Mathematically thisimplies

d

dtE = int

Ωs dV minus int

partΩq sdotn dS + P (126)

We can use the divergence theorem to write

intpartΩq sdotn dS = int

partΩqini dS = int

Ωqii dS = int

Ωdivq dS (127)

10

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which defines the divergence of a vector as the scalar quantity

div(sdot) = (sdot)ii (128)

Energy is an extensive variable ie the total energy doubles when adding to bodies of thesame energy This is in contrast to intensive variables such as temperature or pressure whenadding to bosides having the same eg temperature Since energy is an extensive variable wecan introduce an energy density e and write

E = intΩe dV rArr d

dtE = int

Ωe dV (129)

The analogous applies to the mechanical work being a change in strain energy density so

P = d

dtint

ΩW dV = int

ΩW dV (130)

Rewriting the balance law of energy now yields

intΩe dV = int

Ωs dV minus int

Ωdivq dV + int

ΩW dV (131)

This can be rewritten as

intΩ(e minus s + divq minus W ) dV = 0 (132)

Since the balance of energy does not only have to hold for Ω but for any subbody ω sub Ω wemay conclude that the local energy balance equation is

e = W + s minus divq (133)

This is the local (ie pointwise) counterpart to the macroscopic energy balance and states thatat each point x isin Ω the rate of energy change (e) is given by the local production of heat (ρs)plus the local mechanical power supplied (W ) minus the heat lost by outward fluxes q awayfrom the point

Example 13 Heat conduction

Consider a purely thermal problem without mechanical energy (so W = 0) Thermally storedenergy is given by e = ρcvT with mass density ρ(x) constant specific heat capacity cv(x) andan unknown temperature field T = T (x t) Let us assume that heat conduction follows Fourierrsquoslaw ie

q(x t) = minusκ(x)gradT (x t) hArr qi(x t) = minusκ(x)Ti(x t) (134)

with a heat conductivity κ(x) The local energy balance equation then becomes

ρ(x)cv(x)T (x t) = [κ(x)Ti(x t)]i + s(x t) (135)

and for the special case of a homogeneous body with spatially constant material properties wearrive at the well-known heat equation (also known as the inhomogeneous Laplace equa-tion)

ρcvT (x t) = κnabla2T (x t) + s(x t) (136)

11

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

where we used the definition of the Laplacian viz Tii = nabla2T = ∆T Whenever we consider astatic problem we assume that the body is in equilibrium and the temperature field is constantwhich reduces the above to the Poisson equation

κ∆T = minuss (137)

Also for a 1D problem the heat equation with T = T (x t) reduces to

ρcvT (x t) = κTxx(x t) + s(x t) (138)

mdashmdashmdashmdash

13 Computational Mechanics

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

from reality to mathematical model a practical problem is turned into an abstractproblem by making a series of simplifications and assumptions thus introducing modelingerrors in order to define a proper mathematical problem

from mathematical model to numerical model if the mathematical model cannotbe solved analytically the sought infinite-dimensional solution is turned into a finite-dimensional solution by making approximations here discretizing the body Ω so that itsdescription involves a finite number of unknowns This incurrs discretization errors

from numerical model to results solving the numerical problem computationally gen-erally involves solution errors that stem from round-offfloating-point errors iterativesolution approaches etc

Ensuring that the results agree with the mathematical model (eg by comparing the numericalsolution to an analytical solution where available) is the step of verification while ensuringthat the obtained results properly reflects reality (eg by comparing the numerical solution toexperimental data) is the validation step

12

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 (Initial) Boundary Value Problems

So far we have seen how partial differential equations governthe thermal and mechanical behavior of solid bodies (and ofcourse those two can be coupled as well to describe the thermo-mechanical behavior of deformable bodies) In order to solve aproblem we need an initial boundary value problem (IBVP)which furnishes the above equations with appropriate boundaryconditions (BCs) and initial conditions (ICs)

To this end we subdivide the boundary partΩ of a body Ω into

t

u = u

W

paraWD

paraWN

partΩD equiv Dirichlet boundary prescribing the primary field (eg u T etc)

eg u(x t) = u(x t) on partΩD or T (x t) = T (x t) on partΩD (139)

partΩN equiv Neumann boundary prescribing derivatives of the primary field (eg εgradT etc)

eg t(x t) = σ(x t)n(x t) = t(x t) on partΩN or q(x t) = q(x t) on partΩN

(140)

Note that we may generally assume that

partΩD cup partΩN = partΩ and in most problems also partΩD cap partΩN = empty (141)

In addition all time-dependent problems require initial conditions eg

T (x0) = T0(x) forall x isin Ω

or u(x0) = u0(x) and v(x0) = v0(x) forall x isin Ω(142)

The number of required BCsICs depends on the order of a PDE eg

ρcvT = div(K gradT ) + ρs (143)

is first-order in time and therefore requires one IC eg T (x0) = T0(x) It is second-order inspace and hence requires BCs along all partΩ (eg two conditions per xi coordinate)

In summary we will have governing PDEs supplemented by ICs and BCs as required (egquasistatic problems of course do not require any initial conditions) Those need to be solvedfor the primary fields (eg temperature T or displacements u)

Any of the aforementioned PDEs can be written in an operator form introducing an operatorL For example we may abbreviate the 1D wave equation

u minus c2uxx = 0 rArr L[u] = 0 with L = part

partt2minus c2 part

partx2(144)

One key feature of all PDEs discussed so far (including the heat and wave equations) is thattheir operators are linear A linear operator L is characterized by

L[α1u1 + βu2] = α1L[u1] +α2L[u2] forall α1 α2 isin R and for all functions u1 u2 (145)

In the following we will need to be more specific about what we mean by all functions (since wemay need to classify admissible or useful classes of functions) but this is left for the examplesin the following sections A few examples involving linear operators are summarized here

13

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

wave equation in one dimension (second order in space and time)

L[u] = 0 with L = part

partt2minus c2 part

partx2hArr u = c2uxx (146)

heat equation in one dimension (second order in space first order in time)

L[T ] = s with L = ρcvpart

parttminus κ part

2

partx2hArr ρcvT = κTxx + s (147)

advection or transport equation (first order in space and time) with flow speed v

L[u] = 0 with L = part

partt+ v part

partxhArr u + v ux = 0 (148)

Similarly boundary conditions can also be expressed by linear operators For example for wemay define boundary operators for

boundary tractions of a one-dimensional bar

B[u] = t with B = E part

partxhArr Eux = t (149)

boundary flux in a one-dimensional rod

B[T ] = q with B = minusκ partpartx

hArr minus κTx = q (150)

Unfortunately analytical solutions (I)BVPs of the above type are hardly ever available ndash exceptfor relatively simple problems involving

simple geometries

simple material behavior

simple ICsBCs

For realistic geometries materials andor ICsBCs one usually requires numerical techniquesto obtain approximate solutions numerically

We point out that computing machines have two main shortcomings that require the discussionof topics in the following few sections

First computers do not know any units To this end any numerical technique must cope withthe intrinsic units present in physical problems This is commonly in done in one of two wayseither one defines a set of consistent units (eg only SI units) and tacitly implies that thoseunits are being used throughout (this is common practice in most commercial FEA codes) orone reduces the physical system to a dimensionless problem This will be discussed in Section 2

Second computers cannot deal with infinity For this reason any numerical technique has theobjective to turn an infinite-dimensional problem into a finite-dimensional one The exactsolution to any of the above systems of IBVPs lives within an inifinite-dimensional functionspace In other words we donrsquot know much about the sought function fields u(x t) or T (x t) a-priori so the problem is not to simply identify the coefficients of some known type of polynomialbut to find an arbitrary function (with some differentiability constraints) Numerical techniquesreduce such problems commonly to finite-dimensional ones Let us consider a few examples

14

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Any function can be expressed as an infinite Fourier series or as a polynomial series(those series have an infinite number of terms and hence coefficients) We can aim forapproximations by considering eg only the lowest n terms of such a truncated seriesand find the respective coefficients by some numerical method This way we have reducedthe infinite-dimensional problem to an n-dimensional one

Any computer stores and operates rational numbers (with infinite precision) with a finitenumber 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 isin Ω andfor all times we could set out to find solutions that are known only at certain discretepoints xi and possibly also at discrete time steps tα This defines the concept of finitedifferences which will be discussed in Section 3

15

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

2 Dimensionless Forms

Computer programming languages have no notion of units which is why one usually definesa set of units that are commonly agreed upon or as an elegant alternative one introducesdimensionless forms before solving problems numerically Let us illustrate the procedure throughan example

Example 21 Linear elastic spring vibration

Consider a particle of mass m attached to a linear elastic spring of stiffness k subjected toan external force F (t) The vibration of the particle is described by the equation of motionalong with an initial condition (here assuming that the spring is unstretched initially) Let u(t)denote the position of the mass then

mu(t) = minusku + F (t)u(0) = u0

(21)

We start by making the unknown displacement u dimensionless by the normalization

u = u

u0 (22)

Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0eg) but we could use any non-zero length for this normalization Insertion into the equationof motion and dividing by m yields

part2

partt2u = minus k

mu + F (t)

u0m

u(0) = 1

(23)

The first equation shows thatradicmk must have the units of time so we may define

t = tradicmk

= tradic

k

mrArr part2

partt2u = minusu + F (t)

ku0(24)

Finally introducing a dimensionless force as follows leads to the dimensionless form of theoriginal problem

f(t) =F (t

radicmk)

ku0rArr

part2

partt2u = minusu + f (t)

u(0) = 1

(25)

mdashmdashmdashmdash

Example 22 Heat equation

Let us consider the heat equation derived above as

ρcV T = sh + knabla2T for x isin Ω (26)

with some suitable boundary and initial conditions We start by introducing a reference lengthL (eg the size of the body) and a reference temperature T0 (eg the initial temperature ofthe body) and defining

x = xL

rArr part

partx= 1

L

part

partxand T = T

T0 (27)

16

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This turns the heat equation into

ρcV T0T = sh + kT0

L2nabla2T with nabla = ( part

partx1

part

partxd)

T

(28)

Next we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into

ρcV T0L2

kT0T = shL

2

kT0+nabla2

T (29)

Obviously the last term on the right-hand side is dimensionless which implies that also theremaining two terms must be dimensionless This allows us to make two more definitions ofdimensionless type viz

sh =shL

2

kT0and

ρcV T0L2

kT0

part

partt= part

partthArr t = kT0

ρcV T0L2t (210)

This finally leads to the dimensionless heat equation

T t = sh +nabla2T (211)

Note that in an analogous fashion the boundary and initial conditions can also be made dimen-sionless Dirichlet boundary conditions simply use the definition of the dimensionless temper-ature directly converting T = T T0 Neumann boundary conditions of the type q = minusknablaT = qcan be transformed according to

minuskT0

LnablaT = q rArr minusnablaT = q with q = qL

kT0 (212)

mdashmdashmdashmdash

Analogously any other problem can be made dimensionless by introducing proper normaliza-tions and rewriting the governing equations and any initial andor boundary conditions A moregeneral protocol for finding dimensionless definitions based on a given set of system parametersis given by Buckinghamrsquos Π-theorem which is not discussed In the following we typicallyassume that any given problem is dimensionless (even though not showing the normalizationspecifically)

17

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

3 Direct Numerical Methods Finite Differences

To numerically solve such ODEsPDEs we generally have so-called direct and indirect methods

Direct methods aim to solve the governing PDEsdirectly for example by approximating all spatial andtemporal derivatives using finite differences (FD)Consider eg an unknown scalar field u(x t) whosederivatives appear in the governing PDEs (for simplifictylet us consider only a 1D problem whose results caneasily be extended to higher dimensions by applying thederivatives component-wise)

We introduce a regular (∆x∆t)-grid with constant spac-ings ∆x = xi+1 = xi and ∆t = tα+1 minus tα and we define thesought field u only at the grid points writing

uαi = u(xi tα) (31)

x

tDx

Dt

xi xi+1xi-1

+at

a+1ta-1t

a(t x )i

In order to approximate derivatives at the grid points we use Taylor expansions eg inspace

u(xi+1 tα) = uαi+1 = uαi +∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

+ (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(32)

u(ximinus1 tα) = uαiminus1 = uαi minus∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

minus (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(33)

where O(sdot) denotes on the order of (sdot) Addition of the two equations leads to

uαi+1+uαiminus1 = 2uαi +(∆x)2 part2u

partx2∣xitα

+O(∆x4) rArr part2u

partx2(xi tα) =

uαi+1 minus 2uαi + uαiminus1

(∆x)2+O(∆x2)

(34)

This is the second-derivative central difference approximation (which is second-order ac-curate as evident from O(∆x2))

Analogously subtraction of the two equations gives the first-derivative central differenceapproximation (which is second-order accurate as well)

uαi+1 minus uαiminus1 = 2∆xpartu

partx∣xitα

+O(∆x3) rArr partu

partx(xi tα) =

uαi+1 minus uαiminus1

2∆x+O(∆x2) (35)

Of course the same can be carried out for derivatives in time yielding analogously eg

uα+1i minus uαminus1

i = 2∆tpartu

partt∣xitα

+O(∆t3) rArr partu

partt(xi tα) =

uα+1i minus uαminus1

i

2∆t+O(∆t2) (36)

Many other such finite-difference approximations of derivatives can be obtained in a similarfashion For example a simpler first-derivative stencil is obtained from the first Taylor equa-tion (32) alone

uα+1i minus uαi = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uα+1i minus uαi

∆t+O(∆t) (37)

18

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which is known as the (first-order accurate) first-derivative forward-Euler approximation

Analogously we use the second Taylor expansion (33) to obtain the first-derivative backward-Euler approximation (which is first-order accurate)

uαi minus uαminus1i = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uαi minus uαminus1i

∆t+O(∆t) (38)

In order to numerically solve a PDE directly we choose suitable finite-difference approximationsfor all appearing derivatives Of course an extension of the above to non-constant grid spacings∆tα and ∆xi is straight-forward Also when dealing with higher dimensions any chosen stencilis applied to each partial derivative

Example 31 Heat equation by finite differences in 1D

Consider the general form of the 1D heat equation

T (x t) = k Txx(x t) + r(x t) (39)

When using the second-order central-difference approximation for the spatial and the forward-Euler approximation for the temporal derivative in the heat equation the discretized governingequation becomes

Tα+1i minus Tαi

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (310)

which in the limit ∆t∆xrarr 0 is expected to converge towards the same solution as the governingequation (this is the requirement of consistency of the discretized equation) Notice that theright-hand side of (310) does not involve Tα+1

i nor any information at the new time tα+1 whichis found only on the left-hand side Such time-dependent finite-difference schemes are calledexplicit

As a key feature of explicit schemes one can easily solve for Tα+1i at the new time for known

values Tαi at the current time and Tαminus1i at the previous time without solving a system of

equations Specifically solving the above for Tα+1i yields the update rule

Tα+1i asymp Tαi + k∆t

(∆x)2(Tαi+1 minus 2Tαi + Tαiminus1) +∆t r(xi tα) (311)

By contrast when using the backward-Euler approximation we obtain

Tαi minus Tαminus1i

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (312)

which is a linear system to be solved for Tα+1i at the newest time step (which is here α) Such

a time-dependent finite-difference scheme which has unknown degrees of freedom at the newesttime step on both sides of the equation is called an implicit scheme

Let us rewrite the above implicit approximation of the heat equation as

minuscTαi+1 + (1 + 2c)Tαi minus cTαiminus1 asymp ∆t r(xi tα) + Tαminus1i with c = k∆t

(∆x)2 (313)

19

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The solution for a system of n grid points in space is obtained from solving

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

⋱⋱minusc 1 + 2c minusc

minusc 1 + 2c minuscminusc 1 + 2c minusc

⋱⋱

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

Tα1⋮⋮Tαi⋮⋮Tαn

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

∆t rα1 + Tαminus11

⋮⋮

∆t rαi + Tαminus1i

⋮⋮

∆t rαn + Tαminus1n

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

(314)

Note that suitable boundary conditions must be supplied For example if we have theessential boundary condition Tαi = Ti(tα) we may replace the equation for Tαi in the abovesystem (ie the αth row in (314)) by Tαi = Ti(tα) By contrast if we have a natural boundarycondition Tx(xi tα) = qi(tα) then we need to introduce a finite-difference stencil to Tx(xi tα)and again replace the respective equation in the above system

mdashmdashmdashmdash

Any of the above finite-difference schemes can be interpreted as a stencil (which may alsoreveal the required BCsICs) For example the explicit and implicit update rules given byrespectively (311) and (2430) have the stencils shown below revealing how information ispassed from time step to time step (and also revealing the explicit vs implicit nature of eachfinite-difference scheme)

i i +1i -1

Dx

Dt

a

a+1

a-1i i +1i -1

Dx

Dt

a

a+1

a-1

(a) explicit stencil (b) implicit stencil

Example 32 Bar under its own weight

Analogous finite difference approaches can be taken forquasistatic problems where a time-independent solutionis thought in one or several dimensions For exampleconsider a vertical elastic bar of constant Youngrsquos mod-ulus E and length L clamped at its top end deformingunder its own weight The unknown displacement field isu(x) as a function of the axial x-coordinate Gravity actsdownward In this case the governing equation is linearmomentum balance viz

divσ(x) + ρg = 0 rArr uxx = minusρg

E (315)

x

u(x) L

+

g

+

xi+1

xi

xi-1

ui

x0

xn

Dx

Boundary conditions are (assuming a free end at x = L)

u(0) = 0 and F (L) = EAux(L) = 0 hArr ux(L) = 0 (316)

We can easily find an analytical solution for this case by integrating (315) twice with respectto x and inserting the boundary conditions which yields

u(x) = ρg

2E(2L minus x)x (317)

20

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us discretize the bar into n+ 1 segments of equal lengths ∆x = L(n+ 1) so that the (n+ 1)grid points are located at xi = in for i = 0 n We may use a second-order central-differenceapproximation for the second derivative with respect to x leading to

ui+1 minus 2ui + uiminus1

(∆x)2= minusρg

Ewith u0 = 0 and

un+1 minus un∆x

= 0 (318)

where we introduced a ghost node at xn+1 = xn + ∆x to enforce the free traction boundarycondition via a first-order forward-Euler approximation and the central-difference stencil isapplied to update all nodes i = 1 n while nodes 0 and n + 1 are updated by the boundaryconditions u0 = 0 and un+1 = un This results in a linear system of equations

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

1 0 0 0 ⋱1 minus2 1

1 minus2 11 minus2 1

⋱1 minus2 1

minus1 1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

u0

⋮⋮ui⋮⋮unun+1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

0⋮ccc⋮c0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

with c = minusρgE

(∆x)2 (319)

Notice how we replaced the first and last row in the matrix and the respective entries in theright-hand-side vector in order to enforce the two boundary conditions This is a convenientstrategy to impose boundary conditions directly within the system to be solved (which we willalso exploit later in the context of finite elements) Solving the above linear systems yields theapproximate finite-difference solution

This is not a time-dependent problem hence our above definition of explicit vs implicit schemesdoes 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

Shown below is the solution obtained for n = 9 (green) n = 19 (purple) n = 29 (light blue)n = 49 (orange) and n = 99 (red) showing convergence with increasing number of grid pointstowards the exact solution u(x) which is included as the solid blue line (Results are normalizedsuch that u = uE

ρgL2 and x = xL) Note that convergence is from below ie the discretized bar

appears stiffer than it is in reality (a fact that we will get back to later)

02 04 06 08 10

01

02

03

04

05

x

u

mdashmdashmdashmdash

Notice that the above finite-difference approximation also admits a physical interpretation inthe following sense Imagine that we subdivide the bar into n bars each of length ∆x = Ln

21

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We can replace a bar by an elastic spring of effective stiffness k = EA∆x = nEAL At thesame time each bar carries a weight m = ρA∆x = ρALn which we may distribute evenly to itstwo ends As a result we arrive at a chain of n+1 masses (the inner ones being m the first andlast ones m2) connected by linear springs If we formulate the system of equations resultingfrom the static force equilibrium of eg the ith mass we obtain

nEA

L(ui minus uiminus1) minus

nEA

L(ui+1 minus ui) minus gρALn = 0 (320)

or (after some simplification)

ui+1 minus 2ui + uiminus1 = minusρgE(Ln)2 (321)

which is identical to (318) and (319) (for each inner mass while the first and last differ)

x

u(x) L

+

g+

xi+1

xi

xi-1

ui

x0

xn

Dx

+

ui

Dxmmm

mm2

m2

kkk

m2

m2kDx =

+ =

22

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

4 Stability of Finite Difference Schemes

So far we have derived first- and higher-order finite difference approximations in space and timeand discussed the explicit and implicit finite-difference schemes resulting from applying thoseapproximations to PDEs We still need to discuss the suitability of particular combinations offinite-difference combinations in space and time for a particular PDE This raises the questionof finite-difference stability which is classically associated with two names

the Courant-Friedrichs-Levy or CFL condition is a necessary condition for the sta-bility of a finite-difference scheme

von Neumann analysis yields a sufficient condition or the stability of a finite-differencescheme and is related to phase error analysis

We will discuss all three concepts at the example of the 1D wave equation below

41 CFL Condition

Every finite-difference stencil comes with a numerical domain of dependence For exampleconsider the 1D wave equation which when discretized by second-order central-difference ap-proximations in space and time becomes

uα+1i minus 2uαi + uαminus1

i

(∆t)2= c2u

αi+1 minus 2uαi + uαiminus1

(∆x)2 (41)

Drawing the stencil in the shape of a plus sign indicatesthat the solution for uα+1

i depends on information at theprevous time step specifically on uαi+1 uαi and uα+1

iminus1 (aswell as uαminus1

i from two time steps ago) When repeatingto apply this stencil on a large grid we may draw thenumerical domain of dependence as all those pointswhose information was affected the value uα+1

i For theabove example this turns into a triangular fan for whichany change to the value of u at a grid point interior tothe fan affects the value of uα+1

i whereas points outsidethe fan do not impact the value of uα+1

i The slope of thetwo curves limiting our fan in the x-t-diagram are simplyplusmn∆t∆x

Dx

Dt

mathematical domain of dependence

numerical domainof dependencec

We may also define the mathematical domain of dependence by studying the exact solution ofthe wave equation which we know is composed of characteristics of the type

u(x t) = f1(x + ct) + f2(x minus ct) (42)

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

x + ct = const and x minus ct = const (43)

are characteristics of the solution Now consider a grid point (xi tα) such that the character-istics through this point are defined by

x + ct = xi + ctα and x minus ct = xi minus ctα (44)

23

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The fan enclosed below these two lines is the mathematical domain of dependence sinceany point inside the fan can affect the solution on the bounding curves of the cone and hencecan affect u(xi tα) The latter does not apply to points outside the fan More mathematicallyspeaking we may invoke drsquoAlembertrsquos formula if the initial conditions are supplied as u(x t0) =u0(x) and u(x t0) = v0(x) then

u(xi tα) =u0(xi + ctα) + u0(xi minus ctα)

2+ 1

2cint

xi+ctα

ximinusctαv0(y)dy (45)

which again confirms that u(xi tα) depends only on information at time t0 = 0 contained withinxi minus ctα le x le xi + ctα

The Courant-Friedrichs-Levy (CFL) condition now states that convergence and thusstability requires that the mathematical domain of dependence is contained in the numericaldomain of dependence

For the above example of the 1D wave equation this implies that the fan of the mathematicaldomain of dependence must be enclosed by the fan of the numerical domain of dependencewhich ndash by comparing the slopes of the bounding lines ndash is equivalent to requiring that

minus∆x

∆tle c le ∆x

∆thArr minus 1 le c∆t

∆xle 1 hArr ∣c∆t

∆x∣ le 1 (46)

This is the CFL condition for the 1D wave equation which is only a necessary conditionof stability In order to determine the sufficient condition(s) of stability we need to discuss themethods described in the following

42 von Neumann Analysis and Phase Error Analysis

A sufficient condition of stability is obtained from so-called von Neumann analysis Sinceit is very closely related to phase error analysis we will discuss these two together Let usagain consider the stencil (41) for the 1D wave equation Losely speaking stability requiresthat small errors in the numerical solution uαi (which always occur due to round-off errors andmachine precision) remain bounded and do not grow over time when the finite-difference schemeis applied time and time again The latter would imply instability and result in exponentialgrowth of numerical noise over time

Let us assume that at any time t there is a small perturbation to the solution written as

uαj = ei(ωtαminuskxj) = ei(ωα∆tminusj∆xk) (47)

which is of harmonic type Note that any general noise function can always be decomposed asa Fourier series so if we can show that the above function does not grow over time for arbitraryω and k then any perturbation of the solution should remain stable Note that we deliberatelydid not include an amplitude since it does not affect the outcome of a linear PDE

Inserting (47) into (41) results in

ei(ω(α+1)∆tminusj∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ω(αminus1)∆tminusj∆xk)

= c2(∆t)2

(∆x)2[ei(ωα∆tminus(j+1)∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ωα∆tminus(jminus1)∆xk)]

(48)

Dividing by uαj = ei(ωα∆tminusj∆xk) yields

eiω∆t minus 2 + eminusiω∆t = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + eminusi∆xk] (49)

24

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or (dividing by 2 and using Eulerrsquos identity for the cosine)

cos(ω∆t) minus 1 = σ2 [cos(k∆x) minus 1] with σ = c∆t

∆x (410)

To establish a relation between ω and k we need to consider three cases

σ = 1 in this case we obtain cos(ω∆t) = cos(k∆x) or ω∆t = plusmnk∆x

∣σ∣ gt 1 in this case we have cos(ω∆t) = 1+σ2 [cos(k∆x) minus 1] and there are cases of k forwhich the right-hand side becomes lt minus1 meaning that there are solutions ω isin C Hencecertain wave vectors k cause instability in the form of expontential growth of solutions

∣σ∣ lt 1 in this case there are frequencies ω for which no k isin R exists (only solutions k isin C)This implies that waves at those frequencies vanish since they are damped out by thescheme

In summary the scheme is unstable if ∣σ∣ gt 1 or in other words the scheme is conditionallystable and stability requires that

∣σ∣ le 1 hArr ∣c∆t

∆x∣ le 1 hArr minus 1 le c∆t

∆xle 1 (411)

We also conclude that σ = 1 leads to no damping while ∣σ∣ lt 1 leads to numerical damping ofcertain frequencies

Classical von Neumann analysis is not interested in phase delays and therefore uses a slightlymodified approach writing z = eiω∆t so that

uαj = zαeminusikxj with z isin C (412)

This implies that for any grid point xj the solution from one time step to the next relates as

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

=uα+1j

uαj= z (413)

Stability hence requires that ∥z∥ le 1 since otherwise again exponential growth occurs over timeInsertion of (412) into the finite-difference approximated wave equation (41) and dividing byzα yields

z minus 2 + zminus1 = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + e+i∆xk] = 2σ2 [cos(k∆x) minus 1] (414)

Solving the above for z leads to

z = 1 + σ2 [cos(k∆x) minus 1] plusmn ∣σ∣radic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (415)

Now observe that if ∣σ∣ le 1 then the radicand is always non-positive and soradic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = iradicminus [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (416)

which leads to

∥z∥2 = (1 + σ2 [cos(k∆x) minus 1])2 minus σ2 [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = 1 (417)

Therefore ∣σ∣ le 1 implies a stable scheme Otherwise the scheme is unstable

Finally let us note that the Lax-Richtmyer theorem states that a finite-difference schemeconverges if and only if (1) the scheme is consistent (ie all truncation errors decay as∆x∆trarr 0) and (2) the scheme is stable

25

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 41 Advection equation by an implicit finite-difference scheme

As mentioned in Section 14 the advection equation governing eg fluid transport processesis given by

u(x t) + v ux(x t) = 0 (418)

here written for a 1D scenario for instructive purposes with a constant advection speed v isin RLet us introduce a regular grid in both space and time and introduce the dimensionless speed

c = v ∆t

∆x (419)

Let us discretize the advection equation by a backward-Euler approximation in time and afirst-order central difference approximation in space ie

u(xj tα) =uαj minus uαminus1

j

∆t+O(∆t) ux(xj tα) =

uαj+1 minus uαjminus1

2∆x+O(∆x2) (420)

Insertion into (418) leads to

uαj minus uαminus1j

∆t= minusv

uαj+1 minus uαjminus1

2∆xhArr uαj minus uαminus1

j = minus c2(uαj+1 minus uαjminus1) (421)

Note that this is an implicit stencil since it requires solving a system of equations for theunknown field u at time tα

Let us perform von Neumann stability analysis which starts by assuming an error of the type(note that wersquoll replace the spatial index i by j to not confuse it with i =

radicminus1)

uαj = zαeminusikxj with z isin C (422)

Insertion into uαj minus uαminus1j = minusc (uαj+1 minus uαjminus1) from (421) gives

zαeminusikxj minus zαminus1eminusikxj = minus c2(zαeminusikxj+1 minus zαeminusikxjminus1) (423)

Using that xjplusmn1 = xj plusmn∆x and dividing by zαeminusikxj results in

1 minus 1

z= minus c

2(eminusik∆x minus e+ik∆x) = c

2(eik∆x minus eminusik∆x) = c

22i sin(k∆x) = i c sin(k∆x) (424)

and isolating z isin C gives

1

z= 1 minus i c sin(k∆x) hArr 1

∥z∥2= 1 + c2 sin2(k∆x) (425)

and thus

∥z∥2 = 1

1 + c2 sin2(k∆x)le 1 (426)

We conclude that irrespective of k and ∆x the right-hand side is always less or equal to1 implying that ∥z∥ le 1 so that the scheme is unconditionally stable (not that this isindependent of the sign of v as may be expected) Unconditional stability is generally notobserved in explicit schemes and can be a significant advantage of an implicit scheme (if itapplies not every implicit scheme is unconditionally stable)

mdashmdashmdashmdash

26

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

43 Direct vs Indirect Methods

The above finite-difference schemes are powerful direct numerical techniques but they comewith significant disadvantages Problems associated with direct methods include the following

a regular grid is required (which is fine for many fluid mechanics problems but oftentimesproblematic for complex solid geometries especially when undergoing large deformation)

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 primaryfields and their errors are undefined between grid points) This can be problematic whenseeking approximate solutions that are ldquoglobally optimalrdquo Also the question needs toaddressed how BCsICs are applied in between grid points and how about moving BCsare imposed

stabilityefficiency issues arise due to the above stability restrictions choices of ∆t and∆x are not arbitrary but ndash aside from accuracy concerns ndash the stability of especially ofexplicit finite-difference schemes dictates the maximum step widths to be used (whichmay impose severe computational costs due to small steps sizes)

As an alternative indirect methods do not solve the ODEsPDEs directly but search forldquooptimalrdquo approximations Essentially one reduces the infinite-dimensional problem to a finite-dimensional problem by considering solutions uh(x t) asymp u(x t) that satisfy the BCs and ICsand approximate the exact solution as well as possible Particular questions to be addressedinclude

How do we choose uh(x t) For example are these globally or locally defined functionsWhich choices minimize the error

What does ldquooptimalrdquo mean in this context How do we quantify the error betweenapproximation and exact solution

What types of functions should be used for uh(x t) ndash eg polynomial or Fourier seriespiecewise-polynomial or maybe even piece-constant

We need a few more concepts to address those questions Note that in the following we willformulate most concepts in 1D with analogous generalizations possible for higher dimensionsunless specifically mentioned

27

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

5 Methods of Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh(x t) thatminimize the total error (which still needs to be defined) when comparing with the exact solutionu(x t) For simplicity let us drop the time dependence for now and only consider (quasi)staticproblems We will add dynamics later in the course for completeness but it is beneficial to firstdiscuss the instructive static scenario Also let us start with 1D problems seeking uh(x) andlater expand all concepts to higher dimensions as needed

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

uh(x) =n

suma=1

caφa(x) (51)

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-prioriExamples are polynomials ie φa(x) = xa or Fourier series with eg φa(x) = sin(πax)

ca are unknown coefficients to be determined

We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solvedfor n coefficients) Note that nrarrinfin yields the exact solution if a proper orthogonal set of basisfunctions is chosen (eg polynomials or Fourier series) while we deliberately choose n≪infin sothat the resulting finite-dimensional problem is computationally tractable

One constraint to be imposed is that the approximate function uh(x) must satisfy all Dirichlet(essential) boundary conditions (otherwise it does not qualify as a solution to the problem)One possible approach is to separate the boundary part from the interior part by defining

uh(x) = upartΩD(x) +

n

suma=1

caφa(x) with φa(x) = 0 on partΩD (52)

and upartΩD(x) satisfying all essential boundary conditions Alternatively one can impose the es-

sential boundary conditions onto the unknown coefficients as a direct constraint to be accountedfor while solving (we will use this latter strategy in most of the below examples)

As explored in Section 14 the general boundary value problem we aim to solve can be writtenin general as

find u(x) st L[u] = s for x isin Ω and Bj[u] = tj for x isin partΩj (j = 1 k) (53)

where L is a linear differential operator and Bj is a linear differential boundary operator Notethat we here account for the fact that we may have k different boundary conditions

We now insert our approximate solution uh(x) into the above set of PDEs knowing that itwill in general not satisfy those governing equations (otherwise we would have found an exactsolution) As a consequence we obtain residuals defined by

rΩ = L[uh] minus s and rpartΩj = Bj[uh] minus tj (54)

Unless we have found the exact solution we will have rΩ ne 0 and rpartΩj ne 0 and we seek coefficients

ca (a = 1 n) such that our approximate solution uh(x) satisfies rΩ asymp 0 and rpartΩj asymp 0 in somesense In order to find the n coefficients we need n equations

28

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

To this end the family of methods of weighted residuals defines n total residuals as

Ri = intΩrΩWidV + ξ2

k

sumj=1int

ΩrpartΩjwidS rArr Ri = 0 for i = 1 n (55)

where Wi and wi (i = 1 n) are weighting functions for the bulk and surface residualsrespectively which define ndash loosely speaking ndash the priority of where the residuals are to beevaluated ξ2 gt 0 is an in principle arbitrary constant introduced for unit compatibility (andwe write ξ2 instead of ξ to make sure the pre-factor in front of the second integral is positiveassuming ξ isin R) Now there are various ways to define the weights (each of different difficultyand accuracy levels) and this leads to the following methods of weighted residuals

51 Collocation Method

A straight-forward approach is to evaluate the residuals only at specific locations which resultsin the so-called collocation method

To this end we define

Wi = δ(x minus xi) for xi isin Ω i = 1 n minus kwi = δ(x minus xi) for xi isin partΩiminus(nminusk) i = n minus k + 1 n

(56)

so that the equations to be solved are

rΩ(xi) = 0 for i = 1 n minus krpartΩiminus(nminusk)(xi) = 0 for i = n minus k + 1 n

(57)W

+x1

+x2

+x3

+x4

+x5

t+

x6

Points xi (i = 1 n) are called collocation points This method is closest to the finite-difference techniques discussed before since it aims to minimize the error only at discretepoints (much like finite differences aimed to solve the PDE exactly only on a discrete grid)For convenience we here chose k collocation points on the k boundaries with natural boundaryconditions (one per boundary) while one could also choose this distribution differently as longas sufficiently many equations are available

52 Subdomain Method

The subdomain method is similar in spirit to the collocationmethod but instead of evaluating the residuals at specific colloca-tion points we subdivide the body and its boundary into subdo-mains and require the total residual to vanish on average over eachof the subdomains Therefore we define

Wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isinDi

0 elsefor i = 1 n minus k (58)

and

t

WD1

D2

D3

wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isin partΩiminus(nminusk)

0 elsefor i = n minus k + 1 n (59)

where Di sub Ω for i = 1 n minus k are (possibly overlapping) domains within the body whilepartΩi sub partΩ are the k boundary domains

29

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the n equations to be solved for the n coefficients ca are

intDirΩ dV = 0 for i = 1 n minus k

intpartΩi

rpartΩi dS = 0 for i = 1 k(510)

Keep in mind that we here aim to solve the PDE and boundary conditions only on averageacross the respective domains

53 Method of Least Squares

The least squares method is most intuitive and seeks to determine the unknown coefficientsby minimizing the bulk and boundary residuals To this end we introduce the total error

E = intΩr2

Ω dV + ξ2k

sumj=1intpartΩj

r2partΩj

dS (511)

and obtain the coefficients as the minimizers thereof ie

c1 cn = arg minE (512)

As before ξ2 gt 0 is an arbitrary (positive) parameter introduced for dimensional consistencyThe associated stationarity conditions become

partE

partca= 0 hArr int

ΩrΩpartrΩ

partcadV + ξ2

k

sumj=1intpartΩj

rpartΩj

partrpartΩj

partcadS = 0 for a = 1 n (513)

from which we realize by comparing to (55) that we have yet another method of weightedresiduals and that we have effectively chosen

Wa =partrΩ

partca and wa =

partrpartΩj

partcaon Neumann boundary partΩj (514)

Recalling our definitions and exploiting the properties of a linear operator we may write

uh(x) =n

suma=1

caφa(x) rArr rΩ = L[uh] minus s =n

suma=1

caL[φa(x)] minus s (515)

and

rpartΩj = Bj[uh] minus tj =

n

suma=1

caBj[φa(x)] minus tj (516)

so that

Wa =partrΩ

partca= L[φa(x)] wa =

partrpartΩj

partca= Bj[φa(x)] on Neumann boundary partΩj (517)

This turns the stationarity conditions (513) for a = 1 n into1

intΩ(n

sumb=1

cbL[φb(x)] minus s)L[φa(x)]dV

+ ξ2k

sumj=1intpartΩj

(n

sumb=1

cbBj[φb(x)] minus tj)Bj[φa(x)]dS = 0

(518)

1Here and everywhere in the following we will switch the summation index when multiplying to sums in orderto avoid duplicated indices and ambiguity eg rΩ

partrΩpartca

= (sumnb=1 c

bL[φb(x)] minus s)L[φa(x)] where summation index

b is used instead of a in parentheses in order to avoid ambiguity when multiplying by L[φa(x)]

30

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or after some re-arrangement (separating terms depending on cb from those independent of thecoefficients)

n

sumb=1

⎡⎢⎢⎢⎢⎣int

ΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS

⎤⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Kab

cb

= intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBi[φa(x)]dS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFa

for a = 1 n

(519)

This is a linear system of n equations which may be rewritten concisely as

n

sumb=1

Kabcb = F a for a = 1 n or Kc = F (520)

where we grouped all unknown coefficients into the vector

c = (c1 cn)T(521)

Matrix K and vector F are both constant and their components read respectively

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (522)

and

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (523)

We notice that K is by definition symmetric (Kab = Kba) For reasons to be explained laterwe here and in the following use the notation Kab for the matrix component associated withcoefficients a and b (instead of writing Kab) Let us accept this for now ndash we will get back to thisnotation when discussing higher dimensions where each coefficient ca isin Rd has d componentsso we need to find all cai with a = 1 n and i = 1 d and we will need matrices with Kab

ij

54 Higher Dimensions

Any of the above methods can be extended to higher spatial dimensions as needed (after all onlyfew real-world problems can be reduced to one dimension) In higher dimensions we generallyseek a function u(x) ∶ Ωrarr Rd and introduce the approximation

uh(x) = sumaisinT

caφa(x) (524)

where ca isin Rd are the unknown vector coefficients and φa(x) denote the basis functions Forexample we may again use polynomial or Fourier basis functions eg φa(x) = sin(πa sdotx) withappropriate choices of the vector set T Now we need d times n independent equations to solve forall components of the n coefficient vectors ca (d equations per any of the n coefficients) It issimplest to explain these concepts through practical examples which will follow later

31

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 51 Rotating bar with attached point mass

Consider a bar of length L constant Youngrsquos modulus E cross-sectional area A and mass density ρ which is hinged at the originand rotating about this hinge with a constant angular velocity ωIn addition a point mass m is attached at the free end of therotating bar

w

mEAr

L

xu(x)+

Let us first find the exact solution of the 1D displacement field u(x) inside the bar We considera co-rotating frame of reference with coordinate x running along the bar starting at the originLinear momentum balance with the centripetal acceleration a = minusω2x states that

divσ = ρa rArr (Eux)x = minusρω2x rArr uxx = minusρω2

Ex (525)

and the boundary conditions are (the force again coming from the cenitrpetal acceleration)

u(0) = 0 and F (L) = AEux(L) =mω2L (526)

Integration the ODE twice for u(x) and obtaining the two integration constants from the twoboundary conditions yields the exact solution

u(x) = minusρω2

6Ex3 + (mω

2L

EA+ ρω

2L2

2E)x (527)

Next let us find approximate solutions by the various methods of weighted residuals To thisend we first introduce an approximate solution with a polynomial basis φa(x) = xa such that

uh(x) =n

suma=0

caxa (528)

where we chose a polynomial function space of order n which is often abbreviated asuh(x) isin Pn The boundary condition u(0) = 0 requires that c0 = 0 Also for a practical example(which admits simple closed-form solutions) let us pick n = 3 Hence we in fact use

uh(x) =3

suma=1

caxa = c1x + c2x2 + c3x3 (529)

The bulk and surface residuals in this problem are written as respectively

rΩ(x) = Euhxx(x)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraL[uh]

+ ρω2xsup2minuss

for 0 le x le L

rpartΩ(x) = EAuhx(L)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraB[uh]

minusmω2Lacutesup1sup1sup1sup1cedilsup1sup1sup1sup1sup1paraminusF

(530)

Since there is only one Neumann boundary (viz the free end of the bar at x = L there is onlya single boundary residual and k = 1)

Collocation Method In order to use the collocation method we must choose a total of n = 3collocation points to obtain the same number of equations as we have unknown coefficients inthe approximation uh(x) isin P3 Since we have one boundary residual let us choose two pointsalong the bar (eg equally spaced) and one at the end x = L overall leading to

x1 = L3 x2 = 2L3 x3 = L (531)

32

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

With those collocation points the collocation method yields the three residuals that we set tozero

rΩ(x1) = E(2c2 + 2c3L) + ρω2L3 = 0

rΩ(x2) = E(2c2 + 4c3L) + 2ρω2L3 = 0

rpartΩ(x3) = EA(c1 + 2c2L + 3c3L2) minusmω2L = 0

(532)

In matrix form the above becomes the linear system of equations

⎡⎢⎢⎢⎢⎢⎣

0 2E 2EL0 2E 4ELEA 2EAL 3EAL2

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

minusρω2L3minus2ρω2L3mω2L

⎞⎟⎠ (533)

whose solution yields

c1 = mω2L

EA+ ρω

2L2

2E c2 = 0 c3 = minusρω

2

6E (534)

Insertion into (529) shows that

uh(x) = c1x + c2x2 + c3x3 = (mω2L

EA+ ρω

2L2

2E)x minus ρω

2

6Ex3 = u(x) (535)

is in fact the exact solution cf Eq (527) The chosen collocation points were chosen optimally(a different choice of the collocation points could have resulted in a different set of coefficientsand hence in a different solution)

Subdomain Method Let us repeat the above example using the subdomain method Tothis end we define two equally-sized subdomains in the bulk of the bar (simply by dividing thebar into two equal halfs)

D1 = x ∶ 0 le x le L2 D2 = x ∶ L2 le x le L (536)

and we have x = L as our third ldquodomainrdquo to satisfy the Neumann boundary condition Weinvite you to try this case as an exercise at home (you will again obtain the correct solutionuh(x) = u(x))

Least Squares Method Finally let us use the method of least squares for which we hadshown that the problem reduces to solving the linear system (520) with matrix components

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (537)

and vector components

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (538)

For this particular problem we have defined L[sdot] and B[sdot] in (530) which results in

Kab = intL

0L[xa]L[xb]Adx + ξ2[B[xa]B[xb]]

x=Lfor a b = 123 (539)

33

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = intL

0(minusρω2x)L[xa]Adx + ξ2mω2LB[xa]x=L (540)

We still need to choose an appropriate scaling parameter ξ such that the above forms make sensewith respect to their dimensions By comparison of the two terms we realize that ξ2 = (LA)minus1

(or any inverse volume in general) is a suitable choice

Carrying out the above integrals with L[sdot] and B[sdot] from (530) yields the linear system

⎡⎢⎢⎢⎢⎢⎣

AE2

L 2AE2 3AE2L2AE2 8AE2L 12AE2L2

3AE2L 12AE2L2 21AE2L3

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

Emω2

ELω2(2m minusALρ)EL2ω2(3m minus 2ALρ)

⎞⎟⎠ (541)

whose solution again recovers the exact solution (527) (the individual steps are left out herebut you are invited to solve the problem on your own at home)

mdashmdashmdashmdash

55 Galerkinrsquos Method

As introduced in basic mechanics and continuum mechanics courses (and therefore not discussedhere in detail) the equilibrium conditions of a mechanical boundary value problem can also bestated in terms of the principle of virtual work

intΩσijvij dV = int

ΩρbividV + int

ΩNtividS (542)

for any kinematically admissible virtual displacement field v(x) defined on the body Ω Inother words the virtual work done by the internal stresses equals the virtual work done bythe externally applied body forces and surface tractions Note that admissibility in particularrequires that v = 0 everywhere on partΩD since no virtual displacement can be applied to pointson the surface that are restrained from moving

Applying the divergence theorem to the first term in the principle of virtual work yields

intΩσijvij dV = int

partΩσijnjvidS minus int

ΩσijjvidV (543)

so that rewriting (542) leads to

intΩ(σijj + ρbi)vidV + int

partΩN(ti minus σijnj)vidS = 0 (544)

Since this equation must hold for all admissible virtual displacements v it is concluded that wemust have

σijj + ρbi = 0 in Ω and σijnj = ti on partΩN (545)

These are equivalent to the (static) balance of linear momentum and the associated tractionboundary condition so that (542) ndash when valid for all admissible virtual displacements v ndashindeed holds true and is an alternative expression of the balance of linear momentum and theassociated traction BCs as stated in (545)

Notice that the form of (544) is identical to the total residual (55) in the methods of weightedresiduals with the trial or weighting functions now being v(x) Hence the principle of virtual

34

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

work lends itself for a very natural way to formulate a total weighted residual (without the needto introduce a scaling parameter ξ and without having to pay separate attention to variousboundary terms) Note that v(x) is a continuous function so we here have in principle aninfinite-dimensional problem (and infinitely many admissible weighting functions v) Howeverwe can (and will) turn this problem into a finite-dimensional one by introducing approximateforms for both uh(x) asymp u(x) and vh(x) asymp v(x) which will form the basis of the finite elementformulation later

Example 52 Hanging bar under its own weight revisited

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

Euxx(x) + ρg = 0 with u(0) = 0 and F (L) = EAux(L) = F (546)

With σ = Eε = Eux the principle of virtual work here reads

intL

0σvxAdx = int

L

0ρgvAdx+F v(L) rArr int

L

0EuxvxAdx = int

L

0ρgvAdx+F v(L) (547)

Integration by parts on the first integral yields

[EuxvA]L0 minus intL

0EuxxvAdx = int

L

0ρgvAdx + F v(L) (548)

We exploit that v(0) = 0 (since u(0) = 0 is fixed virtual displacements at x = 0 must vanish)and re-arrange the integrals into

intL

0(Euxx + ρg) vAdx + [F minusEAux(L)] v(L) = 0 (549)

Since we want this equation to hold for any admissible function v(x) we thus conclude that thetwo terms in parentheses and brackets must vanish which in turn confirms that a function u(x)that satisfies (547) for any admissible virtual displacement v(x) is also a solution of (546)

Finally note that (547) can be rewritten as

R = intL

0EuxvxAdx minus int

L

0ρgvAdx minus F v(L) = 0 (550)

which is of the form (55) of the total residual discussed for the methods of weighted residualsand we can as before introduce a finite-dimensional representation for uh(x) asymp u(x) eg inthe form of a polynomial or a Fourier series and solve for the n unknown coefficients ca byintroducing n independent weight functions va(x) Since the residual R in (550) is linear inu(x) we would have to solve a linear system for the coefficients

mdashmdashmdashmdash

At the end of this section let us recap the basic principle of weighted residual methods discussedhere This indirect method set out to not solve the governing PDEs directly but instead tominimize the error made by an approximate solution as follows

(i) we first define an approximate solution space and an approximate solution uh(x) definedup to n unknown coefficients

35

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

(iii) we define a global residual R to be minimized and choose appropriate weighting functionsWi wi such as to produce n equations to be solved for the n unknown coefficients byminimizing the global residuals

(iv) we numerically solve the obtained linear system of equations

Although the methods of weighted residuals are handy simple and can be applied to in principleany physical problem of interest the solution depends significantly on the choice of the weightsand 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 thosechoices

It turns out that for most physical problems including the classical mechanical thermal and alsoelectromagnetic problems there is a more intuitive way to arrive at equations of the type (542)viz by considering the energetic (or so-called variational) basis of the underlying boundary valueproblems In simple terms we know that any physical system aims to minimize its energy ina stable equilibrium We will see that (542) is in fact nothing but the associated stationarityequation of such a minimization problem but to get there we first need to introduce some ofthe fundamentals of variational calculus

36

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

6 Variational Calculus

As a motivational example let us revisit a simple physics problem We knowfrom elementary physics that the energy stored in an elastic spring (stiffnessk) stretched by an amount ∆x is 1

2k(∆x)2 If a spring is hanging from the

ceiling and a weight mg is attached at its free end then the total energy is

I = 1

2kx2 minusmgx (61)

where x denotes the elongation of the spring and the second term enters asthe work done by the external force mg (or alternatively interpreted thepotential energy of the attached mass m)

m

k

x

In order to calculate the stretched equilibrium length of the spring we may minimize the totalenergy leading to

partI

partx= 0 = kx minusmg rArr x = mg

k (62)

Note that the stationarity equation kx =mg is nothing but (static) linear momentum balance(or Newtonrsquos second axiom) Hence we may minimize the total energy I in order to find theequilibrium solution and that solution is ensured to satisfy linear momentum balance

For the general continuum thermo-mechanical problems considered here we would like to havea similar concept at hand to turn equilibrium equations (such as the governing PDEs discussedabove) into energy minimization problems Unfortunately the situation is a bit more complexsince we here no longer seek to find equilibria described by variables (like x above) but by func-tions (such as the displacement field u(x)) We can intuitively imagine extending the conceptndash defining an energy I that depends on u(x) and being minimized by the exact solution How-ever we first need to verify some mathematical preliminaries related to the so-called functionalI and how to minimize a functional with respect to a function (we can no longer take simplederivatives to arrive at the stationarity conditions since we are minimizing not with respect toa set of variables but with respect to a function) The underlying mathematical concepts areknown as variational calculus

61 Functionals

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

I ∶ u isin U rarr I[u] isin R (63)

In simple terms a functional2 I is a ldquofunction of functionsrdquo ie a function whose argumentis another function you hand it a function u(x) and it returns a scalar I isin R (eg the energyassociated with u(x)) Functionals are to be distinguished from functions such as f(x) =x2 with f ∶ R rarr R+

0 Unlike a function which is a mapping from Rd rarr R a functional rsquosdomain is generally a function space U (eg all polynomial functions up to a certain degreen abbreviated as Pn or all continuously differentiable functions or all piecewise polynomialfunctions etc) For more information on vector and function spaces see Appendices A and B

When seeking solutions u(x) we typically seek solutions within a particular function space U For example a functional may impose constraints on the differentiability or integrability of

2To differentiate functionals from functions we will write I[u] with brackets instead of parantheses as in u(x)

37

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

function u(x) As an example consider the functional

I[u] = int1

0u2x(x) dx (64)

which is a functional requiring that u(x) is differentiable (ie possesses a first derivative ux)and that the first derivative squared can be integrated to yield a finite value as a counter-example a piecewise constant function u(x) would not be square-integrable (the first derivativeconsists of delta-functions which if squared yield infinity when integrated) Hence functionalI[u] in (64) restricts the function u(x) to belong to the function space

U = u ∶ (01)rarr R such that int1

0u2x(x) dx ltinfin (65)

In the following it will be important to define such spaces U of admissible functions

For convenience of notation let us introduce the Sobolev space3

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥Hk(Ω) ltinfin (66)

with the Sobolev norm (in 1D)

∥u∥Hk(Ω) =radicint

Ωu(x)2 dx + int

Ω[uprime(x)]2 dx + + int

Ω[u(k)(x)]2

dx (67)

In simple terms (and this is all we will need to remember in the following) Hk(Ω) denotes thespace of all functions whose derivatives up to kth order are square-integrable The aboveexample in (64) eg requires u isin U subH1(01) ie the first derivative of functions u(x) mustbe square-integrable on the interval (01) (Of course in this example u(x) need not be square-integrable itself (the functional only contains ux) yet there is no function u(x) which is notsquare-integrable while its first derivative is square-integrable)

Example 61 Energy of a strained bar

Consider bar of length L and with constant Youngrsquos modulus E and cross-sectional area A andstrain energy density W The total energy I of the bar as a function of the 1D displacementfield u(x) is

I[u] = intL

0W (ε)Adx = int

L

0

E

2[ux(x)]2 Adx (68)

where we used that W = E2 ε

2 and ε = ux Here we generally may want to impose the restrictionu isin H1(0 L) (unless when dealing with discontinuities such as cracks) to ensure that the firstderivative ux is square-integrable To replicate Example 52 of the hanging bar with an appliedend force F we have to append to the above energy by the work done by the external forcethus arriving at the total potential energy functional

I[u] = intL

0

E

2[ux(x)]2 Adx minus F u(L) (69)

Minimizing this functional with respect to the unknown function u(x) is expected to yield thesought solution Unfortunately we still do not know how to minimize a functional with respectto a function which will be discussed next

mdashmdashmdashmdash

3Though not needed for our purposes here more information on Sobolev norms and spaces is available inAppendix D

38

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

62 Variations

Consider a functional I ∶ U rarr R such as the potential energy Analogous to the stationaritycondition of classical optimization problems a necessary condition for an extremum of I is thatthe first variation of I vanishes ie δI[u] = 0 (this is the stationarity condition) Like infunctional analysis we are going to compute the analog of a derivative to identify maxima andminima of the functional To this end we perturb the functional around a point by a smallvariation and verify if the functional increases or decreases Complicating is the fact that aldquopointrdquo is now in fact a function and a perturbation must be a variation of that function Tothis end we define the following

A variation δu(x) is an arbitrary function that represents admissi-ble changes of u(x) If Ω sub Rd is the domain of u isin U with boundarypartΩ and we seek solutions

u isin U = u isinHk(Ω) ∶ u = u on partΩD (610) x

u

0+L

uu+du

+

du

then the variation must satisfy

δu isin U0 = δu isinHk(Ω) ∶ δu = 0 on partΩD (611)

k can be determined from the specific form of I[u] (and δu and u must lie in the same functionspace since we want to be able to compute I[u + δu]) The fact that variations δu must vanishon the Dirichlet boundary partΩD stems from the need for perturbations that allow the perturbedfunction 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 partΩD

With this we define the first variation of I (ie the analog of a first derivative) as

δI[u] = limεrarr0

I[u + ε δu] minus I[u]ε

= d

dεI[u + ε δu]∣

εrarr0

(612)

Analogously higher-order variations are defined recursively via

δkI[u] = δ (δkminus1I) for k ge 2 (613)

Note that a Taylor expansion of a functional I can now be written as

I[u + δu] = I[u] + δI[u] + 1

2δ2I[u] + 1

3δ3I[u] + (614)

The following are helpful relations (which follow directly from the definition of variations) Forany functions u v isin U functionals Ii ∶ U rarr R and constants αi isin R we have the following rules

δ (α1I1 + α2I2) = α1 δI1 + α2 δI2

δ(I1I2) = (δI1)I2 + I1(δI2)

δdu

dx=

d

dxδu (assuming differentiability of u)

δ intΩ u dx = intΩ δu dx (assuming Ω is independent of u)

δI[u v ] =d

dεI[u+ε δu v+ε δv ]εrarr0 (for functionals depending on several functions)

39

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 62 Calculation of variations

Let us consider

I[u] = int1

0u2 dx so that we seek u isin U =H0(01) (615)

The first second and k-th variations respectively follow as

δI = limεrarr0

d

dεint

1

0(u + ε δu)2 dx = lim

εrarr0int

1

02(u + ε δu)δu dx = 2int

1

0uδu dx

δ2I = limεrarr0

δI[u + ε δu] = limεrarr0

d

dεint

1

02(u + ε δu) δu dx = 2int

1

0(δu)2 dx

δkI = 0 for all k gt 2

(616)

Notice that we automatically recover the Taylor series

I[u + δu] = int1

0(u + δu)2 dx = int

1

0u2 dx + int

1

02uδu dx + int

1

0(δu)2 dx

= I[u] + δI[u] + 1

2δ2I[u]

(617)

mdashmdashmdashmdash

The above gives the formal definition of variations which can always be applied to derivevariations of arbitrary order As a practical shortcut note that for a functional

I[u] = intΩf(unablaunabla2u ) dx (618)

we may write

I[u] = d

dεint

Ωf(u + ε δunablau + ε δnablaunabla2u + ε δnabla2u ) dx∣

εrarr0

= intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx

(619)

so that we may use from now on that

δI[u] = intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx (620)

The analogous of course also applies in higher dimensions ndash which will become important inour later boundary value problems For example if we seek a displacement field u(x) ∶ Ωrarr Rdthe functional becomes

I[u] = intΩf(ui uij uijk ) dV (621)

so we can write

I[u] = intΩf(unablau ) dx rArr δI[u] = int

Ω( partfpartui

δui +partf

partuijδuij ) dV (622)

using classical index notation

Now that we have established the basics of variational calculus let us exploit the variationalstructure of our boundary value problems ie their solutions u isin U can be interpreted asextremal points over U of a functional I[u]

40

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 63 Hanging bar under its own weight revisited (again I know)

Once more let us consider a bar of length L (Youngrsquos modulus E cross-sectional area Adensity ρ) that is hanging from the ceiling and deforming under its own weight (gravitationalacceleration g) with a constant force F applied to its free end at x = L u(x) denotes the 1Ddisplacement field where x runs from top to bottom of the bar The total potential energy isthus the total strain energy of the elastic bar minus the work done by the graviational bodyforces and the constant end force

I[u] = intL

0

E

2u2x(x)Adx minus int

L

0ρg u(x)Adx minus F u(L) (623)

and

u(x) isin U = u isinH1(0 L) ∶ u(0) = 0 (624)

The first variation yields

δI[u] = 0 = intL

0Eux(x) δux(x)Adx minus int

L

0ρg δu(x)Adx minus F δu(L)

= minusintL

0[Euxx(x) + ρg] δu(x)Adx +EAux(L) δu(L) minusEAux(0) δu(0) minus F δu(L)

(625)

where we used integration by parts of the first integral to arrive at the final form Noting thatδux(0) = 0 because of essential boundary condition the above reduces to

intL

0[Euxx(x) + ρg] δu(x)Adx minus [F minusEAux(L)] δu(L) = 0 forall δu isin U0 (626)

As we noted above recall that (626) must vanish for all variations δu isin U0 This implies thatwe must in fact have

Euxx(x) + ρg = 0 and EAux(L) = F (627)

These are exactly the governing equation and traction boundary condition that the bar needsto satisfy cf Eq (546) Hence we have shown that rendering (623) stationary with respectto u(x) isin U is equivalent to solving (627) with u(0) = 0 That is we have a strategy to replacethe solution of a differential equation by an optimization problem and we would in both casesobtain the exact or classical solution

To see if the solution is a maximizer or minimizer of I let us compute the second variation

δ2I[u] = intL

0Eδux δuxA dx = int

L

0E(δux)2 dV ge 0 forall δux (628)

Hence δ2I[u] gt 0 in general (unless δu equiv 0) and as in classical functional analysis we concludethat the extremum is a minimizer We thereby tactily assume that E gt 0 E lt 0 would lead tosolutions being unstable energy maxima which implies that E gt 0 is a (necessary and sufficient)stability condition

Finally notice that the first line here is exactly the principle of virtual work discussed beforecf Eq (547) if we replace δu by v Thus our variations here are the same as virtual displace-ments in the principle of virtual work and we obtain the latter automatically from the energyfunctional as the first variation

mdashmdashmdashmdash

41

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us revisit the hanging bar problem once more to observe a particular structure of theproblem that will come handy shortly For the hanging bar (assuming that E = const) noticethat we can rewrite the energy functional for short as

I[u] = 1

2B[uu] minusL[u] (629)

where we introduced a bilinear form B and a linear form L defined as

B[a b] = intΩE(grada)(grad b) dV and L[a] = int

Ωρga dV minus int

partΩD

ta dS (630)

where we included tractions t applied to the surface ΩD

The above is in fact a recipe for a more general class of variational problems (the same structureapplies to heat conduction electrostatics or mechanical equilibrium as discussed later) Let usconsider an energy functional of the general form (629) Taking variations shows that

I[u] = 1

2B[uu] minusL[u] rArr δI[u] = B[u δu] minusL[δu] (631)

For example in the hanging bar problem compare the energy functional (623) and the firstvariation (625) to confirm the above relation

For convenience let us adopt the following notation found in various textbooks on finite ele-ments the first variation is usually abbreviated as an operator acting on both the unknownfield u and its variation δu ie we write G ∶ U times U0 rarr V sub R with

G[u δu] = limεrarr0

d

dεI[u + δu] (632)

Without proof we just note that one of the beauties of the above variational problem (631)(based on a bilinear and a linear form) is that a unique minimizer exists by the Lax-Milgramtheorem (for more information see Appendix F) Recall that for the linear heat problem abovewe already showed that the solution is a unique (global) minimizer if E gt 0

63 Rayleigh-Ritz Method

One way to exploit the above variational structure right away is the so-called Rayleigh-Ritzapproach which introduces an approximation uh(x) asymp u(x) eg a polynomial series

uh(x) =n

suma=0

caxa (633)

with unknown coefficients ca isin R Any choice of (linearly independent) ansatz functions ispermissible including eg Fourier series of cosine or sine terms as long as they satisfy anyexisting essential boundary conditions and the differentiabilityintegrability requirements ofthe problem (eg a piecewise linear guess for uh(x) would not be permissible if its derivativesmust be square-integrable etc) For example for the hanging bar problem we need to enforcec0 = 0 because of the boundary condition u(0) = 0

Next we insert uh(x) into the total energy functional I which then depends only on the coef-ficients ca as the only unknowns We know that the exact equilibrium solution u(x) minimzies

42

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

the total potential energy I[u] Therefore we conclude that we may want to minmize I[uh]with respect to ca giving a system of equations

0 = partI[uh]

partcaforall a = 0 n (634)

Recall that we had expressed the energy functional in operator form so that

I[uh] = 1

2B[uh uh] minusL[uh] = 1

2B[

n

suma=0

caxan

sumb=0

cbxb] minusL[n

suma=0

caxa]

= 1

2

n

suma=0

n

sumb=0

cacbB[xa xb] minusn

suma=0

caL[xa](635)

where we exploited the (bi)linear nature of the two forms B[sdot sdot] and L[sdot] This leads to

partI[uh]partca

=n

sumb=0

cbB[xa xb] minusL[xa] = 0 forall a = 0 n (636)

This is a linear system of equations to be solved for the unknown coefficients cb (with b = 0 n)which we abbreviate as

n

sumb=0

Kabcb = F a for a = 1 n or Kc = F (637)

with K isin Rntimesn and F c isin Rn having components

Kab = B[xa xb] F a = L[xa] and c = (c0 cn)T (638)

Notice that this is fully analogous to (520) 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 problemwhich is more physical)

Example 64 Hanging bar by Rayleigh-Ritz

For the problem of the freely hanging bar (no end force applied here for brevity) the totalenergy potential with the approximate solution uh(x) from (633) becomes

I[uh] = intL

0

E

2(uhx)2(x)Adx minus int

L

0ρg uh(x)Adx with uh(x) =

n

suma=1

caxa (639)

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

partI[uh]partca

= 0 for a = 1 n (640)

As we know from (636) the resulting system of stationarity equations is Kc = F with

Kab = B[xa xb] = intL

0E(xa)x(xb)xAdx

= intL

0Eaxaminus1bxbminus1Adx = abEAint

L

0xa+bminus2 dx = abEA La+bminus1

a + b minus 1

(641)

43

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = L[xa] = intL

0ρg xaAdx = ρgAint

L

0xadx = ρgAL

a+1

a + 1 (642)

Solving the linear system Kc = F for any n ge 2 (feel free to try this as an exercise at home)yields

c1 = ρgEL c2 = minus ρg

2E and ca = 0 for all a gt 2 (643)

which is in fact the exact solution see Eq (317)

u(x) = ρg

2E(2L minus x)x (644)

This could have been expected since we chose polynomial ansatz functions in (633) takinguh(x) isin Pn The exact solution is a polynomial of order 2 If we choose uh(x) isin Pn withn ge 2 the exact solution is contained in the solution space within which we are looking for theoptimal solution As a consequence the Rayleigh-Ritz approach recovers the exact solution asthe energy minimizer Choosing any Pn with n gt 2 does not affect the solution since P2 sub Pnfor n gt 2 so the solution is still contained in the solution space and therefore found

mdashmdashmdashmdash

44

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

7 The weak form

In the previous sections we have seen how indirect methods aim to find approximate solutionsto boundary value problems by introducing an approximate (finite-dimensional) solution spaceand solving for the unknowns describing the sought approximate solution by enforcing thestrong form in some average sense (rather than at every grid point as in finite differences)We have also seen how this ldquoaverage senserdquo can be defined in various ways eg by enforcingthe governing PDE only at collocation points on average over subdomains or by minimizingthe total error made across the entire body Finally we have seen how most boundary valueproblems can be linked to a variational structure implying that the strong form is in fact thestationarity condition of an energy minimization problem This in turn allowed us to replacethe strong form by an optimization problem which was exploited eg by the Rayleigh-Ritzapproach It is important to keep in mind that the variational approach gave us something evenmore powerful it gave us the stationarity conditions of the minimization problem which wewill call the weak form Those stationarity conditions combined with an approximate functionspace where shown to guide us to a linear system of equations to be solved for the unknowncoefficients of the approximate solution Here we would like to explore the underlying structurefurther and finally come to the general mechanical boundary value problem to be solved bymethods such as the finite element technique

71 Classical and weak solutions

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

(E ux)x + s = 0 in Ω

u = u on partΩD

Eux = t on partΩN

(71)

This general strong form applies to the mechanical problem (where u is the displacement field EYoungrsquos modulus s = ρb body forces u is a prescribed displacement and t a prescribed surfacetraction) as well as to electrical problems (where u denotes the electric voltage potential E isthe 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 andt 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 tothe above problem let us define that a function u is of class Ck(Ω) (or in the function spaceCk(Ω)) with an integer k ge 0 if it is k times continuously differentiable over Ω (ie u possessesderivatives up to the kth order and these derivatives are continuous functions) Hence thestrong form (71) imposes the requirement

u isin C2(Ω) (72)

That is we require the function to be twice continuously differentiable in order for the strongform to make sense4

4To be exact the strong form in fact requires that u isin C2(Ω) cap C0

(Ω) ie functions u must be twicecontinuously differentiable within Ω and at least continuous up to the boundary partΩ But this detail is of minorimportance here and in the following

45

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 71 Ck-continuity

Any kth-order polynomial u(x) with k ge 0 is generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks or shocks (or discontinuities in the BCsICs)we usually assume that the classical solution fields are Cinfin(Ω) so we may take derivativesotherwise derivatives exist almost everywhere (ae)

mdashmdashmdashmdash

As we showed previously the solution u can alternatively be found by using a variationalapproach viz as the minimizer of I[u] within a function space U which we write as

u = arg minI[u] ∶ u isin U with I[u] = 1

2B[uu] minusL[u] (73)

whose stationarity condition is

δI[u] = G[u δu] = B[u δu] minusL[δu] = 0 for all δu isin U0(Ω) (74)

Therefore we can reformulate the problem (71) (without in principle knowing anything aboutvariational calculus) as

find u isin U st G[u v] = B[u v] minusL[v] = 0 for all v isin U0(Ω) (75)

This is called Galerkinrsquos weak form and the resulting solution u is called weak solutionThis terminology has the following origin Notice that we no longer seek solutions u isin C2(Ω)but instead we seek solutions u within

U = u isinH1(Ω) ∶ u = u on partΩD (76)

which satisfy (75) for all v isin U0(Ω) There is one essential difference between the weak andstrong form solutions u of the weak form are required to be u isin H1(Ω) whereas the strongform required solutions u to be u isin C2(Ω) The latter is a considerably stronger constraintThus we have weakenedrelaxed the conditions on the family of solutions which is why theabove is called the weak form

To see this take eg functions u that are piecewise-linear (like a zig-zag curve) The firstderivative is piecewise-constant and is therefore square-integrable (we can easily integrate apiecewise-constant function) hence u satisfies u isin H1(Ω) By contrast if you take a secondderivative differentiating the piecewise-constant first derivative leads to a sum of delta functions(which are certainly not continuous functions) so u notin C2(Ω) Such a function does not qualifyas a solution to the strong form as the governing PDE makes little sense with sums of deltafunctions Hence piecewise-linear functions qualify as approximate solutions of the weak formbut not necessarily of the strong form Thus we have relaxed the requirements on our function

Recall that if v is interpreted as a virtual displacement field then (75) is equivalent to theprinciple of virtual work and the form agrees with (542) (or (547) for the 1D bar problem)This is important because even if no variational basis exists we could still formulate the weakform by starting from the principle of virtual work Whether or not a variational structure

46

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

exists for a given strong form can be verified by the use of Vainbergrsquos theorem summarizedin Appendix G

Computationally solving the weak form is usually preferable over the strong form for (at least)two reasons First u isin H1(Ω) is simpler to satisfy than u isin C2(Ω) (eg piecewise linearinterpolation is sufficient in the weak form but not in the strong form) Second as we showedalready for the Rayleigh-Ritz approach the weak form boils down to solving a system of algebraicequations (rather than solving PDEs)

72 Equivalence of strong and weak forms

We now have two equivalent principles for finding the solution of the BVP described by (71)

Given a function space

U = u isinHk(Ω) ∶ u = u on partΩD (77)

a functional I ∶ U rarr R and the associated bilinear form B(sdot sdot) and linear form L(sdot) both definedon functions u isin U we seek to

(A) find u isin U st u = arg min I[u] (78)

(B) find u isin U st B[u v] = L[v] for all v isin U0 (79)

We know that the two have a unique connection since δI = B[u δu]minusL[δu] Thus we also knowthat

(A)hArr (B) (710)

with a unique solution for this particular type of problem (if it is stable ie if E gt 0)

73 Approximate solutions

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

Uh sub U (711)

in which we seek a solution uh where h stands for the discretization size

An n-dimensional space Uh is defined by a set of n basis or shape functions N1 Nnalong with the approximate functions

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (712)

When we use the same approximation space for uh and vh we make the so-called the Bubnov-Galerkin approximation Alternatively one can choose different function spaces for theapproximations uh and vh which leads to the so-called Petrov-Galerkin method The lattergains importance when solving overunderconstrained problems since it allows us to control thenumber of equations by the choice of the dimension of the space of vh

47

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Assume that the approximation space is chosen wisely so the the exact solution can be attainedwith infinite refinement ie we assume that

for all u isin U there exists uh(v) isin Uh such that limhrarr0

∥uh(v) minus u∥ = 0 (713)

Then we can formulate the discrete problem

(C) find uh isin Uh st B[uh vh] = L[vh] for all vh isin Uh0 (714)

It is a relatively simple exercise to verify that the above form reduces again to a linear systemof equations to be solved To this end insert the approximations (712) into (714) to obtain

B [n

suma=1

uaNan

sumb=1

vbN b] = L [n

sumb=1

vbN b] for all vb (715)

Exploiting that B is bilinear and L is linear lets us transform the above into

n

sumb=1

vb (n

suma=1

uaB [NaN b] minusL [N b]) = 0 for all vb (716)

Since this must hold for all (admissible) vb we conclude that

n

suma=1

uaB [NaN b] = L [N b] for b = 1 n (717)

This is a linear system to be solved for ua (a = 1 n) Comparison to Eq (636) shows thatthe linear equations are identical to those derived for the Rayleigh-Ritz method This is in factnot surprising for the Rayleigh-Ritz method we inserted the approximate solution uh directlyinto I and minimized I[uh] with respect to the unknown coefficients ca Here we first obtainedthe stationarity equation G[u v] = 0 from I[u] exactly and then inserted uh and vh Yet if wechoose the very same function space for uh and vh then both methods lead to the very samesystem of equations Thus we may also re-interpret the Bubnov-Galerkin scheme as computingthe coefficients ua as the minimizers of I[uh]

As before let us define a vector of all unknown coefficients

Uh = u1 unT (718)

Further we define a (symmetric) matrix K isin Rntimesn and vector F isin Rn with components

Kab = B [NaN b] F b = L [N b] (719)

Then the linear system reads

KUh = F hArr Kabub = F a (720)

Note that this system of equations is identical to (638) which was derived by the Rayleigh-Ritzmethod

48

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

8 The mechanical variational problem at small strains

81 General case

After all those precursors let us analyze the mechanical variational problem and start with thesimplest problem quasistatics in linearized kinematics Here the strong form is

σijj + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(81)

and in the special case of linear elasticity (using σij = Cijklεkl = Cijklukl) the above strongform reduces to

(Cijklukl)j + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(82)

From this we see that classical solutions must satisfy u isin C2(Ω)

In the following let us first treat the general case ndash based on (81) ndash and then study linearelasticity ndash given by (82) ndash as a special case The total potential energy functional associatedwith (81) is

I[u] = intΩW (ε) dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parainternal stored energy

minus [intΩρb sdotu dV + int

partΩNt sdotu dS]

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parawork by external forces

(83)

and we seek displacement field solutions

u = arg minI[u] ∶ u = u on partΩD (84)

For the special case of linear elasticity we know that the strain energy density takes the form

W (ε) = 1

2εijCijklεkl =

1

2uijCijklukl (85)

from which we may conclude that the variational problem seeks solutions u isin U subH1(Ω)

We compute the first variation defining sym(sdot) = 12(sdot + sdot

T)

δI[u] = intΩ

partW

partεijsym(δuij) dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS

= intΩσijδuij dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS = 0 forall δu isin U0

(86)

where we used σij = partW partεij and σij = σji (by angular momentum balance) This form isindeed equivalent to the principle of virtual work if we replace δui by vi see Eq (542)

Application of the divergence theorem to the first term above proves the equivalence of the twoforms since

δI[u] = 0 = intpartΩN

(σijnj minus ti)δuidS minus intΩ(σijj + ρbi)δuidV forall δu isin U0 (87)

49

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since this must hold for all arbitrary variations δu isin U0 the two terms in brackets must vanishwhich yields indeed the strong form (81)

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

G(uv) = A(uv) minusL(v) = 0 forall v isin U0 (88)

with

A[uv] = intΩσijvij dV and L[v] = int

ΩρbividV + int

partΩNtividS (89)

Note that the dependence of A on u is not directly obvious but the stresses depend throughthe strains on the displacement field ie σij = σij(ε) and εij = ( sym(uij)) A(sdot sdot) is thereforein general not a bilinear operator while L(sdot) is a linear operator

In the special case of linear elasticity

σij = Cijklεkl = Cijklukl rArr σijvij = Cijkluklvij = Cijkluijvkl (810)

exploiting the symmetries Cijkl = Cijlk = Cklij This leads to

A[uv] = intΩσijvij dV = int

ΩCijkluijvkl = B[uv] (811)

Thus we see that for linear elasticity A is indeed a bilinear operator

Next we introduce the discrete weak form A(uhvh) minus L(vh) = 0 with the Bubnov-Galerkinapproximation

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (812)

so that we arrive at (in component form)

n

suma=1

vai [intΩσij(nablauh)Na

j dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para[F int]

ai

minusintΩρbiN

adV minus intpartΩN

tiNadS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraminus[F ext]

ai

] = 0 for all adm va (813)

which is equivalent to

Fint(Uh) minusFext = 0 with Uh = u1 unT (814)

where we introduced FintFext isin Rdsdotn with components

F ainti = intΩσij(nablauh)Na

j dV and F aexti = intΩρbiN

adV + intpartΩN

tiNadS (815)

As mentioned above for the special case of linear elasticity we have a bilinear form describingthe weak form Inserting the approximate fields (815) then becomes

F ainti = intΩCijkluhklN

aj dV =

n

sumb=1int

ΩCijklubkN

blN

aj dV =

n

sumb=1

ubk intΩCijklNa

jNbl dV

=n

sumb=1

Kabik u

bk with Kab

ik = intΩCijklNa

jNbl dV

(816)

50

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so we arrive at a linear problem to be solved for the unknown coefficients Uh = u1 un

Fint =KUh rArr KUh minusFext = 0 rArr Uh =Kminus1Fext if detK ne 0 (817)

As before matrix K isin Rdsdotntimesdsdotn is by definition symmetric and positive definite as long as theelastic modulus tensor C is strongly elliptic (ie for stable elastic moduli)

For computational purposes notice that vectors Uh isin Rdsdotn and FintFext isin Rdsdotn eg in 3D arerespectively (dropping the superscripts on F for universality)

[Uh] =⎛⎜⎝

u1

un

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

u11

u12

u13

un1un2un3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

[F ] =⎛⎜⎝

F 1

F n

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

F 11

F 12

F 13

Fn1Fn2Fn3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(818)

Here we used 1-index notation like in Matlab (ie we sum over a = 1 n and not a =0 n minus 1 as eg in CC++) so that

uai is the (d sdot (a minus 1) + i)th component of vector Uh in d dimensions (819)

Similarly we apply the same rule to the rows and columns of matrix K so that

Kabik is the component at (d sdot (aminus 1)+ i d sdot (bminus 1)+ k) of matrix K in d dimensions (820)

Note that we now use super- and subscripts on K and F since our unknown coefficients arevector-valued here Any superscript a refers to the a-th coefficient while a subscript i refers tothe i-th component of the coefficient

82 Linear elasticity

In the simplified framework of linear elasticity (already introduced above) the governing equa-tions are oftentimes written in a more condensed version that allows for a simple extraction ofmatrix K We here start with

uh(x) =n

suma=1

uaNa(x) rArr εhij =1

2(uhij + uhji) =

1

2

n

suma=1

[uaiNaj(x) + uajNa

i(x)] (821)

which allows us to write (eg in 3D)

[ε] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

ε11

ε22

ε33

2ε23

2ε13

2ε12

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

N11 0 0 N2

1 0 0 Nn1 0 0

0 N12 0 0 N2

2 0 0 Nn2 0

0 0 N13 0 0 N2

3 0 0 Nn3

0 N13 N1

2 0 N23 N2

2 0 Nn3 Nn

2

N13 0 N1

1 N23 0 N2

1 Nn3 0 Nn

1

N12 N1

1 0 N22 N2

1 0 Nn2 Nn

1 0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

B

Uh (822)

where we introduced the matrix B isin R3ntimes6 in 3D (and analogously B isin R2nsdot3 in 2D) in order towrite for short

ε(x) =B(x)Uh (823)

51

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here use Voigt notation to condense the strain tensor into a strain vector with only uniquecomponents Since ε is symmetric one usually stores only the six independent components ina vector which leads to the above Voigt notation The factor 2 in the shear strain componentsin Voigt notation (which is not found in the stresses) is required so the energy density isconveniently given by W = 1

2σijεij =12 ε sdot σ

Hence we may define the stress vector σ in Voigt notation and the associated linear elasticconstitutive law as (again in in 3D)

σ = (σ11 σ22 σ33 σ23 σ13 σ12)T rArr σ = E ε rArr σ = EBUh (824)

where E denotes an elastic stiffness matrix whose components are deduced from C and followfrom the definitions of stresses and strains For example for an isotropic linear elastic materialcharacterized by Youngrsquos modulus E and Poissonrsquos ratio ν the E-matrix in 3D reads

[E3D] = E

(1 + ν)(1 minus 2ν)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 minus ν ν ν 0 0 0ν 1 minus ν ν 0 0 0ν ν 1 minus ν 0 0 0

0 0 0 1minus2ν2 0 0

0 0 0 0 1minus2ν2 0

0 0 0 0 0 1minus2ν2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(825)

while the 2D version depends on the plane stress vs plane strain scenario

[Eplane stress] =E

1 minus ν2

⎛⎜⎝

1 ν 0ν 1 0

0 0 1minusν2

⎞⎟⎠ [Eplane strain] =

E

(1 + ν)(1 minus 2ν)

⎛⎜⎝

1 minus ν ν 0ν 1 minus ν 0

0 0 1minus2ν2

⎞⎟⎠

(826)

Analogous matrices can be derived for other elasticities eg for general linear elastic anisotropicmedia

Altogether we thus arrive at the stored internal energy

I int = intΩW dV = int

Ω

1

2σ sdot ε dV = int

Ω

1

2ε sdotE ε dV = 1

2Uh sdot int

ΩBTEB dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraK

Uh (827)

so that we observe that

I int = 1

2Uh sdotKUh rArr F int = partI

int

partUh=KUh (828)

and the matrix K can be computed quickly as

K = intΩBTEB dV (829)

with B from (822) and E depending on the material model (note that B contains only ba-sistrial function derivatives so that ndash once a basis Na for a = 1 n has been chosen ndash B isknown and can be compted)

52

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

9 Interpolation spaces

So far we have assumed that the approximate solution uh (or uh in higher dimensions) is basedon a choice of basisshape functions Na(x) with a = 1 n Before discussing particular suchbasis functions it is important to consider what conditions those shape functions Na(x) mustsatisfy We have seen already that polynomial or Fourier series may lead to simpler integralswhen computing matrixK and right-hand-side vector F Yet this is only an observation and norigorous constraint on the basis functions Let us here discuss the requirements of appropriateinterpolation spaces

91 Shape functions

We consider approximations uh isin Uh of the type

uh(x) =n

suma=1

uaNa(x) (91)

which are defined through the shape functions Na(x)

In general there are two possible choices for the nature of Na(x)

global shape functions are defined everywhere in Ω ie ∣suppNa∣ sim ∣Ω∣eg polynomials Na(x) = xa or trigonometric polynomials Na(x) = cos (π(a minus 1)x)

local shape functions are defined only locally ∣suppNa∣ ≪ ∣Ω∣eg picewise linear shape functions

Here we introduced the support of a continuous function f ∶ Ω rarr R as the set of all points5

where f(x) ne 0 ie

supp f = x isin Ω ∶ f(x) ne 0 (92)

This means that f(x) = 0 for all points outside the support ie for x isin Ω supp f

x

x

Na Na

suppNa suppNa

local shape functions global shape functions

Irrespective of global or local shape function choices for any set of shape functions the followingshape function properties must be satisfied

(I) For any x isin Ω there must be at least one a with 1 le a le n such that Na(x) ne 0 (iethe whole domain must be covered) Otherwise no approximation would exist in certainregions or at certain points in the body

5To be more specific the support is the closure in Ω of the set of all points with non-zero f(x) Yet this isof minor importance here so we will not make that differentiation

53

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(II) The chosen shape functions Na should allow us in some ldquosimplerdquo manner to satisfy anyDirichlet boundary conditions where required (recall that uh should satisfy the essentialBCs)

(III) All shape functions must be linearly independent ie

n

suma=1

uaNa = 0 hArr ua = 0 for all a = 1 n (93)

In other words given any function uh isin Uh there exists a unique set of parametersu1 un such that

uh =n

suma=1

uaNa (94)

Linear independence is important since it avoids ill-posed problems For example takeUh = P2 and N1N2N3 = 1 x x2 so that uh = u1N1 + u2N2 + u3N3 Hence if eguh = a+bx then we immediately conclude that u1 = a u2 = b u3 = 0 uniquely By contrastif we chose the not linearly independent functions N1N2N3 = 1 x1+x there wouldbe no unique choice of the coefficients since uh = a + bx in this case would have solutionsu1 = a minus s u2 = b minus s u3 = s for arbitrary s isin R

More generally if there existed a set α1 αn ne 0 such that sumna=1 αaNa = 0 then this

set of parameters could be added on top of any solution u1 un such that

uh =n

suma=1

uaNa =n

suma=1

(ua + αa)Na = uhα (95)

which means both uh and uhα are solutions (hence the problem is not well-posed)

For these reasons we must define shape functions that are linearly independent If func-tions N1 Nn are indeed linearly independent then we call them a basis of Uh

(IV) The shape functions Na must satisfy the differentiabilityintegrability requirements of theweak form (this depends on the problem to be solved as discussed before in the contextof the weak form in Section 7)

(V) The shape functions must possess ldquosufficient approximation powerrdquo In other wordsconsider uh isin Uh sub U we should ensure that uh = sumna=1 u

aNa rarr u as n rarr infin Thisrequirement is important and will be discussed below in Section 93

92 Approximation power and completeness

Condition (V) above tells us that for an approximation uh to converge to u we must pick anapproximate function space Uh which gives the solution uh ldquoa chance to convergerdquo to u Forexample assume you aim to approximate a high-order polynomial u isin Pn (with n ≫ 1) by anapproximation uh using shape functions 1 x x2 x3 xn This is expected to converge asnrarrinfin because the coefficients of u will approach the coefficients of uh However choosing thebasis functions poorly as 1 x x3 xn (notice the x2-term is omitted) will never converge asnrarrinfin If all terms are present and none is omitted then polynomials are expected to convergeby the following theorem

Weierstrass approximation theorem Given a continuous function f ∶ [a b] sub R rarr R andany scalar ε gt 0 then there exists a polynomial

pn(x) isin Pinfin such that ∣f(x) minus pn(x)∣ lt ε for all x isin [a b] (96)

54

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This means every continuous function u can be approximated by a polynomial approximiationuh isin Pn to within any level of accuracy Therefore N i = 1 x x2 x3 ie the polynomialsin R is a suitable choice for the shape functions that satisfy the so-called completenessproperty (and we have shown their linear independence)

Note that as discussed above one cannot omit any intermediate-order terms from the set

1 x x2 x3 (97)

As an extension the Weierstrass approximation theorem also applies to trigonometric poly-nomials (cf Fourier series)

93 Completeness in higher dimensions

When going to higher dimensions we need to specify what complete polynomials are A poly-nomial approximation in Rd is complete up to order q if it contains independently allmonomials xα with ∣α∣ = α1 + + αd le q ie using multi-indices we write

uh =q

sumβ=0

sum∣α∣=β

cαxα (98)

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

1D For d = 1 the above reduces to

uh =q

sumβ=0

sumα=β

cαxα =

q

sumβ=0

cβxβ (99)

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 93

2D for d = 2 with coordinates x1 and x2 we use the above definition of complete polynomialsFrom the above definition we conclude

uh =q

sumβ=0

sumα1+α2=β

c(α1α2)xα11 xα2

2 (910)

This results in the following bases for increasing q-values

q = 0 ∶ 1q = 1 ∶ 1 x1 x2q = 2 ∶ 1 x1 x2 x

21 x1x2 x

22

q = 3 ∶ 1 x1 x2 x21 x1x2 x

22 x

31 x

21x2 x1x

22 x

32

(911)

The number of independent monomials in 2D is (q + 1)(q + 2)2

The same definition can be extended to higher dimensions

55

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

10 The Finite Element Method

All of the shape functions discussed in previous sections were global ie they were defined overthe entire body Ω This is quite disadvantageous for (at least) two reasons First using globalshape functions such as polynomials xa (for a = 0 n) results in a dense matrix K whenforming the linear system to be solved for the unknown coefficients by the various methodsintroduced before That is because integrals of the type B[NaN b] ne 0 in general The denseK-matrix creates high computational costs (by contrast a sparse matrix admits more efficientsolving of the system of equations) Second global shape functions are problematic when itcomes to Dirichlet BCs imagine eg prescribing the displacements at both ends of a 1D barEnforcing uh(0) = 0 is simple whereas setting uh(0) = 0 and uh(L) = ∆u is more involved asthe latter leads to a condition involving all unknown coefficients

uh(x) =n

suma=0

uaNa(x) rArr uh(0) = u0 = 0 uh(L) =n

suma=1

uaNa(L) = ∆u (101)

Such global coefficient constraints as given by the latter form are especially cumbersome whendealing with multiple essential BCs in higher dimensions The motivation for the finite elementmethod was hence to construct local shape functions that admit the relatively easy implemen-tation of essential BCs (while also resulting in sparse matrices)

The main idea is to introduce a discretization Th which splits Ωinto a finite number of subdomains Ωe the so-called elementssuch that

Ωe sube Ω Ω =⋃e

Ωe partΩ sube⋃epartΩe (102)

The discretization Th is defined by the collection of nodes andelements it is called a mesh

nodeelement

mesh

Mathematically (and computationally) a finite element (FE) is an object that has

(i) a (sub)domain Ωe sube Ω

(ii) a space of shape functions Nae (defined within Ωe and suppNa

e = Ωe)

(iii) a set of degrees of freedom (dofs) viz the uae-coefficients associated with those Nae

The Finite Element Method (FEM) defines continuous piecewise-polynomial shape func-tions such that

Na(xb) = δab for all a b isin 1 n (103)

In other words each shape function Na is 1 when evaluated at exactly one node a and itvanishes at all other nodes This is the defining relation that determines the shape functionsNotice that if we evaluate the approximation uh(x) at one of the nodes xb then

uh(xb) =n

suma=1

uaNa(xb) =n

suma=1

uaδab = ub (104)

That is the coefficient ub can now be identified as the value of approximate function uh atnode b This makes for a very beneficial interpretation of the (yet to be determined) shapefunction coefficients

56

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us check if FE shape functions satisfying (103) also satisfy the requirements for shapefunctions discussed in Section 91

(I) is automatically satisfied if x isin Ω then we must have x isin Ωe for some element e Conse-quently there must be element shape functions Na(x) ne 0

(II) can be satisfied (approximately) by fixing those degrees of freedom associated with theboundary nodes (while leaving the entire nodes unaffected and vice-versa) For example ifour 1D bar is discretized into n nodes and nminus1 elements such that uh(x) = sumna=1 u

aNa(x)then imposing uh(0) = 0 and uh(L) = ∆u is simply enforced by fixing the coefficientsu1 = 0 and un = ∆u

(III) Linear independence can be shown by contradiction assume that uh(x) = 0 for all x isin Ωwhile there is indeed some ua ne 0 for 1 le a le n Now evaluate uh at any node b

0 = uh(xb) =n

suma=1

uaNa(xb) = ub rArr ub = 0 forall b = 1 n (105)

which contradicts the assumption that some ua ne 0 Thus (103) ensures that we havelinearly independent shape functions

(IV) Integrabilitydifferentiability requirements depend on the variational problem to be solvedand must be ensured For example for the mechanical BVP we have seen that Uh sub H1ie 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 onthe type of piecewise-polynomial interpolation functions to be used

(V) Completeness requires uh rarr u (and thus Uh rarr U) to within desirable accuracy In the FEmethod one commonly enriches Uh by one of the following methods (shown below)

h-refinement refining the discretization Th while keeping the polynomial interpo-lation order within elements fixed (ie decreasing the element size while using thesame type of shape functions)

p-refinement increasing the polynomial interpolation order within a fixed dis-cretization Th (ie keeping the elements but using higher-order polynomial shapefunctions)

hp-refinement a combination of the two above (ie increasing the number ofelements while also increasing the polynomial order of shape functions)

r-refinement repositioning of nodes while keeping the discretization and interpo-lation order fixed (eg moving nodes into regions requiring higher accuracy)

element element element

element

original mesh h-refinement p-refinement r-refinement

linear interpol

linear interpol

quadratic interpolation

linear interpol

When using either of these refinement techniques appropriately within the FE context wemay expect that Uh rarr U and hence that the approximate solution uh converges to the exactsolution u

57

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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 isin Ω so that within a small h-neighborhood of x(and h being interpretable as the element size) we may expand

u(x + h) = u(x) + huprime(x) + 1

2h2uprimeprime(x) + + 1

qhqu(q)(x) +O(hq+1) (106)

Assume that Uh contains all polynomials complete up to degree q (ie Uh = Pq) then thereexists

uh isin Uh such that u(x) = uh(x) +O(hq+1) (107)

Let p denote the highest derivative in the weak form then

dpu

dxp= dpuh

dxp+O(hq+1minusp) (108)

For the solution to converge as h rarr 0 we need the errors to be at least of order O(h) whichimplies that we must have q + 1 minus p ge 1 Thus we must ensure that

q ge p (109)

For example for the mechanicalthermalelectromagnetic variational problem discussed previ-ously we had the requirement uuh isinH1(Ω) since the energy and resulting weak form containedfirst derivatives of u only Hence we have p = 1 and interpolations must satisfy q ge p = 1 There-fore shape functions to be used for solving mechanical BVPs require at least piecewise-linearshape functions

58

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

11 Finite element spaces polynomial shape functions in 1D

Let us start with the simplest of all choices continuous piecewise-polynomial interpolation func-tions As explained above we need q ge 1 since p = 1 for the mechanicalthermalelectromagneticvariational problem ie we need at least linear interpolation within elements

111 2-node bar element

The simplest example for our discussion of shape functions is the2-node bar element in 1D Since the element has only two nodes(which we call nodes 1 and 2) we employ shape functions for theinterpolation of the element dofs Ue = u1

e u2e so that

uhe(x) = N1e (x)u1

e +N2e (x)u2

e (111)

and we must have uhe(0) = u1e and uhe(∆x) = u2

e for an elementdefined on x isin [0∆x] as shown on the right

1 2

Dx

1u 2u

x

2N 1Ne e

e e

We know that the shape functions must be linear polynomials (q = 1) so that uhe(x) = c1e + c2

ex(we have only two nodes and therefore must have an interpolation with two coefficients)

Imposing those two constraints implies

uhe(0) = c1e = u1

e uhe(∆x) = c1e + c2

e∆x = u2e hArr c2

e =u2e minus c1

∆x= u

2e minus u1

e

∆x(112)

and hence

uhe(x) = c1e + c2

ex = (1 minus x

∆x)u1

e +x

∆xu2e (113)

Comparison with (111) yields the element shape functions (plotted above) as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (114)

Notice that these functions automatically satisfy (103) ie each shape function a is 1 at nodea and 0 at the respective other node

Differentiating the above linear shape functions yields

N1ex(x) =

d

dx(1 minus x

∆x) = minus 1

∆x N2

ex(x) =d

dx

x

∆x= 1

∆x (115)

so that the (only non-zero) axial strain inside the bar element is constant since

εhxx = uhex(x) =n

sumi=1

uieNiex(x) = u1

eN1ex(x) + u2

eN2ex(x) =

u2e minus u1

e

∆x= const (116)

If we assume a linear elastic bar so σ = E ε we obtain from (815)

F ainte = intΩσxx(εhxx)Na

xdV = int∆x

0Eu2e minus u1

e

∆xNaxA dx = EA

∆x(u2

e minus u1e)int

∆x

0Naxdx (117)

and inserting the constant shape function derivatives finally yields

F 1inte =

EA

∆x(u2

e minus u1e) (minus

1

∆x)∆x = minusEA

∆x(u2

e minus u1e) and F 2

int = minusF 1int (118)

59

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The components of the element stiffness matrix Ke follow as

[Ke] = [partF iint

partuje] = EA

∆x( 1 minus1minus1 1

) (119)

which has the typical form known from 1D assemblies of linear springs of effective stiffnessk = EA∆x We could alternatively have used our definition obtained from the linear elasticmechanical weak form

Kab = intΩeB[NaN b] dV = int

∆x

0ENa

exNbexAdx = EA∆xNa

exNbex =

EA

∆x

⎧⎪⎪⎨⎪⎪⎩

1 if a = bminus1 else

(1110)

where inserting the constant shape function derivatives again led to (119)

Note that the two nodal forces F 1inte and F 2

inte depend linearly on the nodal displacements (ascan be expected from a linear elastic bar) so that

[Finte] = (F1int

F 2int

) = EA∆x

( 1 minus1minus1 1

)(u1e

u2e) hArr Finte =KeUe (1111)

Further we realize that indeed

Ie(Ue) = int∆x

0

E

2(εhxx)

2Adx = 1

2Ue sdotKeUe so Finte =

partIepartUe

(1112)

So far we have only considered axial (ie 1D) deformation of the bar element In general thebar may be part of a 2D or 3D structure so it is important to generalize the above frameworkto higher dimensions This can be achieved by projecting the 2D or 3D displacements of theelement nodes onto the orientation of the bar element as follows

In d dimensions the nodal displacements of the bar element are

Ue = (u1eu

2e)

Twith uae = (uae1 uaed)

T (1113)

That is in 2D we deal with four nodal dofs (viz the u1- and u2-displacement components ofeach of the two nodes in the x1- and x2-directions respectively) while in 3D we have six nodaldofs (the u1- u2- and u3-displacement components of each of the two nodes)

We obtain the orientation of the bar element in space from its

nodal coordinates in the reference configuration Xe = (x1ex

2e)

T

such that ∆xe = ∥x2e minusx1

e∥ In 2D the angle with the x1-axis isobtained from geometry as

ϕe = arctan⎛⎝x2e2 minus x1

e2

x2e1 minus x1

e1

⎞⎠ (1114)

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

1(xe1

1 x )e2

2(xe1

2 x )e2

Dxe

The projection of the nodal displacements Ue onto the bar axis identifies the axial displacementsUe of the two nodes (written with a tilde to avoid ambiguity) as

(u1e

u2e) = (cosϕe sinϕe 0 0

0 0 cosϕe sinϕe)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[R(ϕe)]

⎛⎜⎜⎜⎜⎝

u1e1

u1e2

u2e1

u2e2

⎞⎟⎟⎟⎟⎠

hArr Ue =R(ϕe)Ue (1115)

60

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice further that the resulting axial forces acting at the two nodes Finte = (F 1inte F

2inte)

T

can be decomposed into the nodal forces in 2D Finte = (F 1inte1 F

1inte2 F

2inte1 F

2inte2)

T via

⎛⎜⎜⎜⎜⎝

F 1inte1

F 1inte2

F 2inte1

F 2inte2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

cosϕe 0sinϕe 0

0 cosϕe0 sinϕe

⎞⎟⎟⎟⎠(F 1

inte

F 2inte

) hArr Finte =RT(ϕe)Finte (1116)

Recall that we showed

Finte =KeUe rArr RT(ϕe)Finte =KeRT(ϕe)Ue hArr Finte =R(ϕe)KeR

T(ϕe)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

=Ke

Ue

with the axial stiffness matrix determined above as

[Ke] =EA

∆xe( 1 minus1minus1 1

) (1117)

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

R(ϕe)KeRT(ϕe) = Ke hArr Ke =RT(ϕe)KeR(ϕe) (1118)

Without derivation we mention that the same relations apply in 3D with the rotation matrix

R = ( l m n 0 0 00 0 0 l m n

) (1119)

where l m and n are respectively the direction cosines with the x1- x2- and x3-axes iel = cosang(xe1) where x is the unit vector pointing along the bar axis m = cosang(xe2) etc

Example 111 Truss consisting of three bars in 2D

Consider a truss consisting of three linear elastic bars connected byhinges and supported by a rigid impenetrable ground as shownon the right Loading the truss by a vertical force F we seek thedisplacements of the three nodal hinges

We first compute the stiffness matrix of each bar element individ-ually accounting for two displacement dofs per node By reusingthe stiffness matrix derived in (1117) and (1118) the horizontalbar (bar 1 connecting nodes 1 and 2) with ϕe = 0 has

L L

L1 2

3

F

sbquoƒ

EA

[K1] =RT(0)KeR(0) = EAL

⎛⎜⎜⎜⎝

1 0 minus1 00 0 0 0minus1 0 1 00 0 0 0

⎞⎟⎟⎟⎠ (1120)

Similarly bar 2 on the right (connecting nodes 2 and 3) with ϕe = 2π3 has

[K2] =RT(2π3 )KeR(2π

3 ) = EA4L

⎛⎜⎜⎜⎜⎝

1 minusradic

3 minus1radic

3

minusradic

3 3radic

3 minus3

minus1radic

3 1 minusradic

3radic3 minus3 minus

radic3 3

⎞⎟⎟⎟⎟⎠

(1121)

61

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly bar 3 on the left (connecting nodes 1 and 3) with ϕe = π3 has

[K3] =RT(π3 )KeR(π3 ) =EA

4L

⎛⎜⎜⎜⎜⎝

1radic

3 minus1 minusradic

3radic3 3 minus

radic3 minus3

minus1 minusradic

3 1radic

3

minusradic

3 minus3radic

3 3

⎞⎟⎟⎟⎟⎠

(1122)

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 barrsquosreference axis with the x1-axis with the first node being the center of rotation)

mdashmdashmdashmdash

112 Problem assembly

In order to solve the above truss problem we need to formulate the system of equations tobe solved This requires an important step known as the assembly of the global stiffnessmatrix Each of the above stiffness matrices represents a local stiffness matrix ie each ofthe matrices K1 K2 and K3 are each valid only for one particular element and the matricesare therefore associated with the displacements of the nodes of the respective elements In orderto solve the truss problem we need to formulate the global system of equations for the unknowndisplacements U = (u1

1 u12 u

21 u

22 u

31 u

32)T of the three nodes

Notice that to this end we need to differentiate between local and global dofs eg beamelement 2 (on the right) locally links its two nodes with dofs (u1

e1 u1e2) and (u1

e1 u1e2) However

taking the global view it is linking the global nodes 2 and 3 Hence local node 1 correspondsto the global node 2 and local node 2 corresponds to the global node 3 This local-to-globalmap is an essential book-keeping task within the FEM To avoid confusion we introduced thesubscripts e for local element-internal quantities For example for element 2 we have u1

e = u2

and u2e = u3 For element 3 we have analogously u1

e = u1 and u2e = u3 etc

Example 112 Three-bar truss in 2D (continued)

Let us continue Problem 111 using the above local-to-global map Now that we have understoodhow local nodes (1 and 2 for each beam element) are linked to global nodes (1 2 and 3) wecan assemble the global system All we must do is add the components of the local stiffnessmatrices to the right spots in the global stiffness matrix For example K1 (linking nodes 1 and2) in the global system with U = (u1

1 u12 u

21 u

22 u

31 u

32)T becomes

[K1]global =EA

L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 minus1 0 0 00 0 0 0 0 0minus1 0 1 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1123)

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

[K2]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 0 0 0 0 0

0 0 1 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

0 0 minus1radic

3 1 minusradic

3

0 0radic

3 minus3 minusradic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1124)

62

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

1radic

3 0 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

0 0 0 0 0 00 0 0 0 0 0

minus1 minusradic

3 0 0 1radic

3

minusradic

3 minus3 0 0radic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1125)

Now we obtain the global stiffness matrix simply from the assembly of the local matrices ie

[K] = [K1]global+[K2]global+[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

5radic

3 minus4 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

minus4 0 5 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

minus1 minusradic

3 minus1radic

3 2 0

minusradic

3 minus3radic

3 minus3 0 6

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1126)

In order to solve for the deformation of the truss in Problem 111 we may now use the assembledstiffness matrix (1126) but we must impose proper boundary conditions First we have anexternal force F applied vertically downwards at node 3 The global external force vector(collecting all external forces applied to the truss) reads

[Fext] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

000minusF

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1127)

where we left question marks for the two unknown support reactions in the vertical directionof the two sliders on the ground The natural boundary conditions (here the force F ) are thusimposed through the external force vector Fext

When it comes to essential BCs we must constrain nodes 1 and 2 from moving off the groundso we have u1

2 = 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 wefurther impose arbitrarily u3

1 = 0 (which will result in symmetric deformation)

Let us impose the essential BCs by eliminating the respective rows and columns from the systemConsequently we only retain rows and colums 1 3 and 6 of K and analogously we only retainrows 1 3 and 6 of Fext (which automatically removes the question marks in the external forcevector) Overall we arrive at the linear system

EA

4L

⎛⎜⎝

5 minus4 minusradic

3

minus4 5radic

3

minusradic

3radic

3 6

⎞⎟⎠

⎛⎜⎝

u11

u21

u32

⎞⎟⎠=⎛⎜⎝

00minusF

⎞⎟⎠

rArr⎛⎜⎝

u11

u21

u32

⎞⎟⎠= FL

4radic

3EA

⎛⎜⎝

minus11

minus3radic

3

⎞⎟⎠

(1128)

Hence we see that the truss deforms indeed symmetrically as u11 = minusu2

1 and the top node movesdownwards under the applied load while the bottom nodes move outwards Note that we canalso compute the unknown nodal reactions from Fext = Fint =KU

mdashmdashmdashmdash

63

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order

So far we have only considered linear shape functions When going to higher-order polynomialinterpolation (as required eg for p-refinement but also for BVPs with higher-order derivativesin the weak form) various choices are possible for the definition of the element shape functionsWe here discuss two such approaches

1131 Lagrangian interpolation

The above scenario is a special case (ie the simplest case possible) of Lagrangian interpo-lation in 1D which can be extended to higher orders as follows Assume an interpolation upto degree q ie 1 x x2 xq such that

uhe(x) =q+1

suma=1

Nae (x)uae = a0 + a1x + a2x

2 + + aqxq (1129)

In general shape functions Nae (x) for a = 1 q + 1 can be determined by solving the q + 1

equations

uhe(xi) = ui for all i = 1 q + 1 (1130)

for the q + 1 coefficients ai (i = 0 q) Then rearranging the resulting polynomial allows toextract the shape functions Na

e (x) by comparison of the coefficients of uae cf (113) for the 1Dbar element

Alternatively we can solve

Nae (xb) = δab for all nodes b = 1 q + 1 (1131)

The solution to this problem is quite intuitive

Nae (x) =

(x minus x1) sdot sdot (x minus xaminus1) sdot (x minus xa+1) sdot sdot (x minus xq+1)(xa minus x1) sdot sdot (xa minus xaminus1) sdot (xa minus xa+1) sdot sdot (xa minus xq+1)

(1132)

so that Nae (x) is by definition 1 if x = xa and it vanishes at all

other nodes Hence one can readily verify that Nae (xb) = δab

These shape functions are called Lagrange polynomials Thedenominator is known and depends only on the nodal locationswhile the numerator is indeed a polynomial of order q

Shown on the right is an example of quadratic shape functionsinterpolating the displacement field in a bar element with threenodes

1 2

Dx

1u 2u

x

2N 1Ne e

e e33ue

3Ne

1132 Hierarchical interpolation

An alternative to the above Lagrangian interpolation is so-called hierarchical interpolationHere we construct higher-order interpolations based on lower-order shape functions For ex-ample we start with a 2-node bar element

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (1133)

64

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us enrich the interpolation to reach q = 2 by defining

uhe(x) = N1e (x)u1

e +N2e (x)u2

e + N3e (x)αe (1134)

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

N3e (x) = a0 + a1x + a2x

2 (1135)

which is associated with the newly introduced dof α To identify the coefficients ai recall thatwe must have

N3e (0) = N3

e (∆x) = 0 rArr N3e (x) = c

x

∆x(1 minus x

∆x) (1136)

with some arbitrary non-zero constant c ne 0 (which is to be chosen)

Note that αe does not have to be continuous across elements and can hence be determinedlocally (ie given u1

e and u2e αe can be determined internally for each element which allows

for condensation of the αe-dof with efficiency advantages)

114 2-node beam element

A practical example of elements with higher-order interpolation are beam element Unlikethe 2-node bar element (which only captures stretching of the bar see Section 111) beamelements account for bending (and can be superposed with the bar element to result in generalelements ready for stretching and bending) The linear elastic Euler-Bernoulli beam isthe most common structural element for this purpose whose deformation is defined by thedeflection w(x) Let us first review the underlying governing equations

Consider a continuous linear elastic beam of length L (constant Young modulus E and areamoment Iy) loaded by a distributed transverse load q(x) as well as bending moments My (aboutthe y-axis) and transverse forces Fz (in the positive z-direction) applied at its two ends Thestrong form of this problem (assuming EIy = const) reads

EIywxxxx(x) = q(x) with x isin (0 L) (1137)

with the boundary conditions (flipped signs at the negative cut)

minusF 1z = minusE Iy wxxx(0) minusM1

y = minusEIywxx(0)F 2z = minusEIywxxx(L) M2

y = minusEIywxx(L)(1138)

wxz 1F

z

2F

y

2My

1ML

z

q

The potential energy functional for the variational problem with deflection w(x) is

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1139)

where the plus-signs in the terms involving bending moments result from May being against

the rotation direction of wx The first variation yields the weak form (which must hold for alladmissible v(x))

G[w v] = intL

0[EIywxxvxx minus qv] dxminusF 1

z v(0)minusF 2z v(L)+M1

y vx(0)+M2y vx(L) = 0 (1140)

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

w isin U = w isinH2(0 L) ∶ w = w on partΩD (1141)

65

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Following our definitions from Section 7 we identify from (1140) the bilinear form

B[w v] = intL

0EIywxxvxxdx (1142)

and the linear boundary operator

L[v] = intL

0q vdx + F 1

z v(0) + F 2z v(L) minusM1

y vx(0) minusM2y vx(L) (1143)

such that

G[w v] = B[w v] minusL[v] = 0 forall v isin Uh0 = v isinH2(0 L) ∶ v = 0 on partΩD (1144)

As shown in Section 73 introducing an approximate solution

wh(x) =n

suma=1

waNa(x) (1145)

transforms the continuous problem into a linear problem for the n unknown coefficients wa andthe stiffness matrix associated with the linear problem has components

Kab = B[NaN b] = intL

0EIyN

axxN

bxxdx (1146)

To identify suitable shape functions Na(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 beamelement We know from the weak form that q ge 2 so the simplest admissible interpolation forthe unknown deflection w(x) would be based on 1 x x2 However this would introduce onlythree unknown coefficients (for two nodes) which is why we deliberately go one order higherand choose the basis 1 x x2 x3 This leads to the approximate deflection

whe (x) = c0 + c1x + c2x2 + c3x

3 for x isin [0 Le] (1147)

Since the four coefficients ci are hard to interpret physically in general we instead assign toeach node a deflection w and a deflection angle θ = wx and we use those as the four unknownsdefining the element interpolation The four coefficients ci are thus uniquely defined by thenodal conditions (shown below schematically)

whe (0) = w1e whe (Le) = w2

e whex(0) = θ1e whex(Le) = θ2

e (1148)

In order to clearly associate the shape functions with the nodal dofs let us alternatively writethe element interpolation as

whe (x) =2

suma=1

[Nae (x)wae +Ma

e (x)θae ] (1149)

with the four shape functions N1e and N2

e (associated with the nodal deflections) as well as M1e

and M2e (associated with the nodal rotations)

1 2

Le

1w2w

x

ee

2qe1qe

66

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Inserting the interpolation (1149) into the four conditions (1148) we obtain four equations tosolve for the unknown shape functions The resulting shape functions are known as Hermitianpolynomials which for a beam with x isin [0 Le] evaluate to

N1e (x) = 1 minus 3( x

Le)

2

+ 2( xLe

)3

N2e (x) = 3( x

Le)

2

minus 2( xLe

)3

M1e (x) = x(1 minus x

Le)

2

M2e (x) =

x2

Le( xLe

minus 1) (1150)

We can easily verify that eg N1e (0) = 1 while N2

e (0) = 0 and analogously N1e (Le) = 0 while

N2e (Le) = 1 Further we need to have N1

ex(0) = N1ex(Le) = N2

ex(0) = N2ex(Le) = 0 as well

as M1e (0) = M1

e (Le) = M2e (0) = M2

e (Le) = 0 Note the difference in units between N ie and

M ie because they multiply deflections and deflection angles respectively in the interpolation

(1149) Shown below are the four shape functions

02 04 06 08 10

02

04

06

08

10

02 04 06 08 10

-015

-010

-005

005

010

015

xLe

xLe

2N 1Ne

e

1M Lee

2M Dxee

1 1

Note that this approximation is only one possible choice we could also define alternative nodesand nodal values However the above choice ensures that both deflection and angle are contin-uous across elements (since nodal values are shared by neighboring elements)

Having established the shape functions we proceed to deriving the resulting element stiffnessmatrix where we follow the analogous procedure as for the bar element in Section 111 we firstcompute Ke the stiffness matrix for a beam element that is horizontal and then generalize theformulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke

Let us sort the nodal dofs as Ue = (w1e θ

1e w

2e θ

2e)

T Using (1146) with N1

e M1e N2

e and M2e

(in that order to comply with the nodal dof sorting) we obtain

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠ (1151)

and the nodal reactions (including transverse forces F az and bending moments May conjugate to

the deflections wae and deflection angles θae respectively) are

Finte = KeUe with Finte = (F 1inteM

1inte F

2inteM

2inte)

T (1152)

Here forces and moments have the same directions as the conjugate deflections and rotationangles In conclusion the nodal dofs and the nodal reactions are related linearly via

⎛⎜⎜⎜⎜⎝

F 1inte

M1inte

F 2inte

M2inte

⎞⎟⎟⎟⎟⎠

=2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

w1e

θ1e

w2e

θ2e

⎞⎟⎟⎟⎠ (1153)

67

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Next let us generalize the beam element discussed above by considering a beam in 2D whose

nodal dofs are Ue = (u1e1 u

1e2 θ

1 u2e1 u

2e2 θ

2)T ie each node is now displacing in 2D and

rotating Since the above beam formulation only considers bending let us superimpose the barelement from Section 111 so that the resulting element can stretch and bend (otherwise thenodal dofs would not be independent as the length of the bar would have to remain unchangedwithout the ability of the element to stretch axially)

Consider a horizontal 2-node beam with nodal dofs Ue = (u1e w

1e θ

1 u2e w

2e θ

2)T so that wie

and θi describe the beam deflection while u2e minus u1

e defines the change in length of the beamelement 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 beamelements yielding

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 6 3Le 0 minus6 3Le0 3Le 2L2

e 0 minus3Le L2e

0 0 0 0 0 00 minus6 minus3Le 0 6 minus3Le0 3Le L2

e 0 minus3Le 2L2e

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

+ EALe

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 0 minus1 0 00 0 0 0 0 00 0 0 0 0 0minus1 0 0 1 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1154)

Note that we must carefully associate the stiffness matrix components with the correct nodaldofs as done above for the bending and stretching contributions

Now we can apply a coordinate transformation to generalize the above to beams with arbitraryorientation in 2D with ϕe denoting the angle of the beam elementrsquos reference orientation againstthe horizontal axis (see the schematic below where we flipped the directions of both deflectionsand rotation angles for consistency) as defined in (1114)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e

w1e

θ1

u2e

w2e

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraR(ϕe)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e1

u1e2

θ1

u2e1

u2e2

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Ue =R(ϕe)Ue (1155)

By using the same argument as for the 2-node bar element thestiffness matrix of the generally oriented 2-node beam element isthus obtained as

Ke =RT(ϕe)KeR(ϕe) (1156)

with R(ϕe) and Ke from (1155) and (1154) respectively Ofcourse the same can also be extended to beams in 3D where anappropriate transformation matrix R based on direction cosines isintroduced

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

L

2we~

1we~

1qe

2qe

The key difference between bar and beam elements lies in the deformation modes capturedby each Bars only undergo axial stretching and bar networks are hinged (ie bars carryno transverse forces nor bending moments) The above beam element supports both axial andbending deformation and beam networks are rigidly connected at nodes (angles between beamsat nodal junctions remain constant)

68

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

115 A note on beam elements and boundary conditions

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

The potential energy functional for the variational problem of an Euler-Bernoulli beam withthe deflection field w(x) was given by

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1157)

so that the first variation reads (dropping the dependence on x in the integral for brevity)

δI = intL

0[EIywxxδwxx minus q δw] dxminusF 1

z δw(0)minusF 2z δw(L)+M1

y δwx(0)+M2y δwx(L) (1158)

In order to recover the strong form (whose PDE is EIywxxxx minus q = 0) we integrate the firstterm by parts to obtain

δI = minusintL

0EIywxxxδwxdx + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1159)

and integrating the first term by parts again finally gives

δI = intL

0EIywxxxxδwdx minus [EIywxxxδw]L0 + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1160)

Re-arranging the above leads to the stationarity condition

δI = 0 = intL

0(EIywxxxx minus q) δw dx

minus [F 1z minusEIywxxx(0)] δw(0) minus [F 2

z +EIywxxx(L)] δw(L)minus [minusM1

y +EIywxx(0)] δwx(0) + [M2y +EIywxx(L)] δwx(L) forall δw isin U0

(1161)

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

EIywxxxx minus q = 0 for 0 lt x lt L (1162)

Furthermore the remaining four terms in (1161) must also vanish individually (since we can inprinciple choose the variations at the ends individually and δI = 0 must hold for all admissiblevariations) For example we must have

[F 1z minusEIywxxx(0)] δw(0) = 0 (1163)

which means that either F 1z minus EIywxxx(0) = 0 (ie a transverse force F 1

z is imposed at theend x = 0) or δw(0) = 0 (which implies that w(0) = w1 must be an essential BC) Likewise[minusM1

y +EIywxx(0)] δwx(0) means that either M1y = EIywxx(0) (ie a bending moment is

imposed at x = 0) or δwx = 0 (which implies that wx(0) = θ1 must be an essential BC)Therefore the above form of the first variation (in which the integral term matches the PDEof the strong form) reveals all possible boundary conditions both natural and essential (ieNeumann and Dirichlet respectively)

69

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We thus also need to revise our definition of a Dirichlet boundary condition not neces-sarily every derivative of the primary field u imposed implies a Neumann boundary conditionInstead we extract the notion of Dirichlet vs Neumann boundary conditions from the firstvariation of a variational problem As a rule of thumb essentialDirichlet BCs imposethe function itself as well as derivatives up to order (pminus 1) where p is half the order ofthe PDE in the strong form or the matching order of u and v in weak form (eg for a beamthe PDE is of fourth-order the matching-order weak form contains second derivatives essentialBCs impose the deflection itself or its first derivative)

70

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

12 Shape Functions in higher dimensions

So far we have used polynomial shape functions for element interpolations in 1D and we sawthat the shape functions depend on the element size ∆xe or Le In higher dimensions it wouldbe quite cumbersome to define polynomial shape functions on the actual shape of the elementthus depending on the nodal locations and the geometry of the element in space unless oneuses regular structured meshes (eg grids where all elements have the same shape) In generalall elements have different shapes and it is beneficial to define shape functions independent ofthe specific element shape

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 shapefunctions in the reference configuration to those in real physical space

To this end we introduce a (bijective) mapping φ from a reference domain (with referencecoordinates ξ = ξ η ζ) onto the physical domain (with coordinates x = x1 x2 x3) of anelement e

x = φ(ξ) ie in 3D for i = 123 xi = xi(ξ η ζ) (121)

A schematic of the parametric mapping concept is shown below in 2D for a quadrilateral (bi-linear) element which will be introduced soon The mapping links the element in its referenceconfiguration or space described by coordinates (ξ η) to the elementrsquos representation in realphysical space described by Cartesian coordinates (x1 x2) in 2D

For simplicity we reuse the interpolation concepts from before

so far we used uhe =n

sumi=1

N ie(x)uie

now we use uhe =n

sumi=1

N ie(ξ)uie and x =

m

sumi=1

N ie(ξ)xie

(122)

where we have three options for the mapping

(i) isoparametric mapping n =m and N ie = N i

e (same interpolation of positionsdofs)

(ii) subparametric mapping n gtm (lower-order interpolation of positions)

(iii) superparametric mapping n ltm (higher-order interpolation of positions)

The strategy is now to define N ie(ξ) in the reference configuration We will first discuss this

concept for simplicial elements in the next section before proceeding to more general classes ofpolynomial element interpolations

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

4 4 3

1 2

mapping

element in physical space element in its reference space

71

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

13 Simplicial elements

The probably simplest type of finite element are so-called simplicial elements (and we havealready seen one) These are characterized by having the minimum number of nodes possible ina given dimension Mathematically speaking a simplex of order k is a k-dimensional polytopewhich is the convex hull of its k + 1 vertices

In plain English a simplex in d dimensions is a convex body made up of d + 1 nodes

in 1D a 2-node bar whose interpolation basis is 1 x

in 2D a 3-node triangle (T3) whose interpolation basis is 1 x1 x2

in 3D a 4-node tetrahedron (T4) whose interpolation basis is 1 x1 x2 x3

Overall this shows that the element interpolation in each case is of degree q = 1 (linear) andthe space of shape functions is complete up to linear order for a simplicial element in everydimension

Although one could in principle derive the shape functions for any arbitrary element geometrythis turns out to be cumbersome in general Consider eg a simplicial element in 2D (a triangle)whose three nodes are equipped with some nodal dofs u1 u2 and u3 One could now write

uh(x) =n

suma=1

uaNa(x) (131)

and enforce the conditions uh(xa) = ua to solve the resulting system of equations for the shapefunctions Na(x) as done at the beginning of Section 111 However such an approach isinconvenient as the resulting shape functions will inevitably depend on the nodal locationsxa in a complex manner and therefore vary from element to element based on the elementlocation and geometry As a remedy one resorts to the concept of isoparametric mappings(see Section 12) to introduce general shape functions whose definition does not depend on theelement geometry For simplices one commonly introduces so-called barycentric coordinates

131 Linear Triangle (T3)

In order to derive the shape functions and resulting element inter-polation for a 3-node triangular element (T3) in 2D one definesthe barycentric coordinates

lae(x) =Aae(x)Ae

for a = 123 (132)

where Ae = ∣Ωe∣ is the total area of the triangular element and Aae isthe sub-area opposite from node a when splitting the triangle intothree parts by connecting the nodes to point x (see the schematicon the right) Consequently we have A1

e +A2e +A3

e = Ae 1

23

x

A1

A3A2

Note that by finite element convention we always number the local nodes of an element in 2Dcounter-clockwise

We now have two ways to describe a point inside the triangular element we either use itscoordinate x or the three barycentric coordinates lae to describe the point and there is a uniquerelation (a mapping) between (x1 x2) harr (l1a l2a l3a) In general we need only two coordinates

72

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

to describe a point in 2D space and here we notice that indeed we need only two of thebarycentric coordinates to uniquely describe a point in space (if two of the lae are known thenthe third is known as well since l1e + l2e + l3e = 1) For example we may define

ξ = l1e and η = l2e (133)

as the two coordinates (ξ η) to uniquely describe points within the triangle

Furthermore notice that the barycentric coordinates also satisfy the relation

lae(xb) = δab (134)

(eg if x is one of the nodal locations then two of the three areas Aae are zero and one areaequals Ae) This indicates that the three barycentric coordinates also qualify as shape functionsie we may choose Na(x) = lae(x) Note that also 0 le lie le 1 and sum3

i=1 lie(x) = 1 for all x isin Ωe

The shape functions associated with the three nodes now become

N1e (ξ η) = ξ N2

e (ξ η) = η N3e (ξ η) = 1 minus ξ minus η (135)

The beauty of these shape functions lies in the fact that in the above form they are independentof the element geometry In addition computing shape function derivatives with respect to (ξ η)is obviously trivial N1

eξ = 1 N1eη = 0 etc

We still need to find the link between the Cartesian coordinates (x1 x2) and the barycentriccoordinates (ξ η) To this end let us exploit that we know Na(xb) = δab and further the factthat the shape functions introduced above define a linear interpolation across the element in 2DThe latter is easy to realize when eg moving from one node a to another ndoe b and realizingthat the barycentric coordinates linearly vary between 0 and 1 between these two nodes (Na

e

will decrease from 1 to 0 while N be 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 Asa consequence we may introduce the isoparametric mapping

x(ξ η) =3

suma=1

Nae (ξ η)xae (136)

which applies the interpolation rules (classically used for the dofs) to the nodal locations of theelement Given the nodal locations x1

e x2e and x3

e the above mapping uniquely assigns a pointx in real space to any barycentric coordinates (ξ η) (136) thus presents the link the mappingbetween (x1 x2) and (ξ η)

Of course we may exploit the same interpolation for any nodal degrees of freedom (thus usingan isoparametric mapping) so

uh(ξ η) =3

suma=1

Nae (ξ η)uae (137)

A difficulty arises though when using this interpolation in the finite element context because weneed to compute shape function derivatives Na

xi in real space (needed eg for the calculationof Ke or Fint) It is easy to compute Na

ξ and Naη but that is not what we need (136) defines

(x1 x2) in terms of (ξ η) but not the other way around

Instead of inverting (136) let us use a mathematical shortcut known as the inverse functiontheorem To exploit this relation let us formally write x1 = x1(ξ η) and x2 = x2(ξ η) so thechain rule gives

( uhξuhη

) = ( uhx1x1ξ + uhx2

x2ξ

uhx1x1η + uhx2

x2η) = (x1ξ x2ξ

x1η x2η)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[J]

( uhx1

uhx2

) = [J] ( uhx1

uhx2

) (138)

73

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

with the Jacobian6 matrix

[J] = (x1ξ x2ξ

x1η x2η) (139)

and its determinant

J = detJ = partx1

partξ

partx2

partηminus partx1

partη

partx2

partξ (1310)

Note that like for the deformation mapping F = Gradϕ in continuum mechanics for theisoparametric mapping to be invertible we need to have J gt 0 This implies that elementscannot be distorted (inverted for simplicial elements or non-convex for general elements later)

By substituting our isoparametric mapping (136) for x1 and x2 in (139) we obtain

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξx

a1e

3

sumi=1

Naeξx

a2e

3

suma=1

Naeηx

a1e

3

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

(1311)

This solves the problem as we may now use (138) to switch between derivatives in the referenceconfiguration and in real space As discussed we need to have J gt 0 Thus we can invert J toarrive at (by the inverse function theorem)

( uhx1

uhx2

) = [J]minus1 ( uhξuhη

) = [J]minus1

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξu

ae

3

suma=1

Naeηu

ae

⎞⎟⎟⎟⎟⎠

but also ( uhx1

uhx2

) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naex1

uae

3

suma=1

Naex2

uae

⎞⎟⎟⎟⎟⎠

(1312)

By equating these two and comparing the coefficients of uae we thus obtain

(Naex1

Naex2

) = [J]minus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (1313)

where for brevity we summarized the barycentric coordinates into ξ = (ξ η)T Relation (1313)is generally applicable for any isoparametric mapping and will be valuable in the future

Applying the inverse function theorem to the specific shape functions (135) yields the Jacobianmatrix

[J] = (xξ x2ξ

xη x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naerx

a1e

3

suma=1

Naeξx

a2e

3

suma=1

Naesx

a1e

3

suma=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= (x11e minus x3

1e x12e minus x3

2e

x21e minus x3

1e x22e minus x3

2e) = const (1314)

and

J = detJ = (x11e minus x3

1e)(x22e minus x3

2e) minus (x21e minus x3

1e)(x12e minus x3

2e) = 2Ae = const (1315)

6The Jacobian in mathematics is usually defined as the transpose of J defined in (139) In the FE contextour definition is chosen for convenience so that we do not need a transpose in (1313) while J = detF remainsthe same

74

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice that J and hence J are constant and do not depend on (ξ η)

Further we have

(Naex1

Naex2

) = [J]minus1 (Naeη

Naeξ

) (1316)

As we had seen from (135) that all shape function derivatives Naξ and Na

η are constant (minus1+1 or 0) and since J = const as well we may also conclude that

Naex1

= const Naex2

= const and also dA = dx1 dx2 = J dξ dη = 2Aedξ dη (1317)

The constant shape function derivatives have an important consequence they indicate that allderivatives partuhpartxj within the triangular element are constant

For example for a mechanical boundary value problem we have two nodal dof components in2D uae = (uae1 uae2) and the interpolation of the displacement field reads

uh =3

suma=1

uaeNae (ξ) or uhi =

3

suma=1

uaeiNae (ξ) for i = 12 (1318)

The resulting strains are

εhij =1

2(uhij + uhji) =

1

2

3

suma=1

(uaeiNaxj + u

aejN

axi) = const (1319)

Consequently all strain components are constant within the element This is why the 3-nodetriangular element is also called the Constant Strain Triangle or CST element It also hasthe important consequence that integration of force vectors or stiffness matrices can easily beperformed exactly since the integrands (for the element energy nodal forces and stiffness) areconstant across the element

In case of higher-order triangular elements the following relation is helpful for evaluating inte-grals over the triangular element (shown without proof)

intΩeξαηβ dA = αβ

(α + β + 2)2Ae (1320)

132 Extension to three dimensions

The extension to three dimensions is straight-forward and results in the 4-node tetrahedron(constant strain tetrahedron) with reference coordinates (ξ η ζ) and shape functions

N1e (ξ η ζ) = ξ N2

e (ξ η ζ) = η N3e (ξ η ζ) = ζ N4

e (ξ η ζ) = 1minusξminusηminusζ (1321)

Here the barycentric coordinates are defined via the ratios of the partial tetrahedron volumes(obtained by splitting the tetrahedral element into four tetrahedra based on the location ofpoint x analogous to the above procedure in 2D) Like in 2D the resulting interpolated strainsare constant in the linear tetrahedron and dV = 6Vedξ dη dζ

The following relation is analogous to (1320)

intΩeξαηβζγ dA = αβγ

(α + β + γ + 2)2Ae (1322)

75

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

133 Finite element implementation

When using the above simplicial elements (like any finite element based on an isoparametricformulation) the finite element implementation can make use of the isoparametric mappingSpecifically for the simplicial elements we showed that

nablaxNae = Jminus1nablaξNa

e = const and Je = detJ = 2Ae (1323)

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

εhij = const rArr σij = σij(εh) = const (1324)

The key integrals to be evaluated (eg in 2D with an element thickness t) following Section 8now become

F aintei = intΩeσijN

aexj dV = int

ΩeσijN

aexj tdA = sum

r=ξη

σijJminus1jr N

aer

Jet

2 (1325)

where the classical summation convention (here over j is implied and not written out for concise-ness) Note that if we pre-compute and store the following constant quantities for each elemente (which only depend on the reference element geometry and not on its degrees of freedom)viz

we =Jet

2= const and Na

exj = sumr=ξη

Jminus1jr N

aer = const (1326)

then the calculation of the nodal force vectors reduces to

F aintei = σij(εh)Naexjwe (1327)

where only the stresses must be recomputed each time for given strains (which do depend onthe nodal dofs) Similarly we compute the element energy as

Ie = intΩeW (εh)dV = int

ΩeW (εh) tdA =W (εh)we (1328)

The analogous definition of a B-matrix as introduced in Section 82 can be applied here asfollows 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 straincomponents in Voigt notation using (1314) are computed as

[εh] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

uh11uh22

uh12 + uh21

⎞⎟⎠=⎛⎜⎝

sumea=1 uae1N

aex1

sumea=1 uae2N

aex2

sumea=1 [uae1Naex2

+ uae2Naex1

]

⎞⎟⎠

= 1

2Ae

⎛⎜⎝

y23e 0 y31

e 0 y12e 0

0 x32e 0 x13

e 0 x21e

x32e y23

e x13e y31

e x21e y12

e

⎞⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[B]

Ue with

xije = xie1 minus xje1

yije = xie2 minus xje2

2Ae = x21e y

31e minus x31

e y21e

(1329)

Note that we exploited J = const and we defined Ue = (u1e1 u

1e2 u

2e1 u

2e2 u

3e1 u

3e2)

T Fur-

thermore (xae1 xae2) denotes the 2D-location of the elementrsquos node a

76

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1331 Special case linear elasticity

For the special case of linear elasticity we may write

εh =BUe rArr σ = Eεh = EBUe (1330)

and the same relations apply as in Section 82 (see the definition of the elastic E-matrix there)Consequently we have the element stiffness matrix nodal internal force vector and internalenergy of element e as respectively

Ke = intΩeBTEBdV =BTEBtAe Finte =KeUe Ie =

1

2Ue sdotKeUe (1331)

where we exploited that BTEB = const and the volume of element e is ∣Ωe∣ = tAe for a 2DCST element Even though not wise for reasons of memory consumption the element stiffnessmatrices Ke can be computed and stored a-priori for each element for faster calculation of forcesand stiffness matrices during simulations

1332 General case of non-linear elastic materials

For the more general case of a material that is not linear elastic we may still write

W =W (ε) rArr σ = partWpartε

= σ(ε) C = partσpartε

= C(ε) (1332)

so that

Ie = intΩeW (εh)dV (1333)

and the internal force vector follows as

Finte =partI int

e

partUe= int

ΩeBTσ dV =BTσ(εh)tAe (1334)

while the incremental stiffness matrix (the analog of the stiffness matrix for nonlinearmaterial behavior) becomes

Te =partF int

e

partUe= int

ΩeBTCB dV =BTC(εh)B tAe (1335)

Note that if σ = Eε the above equations recover the linear elastic definitions with C = E = const

134 Higher-order triangles and tetrahedra

Following the above recipe for the simplicial elements one can also define higher-order triangularand tetrahedral elements based on the barycentric coordinates introduced here For examplethe quadratic triangle (T6) element has six nodes so that the interpolation function space is1 x1 x2 x

21 x1x2 x

22 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

With the same barycentric reference coordinates (ξ η) as for the T3 element the shape functionscan be found as

N1e (ξ η) = ξ(2ξ minus 1) N2

e (ξ η) = η(2η minus 1) N3e (ξ η) = θ(2θ minus 1)

N4e (ξ η) = 4ξη N5

e (ξ η) = 4ηθ N6e (ξ η) = 4ξθ with θ = 1 minus ξ minus η

(1336)

77

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since derivatives of the above shape functions are linear strains (and thus stresses) also varylinearly 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 curvedwhereas those of the CST element remained straight during deformation due to the linearinterpolation A schematic T6LST element is shown below

1

23

4

5

6

1

2

3

4

1

2

3

4

56

79

108

LST (T6) CST (T4) LST (T10)

Analogously the quadratic tetrahedron (T10 also shown above) has four corner nodes andsix nodes at edge midpoints resulting in linear strains within the element By our definitionboth T6 and T10 elements make use of a subparametric mapping since displacements areinterpolated based on higher-order polynomials while the mapping of positions between referenceand real space relies on the same linear interpolation based on barycentric coordinates

The same concepts can be extended to higher dimensions and to higher-order interpolation

78

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 The bilinear quadrilateral element

The above simplicial elements are simple to implement and their constant strains within el-ements admit an exact integration of the element energy nodal forces and stiffness matrixHowever the constant fields within the simplicial elements may not be ideal eg fine FEmeshes may be required to achieve the sought accuracy especially in regions with spatiallystrongly 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 elementsas well as elements in 3D

For the same reason as for the simplicial elements (where we aimed for shape function definitionsindependent 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 quadrilateralelement by definition the reference configuration is Ωe = [minus11]2 and node numbering starts inthe bottom left corner and is counterclockwise

Shape functions must satisfy the FE relation Nae (ξb) = δab in the reference configuration with

nodal positions ξb (b = 1 4) In fact these shape functions can be obtained from the 2-nodebar (whose shape functions we derived in Section 111) by scaling the linear scaling of the shapefunctions up to 2D Consider a 2-node bar whose nodes are positioned7 at ξ = plusmn1 whose shapefunctions are

N1e (ξ) =

1

2(1 minus ξ) N2

e (ξ) =1

2(1 + ξ) (141)

It can easily be verified that N1e (minus1) = 1 N1

e (1) = 0 and N2e (minus1) = 0 N2

e (1) = 1

The 2D quadrilateral element in its reference configuration is Ωe = [minus11]2 ie a square whosecorners are located at ξ = (plusmn1plusmn1) The shape functions can thus be obtained by combining theabove 1D bar shape functions independently in the ξ- and η-directions

N1e (ξ η) = N1

e (ξ)N1e (η) =

1

4(1 minus ξ)(1 minus η)

N2e (ξ η) = N2

e (ξ)N1e (η) =

1

4(1 + ξ)(1 minus η)

N3e (ξ η) = N2

e (ξ)N2e (η) =

1

4(1 + ξ)(1 + η)

N4e (ξ η) = N1

e (ξ)N2e (η) =

1

4(1 minus ξ)(1 + η)

(142)

One can easily verify that Nae (ξb ηb) = δab and sum4

a=1Nae (ξ η) = 1 for all ξ = (ξ η)

1 2x

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

44 3

1 2

mapping

Q4 element in physical spaceQ4 element in its reference space

-1 1

2-node bar in itsreference space

7We note that this choice of ξ isin [minus11] for the bar in the reference configuration is arbitrary one could alsohave chosen eg ξ isin [01]

79

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The isoparametric mapping here implies that the (x1 x2)-coordinates are interpolated across theelement using the same shape functions (viz the above ones) as those used for the interpolationof the fields of interest Therefore we have

x1 =4

suma=1

Nae (ξ η)xae1 x2 =

4

suma=1

Nae (ξ η)xae2 (143)

Notice that this implies straight edges (in the reference configuration) remain straight (in theactual mesh) For example take the bottom edge (characterized by η = minus1) the interpolationalong this edge is

x =4

suma=1

Nae (ξminus1)xae =

1 minus ξ2x1e +

1 + ξ2x2e =

x1e +x2

e

2+ x

2e minusx1

e

2ξ (144)

which is a linear interpolation in ξ Therefore the bottom edge in the real mesh in physicalspace is a linear interpolation between the two adjacent nodes Similar arguments hold for alledges so that this element has only straight edges in physical space

Looking at the shape functions we notice that completeness of the polynomial interpolationis up to q = 1 (even though the interpolation basis 1 ξ η ξη contains the bilinear term it isnot complete up to quadratic order see Section 93) This means we must be able to representlinear solutions of the type

uh(x1 x2) = c0 + c1x1 + c2x2 (145)

exactly As simple check reveals that this is indeed the case since our interpolation based onthe four nodal values uae = uh(xae) recovers the exact solution

uh(x1 x2) =4

suma=1

Nae u

ae =

4

suma=1

Nae u

h(xae1 xae2) =4

suma=1

Nae (c0 + c1x

ae1 + c2x

ae2)

= (4

suma=1

Nae ) c0 + c1

4

suma=1

Nae x

ae1 + c2

4

suma=1

Nae x

ae2 = c0 + c1x1 + c2x2

(146)

Hence we know that the chosen isoparametric element interpolation is capable of representinglinear solutions exactly

Furthermore notice that this interpolation scheme ensures that uh is continuous across ele-ments To see this recall from (144) that on any element edge only those two shape functionsare non-zero whose nodes are adjacent to that edge while the other shape functions are zeroThis implies that the interpolated field uh on any edge is simply a linear interpolation betweenthe 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 adjacentelements As a further consequence the above interpolation also ensures integrability in theweak form as a continuous piecewise polynomial field uh guarantees that uh isinH1(Ω)

As for the simplicial element computing shape function derivatives requires the use of theinverse function theorem first introduced in Section 131 In analogy to the simplicial elementwe use x = x(ξ η) and y = y(ξ η) so the inverse function theorem states

(Naex

Naey

) = Jminus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (147)

By contrast to the simplicial elements we no longer have that J nor nablaξNa are constant becauseof the bilinear term ξη in the shape functions Therefore strains and stresses will no longer beconstant within an element

80

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 141 2-node bar revisited

As a simple example recall the 2-node bar element whose shape functions we computed as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (148)

For a reference bar element with nodes at ξ = plusmn1 the analogous shape functions in 1D read

N1e (ξ) =

1 minus ξ2

N2e (ξ) =

1 + ξ2

(149)

It is simple to verify that these indeed evaluate to 0 and 1 at ξ = plusmn1 Applying the inversefunction theorem to this 1D problem gives the scalar Jacobian

J = partxpartξ

= partN1e

partξx1e +

partN2e

partξx2e =

x2e minus x1

e

2= ∆x

2(1410)

and further the relation between the shape function derivatives in physical and reference spaceas

Naex = Jminus1Na

eξ =2

∆xeNaeξ with N1

eξ = minus1

2 N2

eξ =1

2 (1411)

so that we obtain correctly

N1ex = minus

1

2

2

∆xe= minus 1

∆xe N1

ex =1

2

2

∆xe= 1

∆xe (1412)

mdashmdashmdashmdash

When applying the inverse function theorem and the above relations to the bilinear quadrilateral(Q4) element we obtain the Jacobian

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

4

suma=1

Naeξx

a1e

4

sumi=1

Naeξx

a2e

4

suma=1

Naeηx

a1e

4

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= 1

4(minus(1 minus η) (1 minus η) (1 + η) minus(1 minus η)minus(1 minus ξ) minus(1 + ξ) (1 + ξ) (1 minus ξ) )

⎛⎜⎜⎜⎜⎝

x1e1 x1

e2

x2e1 x2

e2

x3e1 x3

e2

x4e1 x4

e2

⎞⎟⎟⎟⎟⎠

(1413)

and J = detJ We notice that J indeed is not constant across the element but varies with ξand η For convenience let us define

[Γ] = [Jminus1] = (Γ11 Γ12

Γ21 Γ22) (1414)

Towards the FE implementation let us also introduce the B-matrix notation To this end wewrite

[ε] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

(1415)

81

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We further exploit the inverse function theorem viz

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

(1416)

Finally we also have

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

Ue (1417)

with the element dofs Ue = (u1e1 u

1e2 u

4e1 u

4e2)

T Altogether this shows that ε =BUe with

B =⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

(1418)

which defines theB-matrix for the Q4 element Again note thatB =B(ξ) ie theB-matrix isnot constant within an element but depends on ξ and η (through the shape function derivativesas well as through Γ = Jminus1 which are both not constant)

Analogous to the simplicial element a useful relation to evaluate area integrals over theelement in the following is (e1e2 being reference unit vectors)

dA = dx times dy = (partxpartξ

dξ e1 +partx

partηdη e2) times (party

partξdξ e1 +

party

partηdη e2) = J dξ dη e1 times e2 (1419)

so that

dA = ∣dA∣ = J dξ dη (1420)

Like for the simplicial elements the above can be used to compute the element energy

Ie = intΩeW (εh)dV (1421)

the internal force vector

Finte =partI int

e

partUe= int

ΩeBTσ dV (1422)

and the incremental stiffness matrix

Te =partF int

e

partUe= int

ΩeBTCB dV (1423)

For the special case of linear elasticity the above reduces to

Ke = intΩeBTEBdV Finte =KeUe Ie =

1

2Ue sdotKeUe (1424)

82

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

15 Higher-order elements Q8 Q9 8-node brick

The bilinear quadrilateral (Q4) element discussed in the previous section was the simplestexample of a (non-simplicial) element in 2D Of course the same concepts can be extended tomore complex elements using higher-order interpolation as well as to 3D elements Here wewould 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 whichinstead uses quadratic interpolation It derives its shape functions from applying the 1D shapefunctions of the 3-node bar (using Lagrangian interpolation) to the 2D case For example thefirst few shape functions are defined as

N1e (ξ η) =

ξ(1 minus ξ)η(1 minus η)4

N2e (ξ η) = minus

ξ(1 + ξ)η(1 minus η)4

N3e (ξ η) =

ξ(1 + ξ)η(1 + η)4

(151)

and all other shape functions follow analogously Overall the resulting interpolation uses thebasis (ie the above shape functions include these monomials)

1 ξ η ξη ξ2 η2 ξ2η ξη2 ξ2η2 (152)

which is complete up to order q = 2 (quadratic)

We notice that the above interpolation apparently includes far more monomials terms thanrequired for a quadratic interpolation (specifically ξ2η ξη2 and ξ2η2 are not required for acomplete quadratic interpolation) Therefore one can also construct elements with less nodesthat still provide a complete quadratic interpolation

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 consequenceshape functions are constructed in a different way than defined by (151) One starts by definingthose shape functions associated with the mid-edge nodes 5 6 7 and 8

N5e (ξ η) =

(1 minus η)(1 minus ξ2)2

N6e (ξ η) =

(1 minus η2)(1 + ξ)2

N7e (ξ η) =

(1 + η)(1 minus ξ2)2

N8e (ξ η) =

(1 minus η2)(1 minus ξ)2

(153)

and concludes the remaining four shape functions (serendipitously) as combinations of the aboveeg

N1e (ξ η) =

(1 minus η)(1 minus ξ)4

minus 1

2(N5+N8) N2

e (ξ η) =(1 minus η)(1 + ξ)

4minus 1

2(N5+N6) etc (154)

Both the Q8 and Q9 element are schematically shown below in their reference configurations

x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q9 in its reference space

5

6

7

8 9x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q8 in its reference space

5

6

7

8

83

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We may also extend the above construction of elements to three dimensions The simplestexample in 3D was the Constant-Strain Tetrahedron already discussed in Section Here wemay introduce further 3D elements by extending eg the definition of the bilinear quadrilateral(Q4) element into 3D

This results in the so-called 8-node brick element Here the 3D reference configuration isdescribed by coordinates (ξ η ζ) and the shape functions are a direction extension of (142)now to 3D which gives

N1e (ξ η ζ) =

1

8(1 minus ξ)(1 minus η)(1 minus ζ) N2

e (ξ η ζ) =1

8(1 + ξ)(1 minus η)(1 minus ζ)

N3e (ξ η ζ) =

1

8(1 + ξ)(1 + η)(1 minus ζ) etc

(155)

The link between the reference and actual configuration is again given by an isoparametricmapping so that shape function derivatives again follow from the inverse function theorem as

nablaxNae = Jminus1nablaξNa

e (156)

and volume integrals make use of

dV = J dξ dη dζ (157)

x

h

(-1-1-1) (1-1-1)

(111)

41 2

brick element in its reference space

z

3

85 6

7

(11-1)

84

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

16 Numerical quadrature

The Q4 Q8 Q9 and brick element are perfect examples to motivate the concepts discussed inthis section viz the use of numerical quadrature Recall that in order to perform finite elementsimulations we may need to compute the element energy nodal forces andor tangent matrix

Ie = intΩeW (εh)dV Finte = int

ΩeBTσ dV Te = int

ΩeBTCB dV (161)

each of which requires computing an integral over the element Ωe In general (unlike for thespecial case of simplicial elements) the integrands are not constant but may be complex func-tions of position (even in the linear elastic case) As a consequence the above integrals cannoteasily be calculated analytically which is why we make use of numerical integration schemes

As a clean mathematical example we start by considering an integral in 1D eg

I[u] = intb

au(x) dx (162)

which can later be extended to higher dimensions For convenience let us introduce the coor-dinate transformation

ξ = 2x minus ab minus a

minus 1 rArr ξ(x = a) = minus1 ξ(x = b) = 1 dξ = 2 dx

b minus a (163)

so that

I[u] = int1

minus1f(ξ) dξ where f(ξ) = b minus a

2u(x(ξ)) (164)

with

x = ξ + 1

2(b minus a) + a (165)

Instead of considering general integrals of the type (162) we concentrate on integrals of thetype (164) (and we have seen that we can transform one into the other) The goal is now toapproximate the integral (164) numerically

161 Example Riemann sums

As an example for numerical integration consider a partition of the range from minus1 to 1 into nsegments separated by n + 1 nodes

P = [ξ0 ξ1] [ξ1 ξ2] [ξnminus1 ξn] such that minus1 = ξ0 lt ξ1 lt ξ2 lt lt ξn = 1 (166)

The Riemann sum is probably the simplest approach to computing the above integral numer-ically by simply summing the contributions from all segments thus defining the approximateintegral S as

I asymp S =n

sumi=1

f(ξlowasti )(ξi minus ξiminus1) with ξiminus1 le ξlowasti le ξi (167)

Here the choice of ξlowasti within each interval is in principle arbitrary It should be somehowrepresentative of the function f within the interval [ξiminus1 ξi]

85

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Different choices of ξlowasti lead to different definitions of S eg including

(i) the left Riemann sum ξlowasti = ξiminus1

(ii) the right Riemann sum ξlowasti = ξi(iii) the middle Riemann sum ξlowasti =

12(ξiminus1 + ξi)

(iv) the trapezoidal sum average of left and right

(v) the upper Riemann sum ξlowasti st g(ξlowasti ) = supξisin[ξiminus1ξi] g(ξ)(vi) the lower Riemann sum ξlowasti st g(ξlowasti ) = infξisin[ξiminus1ξi] g(ξ)

More refined formulations can be found in the so-called Newton-Cotes formulas (the trape-zoidal rule is the Newton-Cotes formula of degree 1) While these Riemann and Newton-Cotesformulas are indeed viable schemes to carry out integration numerically they are rather ineffi-cient as they require the breaking down of the integrand into many segments in general Thefollowing concept of Gaussian quadrature aims to circumvent those computational expenses

x-1 +1

f(x)

xx0

f(x )i

xnxi-1xi

xx0

f(x )i

xi-1 +1

exact integral (middle) Riemann sum quadrature rule

162 Gauss quadrature

An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-ture rules in 3D) which are best suited for integrating polynomial functions The idea is toapproximate the integral by a weighted sum over integration points (as shown in the schematicabove on the right) ie we define

I[u] = int1

minus1f(ξ) dξ asymp

nQPminus1

sumi=0

Wi f(ξi) (168)

The challenge now is to choose the number of integration points nQP as well as the weightsW0 WnQPminus1 and locations ξ0 ξnQPminus1 of all each integration point That choiceshould depend on the function to be integrated (more specifically on its smoothness one caneasily imagine that smooth polynomials require few integration points while strongly fluctuat-ing functions require larger numbers of integration points) For the FE context most functionsof interest will be of polynomial type since our shape functions are commonly defined as poly-nomials

We say a quadrature rule is exact of order q if it integrates exactly all polynomial functionsg isin Pq([minus11]) Gauss quadrature generally chooses nQP quadrature points and associatedweights such that the quadrature rule is exact of order q = 2nQP minus 1 Let us find the optimalweights and integration points for Gaussian quadrature

86

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1621 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mo-ments micro are computed exactly In other words we find the weights and locations by requiringthat

microk = int1

minus1ξkdξ

=nQPminus1

sumi=0

Wi ξki k = 01 2nQP minus 1 (169)

These are 2nQP equations for the 2nQP free parameters (Wi ξi) for i = 0 nQP minus 1 Theequations are generally nonlinear and thus hard to solve analytically Yet we can find solutionsfor the lowest few orders in 1D as follows

a single quadrature point ie nQP = 1 approximates the integral by evaluating the func-tion only at a single location ξ0 isin [minus11]The two equations for the two unknowns (the weight W0 and location ξ0) are obtainedfrom requiring the any constant function f(ξ) = ξ0 and any linear function f(ξ) = ξ1must be integrated exactly This implies that

int1

minus1ξ0 dξ = 2

=W0 ξ00 =W0 and int

1

minus1ξ1 dξ = 0

=W0 ξ10 =W0ξ0 (1610)

From these two equations the first-order quadrature rule follows with

W0 = 2 ξ0 = 0 (1611)

That is only a single quadrature point at location ξ0 = 0 is required to integrate any linearfunction exactly Hence since linear functions are integrated exactly this quadrature ruleis exact to order q = 1

two quadrature points ie nQP = 2 require the calculation of the two weights and asso-ciated quadrature point locations

In close analogy to the above case we now have four unknowns (two weights W0 andW1 and two integration point locations ξ0 and ξ1) and construct the four equations tosolve for those by requiring that any constant linear quadratic or cubic function mustbe integrated exactly

int1

minus1ξ0 dξ = 2

=W0 +W1 int1

minus1ξ1 dξ = 0

=W0 ξ0 +W1 ξ1

int1

minus1ξ2 dξ = 2

3

=W0 ξ20 +W1 ξ

21 int

1

minus1ξ3 dξ = 0

=W0 ξ30 +W1 ξ

31

(1612)

While this is a nonlinear system of equations a simple solution can be found by assumingsymmetric quadrature points with respect to the origin ie ξ0 = minusξ1 In this case wemay conclude that

W0 =W1 = 1 ξ0 = minus1radic3 ξ1 =

1radic3 (1613)

Since this quadrature rule integrates cubic polynomials exactly it is exact to order q = 3

higher-order quadrature rules

Quadrature weights and points for arbitrary orders can be obtained in analogous fashionand most importantly can be found in numerous look-up tables (cf the classical FEMtextbooks) A more systematic way to compute Gauss-Legendre quadrature weights andpoints is given in Appendix I

87

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1622 Other Gauss quadrature rules

Note that for general functions f (which are not necessarily of polynomial type) one cansometimes find a decomposition f(ξ) = w(ξ)g(ξ) where w(sdot) is a known weighting function andg(ξ) is (approxiately) polynomial so that a more suitable quadrature rule may be found via

I[u] = int1

minus1f(ξ)dξ = int

1

minus1w(ξ) g(ξ)dξ asymp

nQPminus1

sumi=0

w(ξi) g(ξi) (1614)

Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type whichare obtained form a weighting function w(ξ) = (1 minus ξ2)minus12 and the quadrature points are theroots of Chebyshew polynomials Gauss-Hermite quadrature uses a weighting function w(ξ) =exp(minusξ2) (and the integral is taken over the entire real axis) Gauss-Legendre quadrature isincluded 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 degree2nQP minus 3 viz

I[u] = int1

minus1f(ξ) dξ asymp 2

nQP (nQP minus 1)[f(minus1) + f(1)] +

nQPminus1

sumi=2

Wi f(ξi) (1615)

163 Higher dimensions

Like the polynomial shape functions the above quadrature rules can easily be extended to 2Dand 3D eg

int1

minus1int

1

minus1f(ξ η)dξ dη = int

1

minus1[Nminus1

sumi=0

Wi f(ξi η)] dη =Nminus1

sumj=0

Wj [Nminus1

sumi=0

Wi f(ξi ηj)]

=nQPminus1

sumk=0

W lowastk f(ξk)

(1616)

with the combined weights W lowastk = WiWj and points ξk = (ξi ηj) obtained from the individual

quadrature rules in each direction By symmetry we choose N = radicnQP so that N2 = nQP

For example consider the Q4 element By using the 1D Gauss-Legendre weights and pointswe now have

first-order quadrature (q = 1) as in 1D has only a single quadrature point (nQP = 1)

W0 = 22 = 4 and (ξ0 η0) = (00) (1617)

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

third-order quadrature (q = 3) now has four quadrature points in 2D (nQP = 22 = 4)

W0 =W1 =W2 =W3 = 1 and (ξi ηi) = (plusmn 1radic3 plusmn 1radic

3) (1618)

Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly

88

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly in 3D the brick element may use Gauss-Legendre quadrature resulting in thefollowing schemes

first-order quadrature (q = 1) still has a single quadrature point (nQP = 1)

W0 = 23 = 8 and (ξ0 η0 ζ0) = (000) (1619)

third-order quadrature (q = 3) now has eight quadrature points (nQP = 23 = 8)

Wi = 1 and (ξi ηi ζi) = (plusmn 1radic3 plusmn 1radic

3 plusmn 1radic

3) (1620)

higher-order schemes follow analogously

Shown below are schematics of the quadrature point locations for Gauss-Legendre quadratureof orders q = 1 and q = 3 in both 1D and 2D

xx0

f(x )0

-1 +1

q = 1 in 1D

xx0

f(x )0

-1 +1x

x0

f(x )0

-1 +1x1

f(x )1

x

h

-1

-1

+1

+1

x0x1

x2x3

q = 3 in 1D

x

h

-1

-1

+1

+1

x0

q = 1 in 2D q = 3 in 2D

Ultimately the choice of a specific quadrature rule in any dimension depends on the functionf(ξ) to be integrated If the latter is of polynomial type then we may choose a Gaussianquadrature rule that leads to exact integration Else we may choose a quadrature rule basedon the smoothness of the function (Appendix J shows that the error introduced by a numericalquadrature rule strongly depends on the smoothness of function f) In general the choice of aquadrature rule is often a compromise between accuracy and efficiency

89

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

17 FEM which quadrature rule to use

171 Integrals in the FE context

The key integrals to be evaluated numerically within the FE context are (eg for a 2D quadri-lateral element with out-of-plane element thickness t) the element energy

Ie = intΩeW (εh)dV = int

1

minus1int

1

minus1W (εh(ξ))J(ξ)tedξdη asymp

nQPminus1

sumk=0

WkW (εh(ξk))J(ξk)te

as well as the nodal force vectors

F aintei = intΩeσij(εh)Na

j dV = int1

minus1int

1

minus1σij(εh(ξ))Na

j(ξ)J(ξ)tedξdη

asympnQPminus1

sumk=0

Wk σij(εh(ξk))Naj(ξk)J(ξk)te

(171)

Fruther we compute the element tangent matrix as

(Te)abik = intΩe

Cijkl(εh(ξk))NajN

bldV = int

1

minus1int

1

minus1Cijkl(εh(ξk))Na

j(ξ)N bl(ξ)J(ξ)tedξ dη

asympnQPminus1

sumk=0

WkCijkl(εh(ξk))Naj(ξk)N b

l(ξk)J(ξk)te(172)

Recall that in those relations the shape function derivatives and the strains are computed asrespectively

nablaxNa = Jminus1nablaξNa and εhij(ξ) =1

2suma

(uaeiNaej(ξ) + uaejNa

ei(ξ)) (173)

Of course the above can also be reformulate in terms of the B-matrix For example for a linearelastic element in 2D we have seen that

Te =Ke = intΩeB(ξ)TEB(ξ)dV asymp

nQPminus1

sumk=0

WkBT(ξk)EB(ξk)J(ξk)te (174)

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

172 Which quadrature rule to use

In all of the above integrals the required quadrature rule depends on the smoothness (orpolynomial order) of the integrands Since stresses shape function derivatives Jacobians andB-matrices are not necessarily smooth polynomials one often cannot (or due to computationalexpenses is not willing to) achieve exact integration for each element For example for the Q4element we have seen that J is linear in ξ hence Γ = Jminus1 is a fractional polynomial and Binvolves both Γ and nablaξNa

e As a consequence BTEB is some fractional polynomial that ishard to integrate exactly in general Therefore we introduce a minimum requirement forthe 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 anglesare preserved or in other words if J = const

90

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 171 Full integration for various element types

Let us determine full integration for the element types discussed before

The 4-node bilinear quadrilateral (Q4) is undistorted if the physical element has theshape of a rectangle (side lengths a and b) so that

J = ab4= const (175)

Then for a linear elastic Q4 element we have

F aintei = int1

minus1int

1

minus1Cijkl εhkl(ξ)N

aj(ξ)

ab

4tedξ dη = abte

4Cijkl int

1

minus1int

1

minus1εhkl(ξ)N

aj(ξ)dξ dη

(176)

where εh = sym(nablaxuh) is at most linear (since the interpolation of uh is bilinear) nablaxNa

is also at most linear for the same reason Overall the integrand is at most a quadraticpolynomial so that we need integration order q ge 2 Recall that in 1D we showed thatq = 2nQP minus 1 so that full integration of the Q4 element in 2D requires nQP = 2 times 2 = 4quadrature points

Full integration of the quadratic 2D elements Q8Q9 requires nQP = 32 = 9 quadraturepoints (the derivation is analogous to the above and is therefore omitted here)

Full integration of the 8-node brick element requires nQP = 8 quadrature points

For simplicial elements we showed that strains and stresses are constant across anelement so that a single quadrature point (nQP = 1) at an arbitrary location inside theelement is sufficient to integrate exactly Usually one chooses the element center whichgives

W0 = 1 ξ0 = η0 =1

3(in 2D) and ξ0 = η0 = ζ0 =

1

4(in 3D) (177)

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 simplicialquadrature rules (instead of Gaussian quadrature rules) whose weights and quadraturepoint locations can be found in look-up tables

mdashmdashmdashmdash

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 elementtangent matrix we make the same observation (ie those are integrated exactly as well) Forexample the energy reads

Ie = intΩeW dV = abte

4

1

2Cijkl int

1

minus1int

1

minus1εhij(ξ)εhkl(ξ)dξ dη

(Te)abij =abte

4Cijkl int

1

minus1int

1

minus1Naj(ξ)N b

l(ξ)dξ dη

(178)

where both Naj(ξ) and N b

l(ξ) are linear in ξ so that the resulting integrand is a quadraticpolynomial for the Q4 element in analogy to the above discussion of the nodal forces

Using an integration rule less than full integration is called under-integration or reducedintegration the opposite is called over-integration Which integration order to use dependsvery much on the element type the material model etc Sometimes under-integration can evenbe beneficial (eg to avoid locking) we will discuss one such example in Section 18

91

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

18 Element defects shear locking and hourglassing

The bilinear Q4 element is a classical example for an element type which displays a so-called element defect ie a spurious numerical artifact when using full integration in certainscenarios ndash specifically when used to simulate beam bending To demonstrate this we considera rectangular element having side lengths a and b in the x1- and x2-directions If bendingmoments M are applied to the two vertical edges then the element is expected to undergo purebending

In an actual (slender) Euler-Bernoulli beam we know from elastic beam theory that the stressesin the beam vary linearly across the thickness and that the only non-zero stress component isthe axial stress Therefore we may write (for an element of size a times b as shown below)

σ11 = minusx2

b2σmax σ22 = σ12 = 0 (181)

where σmax is the maximum tensile stress reached on the surface of the beam (at x2 = plusmnb2)From Hookersquos law in 1D we obtain

ε11 = minusσ11

E= minusx2σmax

Eb2 ε22 = minusν

σ11

E= ν x2σmax

Eb2 ε12 = 0 (182)

Let us try to find this solution using a single Q4 element To this end we apply horizontalforces to all four nodes of the element obtained from lumping the distributed beam stresses tothe nodes according to relation (815) found for the externally applied forces

Fext1 = intpartΩe

σ11N1e dS = minusint

1

minus1(minus x2

b2σmax)N1

e (ξ = minus1 η) t b2

= int1

minus1η σmax

(1 minus (minus1))(1 minus η)4

tb

2dη = minusσmaxtb

6= minusF with F = σmaxtb

6

(183)

(Note the minus stems from the negative cut so the traction at the left edge of the elementresponsible for the forces is in fact minusσ11) Analogously one obtains

Fext2 = F Fext3 = minusF Fext4 = F (184)

That is the bottom edge is stretched while the top edge is compressed (as in beam bending)

a

x1

x2

b MyMy

a

x1

x2

smax

smaxsmax

smax

x

hF

F

F

F

x

hU

U

U

U

beam loaded in bending stress distribution due tothe applied moments

Q4 element with equivalent nodal forces

elastic Q4 element deformedby the nodal forces

1 2

3 4

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 outhere for brevity but assume the exact stiffness matrix)

KeUhe = Fext =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusF0F0minusF0F0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Uhe =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusU0U0minusU0U0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

with U = aσmax

E

(1 + ν)(1 minus 2ν)2(1 minus ν) + (ab)2(1 minus 2ν)

92

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(185)

where we evaluated the element forces and stiffness matrix exactly (since the element is undis-torted we can easily reach full integration with 2 times 2 quadrature points)

The resulting strains within the element are evaluated as

εh11 = minusU

aη εh22 = 0 εh12 = minus

U

bξ (186)

While the axial strain component εh11 is physically reasonable (and the lack of a transverse shearεh22 ndash worst case ndash makes the element too soft against bending) the presence of a non-zero shearstress εh12 is problematic This so-called parasitic shear is not physical but a numerical artifact(elastic Euler beams produce no shear stresses cf (182)) This parasitic shear contributes tothe energy of the element so that ndash when minimizing the potential energy in a boundaryvalue problem ndash this shear component introduces artificial stiffness This becomes apparentwhen calculating eg the angle of bending θ of the beam in the above problem Comparingthe exact one (obtained form beam theory) to the approximate one (obtained from the aboveconstruction) one finds

θapprox

θexact=

1 minus ν2

1 +1 minus ν

2(a

b)

2 (187)

Notice that as the Q4 element becomes more and more slender (ab rarr infin) the numericallyobtained angle approaches 0 That is the element shows what is known as locking or morespecifically shear locking in case of long and slender elements (ab≫ 1) the high shear strainand associated elastic energy prevents the element from deformting it ldquolocksrdquo

MyMy

FF

F F

qapprox qexact

Next let us use numerical quadrature to evaluate the element quantities of interest For exam-ple for the energy we have

Ie = intΩe

1

2εh sdotCεhdV asymp t

2

nQPminus1

sumk=0

Wk εh(ξk) sdotCεh(ξk)J(ξk) (188)

We showed before that full integration requires nQP = 2 times 2 quadrature points (and we havedemonstrated above that exact integration leads to element locking under bending)

If instead we use reduced integration with only a single quadrature point (nQP = 1) locatedat ξ0 = 0 then notice that the strain fields in (186) vanish at the quadrature point locationξ = η = 0 Therefore the strains in this case produce no energy In other words any strain fieldof the form (186) can appear without causing any energy and therefore also without causingany resistance from the element in terms of nodal forces This is a zero-energy mode ofthe under-integrated Q4 element and a serious defect The resulting deformation of elements

93

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

undergoing alternating strains (186) is a numerical artifact and often referred to as hourglassmode or chicken-wire mode because of its appearance

Note that note only the underintegrated Q4 element has such a zero-energy mode For examplethe Q8Q9 elements have a similar zero-energy mode with curved element edges

+ + + +

+ + + +

+ + + +

++

++

underintegrated Q4 mesh showing hourglassing zero-energy mode of anunderintegrated Q8 element

simulation example with hourglassing

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 a2times 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with asingle quadrature point at ξk = 0 for the shear strain εh12 removes the spurious shear contributionwhile 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 deformationmodes) and should hence be used with caution

Overall take-home messages are (i) to not use Q4 elements to simulate beam bending (andinstead chose another type of element) and (ii) to be careful with reduced integration as zero-energy modes can appear as spurious deformation modes in the obtained solution

94

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

19 Assembly

Irrespective of the particular finite element type that is being used to solve a boundary valueproblem its solution requires the assembly of global vectors and matrices Specifically recallthat shape functions associated with a node a are non-zero only in elements adjacent to nodea in the FE context When computing eg the total energy E of a body (not accounting forexternal work) discretized into ne non-overlapping elements we may exploit that

E = intΩW (εh)dV =

ne

sume=1int

ΩeW (εh)dV =

ne

sume=1

Ie (191)

ie the total energy is the sum over all element energies When computing the global forcevectors and incremental stiffness matrices the situation is more complex which is why onecommonly introduces an assembly operator A such that

Fint =neAe=1Finte T =

neAe=1Te (192)

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 andglobal node numbering (and it is the reason elements must have ldquoknowledgerdquo of their node IDs)

Similarly the inverse operator extracts local element quantities from the global vector

Ue = Ae

minus1(U) (193)

For practical purposes it is helpful to recall that entry Uai (where a = 1 n is the node numberand i = 1 d refers to the coordinate) is located at position (a minus 1) sdot d + i in the assembledglobal vector Uh (using MATLAB notation with 1-indexed lists) For example consider a 2Dproblem using 2-node bar elements If an element connecting nodes 1 and 3 computes the nodalforce vectors F 1

inte and F 3inte then those are to be added onto the global force vector as

Fint =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+ F 1inte1

+ F 1inte2

sdotsdot

+ F 3inte1

+ F 3inte2

sdotsdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(194)

Analogously if the element connecting nodes 1 and 3 computes a stiffness matrix K13e then its

components must be added onto the global tangent stiffness matrix as

T =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+K1311 +K13

12 sdot sdot +K1313 +K13

14 sdot sdotK13

21 +K1322 sdot sdot +K13

23 +K1324 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdotsdot sdot sdot sdot sdot sdot sdot sdot

K1331 +K13

32 sdot sdot +K1333 +K13

34 sdot sdotK13

41 +K1342 sdot sdot +K13

43 +K1344 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(195)

Note that because nodes have non-zero FE shape functions only in adjacent elements the abovematrix is generally sparse (which comes with significant computational advantages)

95

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

20 Iterative solvers

The solution of linear elastic problems is easily found by solving a linear system of equations vizKU = Fext so that U = Kminus1Fext (assuming that rigid-body modes have been suppressed) Incase of nonlinear problems ndash such as those arising from more complex material models and fromthe geometric nonlinearity stemming from large deformations ndash an iterative solution method isrequired to solve the generally nonlinear system Fint(U) = Fext(U) (the external forces may ormay not depend on the deformation) Here we discuss a few common examples of such iterativesolvers the most important one being Newton-Raphson iteration

The problem to be solved can be written in the general form

f(U) = Fint(U) minusFext(U) = 0 (201)

where in many cases we assume that Fext is independent of U This however is not generallytrue ndash consider eg nodes attached to elastic springs so the nodal force depends on the positionof the node or a so-called follower force whose direction depends on the bodyrsquos deformation

All iterative solvers start with an initial guess U0 (eg U0 = 0) which is then corrected to find

Un+1 = Un +∆Un (202)

repeatedly until convergence is achieved An iterative scheme converges8 if ∆Un rarr 0 as nrarrinfinor equivalently f(Un) rarr 0 as n rarrinfin The various solution methods discussed in the followingdiffer primarily in the way ∆Un is computed based on a given vector Un

201 Netwon-Raphson (NR) method

The Newton-Raphson method (introduced by Newton in 1669 and generalized by Raphsonin 1690) is the most common technique for solving nonlinear systems of the above type Itstarts with a Taylor expansion assuming a small correction ∆Un

0 = f(Un+1) = f(Un +∆Un)

= f(Un) +partf

partU(Un)∆Un +O (∣∆Un∣2)

(203)

If we neglect higher-order terms then the above can be solved for the increment

∆Un = minus [T (Un)]minus1 f(Un) where T (Un) =partf

partU(Un) (204)

is the tangent matrix Note that we have thus broken the nonlinear problem (which is hardto solve) into many incremental linear problems (that are easy to solve)

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

T abik (Uhn ) =

partF aipartubk

(Un) =part

partubk(int

ΩσijN

aj dV minus F aexti)

= intΩ

partσij

partεhklN blN

aj dV minus

partF aexti

partubk

= intΩCijklNa

jNbldV minus

partF aexti

partubk

(205)

8The fact that an iterative solver converges does not necessarily imply that it converges to the correct equi-librium solution For the special case of linear elasticity indeed unique solution exists

96

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

We note that in general C = C(ε) ie for nonlinear problems the incremental tangent dependson the current state of deformation and hence on the nodal displacements U Only for thespecial case of linear elasticity is C a constant tensor containing the elastic moduli and beingindependent of deformation As shown before we can also write for each element e

Te(U) = intΩeBTCBdV (206)

where C is again the incremental stiffness matrix of the material model In the special caseof linear elasticity we saw that C = E = const and Te = intΩe

BTEB dV = Ke is the constantelement stiffness matrix

The Newton-Raphson solver requires that detT ne 0 in order to find a soltion which is guaranteedin linear elasticity if no rigid body mode exists as discussed in Section 214 (ie the linearizedsystem has no zero-energy mode so that U sdot T U ne 0 for all admissible U ne 0)

For linear elastic problems with constant external forces the Newton-Raphson solver convergesin only a single step since Fint =KU and therefore T =K = const so that

Un+1 = Un +∆Un = Un minus T minus1 [Fint minusFext]= Un minusKminus1 [KUn minusFext]= Un minusUn +Kminus1Fext

=Kminus1Fext

(207)

Let us close by mentioning the (dis)advantages of the Newton-Raphson scheme On thedownside the Newton-Raphson method requires the tangent matrix which may be expensiveto compute it may not always be available analytically and it may require significant com-puter memory (based on the matrix size for a mesh having n nodes in d dimensions we haveT isin Rndtimesnd) In addition the tangent matrix in nonlinear problems is not guaranteed to beinvertible this is particularly problematic in case of problems involving mechanical instabilityOn the plus side the Newton-Raphson method generally displays quadratic convergencewhile iterating which is why it is favorable for the solution of nonlinear problems (and it alsosolves linear problems in one step as shown above) If Newton-Raphson is not a viable optionthen the following techniques offer alternatives

202 Damped Newton-Raphson (dNR) method

A slight modification of the Newton-Raphson method the damped Newton-Raphson methodis beneficial eg when the NR method tends to overshoot (eg in case of oscillatory energylandscapes or multiple minima such as in large-strain elasticity)

The iterative scheme is identical to the classical NR method described above except that

Un+1 = Un + α∆Un with α isin (01) (208)

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

203 Quasi-Newton (QN) method

The Quasi-Newton method is the same as the classical NR method with the exception thatone does not use the actual tangent matrix T for computational simplicity or efficiency Its goal

97

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

is hence to avoid the expensive computation of T (U) and its inversion at each iteration stepTo this end one introduces a matrix Bn and updates its inverse directly

The general algorithm is as follows

(1) start with an initial guess U0 and matrix B0 = T (U0)(2) compute ∆Un = minusBminus1

n f(Un) and Un+1 = Un +∆Un and

Bminus1n+1 =Bminus1

n minus(Bminus1

n zn minus∆Un)otimes∆UnBminus1n

∆Un sdotBminus1n zn

with zn = f(Un+1)minus f(Un) (209)

We omit the full derivation of the update for Bminus1n+1 here for brevity The idea is that Bminus1

n+1 andBminus1n are approximately rank-one-connected using the Sherman-Morrison formula The added

benefit is that not only does T not have to be recomputed exactly but also can the inversion orlinear solver be skipped since the updated inverse is computed explicitly

204 Line search method

The line search method can be used as an improvement for other nonlinear iterative solversSimilar to the damped Newton-Raphson scheme updates are made according to

Un+1 = Un + β∆Un (2010)

where unlike in Section 202 β is not a constant but chosen such that f(Un+1) = 0 Forexample we may find β from solving

∆Un sdot f(Un + β∆Un) = 0 (2011)

This is generally a nonlinear but scalar problem to be solved for β isin R which can be solved bybisection regula falsi secant and other methods

Notice that (2011) is in fact the stationarity condition of the minimization problem

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

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

205 Nonlinear Least Squares

The family of methods based on nonlinear least squares aim to minimize

r(U) = ∥f(U)∥2 = f(U) sdot f(U) (2013)

which results in the stationarity condition

partr

partU(U) = 0 (2014)

This approach is helpful eg in case of over-constrained systems since the formulation ofthe residual r does not require as many equations as U has unknowns Application of theNewton-Raphson technique to this nonlinear system of stationarity equations leads to

∆U = minus [ part

partU

partr

partU]minus1

Un

partr

partU(Un)

= minus [TT(Un)partf

partU(Un)f(Un) +

partTT

partU(Un)f(Un)]

minus1

TT(Un)f(Un)(2015)

98

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

∆U = minus [TT(Un)T (Un)]minus1TT(Un)f(Un) (2016)

This latetr form is known as the Gauss-Newton method Note that this reduces to Newton-Raphson for standard problems (ie those with as many equations as unknowns) HoweverGauss-Newton can also be applied to overdetermined systems (ie more equations than un-knowns)

206 Gradient flow method

Although not necessarily with a proper physical meaning the gradient flow method (alsoknown as gradient descent) has become popular as an iterative solver for quasistatic problems

The idea is to replace the equation

0 = f(Un+1) (2017)

by a dynamic evolution equation

CUn+12 = minusf(Un) and Un+1 = Un +∆t Un+12 (2018)

with eg C = cI with c gt 0 It is obvious that as f rarr 0 we have Un+12 rarr 0 and thus themethod converges Although there is no guarantee to reach an extremum the method is popularbecause it does not require a tangent matrix and is quite robust

For example using a simple backward-Euler discretization for the time derivative and C = cIwe obtain

Un+1 = Un minus1

cf(Un) (2019)

207 Conjugate Gradient (CG) method

The conjugate gradient method follows the idea of iterating into the direction of steepestdescent in order to minimize the total potential energy (as a variation it can also be applied tothe nonlinear least squares problem)

Here the update is

Un+1 = Un + αnSn (2020)

where both the direction Sn and increment αn are determined in an optimal way as follows

The conjugate direction is updated according to

Sn = minusf(Un) + βnSnminus1 (2021)

with β computed from the current solution Un and the previous solution Un according to one ofseveral options (Polak-Ribiere Fletcher-Reeves etc) Then the scalar increment αn is obtainedfrom a line search to find

αn = arg min r (Un + αSn) (2022)

A benefit of the conjugate gradient technique is that as for gradient flow no tangent matrixis required A variation of this scheme originally developed for atomistics but also applicableto the FE method (and oftentimes converging faster than CG) is the so-called Fast InertialRelaxation Engine (FIRE)

99

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

21 Boundary conditions

We recall that the solving a mechanical boundary value problem by the finite element methodreduces to solving the global system of equations given by

Fint(U) = Fext(U) (211)

for the vector of all nodal dofs U If the material is linear elastic then Fint(U) = KU andsystem (211) is linear In general (ie for anything but linear elastic behavior) the system ofequations in (211) is nonlinear In Section 20 we discussed solution strategies for the abovesystem of equations but we still need to turn our attention to boundary conditions which hehave not discussed in detail so far This includes both Neumann boundary conditions (leadingto the specific form of Fext(U)) and Dirichlet boundary conditions (imposing restraints on thedegrees of freedom) These will be discussed in the following

211 Neumann boundary conditions

The right-hand side vector Fext in (211) includes the combined effects of externally appliedbody forces ρb and surface tractions t in general Of course if forces are applied only to FEnodes 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 nodalforces first

In Section 8 we derived the components of the external force vector as

F aexti = intΩρbiN

adV + intpartΩtiN

adS =sume

(intΩeρbiN

adV + intpartΩe

tiNadS) (212)

These integrals can be computed in the same fashion as all FE quantities (such as eg nodalforces and stiffness matrices) and it is convenient to use numerical quadrature to approximatethe above integrals in general For example for a 2D quadrilateral element (such as the Q4 Q8or Q9) we may write the contribution from element e to nodal force component F aexti due tobody forces as

F aextei = intΩeρbiN

adV = int1

minus1int

1

minus1ρbi(ξ)Na

e (ξ)J(ξ)tdξ dη asympnQPminus1

sumk=0

Wk ρbi(ξk)Nae (ξk) tJ(ξk)

(213)

Analogously surface tractions result in an external force on node a in direction i again for a2D isoparametric element e given by

F aextei = intpartΩe

tiNadS = int

1

minus1ti(ζ)Na

e (ζ)Jζ(ζ)tdζ asympnQPminus1

sumk=0

Wk ti(ζk)Nae (ζk) tJ(ζk) (214)

Note that the surface traction term integrates over the boundary of the element (ζ stands foreither ξ or η depending on the orientation of the surface on which the tractions are acting) soin d dimensions we can use a quadrature rule for d minus 1 dimensions (eg for a 2D element weuse 1D quadrature rule on an element edge)

Like for internal forces the global external force vector Fext results from assembling all elementcontributions ie from adding the contributions of all external element force vectors onto theglobal external force vector (see Section 19)

100

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

When using a variational formulation we may interpret external forces also in a variationalsense Specifically we can formulate the work done by the external force on element e as

Wexte = intΩeρb sdotu dV + int

partΩet sdotu dS (215)

The resulting force vector F aexte = partWextepartua acting on node a is given by the sum of (213)

and (214) We note that if t and ρb are independent of the nodal displacements ie Fext isindependent of U then the right-hand side of the system of equations to be solved is constantOtherwise Fint(U) minus Fext(U) = 0 is to be solved where the external forces also depend ondisplacements

Several examples of typical external forces in the FEM context are given below

P

PMy

k

n

au

Dx au

ll0

constant forceconstant moment

linear spring(linearized deform)

linear spring(nonlinear deform)

pressure loading(Q4 elements)

p

p

n2

n1

L1

L2

pL 22

pL 22

pL 21

pL 21

Before we dive into specific examples we point out one important aspect with regards to theimplementation and assembly of the overall problem So far we have primarily consideredproblems with context external forces so that we had to solve Fint(U) = Fext When theexternal forces also depend on the nodal unknowns (as eg in Examples 213 and 213 below)then the problem to be solved is in fact

f(U) = Fint(U) minusFext(U) = 0 (216)

Here we can still establish a variational structure exploiting that

I(U) = E(U)minusW (U)rarrminU

with E(U) = Anee=1Ie(Ue) W (U) = Anee=1Wexte(Ue)

(217)

so that

f(U) = partI

partU(U) = partE

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFint

minus partWpartU

(U)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFext

= Fint(U) minusFext(U) (218)

Here iterative solvers (discussed in Secion 20) need the complete tangent matrix (includingboth those contributions from internal and external forces) so that

T (U) = partf

partU(U) = partFint

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraTint from before

minus partFext

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraText∶ new contribution

= Tint(U) minus Text(U) (219)

Therefore when discussing the specific examples in the following we will define the work done bythe external force Wext along with the resulting external nodal forces F a

ext and the associatedexternal stiffness matrix contribution Text as introduced above When assembling the globalsystem both contributions ndash from internal and external forces ndash must be considered

101

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 211 Constant force

Consider a constant force P applied to a particular node b whose position is displacing with ubThe work done by this external force vector is

Wext = P sdotub (2110)

Therefore the resulting external force vector on any node a is

F aext =

partWext

partua= P δab (2111)

ie the constnat external force P is applied only to node b We note that the associated stiffnessmatrix (which would be needed for iterative solution schemes) vanishes since

T abext =partF a

ext

partub= 0 (2112)

Finally we note that the analogous formulation holds for applying a constant external bendingmoment My in case of beam elements with rotational dofs eg to node b in 2D

Wext =Myθb rArr Ma

ext =partWext

partθa=Myδab (2113)

mdashmdashmdashmdash

Example 212 Linear spring undergoing small deformations

Consider a linear elastic spring (stiffness k) attached to a node a along the n-direction (withunit vector ∣n∣ = 1 pointing in the direction of stretching the spring) which undergoes onlysmall deformations so that linearized kinematics can be used (the change of length ∆x of thespring is given by the projection of the displacement ua onto n) In this case the spring energyas a function of the displacement ua is

Espring =k

2∆x2 = k

2(ua sdotn)2 (2114)

To compute the nodal force vectors we need to be careful since Espring is the spring energyand not the work Wext performed by the spring Therefore one would add Espring to thepotential energy functional instead of substracting it as external work Recalling concepts fromundergraduate dynamics we know that the work done by the spring on the body must equalthe potential difference so Wext = Espring0 minus Espring where Espring0 = 0 in our case since thespring is initially unstretched Hence we have Wext = minusEspring The resulting force vector onnode a (all other nodal forces being zero) thus follows as

F aext =

partWext

partua= minus

partEspring

partua= minusk(ua sdotn)n (2115)

where the minus sign enters due to the use of E instead of Wext (and it makes sense physicallyif node a is displaced along the positive n direction the spring is stretched and hence the forceon node a must be acting in the opposite direction since the spring is pulling node a back)

The spring is an example where the external force vector does indeed depend on the nodaldisplacement ua The associated tangent stiffness matrix has the only non-zero component(sub)matrix T aaext and in general

T abext =partF a

ext

partub= minusknotimesn δab = const (2116)

mdashmdashmdashmdash

102

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 213 Linear spring undergoing large deformations

For comparison if the linear elastic spring from the previous example undergoes large defor-mations then the elastic energy in the spring ndash accounting for the nonlinear exact change inlength of the spring ndash is

E = k2( ∣xa +ua minusx0∣ minus ∣xa minusx0∣ )

2

(2117)

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 ie its anchor point and xa + ua with displacement ua is thedeformed position of node a (so that xa minus x0 is the undeformed spring length) External forcevector and stiffness matrix follow as before by differentiation

mdashmdashmdashmdash

Example 214 Pressure in linearized kinematics

A uniform pressure p is a common boundary condition in engineering applications (from pressurevessels to structures under snow loads etc) In this case the pressure p acting on a surface partΩwithin linearized kinematics results in tractions t = minuspn where n is the outward surface normal(with ∣n∣ = 1) Such a boundary condition is realized rather easily via (214) Specifically for asingle element surface partΩe with outward normal n the work done by a uniform pressure p is

Wexte = intpartΩe

t sdotuhdS = intpartΩe

(minusp)n sdotn

suma=1

uaeNae dS = minusp

n

suma=1

uae sdot intpartΩe

nNae dS (2118)

and the external force contribution from element e (associated with node a) follows as

F aexte =

partWexte

partuae= minuspint

partΩenNa

e dS (2119)

For example for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edgesare straight so that the normal n is constant along each element edge Further assume thatpressure p acts only on one edge partΩprime

e of length Le (and an out-of-plane thickness t) In thisspecial case the above simplifies to

F aext = minuspint

partΩprimee

nNae dS = minuspn

2intpartΩprime

e

Nae dS = minuspLet

2n (2120)

where we exploited that the shape function Na (varying linearly between 0 and 1 on the edgeif a is a node on the edge) integrates to 12 The total external force on node a due to pressureagain follows from summing over all element contributions so

F aext = sum

eisinNa

pLet

2(minusne) (2121)

where we need to sum over all elements adjacent to node a (here denoted by the set Na)pLet2 is nothing but the magnitude of the resultant force due to the uniform pressure p overthe element edge of length Le which is evenly distributed to the two nodes on that edge Notethat each edge has its own surface normal ne so that the above implies the net effect summedover all adjacent elements to node a One such example is shown in the rightmost graphicabove

We close by noting that the external forces are constant only because of the assumption ofsmall deformations If we considered large deformations then the force on the element edge

103

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

would change with deformation (as the surface area increases due to deformation so doesthe resultant force due to a uniform pressure) Therefore the finite-deformation scenario isconsiderably more complex and the work done by a constant external pressure acting on abody of deformed volume v = v(U) is Wext = pv

mdashmdashmdashmdash

Example 215 Linearly and quadratically varying surface tractions

In case of a linearly varying surface traction t(x) acting on the edge of an element e thecorresponding nodal forces can be obtained form the above equations Assume eg a (bi-)linear element in 2D (such as the CST or Q4) with straight edges for which a linearly varyingpressure p(x) (which varies between pa and pb see below) applied to an edge of length Le (andout-of-plane thickness t) translates into the two nodal forces

(Faexte

F bexte) = Let

6(2 1

1 2)(p

a

pb) (2122)

Similarly having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadraticelement (such as the LST Q8 Q9) leads to the equivalent nodal forces

⎛⎜⎝

F aexte

F bexte

F cexte

⎞⎟⎠= Let

30

⎛⎜⎝

4 2 minus12 16 2minus1 2 4

⎞⎟⎠

⎛⎜⎝

pa

pb

pc

⎞⎟⎠ (2123)

We note that of course one can also apply higher-order tractions to lower-order elements (ega quadratically varying load to a linearly interpolated edge) In this case however the workdone Wext is approximated by the FE discretization In the above two examples (which areshown schematically below) the equivalence is exact

pa

Le Le

a F

pb

a

bb F

pa

LeLe

a F

pc

a

bb F

c

pb

c F

linearly varying pressureon a linear element edge

quadratically varying pressureon a quadratic element edge

For more complex element types or more complex loading integration over the element edgeor surface can again be carried out using numerical quadrature on the element boundary (eachelement boundary normal ne is computed from the nodal locations) Again forces and stiffnessmatrix follow by differentiation (forces are constant and the stiffness matrix vanishes)

104

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

212 Dirichlet boundary conditions

Essential boundary conditions of the type uai = uai must be imposed onto the system of equationsFint(U) = Fext This is usually accomplished computationally in one of the two ways discussedin the following9 We here limit our discussion to linear elastic examples we will later reconsiderthe procedure for nonlinear systems when discussing iterative solvers in Section 213

2121 Substitution

Brute-force substitution is a simple method (which we already used in in Exercise 4) wereplace the respective equation for uai in the system KU = Fext by uai = uai eg if we wantu3 = u3 (using an example with only a single dof per node) then we replace the correspondingequation (ie the entries in the stiffness matrix and external force vector) resulting in

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 sdot sdotsdot sdot sdot sdot sdot0 0 1 0 0sdot sdot sdot sdot sdotsdot sdot sdot sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

u3

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

(2125)

2122 Condensation

The substitution method discussed above is simple to implement However it can be quiteexpensive computationally since the number of equations remains the same when imposingessential boundary conditions (this becomes a concern when a significant fraction of the dofsis constraint by essential boundary conditions) The condensation method removes from thelinear system to be solved those equations imposing essential boundary conditions

To understand this let us rewrite the above system of equations (2125) by moving the thirdcolumn to the right-hand side and inserting u3 = u3

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 0 K14 sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

F 3ext

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

minus

⎛⎜⎜⎜⎜⎜⎜⎝

K13

K23

K33

K43

K53

⎞⎟⎟⎟⎟⎟⎟⎠

u3 (2126)

so that we can eliminate the third row and column from the system

⎛⎜⎜⎜⎝

K11 K12 K14 sdotsdot sdot sdot sdotsdot sdot sdot sdotsdot sdot sdot K55

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

u1

u2

u4

u5

⎞⎟⎟⎟⎠=⎛⎜⎜⎜⎝

F 1ext

F 2ext

F 4ext

F 5ext

⎞⎟⎟⎟⎠minus⎛⎜⎜⎜⎝

K13

K23

K43

K53

⎞⎟⎟⎟⎠u3 (2127)

9We mention that similar techniques can also be employed to impose more complex conditions such as con-straints of the general type

f(uaub ) = 0 (2124)

which become important eg when enforcing rigid links between nodes (∣xa+uaminus(xb+ub)∣ = const) or systemsof bodies including rigid bodies (ie rigid links plus rigid angles) or imposing deformationmotion of a nodealong an inclined surfaces (ua = uan with fixed known unit vector n) Such constraints can be implemented ina similar fashion but are not discussed here further (we refer to the rich FEM literature)

105

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which we must solve for the unknowns (u1 u2 u4 u5) so that U = (u1 u2 u3 u4 u5)T

The clear advantage of this method is the reduction in size of the system to be solved Thedisadvantage is that it is computationally more involved (indeed it can be even more expensivethan the substitution technique when a small number of essential boundary conditions must beapplied to a large system)

x1

x2

x3

e1

e2

e3

+

x

paraW

u( p

P

g

paraWe

au p

P

g

x)

paraWe

au

1F

2F

3F

1P

2P

continuous BVP FE-discretized body FE-discretized BVP

213 A note on Dirichlet boundary conditions in iterative solvers

We would like to briefly re-assess the enforcement of Dirichlet boundary conditions in the contextof iterative solvers where we do not solve a simple linear system but we use iterative techniquesto solve a nonlinear system in incremental linear steps In order to impose uai = uai we discusstwo implementation strategies

Strategy I To impose uai = uai we can include this Dirichlet boundary condition directly in theinitial guess (ie make sure that uai = uai within vector U) and subsequently iterate accordingto

Un+1 = Un +∆Un (2128)

where the system of equations is modified such that ∆uain = 0 for all iterative steps n Thelatter can be accomplished in the same fashion as we imposed essential boundary conditionsearlier For example when using a Newton-Raphson solver we must solve

T (Un)∆Un = minusf(Un) (2129)

where we now modify the row of the tangent stiffness matrix T (Un) and right-hand-side vectorf(Un) such that ∆uain = 0 is enforced (see Section 212)

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 212) itcomes with one disadvantages when we enforce the boundary condition uai = uai directly in theinitial guess U0 (while using eg the solution from a previous load step as the initial guessfor all remaining dofs in U0) the resulting initial guess U0 may include a rather strong localdeformation 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 nonlinearproblems

Strategy II As a remedy to the above problems we may alternatively choose to not set uai = uaiin the initial guess and simply chose U0 as eg the solution from the previous load step (or

106

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

any other more or less sophisticated guess) In subsequent iterations we then solve

T (Un)∆Un = minusf(Un) (2130)

where we modify both T (Un) and f(Un) to enforce

∆uain = uai minus uain (2131)

so that the incremental update at iteration step n

Un+1 = Un +∆Un rArr uain+1 = uain +∆uain = uain + (uai minus uain) = uai (2132)

imposes uai = uai in a more natural incremental fashion without modifying the initial guess

214 Rigid body motion

For the linear elastic case the stiffness matrix K (and in the general nonlinear case the tan-gent matrix T ) has as many zero eigenvalues as it has rigid-body modes or zero-energymodes Ulowast This can easily be understood by recalling that the total potential energy of theFE-discretized body with global stiffness matrix K and in the absence of any external forcesreads

I = 1

2U sdotKU (2133)

If a particular global vector of the nodal displacements Ulowast ne 0 corresponds to rigid-bodymotion (ie 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 energyConsequently we must have

Ulowast sdotKUlowast = 0 (2134)

This in turn implies that Ulowast is an eigenvector of K with a corresponding zero eigenvalue(KUlowast = 0 which we also understand physically since rigid-body modes cause no nodal forcesso Fint = KUlowast = 0) Hence K has (at least) one zero eigenvalue and is thus not invertibleSince this holds true for each rigid-body mode Ulowast K has as many zero eigenvalues as rigidbody modes If such rigid-body modes exist then no unique solution can be found since bothU and U + Ulowast could be a solution (since K(U + Ulowast) = KU +KUlowast = KU = Fext) Thismanifests in K not being invertible so trying to find U =Kminus1Fext fails We saw this problemarise in Example 112

Therefore we must suppress each rigid body mode via appropriate essential boundary conditionsbefore solving a boundary value problem In 2D we need three essential boundary conditionsto suppress rigid-body translations and rotations in 3D we need a total of six (assuming thatnodes carry only displacement dofs) as shown below

107

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

rigid-body modes in 2D

rigid-body modes in 3D

We close by mentioning that when considering large nonlinear deformation mechanisms instructures may also constitute zero-energy modes (eg a pinned-pinned buckled beam has twostable equilibria and the displacement from one to the other is a so-called mechanism ie azero-energy body which is not rigid-body motion)

Finally if nodes carry further dofs beyond displacements (eg in case of beam elements orcoupled problems) the situation must be reassessed to make sure all possible rigid modes aresuppressed

108

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

22 Dynamics

Our discussion of mechanical boundary value problems so far has been limited to quasistaticsThe term quasistatics refers to the assumption of negligible inertial effects This does notnecessary 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 ofthe type σ = σ(ε ε) which clearly depend on the loading rate and hence on time irrespectiveof 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 eg vibrationsThis is intimately tied the boundary conditions of a problem and creates an initial boundaryvalue problem Static loading is generally time-independent Dynamic loads are time-dependentones for which inertial effects are not negligible Quasistatic loading is time-dependent but issufficiently slow such that inertial effects can be safely ignored

Here we will consider the extension of the mechanical boundary value problem discussed pre-viously to dynamic problems where inertial effects matter In an extension of the (quasi-)staticversion of Section 8 the strong form of the dynamic problem in linearized kinematics reads

⎡⎢⎢⎢⎢⎢⎢⎣

σijj + ρ bi = ρ ui in Ω

ui(x t) = ui(x t) on partΩD

σijnj(x t) = t(x t) on partΩN

(221)

with suitable initial conditions Now we have u ∶ ΩtimesRrarr Rd (ie the displacement field u(x t)varies with position x isin Ω and time t isin R) and it requires sufficient differentiability in bothspace and time Notice that the quasistatic case is easily recovered by neglecting the inertialterm ρu ie if the mass density ρ or the acceleration a(x t) = u(x t) vanish

Analogous to the quasistatic case we can cast the above strong form into a variational structureby making use of the so-called action principle To this end we define the action

A[u] = intt2

t1L[u]dt (222)

with the Lagrangian

L[u] = T [u] minus I[u] (223)

where I is the potential energy functional introduced in Section 6 and T denotes the kineticenergy functional

T [u] = intΩ

ρ

2∣u∣2 dV (224)

For a variational material model with energy density W and assuming that body forces ρb andsurface tractions t are imposed we thus arrive at the action

A[u] = intt2

t1[int

Ω(ρ

2∣u∣2 minusW (ε)) dV + int

Ωρb sdotu dV + int

partΩNt sdotu dS] dt (225)

The action principle (also known as the principle of stationary action10) states that thesolution u(x t) renders A stationary under suitable initial conditions ie

u = arg statA[u] ∶ st ICs (226)

10Various references call this dynamic variational principle the ldquoprinciple of least actionrdquo which is in generalnot correct since the solution must not necessarily be a minimizer of A it is merely guaranteed to be a stationarypoint

109

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This condition is analogous to the minimization of the total potential energy we used so far inthe quasistatic context Here we no longer minimize the total potential energy but we renderthe total action stationary with respect to the displacement field

Taking the first variation of the action A with respect to u (again using the divergence on thestress-term as done in quasistatic) we obtain the stationarity condition

δA[u] = intt2

t1[int

Ω(ρ ui δui minus σijδuij) dV + int

Ωρbiδui dV + int

partΩNtiδuidS] dt = 0 (227)

The dynamic weak form is thus given by

G[uv] = intt2

t1[int

Ω(ρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (228)

Let us for simplicity of the derivation assume that instead of giving two initial conditionsper point (eg imposing initial displacements and velocities) we seek a stationary solutionu(x t) which satisfies the conditions u(x t1) = u1(x) and u(x t2) = u2(x) (ie we assume thedisplacements are known at the initial and final times t1 and t2 respectively) Of course thisis hardly ever the case in reality ndash and the derived concepts apply equally to the case of knowninitial displacements and velocities yet this assumption simplifies our derivation significantly

The above weak form indicates the space of solutions and it particularly lets us conclude that

v isin U0 = v isinH1(Ω) timesH1(R) ∶ v = 0 on partΩD and at t = t1 or t = t2 (229)

where the last two conditions stem from our assumption of u(x t1) = u1(x) and u(x t2) =u2(x) being known

To remove the time derivative v we integrate by parts in time (the ldquoboundary termrdquo vanishessince v = 0 at t = t1 and t = t2)

G[uv] = minusintt2

t1[int

Ω(ρ uivi + σijvij) dV minus int

Ωρbivi dV minus int

partΩNtividS] dt = 0 (2210)

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

Since in the dynamic problem the displacement field depends on time we here introduce a semi-discretization ie we discretize the solution in space but not (yet) in time This implies thatwe introduce shape functions for the interpolation in space where ndash now ndash the nodal unknownsua become functions of time

uh(x t) =n

suma=1

ua(t)Na(x) and vh(x t) =n

suma=1

va(t)Na(x) (2211)

This also allows us to calculate time derivatives eg the approximate velocity and accelerationfields

uh(x t) =n

suma=1

ua(t)Na(x) and uh(x t) =n

suma=1

ua(t)Na(x) (2212)

Insertion into (2210) results in the semi-discrete weak form

G[uhvh] = minusintt2

t1

n

sumb=1

vbi [n

suma=1

uai intΩρNaN bdV + int

ΩσijN

bj dV

minusintΩρbiN

b dV minus intpartΩN

tiNbdS] dt = 0

(2213)

110

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which must hold for all vb(t) histories that vanish at t1 and t2 Because it must hold for allvb(t) histories we may conclude that the term in brackets must vanish vor all b = 1 n andi = 1 d (n being the number of nodes d the number of dimensions) These n times d equationsare discretized equations of motion

Analogous to before we collect all (now time-dependent) nodal dofs in the vector

U(t) = u1(t) un(t) (2214)

so that solving (2213) for all vb(t) is equivalent to solving the equation of motion

MU +Fint(U) minusFext(t) = 0 (2215)

with

Mabij = δij int

ΩρNaN bdV F binti = int

ΩσijN

bj dV F bexti = int

ΩρbiN

b dV +intpartΩN

tiNbdS

(2216)

Matrix M is called the consistent mass matrix and we write Fext = Fext(t) to indicate thatexternal forces are likely to depend on time (and they may also depend on displacements asdiscussed before)

Example 221 Consistent mass matrix of the 2-node bar element

The consistent mass matrix for a 2-node bar element (using theisoparametric formulation) is computed from its shape functions

N1(ξ) = 1 minus ξ2

N2(ξ) = 1 + ξ2

with ξ isin [minus11] (2217)

1 21

u 2ux

Specifically we have (with the total bar element mass me = ρALe)

Mab = intΩρNaN bdV = int

1

minus1ρNaN bA

Le2

dξ rArr Mbar1D = me

6(2 1

1 2) (2218)

Note that this is the consistent mass matrix for 1D motion ieU = (u1 u2)T If each node moves in 2D and hence has two dofsper node in the plane ie U = (u1

1 u12 u

21 u

22)T then each pair of

dofs (horizontal and vertical) is linked by the above mass matrixso that the total consistent mass matrix in 2D becomes

1 22u

x

1u1

1u

1u2u

1

2

2u

Mbar2D = me

6

⎛⎜⎜⎜⎝

2 0 1 00 0 0 01 0 2 00 0 0 0

⎞⎟⎟⎟⎠+ me

6

⎛⎜⎜⎜⎝

0 0 0 00 2 0 10 0 0 00 1 0 2

⎞⎟⎟⎟⎠= me

6

⎛⎜⎜⎜⎝

2 0 1 00 2 0 11 0 2 00 1 0 2

⎞⎟⎟⎟⎠ (2219)

mdashmdashmdashmdash

Example 222 Consistent mass matrix of the CST element

The consistent mass matrix of the constant-strain triangular element is computed analogouslyby integration of the shape functions Again starting with a single dof per node ie U =(u1 u2 u3)T the consistent mass matrix is obtained as (with element area Ae thickness te)

MCST1D = me

12

⎛⎜⎝

2 1 11 2 11 1 2

⎞⎟⎠

with me = ρAete (2220)

111

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The extension to 2D motion with dofs U = (u11 u

12 u

21 u

22 u

31 u

32)T follows from apply in the 1D

mass matrix to the horizontal and vertical dofs independently leading to

MCST2D = me

12

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

2 0 1 0 1 00 2 0 1 0 11 0 2 0 1 00 1 0 2 0 11 0 1 0 2 00 1 0 1 0 2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

with me = ρAete (2221)

mdashmdashmdashmdash

For all other elements the consistent mass matrix can be evaluated analogously or computedby numerical quadrature

Mab1D = int

ΩeρNaN bdV asymp

nQPminus1

sumk=0

WkρNa(ξk)N b(ξk)J(ξk) (2222)

We note that irrespective of the element type the (approximate) kinetic energy of an elementis computed as follows

T = intΩ

ρ

2∥uh∥2

dV = intΩ

ρ

2

n

suma=1

uaNa sdotn

sumb=1

ubN bdV = 1

2

n

suma=1

n

sumb=1

ua sdot ubintΩρNaN bdV (2223)

which can be conveniently recast into

T = 1

2U sdotM U (2224)

From the above examples we observe that the consistent mass matrix leads to a dynamiccoupling between the dofs ie the consistent mass matrix is not diagonal but includes significantoff-diagonal terms From a numerical perspective this is rather inconvenient as it may requireinverting M (as will be discussed soon) Therefore one often resorts to the so-called lumpedmass matrix which is an approximation that is diagonal

One such approach is the so-called particle-mass lumping which aims toevenly distribute the element mass me among its nodes and therefore simplyassumes that for an arbitrary element having ne nodes with d dofs per nodeMlumped isin Rnedtimesned is given by

Mlumpede =me

neI (2225)

m 2e m 2e

m 3e m 3e

m 3e

Example 223 Lumped mass matrix of the 2-node bar element

For example by using particle-mass lumping for a 2-node bar element one distributes the massme evenly to the two nodes resulting in

Mlumped1De =me

2(1 0

0 1) Mlumped2De =

me

2

⎛⎜⎜⎜⎝

1 0 0 00 1 0 00 0 1 00 0 0 1

⎞⎟⎟⎟⎠ (2226)

112

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that a comparison of the kinetic energies (eg in 1D) reveals

Tlumped =1

2Ue sdotMlumpedeUe =

me

4[(u1

e)2 + (u2e)2] (2227)

and

Tconsistent =1

2Ue sdotMconsistenteUe =

me

6[(u1

e)2 + (u2e)2 + u1

eu2e] (2228)

Hence using the lumped mass matrix implies an approximation of the kinetic energy (which isgenerally not exact)

mdashmdashmdashmdash

If defined properly then the solutions obtained from using either the consistent or lumpedmass matrix in the finite element context converge under h-refinement (As the element sizedecreases the differences between the two formulations also decrease so that in the limit ofinfinitely 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 matrixboth at the element and at the global level As a consequence all assembly operationsintroduced 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 androtational inertia must be considered (which is not discussed here in detail and no uniquesolution exists for the lumped mass matrix but various proposed approximations can be used ndashwhich either approximate the kinetic energy or the mass moments of inertia of the beam)

113

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

23 Vibrations

As shown in the previous section treating the dynamic mechanical problem in linearized kine-matics by the finite element method leads to the semi-discretized equations of motion

M U +Fint(U) = Fext(t) (231)

which are to be solved for the time-dependent vector of nodal dofs U = U(t) This solution isusually obtained in one of two ways we either solve for a time-continuous solution U(t) or wediscretize not only in space but also in time and introduce finite differences in time to solve forUα = U(tα) at discrete intervals tα = α∆t Time-continuous solutions in analytical form canusually be found only for special cases ndash vibrations are one such case discussed in the following

For our purposes vibrations are small-amplitude oscillations about a stable equilibrium con-figuration If a body is freely vibrating without any external excitation we speak of free vibra-tions otherwise (eg if harmonic forces or displacement boundary conditions are applied) weconsider forced vibrations In both cases we assume small amplitudes which leads to linearwaves and we consider oscillations about a stable equilibrium defined by nodal displacementsU0 (eg the undeformed configuration U0 = 0 is one such stable equilibrium)

231 Free undamped vibrations

Starting with the general nonlinear equations of motion (231) we linearize about a stableequilibrium configuration U0 with constant external forces Fext(t) = Fext = const such that thestatic equilibrium satisfies

Fint(U0) = Fext (232)

Next consider a small time-varying perturbation V (t) such that insertion of

U(t) = U0 +V (t) rArr U(t) = V (t) (233)

into the equations of motion leads to

MV +Fint(U0 +V ) = Fext (234)

Expanding the above for small ∣V ∣ ≪ ∣U0∣ to leading order gives

MV +Fint(U0) +partFint

partU(U0)V + hot = Fext (235)

or invoking equilibrium (232) and dropping all higher-order terms

MV + T (U0)V = 0 (236)

When considering free vibrations about the undeformed configuration of an elastic body theabove reduces to

MU +KU = 0 (237)

In general the form of the linearized equations of motion for free vibrations without externalforcing and without damping is

MU + TU = 0 (238)

114

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The general type of solution of the above ODE is of the harmonic form11

U = Ulowast exp(iωt) with ω isin R Ulowast isin Cdn (239)

Insertion into (238) leads to (exploiting that the equation must hold for all times t)

(T minus ω2M) U = 0 (2310)

which is an eigenvalue problem to be solved for the unknown ω isin R known as the eigen-frequency and the corresponding eigenvector U isin R known as the associated eigenmodeWe point out that M is positive-definite by definition (both for the consistent and lumpedmass matrix) and T = part2IpartU2(U0) is also positive-semi-definite because it is the tangent stiff-ness matrix associated with a stable equilibrium U0 As a consequence Mminus1T has only realeigenvalues ω determined from

det (T minus ω2M) = 0 (2311)

Further Ulowast = U isin Rnd is also real-valued (which is why we omitted the asterisk in (2310))Finally if ω is a solution of (2310) then so is minusω Since the sign if of minor importance herewe only consider the positive frequencies

For a FE discretization with ntimes d degrees of freedom (n nodes in d dimensions) the eigenvalueproblem (2310) has n times d eigenfrequencies ωj and associated eigenmodes Uj It is commonconvention to label the eigenfrequencies (and associated modes) in ascending order

0 le ω0 le ω1 le le ωntimesdminus1 (2312)

Recall that each rigid-body mode of the FE problem corresponds to a zero eigenfrequencyTherefore a 2D (3D) free vibration problem without essential BCs to suppress rigid-bodymotion has three (six) zero eigenfrequencies When all zero-energy modes have been removedthe lowest non-zero eigenfrequency is known as the natural frequency

Due to the linear nature of the ODE system the complete solution to the free-vibrationproblem is a superposition of the type

U(t) =ntimesd

sumj=1

clowastj Uj exp(iωjt) clowastj isin C for j = 1 n times d (2313)

for whose coefficients clowastj we must solve for a given set of initial conditions Recall that for amechanical initial boundary value problem we have two initial conditions per node and perdegree of freedom (eg imposing an initial displacement and velocity vector for each node)This provides the 2timesntimesd equations from which the coefficients clowastj isin C can be found (since thoseare complex we have in fact 2 times n times d unknowns viz the real and imaginary parts of each ofthe ntimesd coefficients) Roughly speaking free vibrations are characterized by the superpositionof vibrations at all eigenfrequencies with their respective eigenmodes

Example 231 Free vibration of a bar

Let us study the example of a freely vibrating linear elastic 2-node bar which we use to assessthe influence of the different types of mass matrices Consider a 2-node bar element with only

11The solution can alternatively be written in terms of trigonometric functions We here use the exponentialformulation U = Ulowast exp(iωt) for notational simplicity which by Eulerrsquos identity exp(iωt) = cos(ωt) + i sin(ωt)can be transformed into trigonometric solutions to obtain U = U1 cos(ωt) + U2 sin(ωt) To avoid confusion weuse the asterix lowast here and in the following to denote complex-valued variables

115

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

axial displacements in 1D so that each node has only a single dof ua The mass matrices andthe stiffness matrix for this case were derived previously as

Mconsistent =m

6(2 1

1 2) Mlumped =

m

2(1 0

0 1) K = EA

L( 1 minus1minus1 1

) (2314)

For each of the two mass matrices we compute the two eigenfrequencies and eigenmodes bysolving the eigenvalue problem

(K minus ω2M)U = 0 rArr det (K minus ω2M) = 0 (2315)

Insertion of the stiffness and consistent mass matrix results in the two solutions

ωconsistent0 = 0 ωconsistent

1 =radic

12EA

mL= 2

radic3

radicEA

mLasymp 3464

radicEA

mL (2316)

The corresponding eigenvectors follow from insertion of the eigen-frequencies into the eigenvalue problem giving

U consistent0 = (1

1) U consistent

1 = ( 1minus1

) (2317)

1 2

1 2

U0

U1

As expected we have one zero eigenfrequency associated with rigid body translation and onenon-zero eigenfrequency

When repeating the above procedure with the lumped mass matrix we instead obtain

ωlumped0 = 0 ωlumped

1 = 2

radicEA

mL (2318)

and

U lumped0 = (1

1) U lumped

1 = ( 1minus1

) (2319)

Hence the two cases yield the same eigenmodes U0 and U1 but they differ significantly in thefundamental frequency ωconsistent

1 vs ωlumped1

For comparison let us compute the exact solution by studying the free vibration of a continuoushomogeneous linear elastic bar Linear momentum balance ie

Euxx = ρu (2320)

admits the separable solution

u(x t) = u(x) exp(iωt) rArr Euxx(x) = minusω2ρ u(x) (2321)

Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L so that

ux(0) = ux(L) rArr u(x) = A cos(nπxL

) (2322)

with an integer n isin Z and a constant A isin R Insertion into (2320) leads to

minusE (nπL

)2

= minusω2ρ rArr ωn = nπradic

EA

mL (2323)

116

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the lowest two eigenfrequencies are obtained as

ω0 = 0 ω1 = πradic

EA

mL (2324)

Comparison with the above two approximate formulations reveals that

ωlumped1 le ω1 le ωconsistent

1 (2325)

mdashmdashmdashmdash

We can generalize the above observation to vibrational problems (here without proof) Theeigenfrequencies obtained from the consistent mass matrix generally over-estimate theeigenfrequencies while the lumped mass matrix usually provides under-estimates of theeigenfrequencies (the latter is not rigorous though since it depends on the choice of the lumpedmass matrix)

232 Forced vibrations

As defined above forced vibrations result from small-amplitude harmonic excitation of astructure We again start with the linearized governing equations

MU + TU = Fext(t) (2326)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext(t) = Fext cos(Ωt) (2327)

with an excitation frequency Ω isin R and an amplitude vector Fext isin Rdn (2326) showsthat the solution vector generally consists of a homogeneous solution and a particular solutionaccording to

U(t) = Uhom(t) +Upart(t) = Uhom(t) + U cos(Ωt) where U isin Rdn (2328)

The homogeneous solution corresponds to a free vibration (see Section 231) and is usuallyof little interest (any realistic system has a minimum amount of damping which makes thehomogeneous solution of a free vibration decay over time while the particular solution of theforced vibration assumes a steady state) Insertion of the particular solution into (2326) gives

(minusΩ2M + T ) U = Fext (2329)

which is a linear system of equations to be solved for the displacement amplitude vector U Specifically if

det (minusΩ2M + T ) ne 0 hArr Ω is not an eigenfrequency of the system (2330)

then

U = (minusΩ2M + T )minus1Fext rArr Upart(t) = (minusΩ2M + T )minus1

Fext cos(Ωt) (2331)

Hence the system responds to a harmonic excitation ndash at steady state ndash with a harmonicvibration at the excitation frequency As the excitation frequency approaches an eigenfrequency(Ω rarr ωj) the above matrix becomes singular and the displacement amplitude vector U tendsto infinity (this is characteristic of resonant effects)

117

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

233 Modal decomposition

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations thentime-continuous solutions are usually hard to find and one may resort to finite-difference schemes(as discussed next in Section 24) Alternatively one may find time-continuous solutions by themethod of modal decomposition which is based on the above eigenfrequency analysis

The starting point of the concept of modal decomposition is to express the unknown time historyof the vector of nodal dofs through a carefully chosen basis viz

U(t) =ntimesd

sumi=1

zi(t) Ui (2332)

where we use the (somehow normalized) eigenvectors Ui 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 ndash for which to understand we need toinclude a somewhat longer derivation By considering the eigenvalue problem for two distincteigenmodeseigenfrequencies i and j we may write

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0

(T minus ω2jM) Uj = 0 rArr Ui sdot (T minus ω2

jM) Uj = 0(2333)

where we pre-multiplied each of the two equations by the respective other eigenvector Sub-traction of the two equations (using that T is by definition symmetric) results in

(ω2i minus ω2

j ) Ui sdotM Uj = 0 hArr ωi = ωj or Ui sdotM Uj = 0 (2334)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ui sdotM Uj If weassume that we have only distinct eigenfrequencies12 then we may conclude that

Ui sdotM Uj = 0 if i ne j (2335)

We can normalize the eigenvectors in the following fashion

Ui larrUiradic

Ui sdotM UirArr Ui sdotM Ui = 1 (2336)

so that overall

Ui sdotM Uj = δij (2337)

Next if we start with

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0 (2338)

then we may also conclude that by invoking (2337)

Uj sdot T Ui = 0 if i ne j (2339)

12Theoretically we may surely have repeated eigenvalues and hence duplicated eigenfrequencies However anumerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (andrigid-body modes are usually removed unless the simulated response requires rigid-body motion) In case of anyduplicated eigenfrequencies one could still introduce eg Gram-Schmid orthonormalization to produce a set ofeigenmodes that do satisfy the below condition

118

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly by pre-multiplying by the respective same eigenvector ie

Ui sdot (T minus ω2iM) Ui = 0 (2340)

we solve for ω2i and obtain Rayleighrsquos quotient which here simplifies due to the normalization

(no summation over i implied)

ω2i =

U(i) sdot T U(i)

U(i) sdotMU(i)

= U(i) sdot T U(i) rArr Ui sdot T Uj =⎧⎪⎪⎨⎪⎪⎩

ω2i if i = j

0 else(2341)

Let us now return to the modal decomposition of a linearized elastic system using the Fourierrepresentation

U(t) =ntimesd

sumi=1

zi(t) Ui (2342)

where U1 Un 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 scalarcoefficients that are continuous functions of time (maintaining the semi -discretization)

We substitute (2342) into the linearized equations of motion with external forces Eq (2326)or MU + TU = Fext so we arrive at

ntimesd

sumi=1

[zi(t)MUi + zi(t)T Ui] = Fext(t) (2343)

Pre-multiplying by Uj gives

ntimesd

sumi=1

[zi(t) Uj sdotMUi + zi(t)Uj sdot T Ui] = Uj sdotFext(t) (2344)

and exploiting the above orthogonality relations leads to

zj(t) + ω2j zj(t) = Uj sdotFext(t) for j = 1 n times d (2345)

This equation is quite remarkable as it is a scalar linear ODE for each unknown function zj(t)Moreover the system of equations for the n times d unknown functions zi(t) (with i = 1 n times d)has decoupled into n times d uncoupled scalar ODEs to be solved independently for the zi(t) Thestrategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes Uj so that thecoefficients and right-hand sides in (2345) are known The resulting system of decoupled linearODEs can relatively inexpensively be solved for the functions zj(t)

For many practical problems only a limited number of modes are important so we may restrictthe representation (2342) to include only the lowest m lt n times d modes (corresponding to the mlowest eigenfrequencies) Therefore significant numerical efficiency can be gained by truncatingthe Fourier sum and only using the m lowest modes which is referred to as order reduction

U(t) =m

sumi=1

zi(t) Ui m lt n times d (2346)

119

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

234 Structural damping

In structural dynamics (ie in the analysis of structures involving bars beams plates etc)one often includes velocity-proportional damping in an approximate average sense by the intro-duction of a damping matrix C such that the equations of motion (2215) become

MU +CU +Fint(U) minusFext(t) = 0 (2347)

This is the higher-dimensional analog to the classical 1D system consisting of masses springsand dashpots as discussed in undergraduate Dynamics The C-matrix serves as the analog ofthe dashpot which provides velocity-proportional damping The most common form of C usedin structural FEA is mass- and stiffness-proportional damping which assumes

C = αM + βK α β isin R+ (2348)

That is C is a combination of the mass and stiffness matrices M and K respectively Thechoice of parameter α ge 0 controls low-frequency vibration attenuation while parameter β ge 0suppresses high-frequency vibrations We skip the detailed derivation here and refer to FEAliterature on structural damping

If damping is included in a problem of free or forced vibrations then the above strategies andrelations ndash in principle ndash still apply As a major difference solutionsU = U(t) will include a timedelay implying that the energy dissipation due to damping results in forces and displacementsnot being ldquoin syncrdquo anymore but the bodyrsquos deformation lagging behind any applied forces thatcause the deformation This is best captured by starting with an ansatz

U(t) = Ulowast exp(iωlowastt) with ωlowast isin C and Ulowast isin Cdn (2349)

solving for the complex valued solutions and finally extracting the displacement solution as thereal part ie U(t) = Re [Ulowast exp(iωlowastt)]

For example for a forced vibration with structural damping we now have

Upart(t) = Re [(minusΩ2M + iΩC + T )minus1Fext] cos(Ωt) (2350)

120

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

24 Time-dependent transient solutions

If the time-dependent solution for the nodal variables U(t) cannot be obtained in a continuousmanner (eg as discussed above for free vibrations or via modal decomposition) then one usu-ally seeks solutions in a time-discretized fashion (eg by using finite-difference approximationsin time) This turns the previously introduced semi -discretization of our fields of interest intoa proper discretization in both space and time

As discussed in Section 3 at the beginning of this course finitedifferences are a convenient technique when the discretization isapplied to a regular grid with uncomplicated boundary conditions(such as when choosing constant time increments ∆t with knowninitial conditions) We here re-use those techniques introduced backin Section 3 for the discretization in time Specifically we define aconstant time increment ∆t gt 0 and seek solutions at discrete timeintervals writing

∆t = tα+1 minus tα ua(tα) = uaα Uα = U(tα) forall α ge 0

and arbitrarily choosing t0 = 0

au

au

au

au

Dt

t

In order to solve the equations of motion we must choose between explicit and implicit inte-gration schemes ndash which come with all the advantages and disadvantages discussed in generalin Section 3 Let us first turn to the simpler case of explicit time integration13

241 Explicit time integration

The most frequent choice ensuring quadratic convergence while maintaining small finite-differencestencils is the use of central-difference approximations in time which turn the nodal velocityand acceleration vectors into respectively

U(tα) = Uα+1 minusUαminus1

2∆t+O(∆t2) U(tα) = U

α+1 minus 2Uα +Uαminus1

(∆t)2+O(∆t2) (241)

Insertion into the equations of motion (2347) (here including damping for completeness anddropping higher-order terms) leads to the time-discretized equations of motion

MUα+1 minus 2Uα +Uαminus1

(∆t)2+CU

α+1 minusUαminus1

2∆t+Fint(Uα) minusFext(tα) = 0 (242)

which can be reorganized into

[ M

(∆t)2+ C

2∆t]Uα+1 = 2M

(∆t)2Uα + [ C

2∆tminus M

(∆t)2]Uαminus1 minusFint (Uα) +Fext(tα) (243)

This is an update rule for Uα+1 resulting in a scheme of explicit time integration (ie vectorUα+1 can be computed directly from the known previous solutions Uα and Uαminus1 We note theabove relation indicates that solving for Uα+1 still requires the solution of a linear system (dueto the matrix in brackets in front of Uα+1) Yet all nonlinearity that is possibly inherent inFint (U) is irrelevant to the solution procedure as the internal forces in (243) depend only onthe previous known solution Uα

13We note that similar concepts can also be applied when the time increment ∆t is not constant or is adaptivelymodified during the course of a simulation However we here restrict our discussion to constant time steps ∆t

121

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Stability generally limits the choice of the time step ∆t in explicit schemes as discussed inSection 3 This also applies to the dynamic FE formulation described above Without proof wemention that stability requires

∆t le ∆tmax =2

ωmax (244)

with ωmax being the highest eigenfrequency of the FE problem (see Section 231) It is importantto realize that the highest eigenfrequency generally scales inversely with the size of the smallestelement in the mesh ie

ωmax prop1

hmin (245)

For example we showed in Example 231 that the fundamental frequency of a two-node barwas of the form ω1 prop 1

L

radicEρ with L being the element size

Despite the explicit scheme being straight-forward to implement and inexpensive to solve atthe time-step level the above stability constraint has unfortunate consequences The maximumallowed time step ∆tmax decreases with decreasing mesh size ie dynamic FE problems thatare already expensive because of high mesh resolution are even more expensive when usingexplicit time integration due to the required small time step size Moreover what matters isthe absolute smallest element size hmin and not the average element size Therefore the smallestelement in a FE mesh generally dictates the critical step size ∆tmax (even if the average elementsize is considerably larger)

242 A reinterpretation of finite differences

Instead of introducing finite-difference schemes in time as discussed above we could alterna-tively introduce interpolations in time analogous to the interpolation in space introduced withinthe FE context based on shape functions and nodal values We here aim to show that such aninterpolation in time is indeed feasible and that in fact the above explicit central-differencediscretization can be re-interpreted as such an interpolation

To start consider a discretization in time which evaluates U at discrete time intervals ∆t andthen uses a quadratic interpolation in time to define U(t) at all times t ge 0 ie we define

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t) for t isin [tα minus ∆t2 t

α + ∆t2 ] (246)

Shape functions Nα(t) interpolate in time and analogous to thespatial discretization of the FE method we define Nα(tβ) = δαβThe resulting quadratic shape functions are

Nα+1(t) = (t minus tα)(t minus tαminus1)2(∆t)2

Nα(t) = (tα+1 minus t)(t minus tαminus1)(∆t)2

and

Nαminus1(t) = (tα+1 minus t)(tα minus t)2(∆t)2

(247) Dt

t

aN

a+1N

a-1N

at +Dt2

at -Dt2

at

a+1t

a-1t

This piecewise-quadratic interpolation with the above range of validity ensures that U(t) istwice differentiable (as needed for the acceleration) It further guarantess that not only is U(t)continuous over time but also

part

parttNα+1(tα minus ∆t

2 ) = 0 andpart

parttNαminus1(tα + ∆t

2 ) = 0 (248)

122

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that U(t) is continuous as well Consequently the acceleration

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t)

= Uα+1

(∆t)2minus 2

(∆t)2+ U

αminus1

(∆t)2= U

α+1 minus 2Uα +Uαminus1

(∆t)2for t isin [tα minus ∆t

2 tα + ∆t

2 ](249)

is piecewise-constant and recovers the second-order central-difference scheme in time cf (241)

The approximate displacement field now discretized in both space and time has become

uh(x t) =n

suma=1

α+1

sumγ=αminus1

uaγNγ(t)Na(x) for t isin [tα minus ∆t2 t

α + ∆t2 ] x isin Ωh (2410)

where uaγ = uh(xa tγ) is the displacement of node a at time tγ The acceleration field followsas the piecewise-constant (in time) approximation

uh(x t) =n

suma=1

uaα+1 minus 2uaα +uaαminus1

(∆t)2Na(x) for t isin [tα minus ∆t

2 tα + ∆t

2 ] x isin Ωh (2411)

Next we must insert the discretization into the weak form (2210) which also requires a choicefor the trial function vh(x t) We can either choose a Bubnov-Galerkin scheme where vh(x t)is discretized in the same fashion as uh(x t) the consequence is that we arrive at an implicitsystem in time to solve for all nodal unknowns (ie one cannot simply march forward in timebut has to solve for the nodal solution at all times at once) Alternatively we may choose aPetrov-Galerkin scheme in time and ndash having in mind that we wish to evaluate informationonly at the discrete time steps ndash define the trial function (assuming nt time steps) as

vh(x t) =n

sumb=1

vb(t)N b(x) =n

sumb=1

nt

sumα=1

vbαN b(x)δ(t minus tα) (2412)

This approximation of collocation type leads to the weak form being reduced to only the discretetime steps When this choice of vh along with uh is inserted into the weak form (2210) ie

G[u v] = intt2

t1[int

Ω(minusρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (2413)

the integration over time reduces the delta functions to the simple form

nt

sumb=1

vbi

⎡⎢⎢⎢⎢⎣int

Ω

⎛⎝minusρuaα+1i minus 2uaαi + uaαminus1

i

(∆t)2NaN b minus σij(εhα)N b

j

⎞⎠

dV

+intΩρbi(tα)N b dV + int

partΩNti(tα)N bdS] = 0

(2414)

for each time step α (0 le tα le nt∆t) and for all admissible choices of vbi The latter implies thatthe above terms in brackets must vanish or that we must have

intΩρNaN b dV

uaα+1i minus 2uaαi + uaαminus1

i

(∆t)2+ int

Ωσij(εhα)N b

j dV

minus intΩρbi(tα)N b dV minus int

partΩNti(tα)N bdS = 0

(2415)

When inserting our definitions of the consistent mass matrix and the internalexternal forcevectors (cf (2216)) the above is equivalent to

MUα+1 minus 2Uα +Uαminus1

(∆t)2+Fint(Uα) minusFext(tα) = 0 (2416)

which was derived above for a second-order finite-difference time discretization see (242) Ofcourse the same procedure can also be applied to other choices of vh which leads to differenttime discretization schemes

123

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

243 Implicit time integration

Following the above explicit schemes we proceed to discuss implicit time integration whichuses the same discretization in time but requires solving a generally nonlinear system of equa-tions for Uα+1 Various techniques exist the most prominent ones of which we summarize inthe following

2431 Newmark-β method

The most popular scheme for mechanical problems is the so-called Newmark-β method (itwas originally developed for problems in structural mechanics in 1959 by Nathan M Newmarkof the University of Illinois at UrbanandashChampaign after whom it was later named)

We start with the mean value theorem which tells as that

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2417)

and analogously

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2418)

Particular schemes now differ by how U(t) is defined during an interval (tα tα+1) so that theabove two equations can be integrated to find U(t) and U(t)

The so-called average acceleration method eg assumes that the acceleration is piecewiseconstant between two time steps and specifically that

U(t) = Uα+1 + Uα

2= const for t isin (tα tα+1) (2419)

Insertion into (2418) along with U(tα) = Uα leads to

U(t) = Uα + (Uα+1 + Uα) t minus tα

2 (2420)

and inserting this into (2417) with U(tα) = Uα gives

U(t) = Uα + Uα(t minus tα) + (Uα+1 + Uα) (t minus tα)2

4 (2421)

Finally evaluating (2420) and (2421) at the new time step α + 1 yields respectively

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + Uα) (∆t)2

4

(2422)

This is apparently an implicit definition of the new velocity and displacement vectors sincethey involve the unknown acceleration Uα+1 at the new time

As an alternative the linear acceleration method assumes a linear interpolation instead of apiecewise-constant one thus starting with

U(t) = Uα + (Uα+1 minus Uα) t minus tα

∆tfor t isin (tα tα+1) (2423)

124

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Carrying out the same substitutions and integrations as above for the average accelerationscheme we here arrive at

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + 2Uα) (∆t)2

6

(2424)

which is yet another implicit definition of the new velocity and displacement vectors

We note that we can also cast our explicit central-difference scheme from before into theabove framework if we assume a piecewise-constant acceleration

U(t) =⎧⎪⎪⎨⎪⎪⎩

Uα for t isin (tα tα+tα+1

2 )Uα+1 for t isin ( tα+tα+1

2 tα+1) (2425)

The Newmark-β method generalizes the above cases into a single framework which definesthe new displacements and velocities as

Uα+1 = Uα +∆t Uα + (∆t)2

2[2β Uα+1 + (1 minus 2β)Uα] (2426a)

Uα+1 = Uα +∆t [γUα+1 + (1 minus γ)Uα] (2426b)

where 0 le β le 1 and 0 le γ le 1 are parameters to be chosen The above schemes are included asspecial cases

β = 14 γ = 1

2 leads to the most popular average acceleration scheme (which turns outto be unconditionally stable and to have no numerical damping)

β = 16 γ = 1

2 is the linear acceleration scheme (which is conditionally stable and showsnumerical damping)

β = 0 γ = 12 recovers the explicit central-difference scheme (241)

As a major benefit of the Newmark schemes for linear structural problems the method canprovide unconditional stability Specifically

γ ge 12 and β ge γ2 guarantees that the method is unconditionally stable

γ ge 12 and β lt γ2 leads to methods being conditionally stable where as discussed before∆tcr prop ωminus1

max

For γ = 12 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-differencemethods introduce artificial numerical damping (see the discussion in Section 42 on phaseerror analysis) Whenever γ gt 12 the Newmark family of methods produces numerical damp-ing The average acceleration scheme (β = 1

4 γ = 12) 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 definitionsof velocities and displacements (2426a) into a form that allows us to perform algorithmic timestepping To this end let us first solve (2426a) for the acceleration at the new time tα+1

Uα+1 = 1

β(∆t)2(Uα+1 minusUα minus∆t Uα) minus 1 minus 2β

2βUα (2427)

125

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Insertion into (2426b) yields

Uα+1 = Uα +∆t(1 minus γ)Uα + γ

β∆t(Uα+1 minusUα +∆t Uα) minus γ∆t

1 minus 2β

2βUα

= (1 minus γβ) Uα + γ

β∆t(Uα+1 minusUα) minus∆t( γ

2βminus 1) Uα

(2428)

Next inserting both velocity (2427) and acceleration (2428) into the equation of motion atthe new time tα+1

MUα+1 +CUα+1 +Fint(Uα+1) minusFext(tα+1) = 0 (2429)

leads ndash after some rearrangement ndash to

( 1

β(∆t)2M + γ

β∆tC)Uα+1 +Fint(Uα+1) minusFext(tα+1)

=M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2430)

The right-hand side of (2430) is fully known as it only involves Uα Uα and Uα from theprevious time step The left-hand side is generally nonlinear and requires an iterative solverunless the problem is linear elastic in which case Fint(Uα+1) =KUα+1 and the above left-handside is linear in Uα+1

Note that the implementation is quite similar to that of the quasistatic problem using eg theNewton-Raphson solver discussed in Section 201 Specifically we now have

f(Uα+1) =MlowastUα+1 +Fint(Uα+1) minusF lowastext(tα+1Uα Uα Uα) = 0 (2431)

where

Mlowast = 1

β(∆t)2M + γ

β∆tC = const (2432)

and

F lowastext(tα+1Uα Uα Uα) = Fext(tα+1) +M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2433)

Note that Mlowast is constant while F lowastext is fully known from the previous time step and the applied

external forces Therefore the problem is quite similar to the quasistatic problem The tangentmatrix used for iterations is

T lowast =Mlowast + T = 1

β(∆t)2M + γ

β∆tC + T (2434)

Boundary conditions can be implemented in the same fashion as for the quasistatic solversdiscussed in Section 213

In the special case of a linear elastic problem the nonlinear system of equations turns into alinear one viz

f(Uα+1) =MlowastUα+1 +KUα+1 minusF lowastext(tα+1Uα Uα Uα) = 0 (2435)

126

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that

Uα+1 = (Mlowast +K)minus1F lowast

ext(tα+1Uα Uα Uα) (2436)

The algorithmic structure is as follows At each time step we solve (2430) for Uα+1 (usingan iterative solver such as Newton-Raphson for nonlinear problems) based on the informationfrom the previous time step Uα Uα and Uα along with information about the applied externalforces Fext(tα+1) This implies we must store vectors Uα Uα and Uα after each converged timestep Once the new solution Uα+1 has been found we compute Uα+1 from (2427) and Uα+1

from (2428) store all of those vectors and move on to the next time step

244 HHT-α method

The HHT method (also known as the HHT-α method) is a modification of the above implicitNewmark scheme It is named after its inventors Hilber Hughes and Taylor and has gainedpopularity in commercial codes The idea is to use the same Newmark relations (2426a) and(2426b) but to modify the equations of motion into which they are inserted viz assuming

MUα+1 +C [(1 minus α)Uα+1 + α Uα] + (1 minus α)Fint(Uα+1) + αFint(Uα)= (1 minus α)Fext(tα+1) + αFext(tα)

(2437)

with a newly introduced parameter α (using the overline to avoid confusion with our timestep α) α = 0 recovers the Newmark-β scheme If one chooses

0 le α le 1

3 β = (1 + α)2

4 γ = 1

2+ α (2438)

then the HHT method is unconditionally stable and at least second-order accurate Increas-ing α decreases the simulated displacements at high frequencies (thus removing high-frequencynoise from simulated dynamics problems) which can be beneficial in structural dynamics

245 Use of mass matrices

Let us close this section by discussing the use of consistent vs lumped mass matrices in thecontext of explicitimplicit time stepping Recall that for free vibrations we had observedthat the consistent mass matrix generally overpredicts eigenfrequencies while the lumped massmatrix tends to underpredict those Unfortunately we do not have the time here but we coulddo a careful phase error analysis for the explicit and implicit time-stepping schemes derivedabove (recall that we discussed phase error analysis in the context of finite differences see Sec-tion 42) The outcome is that implicit schemes generally introduce numerical error in the formof so-called period elongation ie using implicit schemes like the average-acceleration one(although having no numerical damping) leads to vibrational frequencies being underestimatedHence combining implicit schemes with consistent mass matrices compensates for the errorsintroduced by the two Likewise explicit schemes like the central-difference one tend to exhibitperiod contraction hence compensating for the error introduced by lumped mass matricesThis shows that it is therefore recommended to use

explicit schemes with lumped mass matrices

implicit schemes with consistent mass matrices

This choice is also computationally beneficial lumped mass matrices may allow for solving theexplicit update rule (243) without the need for iterations whereas consistent mass matricescan be conveniently used in the implicit update rule (2430) where a system of equations mustbe solved anyways

127

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

25 Extensions

Many of the finite element tools we have discussed so far (from discretization principles andfunction spaces to elements types and quadrature rules and beyond) apply not only to theframework of small-strain mechanics problems but they extend to a much broader contextwhere they may be conveniently used In this section let us briefly summarize two extensionsof the theory developed so far towards common engineering applications

251 Finite kinematics

When going beyond small strains we need to work with a theory of large (finite) strains whichis commonly referred to as finite kinematics Classical examples are the simulation of rubberymaterials or of biological tissues which generally undergo large strains Here we do not onlyneed to introduce more complex constitutive laws (going well beyond linear elasticity) but wemust 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 strainsHere one typically introduces a deformation mapping of the type

ϕ(X t) ∶ Ω timesRrarr Rd such that x = ϕ(X t) (251)

which assignes to each undeformed point X isin Ω in the undeformed body Ω a point x isin ϕ(Ω)within the deformed body ϕ(Ω) For simplicity we assume that the two points are linked inthe same fashion as in small strains meaning we define a displacement field u ∶ Ω timesR rarr Rdsuch that

x(X t) =X +u(X t) (252)

To describe finite strains inside the deformed body one usually does not resort to ε but insteadintroduces the deformation gradient which is a second-order tensor

F = partx

partXhArr Fij =

partxipartXj

(253)

When inserting the relation (252) we notice that

Fij =partxipartXj

= δij + uij hArr F = I +nablau (254)

This strain measure is frequently used in finite-strain continuum mechanics (besides variousother strain measures that we do not want to introduce here for brevity)

Starting with quasistatics the variational problem in this finite-deformation setting is analogousto the small-strain version The functional of the total potential energy is

I[u] = intΩW (F ) dV minus int

Ωρ0b sdotu dV minus int

partΩNt sdotu dS (255)

where W is still the strain energy density (now depending on F ) ρ0 denotes the mass densityin the undeformed reference configuration (and we integrate over the reference configuration)We seek solutions

u isin U = u isinH1(Ω) ∶ u = u on partΩD such that u = arg min I[u] (256)

128

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The first variation follows as

δI[u] = intΩ

partW

partFijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS

= intΩPijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS = 0

(257)

where we introduced the first Piola-Kirchhoff stress tensor with components

Pij =partW

partFij (258)

which generally differs from the Cauchy stress tensor σ and is furthermore not symmetric Atfinite strains there exists a variety of stress measures we here simply make this choice becauseit emerges naturally from the variation Be alerted that commercial FEA software uses all sortsof strain and stress measures (absolute and incremental ones as well as rates) Only in the limitof small (infinitesimal) strains all stress measures tend to coincide and Pij rarr σij

The above form of the first variation looks quite similar to the small-strain version cf (86)Consequently applying a finite element discretizatio of Bubnov-Galerkin type leads to an FEgoverning equation analogous to (815) That is we again arrive at

Fint(Uh) minusFext = 0 (259)

this time with

F ainti = intΩPij(F h)Na

j dV and F aexti = intΩρ0biN

adV + intpartΩN

tiNadS (2510)

In a nutshell the linearized and finite variational problems result in the same system of equa-tions (259) For the special case of linearized kinematics we have Pij rarr σij so that we recoverthe small-strain version (815) Otherwise the above problem is generally nonlinear (even whenconsidering 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 significantnonlinearity and dependence on U In the above variational formulation we assumed that t =const ie that the externally applied forces are constant and do not depend on deformation Asdiscussed in Section 211 that may not always be the case and especially in finite deformationsit is oftentimes not the case eg consider pressure loading t = pn where n is the deformedsurface normal depending on the deformation and hence on U In such cases one needs torevise the external force term appropriately (For pressure loading eg we know the work doneby pressure is Wext = pv which must replace the traction term in the above total potentialenergy)

Despite all the above differences between large and small strains the key take-home messageis that the general finite element setup is fully analogous between both formulations In bothcases we seek displacement field solutions within the same function space and the governingequations are analogous In fact the above description of quasistatics can be extended todynamics again arriving at

MU +Fint(Uh) minusFext = 0 (2511)

with the consisten mass matrix M now having components

Mabij = δij int

Ωρ0N

aN bdV (2512)

Since the overall setup is equivalent this also implies that all finite element concepts discussedso far can be applied to finite-deformation problems That is all element types quadraturerules solvers etc are fully applicable here as well

129

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

252 Thermal problems

The second extension we would like to discuss aims at solving a thermal problem To this endlet us neglect mechanical boundary value problems and instead discuss how temperature evolvesin a body with heat sources and sinks heat conduction and heat fluxes across its boundaryTo give the punchline right away we will again observe that we can repurpose all our finiteelement tools to this new setting which admits the numerical solution of thermal problems Thereason is that as mentioned before mechanical thermal and also electromagnetic variationalproblems have a common structure of their governing equations (see Section 71)

For a thermal problem in d dimensions we aim to find the generally time-dependent temper-ature field

T = T (x t) (2513)

by solving the strong form

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

κnabla2T + ρs = ρcvT in Ω

T = T on partΩD

q = minusκnablaT sdotn = q on partΩN

T = T0 at t = 0

(2514)

with the following variables

κ equiv thermal conductivity (assuming Fourierrsquos law of heat conduction)

ρ equiv mass density

s equiv heat source (or sink) per mass

cv equiv specific heat

T equiv Dirichlet boundary conditions (imposing a temperature field on the boundary)

q equiv Neumann boundary conditions (imposing a heat flux across the boundary)

q equiv heat flux

n equiv outward unit normal vector on a surface

(2515)

Let us first consider the time-independent problem for simplicity (ie we take ρcvT rarr 0) Inthis case the resulting steady-state problem has a variational structure with the total potentialenergy defined by the functional I ∶ U rarr R with

I[T ] = intΩ(κ

2∥nablaT ∥2 minus ρsT) dV + int

partΩNq T dS (2516)

This functional indicates that we need to weak seek solutions T = T (x) from within the space

U = T isinH1(Ω) ∶ T = T on partΩD and U0 = δT isinH1(Ω) ∶ δT = 0 on partΩD (2517)

which is analogous to the mechanical problem ie we seek solutions from within the samefunction space (except that we now look for a scalar-value field T instead of the vector-valueddisplacement field u which simplifies relations even)

We know that the solution must render I[T ] stationary so we compute the first variation as

δI[T ] = intΩ(κTiδTi minus ρs δT ) dV + int

partΩNq δT dS = 0 for all δT isin U0 (2518)

130

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and we read out the weak form

G[T v] = intΩ(κTivi minus ρs v) dV + int

partΩNq v dS = 0 for all v isin U0 (2519)

Notice that the last term (due to the work by external fluxes) has a plus instead of the usualminus sign in the mechanical problem This arises because of the minus sign in the definitionof fluxes q = minusκnablaT To see this let us apply the divergence theorem to the first term andrearrange terms (with δT = 0 on partΩD) to reformulate the first variation as

δI[T ] = minusintΩ(κTii + ρs) δT dV + int

partΩN(κTini + q) δT dS = 0 for all δT isin U0 (2520)

This must hold for all admissible variations δT isin U0 Therefore (2520) is equivalent to stating

κnabla2T + ρs = 0 in Ω minusκnablaT sdotn = q on partΩN and T = T on partΩD (2521)

Ergo the signs are correct as we recover the (time-independent) strong form (2514) We henceconclude that extremal points T isin U of (2516) are indeed guaranteed to satisfy the governingequations (2514) and are thus classical solutions Differently put functional (2516) is thecorrect energy functional corresponding to the (static) strong form given by (2514) We canfurther show that the solution is a minimizer of I since the second variation is

δ2I[T ] = intΩκδTi δTidV = int

Ωκ ∥δnablaT ∥2 dV ge 0 for all δT isin U0 (2522)

The energy functional (2516) and the resulting weak form (2519) are quite similar to thoseof the mechanical boundary value problem To visualize this we rewrite functional I for thethermal problem for short as

I[T ] = 1

2B(TT ) minusL(T ) (2523)

with the bilinear form B and the linear form L defined by respectively

B(a b) = intΩκnablaa sdot nablab dV and L(a) = int

ΩρsadV minus int

partΩNq a dS (2524)

This form is analogous to eg that of the mechanical problem of a bar whose energy functionalwas derived as (631)

The weak form can be expressed using the above forms as

G[T v] = B[T v] minusL[v] = 0 for all δT isin U0 (2525)

Let us define a spatial finite element discretization of Bubnov-Galerkin-type viz

T h(x) =n

sumb=1

T bN b(x) vh(x) =n

suma=1

vaNa(x) (2526)

Insertion into the weak form (2525) which must hold for all choices of va allows us to deducethe governing equations as

(intΩκNa

iNbj dV )T b

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraQaint(T )

minus [intΩρsNadV minus int

partΩN

qNadS]acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Qaext

= 0 for all a = 1 n (2527)

131

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This implies a system of equations that is quite similar and fully analogous to that of linearelastic mechanical boundary value problems Specifically (2527) balances the internal heat fluxQaint(T ) due to heat conduction with the external heat flux Qaext due to heat sources and due toheat flux across the surface ndash for each node a This is of course the analog of the mechanicalsystem Fint(U) = Fext

When introducing the global vector of the unknown nodal temperatures as T = T 1 Tnthe above system conveniently shows that

Qint(T ) =KT with Kab = intΩκNa

iNbj dV (2528)

denoting the components of a conductivity matrix Note that like in linear elasticity weobserve a linear relation between Qint(T ) and vector T (which is a consequence of the assump-tion of Fourierrsquos law of heat conduction which is linear itself) This results in a linear systemof equations KT =Qext to be solved for the nodal temperatures

When considering time-dependent thermal problems we must extend the above to includetime dependence in the temperature field T = T (x t) Without showing all details (one canderive this form eg from the principle of virtual work) we arrive at the governing equation

CT +Qint(T ) minusQext(t) = 0 (2529)

with a matrix C that is similar to the mass matrix and has components

Cab = intΩρcvN

aN bdV (2530)

The time derivative can be approximated eg by using finite differences which leads to atime-incremental problem as in the dynamic FEA formulation of Section 22

We close by pointing out that (2529) bears great similarity to the dynamic mechanical FEgoverning equations of Section 22 and we seek solutions from within the same function space(except replacing vector-valued displacements by scalar-valued temperatures) As a conse-quence all element types quadrature rules solvers etc that we derived for mechanical (initial)boundary value problems are fully applicable here as well We may thus conveniently re-purposeour FE tools for the analysis of thermal problems

Shown below is an example of solution of the steady-state heat equation illustrating the tem-perature field in a pump casing model (more information can be found online)

132

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

26 Error analysis and adaptivity common mistakes

Having discussed the finite element method the equations to be solved the ways in which acontinuous problem is turned into a discrete one and the various choices of element typesquadrature rules solvers etc to be made it is important to understand the potential errorsources and ways to reduce errors In this section we first discuss the numerical error sourcesinherent in the finite element method then introduce mesh adaptivity and error estimates andfinally review common pitfalls in FE analysis

261 Finite element error analysis

Solving (initial) boundary value problems by the finite element method introduces numeroussources of errors that one should be aware of

(i) The discretization error (also known as the first fundamental error) arises fromdiscretizing the domain into elements of finite size h As a result the body Ω is notrepresented correctly and the model (eg the outer boundary) may not match the trueboundary partΩ (eg think of approximating a circular domain Ω by CST or Q4 elementswith straight edges) This error can be reduced by mesh refinement (and we discussedr-refinement h-refinement p-refinement and hp-refinement in Section 10)

(ii) The numerical integration error results from the application of numerical quadraturefor the evaluation of element force vectors and stiffness matrices in general as discussedin Section 17 (unless in exceptional cases like the simplicial elements integration can becarried out exactly)

intΩef(ξ)dξ cong

nQP

sumq=1

Wqf(ξq) (261)

For an integrand f isin Ck+1(Ω) the error in 1D is bounded by

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQP

sumq=1

Wq f(ξq)RRRRRRRRRRRle C ∥Ω∥hk+1 max

ξisin[minus11]∣α∣=k+1

∥Dαf(ξ)∥ (262)

with an element-dependent constant C gt 0 In other words the error due to numericalquadrature grows with element size h as hk+1 The error is smaller the smoother thefunction f to be integrated (The extension to higher dimensions is analogous) Hencethe numerical integration error depends on the smoothness of the integrand and calls fora proper choice of the integration order

(iii) The solution error stems from numerically solving linear systems TUh = F In generalthe accuracy of the solution depends on the condition number of the matrix

κ = ∥T ∥ sdot ∥T minus1∥ = ∣λmax

λmin∣ (263)

with λmax (λmin) being the largest (smallest) eigenvalue of T The higher the conditionnumber the larger the numerical errorA 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 alinear elastic simulation it is advisable to normalize elastic constants by 1 GPa insteadof assigning eg E = 210 sdot 109 (instead use E = 21 and know that your results will be in100 GParsquos)

133

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(iv) An approximation error is introduced by approximating the functional space U (inwhich to find the solution u(x)) by a finite-dimensional subspace Uh sub U As an example consider an exact solution u(x) in 1D which is approximated by a piece-wise linear polynomial function uh(x) The bar hanging from the ceiling under its ownweight was one such example for which the solution was found to be exact at the nodeswith an error e(x) = u(x)minus uh(x) arising within elements Therefore we can find a pointz within each element such that

parte

partx(z) = 0 for xi le z le xi+1 (264)

Consequently we can expand the error to find the solution at a node as

e(xi) = 0 = e(z) + (xi minus z)parte

partx(z) + (xi minus z)2

2

part2e

partx2(z) +O((xi minus z)3) (265)

Using (264) we find that

e(z) = minus(xi minus z)2

2

part2e

partx2(z) +O(h3) (266)

Note that

(xi minus z)2 le (xi+1 minus xi2

)2

= h2

4 (267)

where h denotes the nodal spacing Altogether we have thus shown that the maximumerror in an element is bounded by

∣e(x)∣max leh2

8max

xilexlexi+1

∣part2u

partx2∣ (268)

As shown in Appendix C the above error bound can be significantly generalized Forpolynomial shape functions of order k and u isinHk+1(Ω) we have

∣uh minus u∣H1(Ω) lehk

πk∣u∣Hk+1(Ω) and ∥uh minus u∥H1(Ω) le ch

k ∣u∣Hk+1(Ω) (269)

using Sobolev norms In simple terms the error is again determined by the smoothnessof the function to be interpolated and it is expected to decrease with decreasing elementsize (as hrarr 0) ndash the faster the higher the interpolation orderNote that special caution is required if stress concentrations of any kind are to be rep-resented (eg imagine a linear elastic fracture problem and the issues arising from usingpolynomial-type elements to capture the stress singularity near the crack tip)

(v) A truncation error is made by every computer when storing and operating numericvalues with only a finite number of digits (eg floats doubles etc) This is unavoidableand one should be aware of what this error is (especially when choosing eg solvertolerances) Choosing a solver tolerance ε in itself produces truncation error becausewe contend with a solution U that satisfies ∣Fint(U) minusFext∣ le ε (instead of being zero)

(vi) Finally no simulation is free of modeling errors which refers to the large collectionof errors made by the selection of the analytical model to be solved (before starting anynumerical approximation) For example we make choices about an appropriate materialmodel choose material parameters boundary conditions and geometric simplificationsincluding reductions to lower dimensions (eg plane strain or plane stress instead of a 3Dsimulation) Any such decision is prone to introducing errors

The sum of all of the above error sources makes up the numerical error inherent in everysimulation

134

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

262 Smoothing and adaptivity

Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (egthe stress and strain fields in case of simplicial elements) and computes a smooth approximationdefined by smoothed nodal values of the discontinuous quantities

In case of simplicial elements the stresses and strains are constantwithin elements Here one can define nodal quantities eg as

(εa)lowast =sumnnbj=1 εejVejsumnnbj=1 1Vej

(2610)

where the element quantities εe of all nnb neighboring elementsmeeting at a node a are weighted by the respective element volumeVe This weighting results in smaller elements (whose quadraturepoints are closer to the node) having a larger weight than largeelements (where quadrature points are far from the node)

a (e )

ee5+

+

++

+ee1

ee2ee3

ee4

In case of higher-order elements such as eg the Q4 element one can extrapolate elementquantities that are defined at the quadrature points ξk to the nodes For example for the Q4element there are four nodes and four quadrature points so that one can uniquely solve forthe four nodal values Once the smoothed nodal values are known one again uses a smooth-ing relation like (2610) with the element quantities εej replaced by the nodal value εae fromthe respective element and element volume Ve replaced by the nodal weight (obtained fromextrapolating the quadrature point weights WqJqt to the nodes)

When performing adaptive mesh refinement we need an error norm where as an example wediscuss the ZZ error estimator named after its inventors Zienkiewicz and Zhu If we usea smoothing scheme like the above we can define smoothed continuous strains εlowast which iscontrasted with the approximate solution εh so that one may define the error per element e byusing the energy norm viz

∥ε minus εlowast∥2e = int

ΩeW (εlowast minus ε)dV (2611)

Note that this definition is not unique and one could also use the L2-norm

∥ε minus εlowast∥2e = int

Ωe∥εlowast minus ε∥2

dV (2612)

or any other sensible norm These norms indicate the quality of a solution εh (if the solutionto be found is smooth or if the mesh is very fine then the piecewise constant solution εh canbe expected to be close to the interpolated smoothed solution εlowast)

In order to define an element-wise error estimate it makes senseto introduce the normalization

ηe =∥ε minus εlowast∥e

∥ε minus 0∥e + ∥ε minus εlowast∥e (2613)

ie the error is divided by the energy in the element so as to notover- or underestimate element errors based on element sizes as wellas in case of vast differences in element strain energies (the abovedenominator may be interpreted as an expansion for small errorsand avoids division by zero)

he

e

e

he

135

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The mesh refinement criterion states that an element e is refined if

ηe gt ηtol (2614)

with some tolerance ηtol determined as a compromise between accuracy and efficiency Basedon the above refinement criterion a set of elements flagged for refinement is identified after asolution uh has be found The elements of highest error ηe are refined and the error estimatesare re-evaluated until sufficiently low element errors are achieved

Needed next is a mesh refinement algorithm For example a frequent choice for triangularelements is longest edge bisection which identifies the longest edge in an element to berefined and inserts a new node at this edgersquos midpoint followed by an update of the elementconnectivity (thus replacing two existing elements by four new elements as schematically shownbelow) Note that this involves some book-keeping since adjacent elements flagged for refinementinterfere so that one needs an algorithmic decision about which elements to refine first and howto handle adjacent elements identified for refinement etc

element to be refined new node inserted atlongest-edge midpoint

new elements createdby connecting nodes

263 Common errors

As Cook Malkus Plesha and Wit put it in their FEA textbook man-made errors in FEAanalysis usually result from unfamiliarity of the user with (i) the physics of the problem (ii) theelement type and its behavior (iii) the limitations of the chosen analysis method and (iv) thesoftware being used Although it is difficult to list all possible error sources in FE analysis letus mention a few common pitfalls to be avoided

poor mesh quality is a very frequent error source The mesh size must be appropriatelyfine (eg one cannot hope to accurately represent stress concentrations near notches orcorners by a few large elements as was done in the Sleipner A oil platform examplediscussed at the very beginning see the mesh shown below) Gradients in mesh sizeshould be smooth rather than abrupt for improved accuracy of solutions Caution isrequired when mixing element types While this is generally possible there must not beany ldquohangingrdquo or unconnected nodes or element edges with different numbers of nodeswhen seen from both adjacent elements One should also avoid large element distortionssince this can lead (through the Jacobian J) to a considerable loss in accuracy Distortionsinclude large aspect ratios poorly shaped elements strongly curved or warped elementsetc For the same reason one should avoid warping of elements in 3D Several examplesare shown below

poor mesh (strong constrast)

better mesh (smooth gradient)poor mesh used in the

Sleipner A study

136

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

poor aspect ratio

ab

near-triangle Q4 off-centered mid-nodes

highly skewed element near-triangle Q4 strongly curved edge

warped Q8 element

Q8

CST

bad element combination

Many codes define the so-called Jacobian ratio j in order to quantify the distortion ofan element When using numerical quadrature all fields of interest are only evaluatedat the quadrature points (q = 0 nQP minus 1) which is where one needs to calculate theJacobian J(ξq) = detF (ξq) The Jacobian ratio of an element e is thus defined as

je =maxq J(ξq)minq J(ξq)

(2615)

ie we compare the minimum to the maximum value of the Jacobian within an elemente Ideally for an undistorted element we have J(ξq) = conts and hence maxq J(ξq) =minq J(ξq) or je = 1 If je ne 1 then the element is distorted ndash the more the further je isaway from 1

wrong element types are a common reason for trouble (eg us-ing structural vs solid elements or using 2D vs 3D elements) 2Delements can effectively be used only if the problem is plane-strainor plane-stress (and the element thickness must be set correctly)Structural elements are significantly more efficient than solid el-ements but they come with strong limitations and eg cannotaccurately represent stress concentrations encountered near sharpcorners (as shown on the right)

solid model beam model

stress concentration

linear vs nonlinear analysis are deformations expected to be large or small (so thatfinite or infinitesimal strains can be used respectively) Is the material model linearelastic or should a finite-deformation model be used

boundary conditions must be chosen appropriately (at the right locations of the righttype and magnitude) If symmetries can be exploited only a reduced system can bemodeled efficiently but boundary conditions must be chosen correctly and it must beensured that the solution is indeed symmetric (eg when studying buckling problemsthe assumption of symmetry automatically rules out asymmetric buckling modes thesame applies to vibrational eigenmodes)

step sizes (ie the load step size in quasistatic studies and the time step size ∆t indynamic studies) must be chosen to ensure convergence and stability of the solver

units must be chosen properly and entered consistently (eg always stick to SI units ndashbut bare in mind the problems associated with large numbers cf Section 261)

the interpretation of results requires caution Are color plots of fields of interest theraw data or smoothed fields Are the units correct are global or local coordinates being

137

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

used for eg the definition of tensor components Can a simple test case be comparedto an analytical or simplified solution

All commercial FEA codes have internal sanity checks which eg for an implicit analysisverify that the tangent or stiffness matrix has no zero diagonal entries The occurrence of suchwould imply eg nodes that are not connected to any element duplicated nodes or materialmoduli 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(eg a Riks path-following or line-search solver rather than a Newton-Raphson-type solver)The same applies to structures with mechanisms (ie zero-energy modes that are not rigid-body modes) For example discretizing a long bar into several 2-node bar elements leads tomechanisms since the 2-node bar element has only axial stiffness To identify the cause of zeroeigenvalues of the stiffness matrix it may be insightful to visualize the corresponding eigenmode

138

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

27 FEM ndash Extensions amp Applications

Through this Introduction to FEA we have discussed the foundations of the finite elementmethod and its applications particularly for solid and structural analysis within the frameworkof linearized kinematics (small strains) and primarily within linear elasticity with extensionsto (small-strain) inelastic behavior In this final section we would like to briefly point outextensions of the basics introduced so far along with practical hints

commercial codes most commercially available FE codes follow a similar structure tothe one discussed here in class as well as during exercises The FEM software providestools for assembling and solving boundary value problems further implementations ofthe most common element types and material models If the user cannot use existingimplementations then there is the common option to implement onersquos own element (so-called user element or UEL) or onersquos own material model (so-called user material modelor UMAT) The UMAT is usually the simpler and most often used option It is of utmostimportance to adhere to the exact strain and stress measures used in the code sinceconfusion thereof leads to nonsensical results In addition most commercial codes do nothave a variational basis and instead define the constitutive law as a relation between strainand stress rates (σ vs ε) or increments ( dσ vs dε) Especially at large strains it isagain essential to adhere to the correct rates or increments (there is a myriad of alternatedefinitions that can be used) improper use of non-conjugate rates is a common pitfall ofcommercial codes14

static vs dynamic FEA if at all possible a quasistatic implicit solution of mechanicalboundary value problems is generally preferable as it ensures that an equilibrium solutionhas been found However this may not always be possible eg because no consistenttangent T is available (because the material model lacks an analytical form of Cijkl orbecause the element implementation does not permit the analytical calculation of thetangent matrix T ) or because the tangent matrix is so large that its calculation and storageis disadvantageous if not impossible computationally We note that an approximatetangent matrix can always be compute numerically by employing finite differences

T abij (U) =partF ainti

partubj(U) asymp

F ainti(U + δebj) minus F ainti(U)δ

(271)

with vector ebi = (0 010 0)T of the length of U with a 1 placed at the locationof component ubj and 0 lt δ ≪ 1 This procedure has the disadvantage that it is compu-tationally expensive (the numerical calculation of T requires perturbing each and everyentry 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 replacethe static simulation to solve for U by a dynamic one to solve for U(t) including sufficientdamping leads to solutions that converge over time to a steady-state Uinfin = limtrarrinfinU(t)and it is expected that this steady state coincides with the static solution ie Uinfin = U Such solvers must be used with caution First it is important to check if the solution hasindeed converged over time (if vibrations or waves are still present in the solution thosemay over- or under-predict local strains and stresses by considerable amounts) Secondunless in a static linear elastic study (which surely should not be solved dynamically butstatically since an analytical tangent is available) the dynamic solver may converge toone of many equilibrium solutions and depending on the initial conditions may take onequite far from the sought solution

14Studies of errors resulting from improper use of rates can be found here and here

139

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

large deformations in this course we focused on linearized kinematics (commonly re-ferred to as ldquosmall strainsrdquo and valid up to at the very most a few percent strain)When larger deformations are to be considered one must employ a finite-strain formu-lation (eg working with deformation and velocity gradients as well as finite-kinematicsstress measures) As a consequence nodal element forces depend not only on the stressesinside the element but also the current deformed state of the element This in turn leadsto the tangent matrix T containing both material stiffness and as a new contributiongeometric stiffness Therefore even when assuming linear elastic material behaviorthe resulting problem is not linear and T is not constant in general As a further conse-quence one may experience mechanical instability and bifurcation which is problematicfor numerical solvers (as also discussed further below for damage and failure)

total-Lagrangian vs updated-Lagrangian so far we only discussed finite elementswhose initial geometry remains unchanged during a simulation For example even thoughloads vary with time we always use the same reference configuration of an element This iscalled a total-Lagrangian formulation By contrast we could also update the referenceconfiguration after each solution step ie once U(tα) has been found we update all nodalpositions xa(tα)larr xa(tα)+ua(tα) recompute the shape functions and ndash at the next timestep tα+1 solve for U(tα+1) based on the new reference configuration This approach isemployed to avoid large mesh distortions and is referred to as updated-LagrangianWhile both have their advantages and disadvantages one computational challange of theupdated-Lagrangian implementation is the accummulation of numerical errors over timeA further alternative generally used in fluid mechanics is the Eulerian formulation inwhich all governing equations are formulated in the currentdeformed configuration

incompressibility especially in large deformations the assumption of incompressibility(ie of zero volume change) is common when modeling eg problems of rubber elastic-ity or generally of soft matter such as tissues and polymers but also in metal plasticityModeling incompressibility is not straight-forward since it imposes a constraint on thedeformation within elements (the nodal dofs of an element are no longer independentsince the element must maintain a constant volume under incompressible deformation)This case calls for a special type of element that can handle incompressibility such asthe so-called family of augmented finite elements or mixed finite elements whichhave mixed dofs including both displacements and the pressure inside the element Theseelements are often referred to as PkQl elements where k denotes the order of interpo-lation of the displacement field while l stands for the polynomial interpolation order ofpressure (and one generally seeks l le k) Common choices of lowest order are eg P1Q0and P1Q1

singularities the FE method is based on polynomial shape functions to interpolateall fields of interest When boundary value problems involve singularities (such as themechanical fields around a crack tip or a sharp notch or the thermal fields around apoint heat source) then the polynomial interpolation inherently cannot lead to a goodapproximate solution As a consequence results are usually mesh-dependent the smallerthe elements (eg at the crack tip) the higher the calculated stress values within thoseelements adjacent to the crack tip It is for this reason that classical FEM is problematicwhen dealing with fracture problems (or generally any problem involving singularities)and results must be interpreted with utmost care An h-convergence study usually revealsthe diverging solution quickly

As a remedy techniques like the extended FE method (XFEM) have been introducedwhich enrich the interpolation space Uh by singularities of the expected type For examplefor fracture problems within linearized kinematics the stress is expected to diverge as

140

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1radicr at the crack tip with r gt 0 being the distance from the tip Hence including shape

functions of this type allows the interpolation to capture the diverging mechanical fieldsthus removing the singularity and yielding reasonable solutions

damage and failure when a material model includes damage or failure it generallysoftens under increasing loads (as the material suffers from damage its stiffness ultimatelytends to zero under increased loading) Such behavior also causes numerical difficultiesbecause the softening branch of the stress-strain response leads to instability (eg mostiterative solvers fail when the tangent matrix T is no longer positive-definite which isgenerally the case during mechanical softening) This manifests not only in solver failurebut also in mesh-dependence (again a study of h-convergence should reveal such issues)

141

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

A Vector Spaces

We define a set Ω as a collection of points X isin Ω

We further say Ω is a (proper) subset of all space if Ω sube Rd in d dimensions (proper if Ω sub Rd)

We usually take Ω to be an open set ie Ω cap partΩ = empty with boundary partΩ

Deformation and motion are described by a mapping

ϕ ∶ X isin Ωrarr ϕ(X) isin Rd or ϕ ∶ Ωrarr Rd (A1)

where Ω is the domain and Rd the range of ϕ The mapped (current) configuration of Ω isϕ(Ω)

Every function f(x) ∶ Rrarr R is a mapping from R to R

We call a mapping injective (or one-to-one) if for each x isin ϕ(Ω) there is one unique X isin Ωsuch that x = ϕ(X) In other words no two points X isin Ω are mapped onto the same positionx A mapping is surjective (or onto) if the entire set Ω is mapped onto the entire set ϕ(Ω)ie for every X isin Ω there exists at least one x isin ϕ(Ω) such that x = ϕ(X) If a mapping is bothinjective and surjective (or one-to-one and onto) we say it is bijective A bijective mapping isalso called an isomorphism

For example ϕ ∶ Ωrarr Rd is injective whereas ϕ ∶ Ωrarr ϕ(Ω) would be bijective

For time-dependent problems we have ϕ ∶ ΩtimesRrarr Rd and x = ϕ(X t) This describes a familyof configurations ϕ(Ω t) from which we arbitrarily define a reference configuration Ω for whichϕ = id (the identity mapping)

A linearvector space Ω+R sdot is defined by the following identities For any uvw isin Ωand αβ isin R it holds that

(i) closure α sdotu + β sdot v isin Ω

(ii) associativity wrt + (u + v) +w = u + (v +w)(iii) null element exist 0 isin Ω such that u + 0 = u(iv) negative element for all u isin Ω exist minusu isin Ω such that u + (minusu) = 0

(v) commutativity u + v = v +u(vi) associativity wrt sdot (αβ) sdotu = α(β sdotu)

(vii) distributivity wrt R (α + β) sdotu = α sdotu + β sdotu(viii) distributivity wrt Ω α sdot (u + v) = α sdotu + α sdot v

(ix) identity 1 sdotu = u

examples

Rd is a vector space By contrast Ω sub Rd is not a vector space since ndash in general ndash itviolates eg (i) closure and (iv) null element

P2 = ax2+bx+c ∶ a b c isin R is the space of all second-order polynomial functionsor an ordered triad (a b c) isin R3 More generally Pk(Ω) is the space of all kth-orderpolynomial functions defined on Ω Pk(Ω) is a linear space

We call P2 a linear subspace of Pk with k ge 2 and we write P2 sube Pk

142

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

B Function Spaces

Consider a function u(x) ∶ Ωrarr R and Ω sub R

u is continuous at a point x if given any scalar ε gt 0 there is a r(ε) isin R such that

∣u(y) minus u(x)∣ lt ε provided that ∣y minus x∣ lt r (B1)

A function u is continuous over Ω if it is continuous at all points x isin Ω

u is of class Ck(Ω) with an integer k ge 0 if it is k times continuously differentiable over Ω (ieu possesses derivatives up to the kth order and these derivatives are continuous functions)

Examples

Functions u(x) isin Pk with k ge 0 are generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks shocks etc (or discontinuities in the BCsICs) weusually assume the solution fields are Cinfin(Ω) so we may take derivatives otherwise derivativesexist almost everywhere (ae)

To evaluate the global errors of functions we need norms

Consider a linear space U +R sdot A mapping ⟨sdot sdot⟩ ∶ U times U rarr R is called inner product onU times U if for all u vw isin U and α isin R

(i) ⟨u + vw⟩ = ⟨uw⟩ + ⟨vw⟩(ii) ⟨u v⟩ = ⟨v u⟩

(iii) ⟨α sdot u v⟩ = α ⟨u v⟩(iv) ⟨uu⟩ ge 0 and ⟨uu⟩ = 0hArr u = 0

A linear space U endowed with an inner product is called an inner product space

Examples

⟨uv⟩ = uivi = u sdot v defines an inner product for uv isin Rd

The L2-inner product for functions u v isin U with domain Ω

⟨u v⟩L2(Ω) = intΩu(x) v(x)dx and often just ⟨u v⟩ = ⟨u v⟩L2(Ω) (B2)

Note that if ⟨u v⟩ = 0 we say u and v are orthogonal

Examples

Legendre polynomials

pn(x) =1

2nn

dn

dxn(x2 minus1)n so that p0 = 1 p1 = x p2 =

1

2(3x2 minus1) (B3)

orthogonality on Ω = (minus11)

int1

minus1pn(x)pm(x)dx = 2

2n + 1δmn (B4)

143

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

trigonometric functions

pn(x) = cos(πnxL

) (B5)

orthogonality on Ω = (minusLL)

intL

minusLpn(x)pm(x)dx =

⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩

2L if m = n = 0

L if m = n ne 0

0 else

(B6)

Now we are in place to define the distance between x1 and x2

d(x1 x2) =radic

⟨x1 minus x2 x1 minus x2⟩ (B7)

We need this concept not only for points in space but also to define the closeness or proximityof functions

Consider a linear space U +R sdot A mapping ∥sdot∥ ∶ U rarr R+ is called a norm on U if for allu v isin U and α isin R

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (triangle inequality)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥(iii) ∥u∥ ge 0 and ∥u∥ = 0 hArr u = 0

A linear space Ω endowed with a norm is called a normed linear space (NLS)

Examples of norms

Consider the d-dimensional Euclidean space so x = x1 xdT Then we define

ndash the 1-norm ∥x∥1 = sumdi=1 ∣xi∣

ndash the 2-norm ∥x∥2 = (sumdi=1 ∣xi∣2)12

(Euclidean norm)

ndash the n-norm ∥x∥n = (sumdi=1 ∣xi∣n)1n

ndash the infin-norm ∥x∥infin = max1leilen ∣xi∣

Now turning to functions the Lp-norm of a function u ∶ Ωrarr R

∥u∥Lp(Ω) = (intΩup dx)

1p

(B8)

The most common norm is the L2-norm

∥u∥L2(Ω) = ⟨uu⟩12L2(Ω)

= (intΩu2(x)dx)

12

(B9)

Furthermore notice that

∥u∥Linfin(Ω) = ess supxisinΩ

∣u(x)∣ (B10)

where we introduced the essential supremum

ess supxisinΩ

∣u(x)∣ =M with the smallest M that satisfies ∣u(x)∣ leM for ae x isin Ω (B11)

144

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Now that we have norms we can generalize our definition of the distance If un u isin U equippedwith a norm ∥sdot∥ ∶ U rarr R then we define the distance as

d(un u) = ∥un minus u∥ (B12)

Now we are in place to define the convergence of a sequence of functions un to u in U wesay un rarr u isin U if for all ε gt 0 there exists N(ε) such that d(un u) lt ε for all n gt N

Examples

Consider un isin U = P2(Ω) with L2-norm and Ω sub R

un(x) = (1 + 1

n)x2 rarr u(x) = x2 since d(un minus u) =

1

nint x2 dx (B13)

with u isin U = P2(Ω) For example for d(un minus u) lt ε we need n gt N = intΩ x2 dxε

Fourier series

u(x) =infin

sumi=0

ci xi rArr un(x) =

n

sumi=0

ci xi such that un rarr u as nrarrinfin (B14)

Given a point u in a normed linear space U a neighborhood Nr(u) of radius r gt 0 is definedas the set of points v isin U for which d(u v) lt r Now we can define sets properly

A subset V sub U is called open if for each point u isin V there exists a neighborhood Nr(u) whichis fully contained in V The complement V of an open set V is by definition a closed set Theclosure V of an open set V is the smallest closed set that contains V In simple terms a closedset is defined as a set which contains all its limit points Therefore note that

supxisinΩ

∣u(x)∣ = maxxisinΩ

∣u(x)∣ (B15)

For example (01) is an open set in R [01] is a closed set and [01] is the closure of (01)

A linear space U is a complete space if every sequence un in U converges to u isin U In simpleterms the space must contain all limit points

A complete normed linear space is called a Banach space ie U +R sdot with a norm ∥sdot∥ andun rarr u isin U A complete inner product space is called a Hilbert space

Note that ∥sdot∥ = ⟨sdot sdot⟩12 defines a norm Hence every Hilbert space is also a Banach space (butnot the other way around)

As an example consider U = Pn (the space of all polynomial functions of order n isin N) This is alinear space which we equip with a norm eg the L2-norm It is complete since (an bn cn )rarr(a b c ) for a b c isin R And an inner product is defined via ⟨u v⟩ = intΩ uv dx With allthese definitions U is a Hilbert space

We can use these norms to define function spaces eg the L2-space of functions

L2(Ω) = u ∶ Ωrarr R ∶ intΩu2 dx ltinfin (B16)

We say L2(Ω) contains all functions that are square-integrable on Ω

145

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Examples

u ∶ Ωrarr R with u isin Pk(Ω) and ess supxisinΩ ∣u(x)∣ ltinfin Then u isin L2(Ω)

f ∶ Rrarr R with f(x) = xminus2 is not in L2(Ω) if 0 isin Ω

Piecewise constant functions u (with ess supxisinΩ ∣u(x)∣ ltinfin) are square-integrable and thusin L2

Note that we can write alternatively

L2(Ω) = u ∶ Ωrarr R ∶ ∥u∥L2(Ω) ltinfin (B17)

146

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

C Approximation Theory

Motivation in computational mechanics we seek approximate solutions uh(x) = sumNa=1 uaNa(x)eg a linear combination of basis functions Na(x) with amplitudes ua isin R

Questions How does uh(x) converge to u(x) if at all Can we find an error estimate ∥uh minus u∥What is the rate of convergence (how fast does it converge cf the truncation error argumentsfor grid-based direct methods)

Fundamental tools for estimating errors are the Poincare inequalities

(i) Dirichlet-Poincare inequality

inth

0∣v(x)∣2 dx le chint

h

0[vprime(x)]2

dx if v(0) = v(h) = 0 (C1)

with a constant ch gt 0 that depends on the interval size h

(ii) Neumann-Poincare (or Poincare-Wirtinger) inequality

inth

0∣v(x) minus v∣2 dx le chint

h

0[vprime(x)]2

dx with v = 1

hint

h

0u(x) dx (C2)

In 1D an optimal constant can be found ch = h2π2

(iii) extension

inth

0∣v(x)∣2 dx le h

2

π2[int

h

0[vprime(x)]2

dx + ∣v(x0)∣2] with x0 isin [0 h] (C3)

Now let us use those inequalities to find error bounds Suppose a general function u(x) isapproximated by a piecewise linear approximation uh(x) Letrsquos first find a local error estimate

Consider v(x) = uprimeh(x) minus uprime(x) and note that by Rollersquos theorem

uprimeh(x0) minus uprime(x0) = 0 for some x0 isin (0 h) (C4)

Next use inequality (iii)

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprimeh(x) minus u

primeprime(x)∣2 dx (C5)

but since uh(x) is piecewise linear we have uprimeprimeh(x) = 0 so that we arrive at the local errorestimate

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprime(x)∣2 dx (C6)

Now letrsquos seek a global error estimate by using

intb

a(sdot) dx =

n

sumi=0int

xi+1

xi(sdot) dx with x0 = a xn+1 = b xi+1 = xi + h (C7)

so that

intb

a∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 intb

a∣uprimeprime(x)∣2 dx (C8)

147

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Taking square roots we see that for Ω = (a b)

∥uprimeh minus uprime∥L2(Ω)

le hπ

∥uprimeprime∥L2(Ω)

(C9)

and hence that ∥uprimeh minus uprime∥L2(Ω)

rarr 0 as hrarr 0 linearly in h

We want to write this a bit more concise Let us define the Sobolev semi-norm

∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

or for short ∣u∣k = ∣u∣Hk(Ω) (C10)

where in 1D Dku = u(k) A semi-norm in general must satisfy the following conditions

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (like for a norm)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥ (like for a norm)

(iii) ∥u∥ ge 0 (a norm also requires ∥u∥ = 0 iff u = 0 not so for a semi-norm)

Examples in 1D

from before

∣u∣H1(ab) = [intb

a∣uprime(x)∣2 dx]

12

(C11)

analogously

∣u∣H2(ab) = [intb

a∣uprimeprime(x)∣2 dx]

12

(C12)

so that we can write (C8) as

∣uh minus u∣2H1(ab) leh2

π2∣u∣2H2(ab) rArr ∣uh minus u∣H1(ab) le

h

π∣u∣H2(ab) (C13)

Hence the topology of convergence is bounded by the regularity of u Convergence withh-refinement is linear

note the special case

∣u∣2H0 = intΩu(x)2 dx = ∥u∥2

L2 (L2-norm) (C14)

We can extend this to higher-order interpolation For example use a piecewise quadraticinterpolation uh From Poincare

inth

0∣uprimeh minus u

prime∣2 dx le h2

π2 inth

0∣uprimeprimeh minus u

primeprime∣2 dx le h4

π4 inth

0∣uprimeprimeprimeh minus uprimeprimeprime∣2 dx = h

4

π4 inth

0∣uprimeprimeprime∣2 dx (C15)

Extension into a global error estimate with quadratic h-convergence

∣uh minus u∣H1(ab) leh2

π2∣u∣H3(ab) (C16)

For a general interpolation of order k

∣uh minus u∣H1(ab) lehk

πk∣u∣Hk+1(ab) (C17)

148

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Why is the Sobolev semi-norm not a norm Simply consider the example u(x) = c gt 0 Allhigher derivatives vanish on R so that ∣u∣Hk(Ω) = 0 for Ω sub R and k ge 1 However that does notimply that u = 0 (in fact it is not)

Let us introduce the Sobolev norm (notice the double norm bars)

∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

or for short ∥u∥k = ∥u∥Hk(Ω) (C18)

For example in one dimension

∥u∥2H1(Ω) = ∣u∣20 + ∣u∣21 = int

Ωu(x)2 dx + int

Ω[uprime(x)]2

dx = ∥u∥2L2(Ω) + ∣u∣2H1(Ω) (C19)

Note that this also shows that more generally

∥u∥2Hk(Ω) ge ∣u∣2Hk(Ω) (C20)

Let us derive a final global error estimate one that involves proper norms ndash here for the exampleof a piecewise linear uh Start with Poincare inequality (i)

∥uh minus u∥2L2(ab)

= intb

a∣uh minus u∣2 dx le chint

b

a∣uprimeh minus u

prime∣2 dx = ch ∣uh minus u∣2H1(ab) (C21)

and from (C19)

∥uh minus u∥2H1(Ω) = ∥uh minus u∥2

L2(Ω) + ∣uh minus u∣2H1(Ω)

le (1 + ch) ∣uh minus u∣2H1(ab) le clowasth ∣u∣2H2(ab)

(C22)

which along with (C13) gives

∥uh minus u∥H1(ab) le ch ∣u∣H2(ab) le ch ∥u∥H2(ab) (C23)

Summary and Extension of Norms

Lp-norm ∥u∥Lp(Ω) = (intΩup dx)

1p

Sobolev semi-norm ∶ ∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

= ∣u∣k

Sobolev norm ∶ ∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

= ∥u∥k

generalization ∶ ∣u∣Wkp(Ω) = [intΩ∣Dku∣p dx]

1p

= ∣u∣kp

∥u∥Wkp(Ω) = (k

summ=0

∣u∣pWmp(Ω)

)1p

= ∥u∥kp

149

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

D Sobolev spaces

The Sobolev norm is used to define a Sobolev space

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥k ltinfin (D1)

which includes all functions whose kth-order derivatives are square-integrable

Examples

Consider a piecewise linear function u isin C0 defined on Ω = (02) Then u isin H1(Ω) sincethe first derivative is piecewise constant and therefore square-integrable

Consider the Heavyside step function H(x) isin Cminus1 defined on R Then eg h isin H0(Ω)with Ω = (minus11) since the first derivative (the Dirac delta function) is not square-integrableover (minus11)

Overall note that the above examples imply that

Hm(Ω) sub Ck(Ω) with m gt k (D2)

For example if a function has a kth continuous derivative then the (k + 1)th derivative isdefined piecewise and therefore square-integrable

Higher dimensions

To extend the above concepts to higher dimensions we need multi-indices A multi-index isan array of non-negative integers

α = (α1 αn) isin (Z+0)n (D3)

The degree of a multi-index is defined as

∣α∣ = α1 + + αn (D4)

This can be used to define a monomial for x isin Rn

xα = xα11 sdot sdot xαnn (D5)

For example we can now extend our definition of polynomials to higher dimensions

p(x) isin Pk(R2) rArr p(x) =k

sumβ=0

sum∣α∣=β

aαxα (D6)

Specifically the monomials above for x isin R2 are

for ∣α∣ = 0 ∶ x0y0 = 1for ∣α∣ = 1 ∶ x1y0 x1y0 = x yfor ∣α∣ = 2 ∶ x2y0 x1 y1 x0y2 = x2 xy y2

(D7)

so that

p(x) = a(00) + a(10)x1 + a(01)x2 + a(20)x21 + a(11)x1x2 + a(02)x2

2 + (D8)

150

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that this defines a complete polynomial of degree k

Now we can use multi-indices to define partial derivatives via

Dαu = part ∣α∣u

partxα11 sdot sdot partxαnn

and D0u = u (D9)

A common notation is

sum∣α∣=β

Dαu = sumα1αnst ∣α∣=β

part ∣α∣u

partxα11 sdot sdot partxαnn

(D10)

With the above derivatives we may redefine the inner product

⟨u v⟩Hm(Ω) = intΩ

m

sumβ=0

sum∣α∣=β

DβuDβu dx (D11)

and the Sobolev norm

∥u∥Hm(Ω) = ⟨uu⟩12Hm(Ω)

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

intΩ(Dαu)2 dx

⎤⎥⎥⎥⎥⎦

12

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

∥Dαu∥2L2(Ω)

⎤⎥⎥⎥⎥⎦

12

(D12)

Letrsquos look at some examples eg consider Ω = R2 and m = 1 Then we have

D0u = u and D1u = partupartx1

partu

partx2 (D13)

so that

⟨u v⟩H1(R2) = intR2(uv + partu

partx1

partv

partx1+ partu

partx2

partv

partx2) dx1 dx2 (D14)

and

∥u∥2H1(R2) = intR2

[u2 + ( partupartx1

)2

+ ( partupartx2

)2

] dx1 dx2 (D15)

Altogether we can now properly define a Sobolev space in arbitrary dimensions

Hm(Ω) = u ∶ Ωrarr R ∶ Dαu isin L2(Ω) forall α lem (D16)

This is the set of all functions whose derivatives up to mth order all exist and are square-integrable

As an example u isin H1(Ω) implies that u and all its first partial derivatives must be square-integrable over Ω because (D15) must be finite

Let us look at the example u(x) = ∣x∣ and take Ω = (minus11) Then we have uprime(x) = H(x) (theHeaviside jump function) and uprimeprime(x) = δ(x) (the Dirac delta function) Therefore

intb

au2(x) dx ltinfin rArr u isin L2(Ω) =H0(Ω)

intb

a(partupartx

)2

dx = intb

aH2(x)dx ltinfin rArr partu

partxisin L2(Ω) and u isinH1(Ω)

intb

a(part

2u

partx2)

2

dx = intb

aδ2(x)dx =infin rArr part2u

partx2notin L2(Ω) and u notinH2(Ω)

(D17)

151

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that one usually indicates the highest order k that applies (since this is what matters forpractical purposes) so here we thus conclude that u isinH1(Ω)

From the above we also see that

Hinfin sub subH2 subH1 subH0 = L2 (D18)

Notice that even though polynomials u isin Pk(Ω) are generally in Hinfin(Ω) for any bounded Ω sub Rdthey are not square-integrable over Ω = Rd Luckily in practical problems we usually consideronly finite bodies Ω To more properly address this issue let us introduce the support of acontinuous function u defined on the open set Ω isin Rd as the closure in Ω of the set of all pointswhere u(x) ne 0 ie

suppu = x isin Ω ∶ u(x) ne 0 (D19)

This means that u(x) = 0 for x isin Ω ∖ suppu We may state eg that functions u ∶ Ω rarr R witha finite support Ω sub Rd and ess supΩ ltinfin are square-integrable over Ω

Finally let us define by Ck0 (Ω) the set of all functions contained in Ck(Ω) whose support is abounded subset of Ω Also notice that

Ck0 (Ω) subHk0 (Ω) (D20)

and

Cinfin0 (Ω) = ⋂

kge0

Ck0 (Ω) (D21)

152

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

E Operators

Energies are often defined via operators Generally we call A an operator if

A ∶ u isin U rarr A(u) isin V (E1)

where both U and V are function spaces

A simple example is

A(u) = cdu

dx (E2)

which is a (linear differential) operator requiring u isin C1

An operator A ∶ U rarr V is linear if for all u1 u2 isin U and αβ isin R

A(α sdot u1 + β sdot u2) = α sdotA(u1) + β sdotA(u2) (E3)

For example L is a linear operator in

auxx + bux = c hArr L(u) = c with L(sdot) = a(sdot)xx + b(sdot)x (E4)

Operators (such as the inner product operator) can also act on more than one function Con-sider eg an operator B ∶ U times V rarr R where U V are Hilbert spaces B is called a bilinearoperator if for all uu1 u2 isin U and v v1 v2 isin V and αβ isin R

(i) B(α sdot u1 + β sdot u2 v) = α sdot B(u1 v) + β sdot B(u2 v)(ii) B(uα sdot v1 + β sdot v2) = α sdot B(u v1) + β sdot B(u v2)

An example of a bilinear operator is the inner product ⟨sdot sdot⟩ ∶ U times U rarr R for some Hilbert spaceU

An operator A ∶ U rarr V is called symmetric if

⟨A(u) v⟩ = ⟨uA(v)⟩ for all u v isin U (E5)

Furthermore the operator is positive if

⟨A(u) u⟩ ge 0 for all u isin U (E6)

An example of a symmetric operator is A(u) = Mu with u isin Rd and M isin Rdtimesd which ispositive if M is positive-semidefinite

153

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

F Uniqueness of solutions

One of the beauties of the above variational problem () is that a unique minimizer exists bythe Lax-Milgram theorem This is grounded in (assuming ∣Ω∣ lt infin and u v isin U with someHilbert space U)

boundedness of the bilinear form

∣B(u v)∣ le C ∥u∥ ∥v∥ for some C gt 0 (F1)

For a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by the Cauchy-Schwarzinequality (using L2-norms)

∣B(u v)∣ le C ∥Gradu∥L2(Ω) ∥Grad v∥L2(Ω) le C ∥Gradu∥H1(Ω) ∥Grad v∥H1(Ω) (F2)

coercivity of the bilinear form (ellipticity)

B(uu) ge c ∥u∥2 for some c gt 0 (F3)

Again for a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by Poincarersquos inequal-ity

B(uu) = ∥Gradu∥2L2(Ω) ge c ∥u∥

2L2(Ω) (F4)

These two requirements imply the well-posedness of the variational problem and thus imply theexistence of a unique solution (or that the potential has a unique global minimizer) In simpleterms the two conditions that the functional has sufficient growth properties (ie the bilinearform has upper and lower bounds)

154

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

G Vainbergrsquos theorem

The question arises whether or not a general form like (631) always exists for any set ofPDEsODEs as governing equations Vainbergrsquos theorem helps us answer this question Con-sider a weak form

G[u v] = 0 forall v isin U0(Ω) (G1)

Let us see if G derives from a potential I via its first variation That would imply that

G(u δu) =DδuI[u] = limεrarr0

d

dεI[u + δu] (G2)

Now recall from calculus that for any continuously differentiable function f(x y) we must haveby Schwartzrsquo theorem

part

party

partf

partx= part

partx

partf

party (G3)

We can use the same strategy to formulate whether or not a weak form derives from a potentialSpecifically we can take one more variation and state that

Dδu2G(u δu1) =Dδu1G(u δu2) if and only if I[u] exists (G4)

This is known as Vainbergrsquos theorem

We can easily verify this for the general form given in (631)

G(u δu1) =Dδu1I[u] = intΩ[λGradu Grad δu1 minus S δu1] dx minus int

partΩNQ δu1 dx

rArr Dδu1G(u δ2) = intΩλGrad δu2 Grad δu1 dx =Dδu2G(u δu1)

(G5)

In simple terms (and not most generally) Vainbergrsquos theorem holds if the potential obeyssymmetry This in turn implies that the governing PDE contains derivatives of even order (suchas linear momentum balance which is second-order in both spatial and temporal derivatives orthe equilibrium equations of beams which are fourth-order in space and second-order in time)If the PDEs are of odd order (such as eg the time-dependent diffusion or heat equation) thenno direct potential I exists ndash there are work-arounds using so-called effective potentials thatwill be discussed later in the context of internal variables

Of course knowing that a variational structure exists is beneficial but it does not reveal anythingabout the actual solution u which will be obtained by solving the above system of equations

155

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

H Energy norm

For many purposes it is convenient to introduce the so-called energy norm

∣sdot∣E =radicB(sdot sdot) (H1)

For example if we find an approximate solution uh for the displacement or temperature fieldthen the error can be quantified by

∣u minus uh∣E=radicB(u minus uh uuh) (H2)

Notice that unlike for eg the Euclidean norm ∥u minus uh∥E

does not necessarily imply uminusuh = 0so that strictly speaking the above energy norm is only a semi-norm To turn it into a propernorm we need to exclude solutions corresponding to rigid-body motion (ie solutions thatimply uniform translations or rotations of the u-field but without producing gradients in u) Ifwe assume that essential boundary conditions are chosen appropriately to suppress rigid bodymotion by seeking solutions

u isin U = u isinH1 ∶ u = u on partΩD (H3)

then for this space ∥sdot∥E is indeed a proper norm

156

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

I Gauss quadrature

A systematic way to deriving Gaussian quadrature rules involves the use of Legendre polyno-mials We here give a brief overview

We start by noticing that monomials 1 ξ ξ2 ξ3 although complete are not orthogonalbasis functions We can turn them into orthogonal polynomials Pn(ξ) by eg the Gram-Schmidt orthogonalization procedure To this end let us start with

P0(ξ) = 1 (I1)

and obtain the next basis function by starting with the linear momonial ξ and computing

P1(ξ) = ξ minus⟨1 ξ⟩⟨11⟩

1 = ξ (I2)

where we used the inner product

⟨u v⟩ = int1

minus1u(ξ)v(ξ)dξ (I3)

Similarly the next higher basis function is obtained by starting from ξ2 so that

P2(ξ) = ξ2 minus ⟨ξ ξ2⟩⟨ξ ξ⟩

ξ minus ⟨1 ξ2⟩⟨11⟩

1 = ξ2 minus 1

3 (I4)

Analogously one finds

P3(ξ) = ξ3 minus 3

5ξ (I5)

By continuing analogously we create a countably infinite set of orthogonal basis functions Pn(ξ)such that

int1

minus1Pn(ξ)Pm(ξ)dξ = 0 if n nem (I6)

These polynomials are known as Legendre polynomials Note that they are defined only upto a constant so one can renormalize them which is commonly done by enforcing that Pn(1) = 1for all n The result is the well known Legendre polynomials which can alternatively be definedvia

Pn(ξ) =1

2nn

dn

dξn[(ξ2 minus 1)n] (I7)

These polynomials have another interesting feature viz by orthogonality with P0(ξ) = 1 weknow that

int1

minus1Pn(ξ)dξ = ⟨1 Pn⟩ =

⎧⎪⎪⎨⎪⎪⎩

2 if n = 0

0 else(I8)

Pn(ξ) has exactly n roots in the interval [minus11] Also for n ne 0 we know that

Pn(ξ) = minusPn(minusξ) for odd n

Pn(ξ) = Pn(minusξ) for even n(I9)

157

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Moreover Pn(0) = 0 for odd n

With this new set of basis functions we can define the Gauss-Legendre quadrature rule toenforce

int1

minus1Pk(ξ)dξ

=nQPminus1

sumi=0

Wi Pk(ξi) k = 01 2nQP minus 1 (I10)

If nQP = 1 then the solution is simple because the above equations simplify to

W0 = 2 and 0 =W0P1(ξ0) (I11)

Therefore the weight is as before W0 = 2 and the quadrature point is the root of P1(ξ) vizξ0 = 0

If nQP = 2 then the four equations to be solved are

W0 +W1 = 2 and 0 =W0P1(ξ0) +W1P1(ξ1)0 =W0P2(ξ0) +W1P2(ξ1) and 0 =W0P3(ξ0) +W1P3(ξ1)

(I12)

By analogy we choose the quadrature points to be the roots of P2(ξ) so that

P2(ξ0) = P2(ξ1) = 0 rArr ξ0 =1radic3 ξ1 = minus

1radic3 (I13)

Using Pn(ξ) = minusPn(minusξ) the above equations reduce to

W0 =W1 = 1 (I14)

Further note that Pn(0) = 0 for odd n Therefore the same procedure can be continued asfollows For an arbitrary number of quadrature points nQP the Gauss-Legendre quadraturepoints and associated weights are defined by

PnQP (ξi) = 0 wi =2

(1 minus ξ2i )[P prime

nQP(ξi)]2

i = 0 nQP minus 1 (I15)

As a check take eg nQP = 1 so that P1(ξ) = ξ with root ξ0 = 0 The weight is computed as

w0 =2

(1 minus ξ20)[P prime

nQP(ξ)]2

= 2 (I16)

as determined above Similarly for nQP = 2 we have P2(ξ) = 12(3ξ

2 minus 1) with the above roots of

plusmn1radic

3 The associated weights are computed as

w0 =2

(1 minus ξ20)[P prime

2(ξ0)]2= 2

(1 minus ξ20)[3ξ0]2

= 223

32

3

= 1 = w1 (I17)

which agrees with our prior solution in Section 1621

158

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

J Quadrature error estimates

Using numerical quadrature to approximate an exact integral introduces a quadrature errorwhich is bounded as follows For a function f(ξ) isin C2nQP (Ω) we have that (without proof here)

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQPminus1

sumk=0

Wk f(ξk)RRRRRRRRRRRle Ch2nQP max

ξisin[minus11]∣f (2nQP )(ξ)∣ (J1)

with a constant C gt 0 This shows that as can be expected the quadrature error decreases withdecreasing mesh size h and with increasing smoothness of function f The rate of convergenceunder h-refinement also depends on the smoothness of the function

The exact error depends on the chosen quadrature rule For example for Gauss-Legendrequadrature an error estimate is given by

e =22nQP+1(nQP )4

(2nQP + 1)[(2nQP )]3maxξisin[minus11]

∥f (2nQP )(ξ)∥ (J2)

159

Index

L2-norm 144h-refinement 57hp-refinement 57n-dimensional space 47p-refinement 57r-refinement 57(proper) subset 1422-node bar element 592-node beam element 664-node bilinear quadrilateral 794-node tetrahedron 758-node brick element 848-node quadratic quadrilateral 839-node quadratic quadrilateral 83

ae 143acceleration field 7action 109action principle 109amplitude 117approximation error 134assembly 62assembly operator 95augmented finite elements 140average acceleration 124 125

backward-Euler 19balance of energy 10balance of linear momentum 9Banach space 145barycentric coordinates 72basis 54basis functions 28bijective 142bilinear form 42bilinear operator 153boundary 142boundary conditions 13Bubnov-Galerkin approximation 47

CFL condition 23chicken-wire mode 94class Ck(Ω) 45 143classical solution 41closure 145collocation method 29collocation points 29commercial codes 139

complete polynomial 151complete space 145complete up to order q 55completeness property 55condensation 105condition number 133conditionally stable 25conductivity matrix 132conjugate gradient 99consistent mass matrix 111Constant Strain Triangle 75constitutive relations 8continuous at a point x 143continuous over Ω 143convergence 145Courant-Friedrichs-Levy 23Courant-Friedrichs-Levy (CFL) condition 24CST 75cubature rules 86

damage and failure 141damped Newton-Raphson method 97damping matrix 120deformation gradient 128deformation mapping 128degree 150degrees of freedom 56Direct methods 18Dirichlet boundary 13Dirichlet boundary condition 70Dirichlet boundary conditions 69Dirichlet-Poincare inequality 147discrete problem 48discretization error 133discretization errors 12displacement field 7 128distance 144 145divergence of a vector 11domain 142dummy index 7dynamic 109

eigenfrequency 115eigenmode 115elasticity tensor 8element defect 92elements 56energy norm 156

160

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

equation of motion 111error estimate 135essential supremum 144Euclidean norm 144Euler-Bernoulli beam 65Eulerian 140excitation frequency 117explicit 19explicit time integration 121extensive 11external forces 101

Fast Inertial Relaxation Engine 99FE 56FEM 56finite differences 18finite element 56Finite Element Method 56finite-difference stability 23first fundamental error 133first Piola-Kirchhoff stress tensor 129first variation 39first-derivative central difference 18forced vibrations 114 117forward-Euler 19free vibrations 114full integration 90function 142function space 37functional 37

Gauss quadrature 86Gauss-Chebyshew 88Gauss-Hermite 88Gauss-Legendre 88Gauss-Legendre quadrature 87 158Gauss-Lobatto quadrature 88Gauss-Newton method 99geometric stiffness 140ghost node 21global 53 95global error estimate 147 148global stiffness matrix 62gradient flow method 99Gram-Schmidt orthogonalization 157

heat equation 11Hermitian polynomials 67HHT method 127HHT-α 127hierarchical interpolation 64higher-order interpolation 148

Hilbert space 145hourglass mode 94

identity mapping 142implicit 19 21implicit time integration 124incompressibility 140incremental stiffness matrix 77indirect methods 27initial boundary value problem 13initial conditions 13injective 142inner product 143inner product space 143instability 141integration point 86intensive 11internal energy 10inverse function theorem 73 74isomorphism 142isoparametric mapping 71isotropy 8

Jacobian 74Jacobian ratio 137

kinetic energy 109

L2-inner product 143L2-space of functions 145Lp-norm 144Lagrange polynomials 64Lagrangian 109Lagrangian interpolation 64Laplace equation 11large deformations 140Lax-Milgram theorem 42 154Lax-Richtmyer theorem 25least squares method 30Legendre polynomials 157line search method 98linear 153linear acceleration 124 125linear elasticity 8 49 50linear form 42linear operator 13linear strain triangle 78linear subspace 142linearvector space 142local 53local energy balance 11local error estimate 147

161

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

local stiffness matrix 62local-to-global map 62locking 93longest edge bisection 136LST 78lumped mass matrix 112

mapping 71 142material points 7mathematical domain of dependence 24maximizer 41mechanical instability 138mechanisms 108 138mesh 56mesh refinement algorithm 136mesh refinement criterion 136methods of weighted residuals 29minimizer 41mixed finite elements 140modal decomposition 118modeling errors 12 134monomial 150monomials 55multi-index 150multi-indices 55

natural frequency 115Navier equation 10neighborhood 145Neumann boundary 13Neumann-Poincare 147Newmark-β 124 125Newton-Cotes 86Newton-Raphson method 96nodes 56nominal strains 8nominal stresses 8nonlinear least squares 98norm 144normed linear space 144numerical damping 125numerical domain of dependence 23numerical integration 85numerical integration error 133

one-to-one 142onto 142open 145open set 142operator 153order of a PDE 13order reduction 119

ordered triad 142orthogonal 143over-integration 91

PkQl elements 140parasitic shear 93particle-mass lumping 112period contraction 127period elongation 127Petrov-Galerkin 47phase error analysis 23Poincare inequalities 147Poisson equation 12polynomial function space 32positive 153principle of stationary action 109principle of virtual work 34 46

Q4 79Q8 83Q9 83quadratic tetrahedron 78quadratic triangle 77quadrature error 159quadrature rules 86Quasi-Newton method 97quasistatics 109

range 142Rayleighrsquos quotient 119Rayleigh-Ritz 42reduced integration 91reference configuration 7residuals 28Riemann sum 85rigid-body mode 115rigid-body modes 107rigid-body motion 107

second-derivative central difference 18selective integration 94semi-discretization 110semi-norm 148serendipity element 83set 142shape function properties 53shape functions 47 53shear locking 93shear strains 8shear stresses 8simplex 72simplicial quadrature 91

162

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

singularities 140smoothing 135Sobolev norm 38 149Sobolev semi-norm 148Sobolev space 38 150 151solution error 133solution errors 12solver tolerance 134space of all second-order polynomial functions

142square-integrable 38 145 150static vs dynamic FEA 139statics 10stationarity condition 39stencil 20strain tensor 7stress tensor 8strong form 45 49subdomain method 29subparametric mapping 71substitution 105superparametric mapping 71support 53 152surjective 142symmetric 153

tangent matrix 96Taylor expansions 18temperature field 130thermal problem 130time delay 120total-Lagrangian 140trial functions 28triangle inequality 144truncation error 134

UEL 139UMAT 139unconditionally stable 26undeformed 7under-integration 91units 133update rule 19updated-Lagrangian 140

Vainbergrsquos theorem 47 155validation 12variation 39variational calculus 37variational structure 40velocity field 7verification 12

vibrations 114Voigt notation 52von Neumann analysis 23 25

wave equation 10weak form 46 110weak solution 46Weierstrass approximation theorem 54

XFEM 140

zero-energy mode 93zero-energy modes 107zeroth derivative 46 143ZZ error estimator 135

163

  • Preface
  • Introduction Continuum Mechanics and Notation
    • Kinematics
    • Kinetics
    • Computational Mechanics
    • (Initial) Boundary Value Problems
      • Dimensionless Forms
      • Direct Numerical Methods Finite Differences
      • Stability of Finite Difference Schemes
        • CFL Condition
        • von Neumann Analysis and Phase Error Analysis
        • Direct vs Indirect Methods
          • Methods of Weighted Residuals
            • Collocation Method
            • Subdomain Method
            • Method of Least Squares
            • Higher Dimensions
            • Galerkins Method
              • Variational Calculus
                • Functionals
                • Variations
                • Rayleigh-Ritz Method
                  • The weak form
                    • Classical and weak solutions
                    • Equivalence of strong and weak forms
                    • Approximate solutions
                      • The mechanical variational problem at small strains
                        • General case
                        • Linear elasticity
                          • Interpolation spaces
                            • Shape functions
                            • Approximation power and completeness
                            • Completeness in higher dimensions
                              • The Finite Element Method
                              • Finite element spaces polynomial shape functions in 1D
                                • 2-node bar element
                                • Problem assembly
                                • Polynomial interpolation of higher order
                                  • Lagrangian interpolation
                                  • Hierarchical interpolation
                                    • 2-node beam element
                                    • A note on beam elements and boundary conditions
                                      • Shape Functions in higher dimensions
                                      • Simplicial elements
                                        • Linear Triangle (T3)
                                        • Extension to three dimensions
                                        • Finite element implementation
                                          • Special case linear elasticity
                                          • General case of non-linear elastic materials
                                            • Higher-order triangles and tetrahedra
                                              • The bilinear quadrilateral element
                                              • Higher-order elements Q8 Q9 8-node brick
                                              • Numerical quadrature
                                                • Example Riemann sums
                                                • Gauss quadrature
                                                  • Gauss-Legendre quadrature
                                                  • Other Gauss quadrature rules
                                                    • Higher dimensions
                                                      • FEM which quadrature rule to use
                                                        • Integrals in the FE context
                                                        • Which quadrature rule to use
                                                          • Element defects shear locking and hourglassing
                                                          • Assembly
                                                          • Iterative solvers
                                                            • Netwon-Raphson (NR) method
                                                            • Damped Newton-Raphson (dNR) method
                                                            • Quasi-Newton (QN) method
                                                            • Line search method
                                                            • Nonlinear Least Squares
                                                            • Gradient flow method
                                                            • Conjugate Gradient (CG) method
                                                              • Boundary conditions
                                                                • Neumann boundary conditions
                                                                • Dirichlet boundary conditions
                                                                  • Substitution
                                                                  • Condensation
                                                                    • A note on Dirichlet boundary conditions in iterative solvers
                                                                    • Rigid body motion
                                                                      • Dynamics
                                                                      • Vibrations
                                                                        • Free undamped vibrations
                                                                        • Forced vibrations
                                                                        • Modal decomposition
                                                                        • Structural damping
                                                                          • Time-dependent transient solutions
                                                                            • Explicit time integration
                                                                            • A reinterpretation of finite differences
                                                                            • Implicit time integration
                                                                              • Newmark- method
                                                                                • HHT- method
                                                                                • Use of mass matrices
                                                                                  • Extensions
                                                                                    • Finite kinematics
                                                                                    • Thermal problems
                                                                                      • Error analysis and adaptivity common mistakes
                                                                                        • Finite element error analysis
                                                                                        • Smoothing and adaptivity
                                                                                        • Common errors
                                                                                          • FEM ndash Extensions amp Applications
                                                                                          • Appendices
                                                                                          • Vector Spaces
                                                                                          • Function Spaces
                                                                                          • Approximation Theory
                                                                                          • Sobolev spaces
                                                                                          • Operators
                                                                                          • Uniqueness of solutions
                                                                                          • Vainbergs theorem
                                                                                          • Energy norm
                                                                                          • Gauss quadrature
                                                                                          • Quadrature error estimates
                                                                                          • Index
Page 4: Computational Mechanics I { Introduction to FEA

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order 64

1131 Lagrangian interpolation 64

1132 Hierarchical interpolation 64

114 2-node beam element 65

115 A note on beam elements and boundary conditions 69

12 Shape Functions in higher dimensions 71

13 Simplicial elements 72

131 Linear Triangle (T3) 72

132 Extension to three dimensions 75

133 Finite element implementation 76

1331 Special case linear elasticity 77

1332 General case of non-linear elastic materials 77

134 Higher-order triangles and tetrahedra 77

14 The bilinear quadrilateral element 79

15 Higher-order elements Q8 Q9 8-node brick 83

16 Numerical quadrature 85

161 Example Riemann sums 85

162 Gauss quadrature 86

1621 Gauss-Legendre quadrature 87

1622 Other Gauss quadrature rules 88

163 Higher dimensions 88

17 FEM which quadrature rule to use 90

171 Integrals in the FE context 90

172 Which quadrature rule to use 90

18 Element defects shear locking and hourglassing 92

19 Assembly 95

20 Iterative solvers 96

201 Netwon-Raphson (NR) method 96

202 Damped Newton-Raphson (dNR) method 97

203 Quasi-Newton (QN) method 97

204 Line search method 98

205 Nonlinear Least Squares 98

206 Gradient flow method 99

207 Conjugate Gradient (CG) method 99

21 Boundary conditions 100

211 Neumann boundary conditions 100

212 Dirichlet boundary conditions 105

2121 Substitution 105

2122 Condensation 105

213 A note on Dirichlet boundary conditions in iterative solvers 106

4

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

214 Rigid body motion 107

22 Dynamics 109

23 Vibrations 114

231 Free undamped vibrations 114

232 Forced vibrations 117

233 Modal decomposition 118

234 Structural damping 120

24 Time-dependent transient solutions 121

241 Explicit time integration 121

242 A reinterpretation of finite differences 122

243 Implicit time integration 124

2431 Newmark-β method 124

244 HHT-α method 127

245 Use of mass matrices 127

25 Extensions 128

251 Finite kinematics 128

252 Thermal problems 130

26 Error analysis and adaptivity common mistakes 133

261 Finite element error analysis 133

262 Smoothing and adaptivity 135

263 Common errors 136

27 FEM ndash Extensions amp Applications 139

Appendices 142

A Vector Spaces 142

B Function Spaces 143

C Approximation Theory 147

D Sobolev spaces 150

E Operators 153

F Uniqueness of solutions 154

G Vainbergrsquos theorem 155

H Energy norm 156

I Gauss quadrature 157

J Quadrature error estimates 159

Index 160

5

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

0 Preface

Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientistsacross all disciplines Whether it is commercial software like Abaqusreg Ansysreg and LS-Dynareg

or open-source libraries such as fenics or FEAP ndash FEA techniques are available in variousflavors and have become an essential ingredient for the analysis of mechanical thermal andmulti-physics initial boundary value problems

The availability and ease of use of FEA tools comes with a risk though the ability to producecolorful plots by the push of a button does not obviate the userrsquos expert knowledge in deploy-ing FEA tools properly and responsibly (ultimately lives could be endangered and significanteconomic losses incurred if engineering design is flawed) What element types to use whatquadrature rules to use what stress components to plot how to interpolate or extrapolate andhow to present results those are questions to be answered by the FEA user and they requirea background knowledge on what the ldquoblack box FEArdquo does for us

To turn the black box into an versatile and understandable toolbox this course discusses thefundamentals of numerical methods and in particular the finite element method Rather thanstudying and using commercial software packages we study FEA from the basics and with thegoal in mind of understanding the theoretical underpinning and the details of numerical imple-mentations This of course requires us to review the underlying mechanical and mathematicaltheory and to discuss the wide variety of finite element types and choices to be made whenusing FEA

Since no course on computational methods would be effective without a computational compo-nent we will write our own finite element code (using MATLABreg) starting with simple barand beam elements for truss and frame problems and advancing to solid elements for static anddynamic analysis Throughout the course we will complete a total of five projects that buildupon each other and grow our finite element code over time in a modular fashion ndash ultimatelyproviding a simple but versatile FEA code that is no longer a black box but whose every singleline we will understand

In order to follow the course contents is assumed that you have a background in solid andstructural mechanics (equivalent to Mechanics 1-2 and Dynamics at ETH Zurich) as well asknowledge in analysis and linear algebra We will begin with a brief review of continuummechanics and an introduction to the notation used in this course after which we will dive intothe discussion of numerical methods

I apologize in advance for any typos that may have found their way into these lecture notesThis is a truly evolving set of notes which was started in the spring semester of 2019 and hasevolved significantly over time Note that this set of notes is not meant as a complete textbookand you are encouraged to take notes during lectures Though I made a great effort to ensurethese notes are free of essential typos I cannot rule out that some have remained If you spotany mistakes feel free to send me a highlighted PDF at the end of the semester so I can makesure those typos are corrected for future years

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

Dennis M KochmannZurich March 2021

6

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1 Introduction Continuum Mechanics and Notation

11 Kinematics

We describe a body Ω sub Rd with boundary partΩ as a collection of material points Each pointhas a position x isin Ω in a Cartesian coordinate system (x1 xd) in d dimensions with origin O

Points are described by vectors with respect to O which in turn are defined by components inthe Cartesian reference frame with basis e1 ed Therefore we write

x =d

sumi=1

xiei = xiei (11)

Here and in the following we use Einsteinrsquos summation convention which implies a summationover an index that appears twice in any product (for a thorough review of index notation seethe tensor notes available online) In the above example i is a dummy index and can bereplace by any other index For example an inner product of two vectors is written as

u sdot v = (d

sumi=1

uiei) sdot⎛⎝

d

sumj=1

vjej⎞⎠=

d

sumi=1

d

sumj=1

uivi(ei sdot ej) =d

sumi=1

uivi = uivi = ukvk (12)

Likewise the norm of a vector is

∥u∥ =radicu sdotu =

radicuiui (13)

The deformation and motion of a body Ω is described bya displacement field

u = u(x t) (14)

which to every undeformed point x isin Ω in its referenceconfiguration defines a unique deformed location y isin Rdsuch that

y(x t) = x +u(x t) (15)

x1

+

x2

x3

e1

e2

e3

+

x

WparaW

y

u

From the displacement field we may derive kinematic variables such as the velocity field

v(x t) = d

dtu(x t) (16)

and the acceleration field

a(x t) = d

dtv(x t) = d2

dt2u(x t) (17)

For convenience we also use dots to denote derivatives with respect to time so that v = u anda = v = u

Deformation is best described not by the displacement field (which would also include rigidbody motion) but by the strain tensor which is a second-order tensor with components

εij =1

2(partuipartxj

+partuj

partxi) = 1

2(uij + uji) rArr ε = 1

2[gradu + (gradu)T] (18)

7

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here used index notation again and to define the second-order tensor Specifically we usedthe gradient of a vector field defined as a second-order tensor with components

[gradu]ij =partuipartxj

= uij (19)

Here and in the following a comma in an index implies differentation with respect to the spatialx-component(s) following the comma

Recall that ε11 ε22 and ε33 are the nominal strains along in the three coordinate directionsof an infinitesimal cube of material εij (with i ne j) by contrast represent shear strains Bydefinition εij = εji or ε = εT ie the strain tensor is symmetric

12 Kinetics

In order to deform body Ω forces (or displacements) must be ap-plied Consider again an infinitesimal cube with (infinitesimal)force vectors dFi applied to each surface dAi normal to the xi-axis(positive in the +xi-direction negative in the minusxi-direction) Wedefine the components of the stress tensor σ as

σij =dFidAj

(110)

x1

x2

x3

s11

s21

s31

s22

s12s32

s13

s23

s33t1

-t1

t3

t2

Analogous to the strains components σ11 σ22 and σ33 represent nominal stresses (resultingin extension or compression of the cube along its axes) while σij (with i ne j) imply a shearstresses acting parallel to the surface that it is acting on (and resulting in angle changes withinthe cube) The complete (infinitesimal) force vector acting on a surface with normal n is givenby

t(n) = σn rArr [t(ei)] =⎛⎜⎝

t1t2t3

⎞⎟⎠=⎛⎜⎝

σ1i

σ2i

σ3i

⎞⎟⎠ (111)

ie the ith column of σ is the traction vector on a surface normal to ei Here and in thefollowing we use brackets to indicate vector (or tensor) components in the Cartesian frameNote that by angular momentum balance on the cube (and in close analogy to the strain tensor)we must have σ = σT (ie σ is symmetric)

Stresses and strains are linked by constitutive relations that depend on the material of whichbody Ω is made The simplest material model is linear elasticity for which stresses and strainsare linearly linked via the linear relation

σij = Cijklεkl hArr σ = Cε (112)

with a fourth-order elasticity tensor whose component Cijkl describes the linear dependenceof the stress component σij to the strain component εkl In principle C has d4 entries yetthe symmetry of both the stress and strain tensors as well as any existing material symmetriesreduce the number of independent material parameters required to describe C For the simplestcase of isotropy (ie the material behavior is the same in every direction) C can be describedby only two constants eg Youngrsquos modulus E and Poissionrsquos ratio ν or the Lame moduli λand micro

8

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

As a convenient alternative to defining the constitutive relation as a link between stresses andstrain we can encode the constitutive response in a strain energy density W = W (ε) whicheg for the case of linear elasticity reads

W = 1

2ε sdotCε hArr W = 1

2εijCijklεkl (113)

so that

σij =partW

partεij Cijkl =

partσij

partεkl (114)

Vector or tensor derivatives of the above type are to be understood component-wise (for detailsand a proper tensorial definition see the tensor notes available online)

In order to solve any mechanical problem we need governing equations that describe howstresses and strains vary over time and space These are given by the conservation or balancelaws First we consider the balance of linear momentum which for a macroscopic body Ωstates that

sumi

Fi =maCM (115)

which equates the sum of all forces applied externally to Ω to its total (constant) mass m andthe acceleration of its center of mass aCM Let us now consider body Ω as a deformable objectfor which we can write the above balance law using integrals over Ω Specifically (115) isequivalent to

intpartΩσn dS + int

ΩρbdV = int

Ωρa dV (116)

where the first term represents all external forces applied to the boundary partΩ of the bodythrough tractions σn the second term denotes external forces in the form of distributed bodyforces and the right-hand side stems from applying the definition of the center of mass and itsacceleration since

aCM = d2

dt2uCM = d2

dt2intΩ ρu dV

intΩ ρ dV= 1

mint

Ωρ

d2u

dt2dV = 1

mint

Ωρa dV (117)

Applying the divergence theorem to the first term in (116) viz

intpartΩσijnj dS = int

Ωσijj dV (118)

which defines the divergence of a second-order tensor as a vector with components

[divσ]i = σijj (119)

Rewriting the resulting equation gives

intΩ(divσ + ρb minus ρa) dV = 0 (120)

This relation must hold not only for the whole body Ω but also for any sub-body cut free fromΩ (as discussed in Mechanics 2 and 3) For the integral to vanish for any arbitrary subset of Ωwe must have

divσ + ρb minus ρa = 0 hArr divσ + ρb = ρa or σijj + ρbi = ρai (121)

which is the local form of the balance of linear momentum

9

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 11 One-dimensional elastic rod

Consider a long and slender rod that is deforming only along its x-axis The displacement field u = u(x t) describes the axial motionof each point on the rod so the associated acceleration field issimply a = a(x t) = u(x t) x

+

u(xt)

The only non-zero strain component is the axial strain εxx(x t) = ε(x t) = ux(x t) and theonly non-zero stress is the axial stress σxx(x t) = σ(x t) which for linear elasticity obeysσ(x t) = E(x)ε(x t) with Youngrsquos modulus E(x) that may vary with position x

Inserting all of this into the balance law of linear momentum gives

ρ(x)a(x t) = divσ(x t) rArr ρ(x)u(x t) = (σ(x t))x= (E(x)ux(x t))x (122)

For the special case of a constant density ρ(x) = ρ = const and constant modulus E(x) = E =const the above reduces to

ρu(x t) = Euxx(x t) hArr u(x t) = c2uxx(x t) with c =radic

E

ρ(123)

This is the one-dimensional wave equation governing the deformation and motion of the rodin one dimension and c is the longitudinal wave speed in the rod For the special case of staticswe have u(x t) = 0 for all x isin Ω and times t

mdashmdashmdashmdash

Example 12 Wave equation in higher dimensions

For the more general case of a body Ω undergoing linear elastic deformation over time thebalance law of linear momentum reads

ρ(x)a(x t) = divσ(x t) hArr ρ(x)ui(x t) = [Cijkl(x)ukl(x t)]j (124)

For the special case of a constant density ρ(x) = ρ = const and constant elastic modulus tensordsC(x) = C = const the above reduces to

ρui(x t) = Cijkl(x)ukjl(x t) (125)

This is sometimes referred to as the Navier equation governing the deformation and motionof a linear elastic body in higher dimensions As before for the special case of statics we haveu(x t) = 0 for all x isin Ω and for all times t

mdashmdashmdashmdash

The balance of energy provides another governing equation which is particularly of interst fornon-elastic problems as wel as for thermal problems The balance of energy states that thechange of internal energy E in a body Ω over time t balances the inward and outward flux ofenergy and the energy being produced inside the body (by some heat source density s) as wellas mechanical power P imposed on the body through mechanical work Mathematically thisimplies

d

dtE = int

Ωs dV minus int

partΩq sdotn dS + P (126)

We can use the divergence theorem to write

intpartΩq sdotn dS = int

partΩqini dS = int

Ωqii dS = int

Ωdivq dS (127)

10

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which defines the divergence of a vector as the scalar quantity

div(sdot) = (sdot)ii (128)

Energy is an extensive variable ie the total energy doubles when adding to bodies of thesame energy This is in contrast to intensive variables such as temperature or pressure whenadding to bosides having the same eg temperature Since energy is an extensive variable wecan introduce an energy density e and write

E = intΩe dV rArr d

dtE = int

Ωe dV (129)

The analogous applies to the mechanical work being a change in strain energy density so

P = d

dtint

ΩW dV = int

ΩW dV (130)

Rewriting the balance law of energy now yields

intΩe dV = int

Ωs dV minus int

Ωdivq dV + int

ΩW dV (131)

This can be rewritten as

intΩ(e minus s + divq minus W ) dV = 0 (132)

Since the balance of energy does not only have to hold for Ω but for any subbody ω sub Ω wemay conclude that the local energy balance equation is

e = W + s minus divq (133)

This is the local (ie pointwise) counterpart to the macroscopic energy balance and states thatat each point x isin Ω the rate of energy change (e) is given by the local production of heat (ρs)plus the local mechanical power supplied (W ) minus the heat lost by outward fluxes q awayfrom the point

Example 13 Heat conduction

Consider a purely thermal problem without mechanical energy (so W = 0) Thermally storedenergy is given by e = ρcvT with mass density ρ(x) constant specific heat capacity cv(x) andan unknown temperature field T = T (x t) Let us assume that heat conduction follows Fourierrsquoslaw ie

q(x t) = minusκ(x)gradT (x t) hArr qi(x t) = minusκ(x)Ti(x t) (134)

with a heat conductivity κ(x) The local energy balance equation then becomes

ρ(x)cv(x)T (x t) = [κ(x)Ti(x t)]i + s(x t) (135)

and for the special case of a homogeneous body with spatially constant material properties wearrive at the well-known heat equation (also known as the inhomogeneous Laplace equa-tion)

ρcvT (x t) = κnabla2T (x t) + s(x t) (136)

11

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

where we used the definition of the Laplacian viz Tii = nabla2T = ∆T Whenever we consider astatic problem we assume that the body is in equilibrium and the temperature field is constantwhich reduces the above to the Poisson equation

κ∆T = minuss (137)

Also for a 1D problem the heat equation with T = T (x t) reduces to

ρcvT (x t) = κTxx(x t) + s(x t) (138)

mdashmdashmdashmdash

13 Computational Mechanics

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

from reality to mathematical model a practical problem is turned into an abstractproblem by making a series of simplifications and assumptions thus introducing modelingerrors in order to define a proper mathematical problem

from mathematical model to numerical model if the mathematical model cannotbe solved analytically the sought infinite-dimensional solution is turned into a finite-dimensional solution by making approximations here discretizing the body Ω so that itsdescription involves a finite number of unknowns This incurrs discretization errors

from numerical model to results solving the numerical problem computationally gen-erally involves solution errors that stem from round-offfloating-point errors iterativesolution approaches etc

Ensuring that the results agree with the mathematical model (eg by comparing the numericalsolution to an analytical solution where available) is the step of verification while ensuringthat the obtained results properly reflects reality (eg by comparing the numerical solution toexperimental data) is the validation step

12

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 (Initial) Boundary Value Problems

So far we have seen how partial differential equations governthe thermal and mechanical behavior of solid bodies (and ofcourse those two can be coupled as well to describe the thermo-mechanical behavior of deformable bodies) In order to solve aproblem we need an initial boundary value problem (IBVP)which furnishes the above equations with appropriate boundaryconditions (BCs) and initial conditions (ICs)

To this end we subdivide the boundary partΩ of a body Ω into

t

u = u

W

paraWD

paraWN

partΩD equiv Dirichlet boundary prescribing the primary field (eg u T etc)

eg u(x t) = u(x t) on partΩD or T (x t) = T (x t) on partΩD (139)

partΩN equiv Neumann boundary prescribing derivatives of the primary field (eg εgradT etc)

eg t(x t) = σ(x t)n(x t) = t(x t) on partΩN or q(x t) = q(x t) on partΩN

(140)

Note that we may generally assume that

partΩD cup partΩN = partΩ and in most problems also partΩD cap partΩN = empty (141)

In addition all time-dependent problems require initial conditions eg

T (x0) = T0(x) forall x isin Ω

or u(x0) = u0(x) and v(x0) = v0(x) forall x isin Ω(142)

The number of required BCsICs depends on the order of a PDE eg

ρcvT = div(K gradT ) + ρs (143)

is first-order in time and therefore requires one IC eg T (x0) = T0(x) It is second-order inspace and hence requires BCs along all partΩ (eg two conditions per xi coordinate)

In summary we will have governing PDEs supplemented by ICs and BCs as required (egquasistatic problems of course do not require any initial conditions) Those need to be solvedfor the primary fields (eg temperature T or displacements u)

Any of the aforementioned PDEs can be written in an operator form introducing an operatorL For example we may abbreviate the 1D wave equation

u minus c2uxx = 0 rArr L[u] = 0 with L = part

partt2minus c2 part

partx2(144)

One key feature of all PDEs discussed so far (including the heat and wave equations) is thattheir operators are linear A linear operator L is characterized by

L[α1u1 + βu2] = α1L[u1] +α2L[u2] forall α1 α2 isin R and for all functions u1 u2 (145)

In the following we will need to be more specific about what we mean by all functions (since wemay need to classify admissible or useful classes of functions) but this is left for the examplesin the following sections A few examples involving linear operators are summarized here

13

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

wave equation in one dimension (second order in space and time)

L[u] = 0 with L = part

partt2minus c2 part

partx2hArr u = c2uxx (146)

heat equation in one dimension (second order in space first order in time)

L[T ] = s with L = ρcvpart

parttminus κ part

2

partx2hArr ρcvT = κTxx + s (147)

advection or transport equation (first order in space and time) with flow speed v

L[u] = 0 with L = part

partt+ v part

partxhArr u + v ux = 0 (148)

Similarly boundary conditions can also be expressed by linear operators For example for wemay define boundary operators for

boundary tractions of a one-dimensional bar

B[u] = t with B = E part

partxhArr Eux = t (149)

boundary flux in a one-dimensional rod

B[T ] = q with B = minusκ partpartx

hArr minus κTx = q (150)

Unfortunately analytical solutions (I)BVPs of the above type are hardly ever available ndash exceptfor relatively simple problems involving

simple geometries

simple material behavior

simple ICsBCs

For realistic geometries materials andor ICsBCs one usually requires numerical techniquesto obtain approximate solutions numerically

We point out that computing machines have two main shortcomings that require the discussionof topics in the following few sections

First computers do not know any units To this end any numerical technique must cope withthe intrinsic units present in physical problems This is commonly in done in one of two wayseither one defines a set of consistent units (eg only SI units) and tacitly implies that thoseunits are being used throughout (this is common practice in most commercial FEA codes) orone reduces the physical system to a dimensionless problem This will be discussed in Section 2

Second computers cannot deal with infinity For this reason any numerical technique has theobjective to turn an infinite-dimensional problem into a finite-dimensional one The exactsolution to any of the above systems of IBVPs lives within an inifinite-dimensional functionspace In other words we donrsquot know much about the sought function fields u(x t) or T (x t) a-priori so the problem is not to simply identify the coefficients of some known type of polynomialbut to find an arbitrary function (with some differentiability constraints) Numerical techniquesreduce such problems commonly to finite-dimensional ones Let us consider a few examples

14

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Any function can be expressed as an infinite Fourier series or as a polynomial series(those series have an infinite number of terms and hence coefficients) We can aim forapproximations by considering eg only the lowest n terms of such a truncated seriesand find the respective coefficients by some numerical method This way we have reducedthe infinite-dimensional problem to an n-dimensional one

Any computer stores and operates rational numbers (with infinite precision) with a finitenumber 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 isin Ω andfor all times we could set out to find solutions that are known only at certain discretepoints xi and possibly also at discrete time steps tα This defines the concept of finitedifferences which will be discussed in Section 3

15

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

2 Dimensionless Forms

Computer programming languages have no notion of units which is why one usually definesa set of units that are commonly agreed upon or as an elegant alternative one introducesdimensionless forms before solving problems numerically Let us illustrate the procedure throughan example

Example 21 Linear elastic spring vibration

Consider a particle of mass m attached to a linear elastic spring of stiffness k subjected toan external force F (t) The vibration of the particle is described by the equation of motionalong with an initial condition (here assuming that the spring is unstretched initially) Let u(t)denote the position of the mass then

mu(t) = minusku + F (t)u(0) = u0

(21)

We start by making the unknown displacement u dimensionless by the normalization

u = u

u0 (22)

Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0eg) but we could use any non-zero length for this normalization Insertion into the equationof motion and dividing by m yields

part2

partt2u = minus k

mu + F (t)

u0m

u(0) = 1

(23)

The first equation shows thatradicmk must have the units of time so we may define

t = tradicmk

= tradic

k

mrArr part2

partt2u = minusu + F (t)

ku0(24)

Finally introducing a dimensionless force as follows leads to the dimensionless form of theoriginal problem

f(t) =F (t

radicmk)

ku0rArr

part2

partt2u = minusu + f (t)

u(0) = 1

(25)

mdashmdashmdashmdash

Example 22 Heat equation

Let us consider the heat equation derived above as

ρcV T = sh + knabla2T for x isin Ω (26)

with some suitable boundary and initial conditions We start by introducing a reference lengthL (eg the size of the body) and a reference temperature T0 (eg the initial temperature ofthe body) and defining

x = xL

rArr part

partx= 1

L

part

partxand T = T

T0 (27)

16

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This turns the heat equation into

ρcV T0T = sh + kT0

L2nabla2T with nabla = ( part

partx1

part

partxd)

T

(28)

Next we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into

ρcV T0L2

kT0T = shL

2

kT0+nabla2

T (29)

Obviously the last term on the right-hand side is dimensionless which implies that also theremaining two terms must be dimensionless This allows us to make two more definitions ofdimensionless type viz

sh =shL

2

kT0and

ρcV T0L2

kT0

part

partt= part

partthArr t = kT0

ρcV T0L2t (210)

This finally leads to the dimensionless heat equation

T t = sh +nabla2T (211)

Note that in an analogous fashion the boundary and initial conditions can also be made dimen-sionless Dirichlet boundary conditions simply use the definition of the dimensionless temper-ature directly converting T = T T0 Neumann boundary conditions of the type q = minusknablaT = qcan be transformed according to

minuskT0

LnablaT = q rArr minusnablaT = q with q = qL

kT0 (212)

mdashmdashmdashmdash

Analogously any other problem can be made dimensionless by introducing proper normaliza-tions and rewriting the governing equations and any initial andor boundary conditions A moregeneral protocol for finding dimensionless definitions based on a given set of system parametersis given by Buckinghamrsquos Π-theorem which is not discussed In the following we typicallyassume that any given problem is dimensionless (even though not showing the normalizationspecifically)

17

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

3 Direct Numerical Methods Finite Differences

To numerically solve such ODEsPDEs we generally have so-called direct and indirect methods

Direct methods aim to solve the governing PDEsdirectly for example by approximating all spatial andtemporal derivatives using finite differences (FD)Consider eg an unknown scalar field u(x t) whosederivatives appear in the governing PDEs (for simplifictylet us consider only a 1D problem whose results caneasily be extended to higher dimensions by applying thederivatives component-wise)

We introduce a regular (∆x∆t)-grid with constant spac-ings ∆x = xi+1 = xi and ∆t = tα+1 minus tα and we define thesought field u only at the grid points writing

uαi = u(xi tα) (31)

x

tDx

Dt

xi xi+1xi-1

+at

a+1ta-1t

a(t x )i

In order to approximate derivatives at the grid points we use Taylor expansions eg inspace

u(xi+1 tα) = uαi+1 = uαi +∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

+ (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(32)

u(ximinus1 tα) = uαiminus1 = uαi minus∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

minus (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(33)

where O(sdot) denotes on the order of (sdot) Addition of the two equations leads to

uαi+1+uαiminus1 = 2uαi +(∆x)2 part2u

partx2∣xitα

+O(∆x4) rArr part2u

partx2(xi tα) =

uαi+1 minus 2uαi + uαiminus1

(∆x)2+O(∆x2)

(34)

This is the second-derivative central difference approximation (which is second-order ac-curate as evident from O(∆x2))

Analogously subtraction of the two equations gives the first-derivative central differenceapproximation (which is second-order accurate as well)

uαi+1 minus uαiminus1 = 2∆xpartu

partx∣xitα

+O(∆x3) rArr partu

partx(xi tα) =

uαi+1 minus uαiminus1

2∆x+O(∆x2) (35)

Of course the same can be carried out for derivatives in time yielding analogously eg

uα+1i minus uαminus1

i = 2∆tpartu

partt∣xitα

+O(∆t3) rArr partu

partt(xi tα) =

uα+1i minus uαminus1

i

2∆t+O(∆t2) (36)

Many other such finite-difference approximations of derivatives can be obtained in a similarfashion For example a simpler first-derivative stencil is obtained from the first Taylor equa-tion (32) alone

uα+1i minus uαi = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uα+1i minus uαi

∆t+O(∆t) (37)

18

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which is known as the (first-order accurate) first-derivative forward-Euler approximation

Analogously we use the second Taylor expansion (33) to obtain the first-derivative backward-Euler approximation (which is first-order accurate)

uαi minus uαminus1i = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uαi minus uαminus1i

∆t+O(∆t) (38)

In order to numerically solve a PDE directly we choose suitable finite-difference approximationsfor all appearing derivatives Of course an extension of the above to non-constant grid spacings∆tα and ∆xi is straight-forward Also when dealing with higher dimensions any chosen stencilis applied to each partial derivative

Example 31 Heat equation by finite differences in 1D

Consider the general form of the 1D heat equation

T (x t) = k Txx(x t) + r(x t) (39)

When using the second-order central-difference approximation for the spatial and the forward-Euler approximation for the temporal derivative in the heat equation the discretized governingequation becomes

Tα+1i minus Tαi

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (310)

which in the limit ∆t∆xrarr 0 is expected to converge towards the same solution as the governingequation (this is the requirement of consistency of the discretized equation) Notice that theright-hand side of (310) does not involve Tα+1

i nor any information at the new time tα+1 whichis found only on the left-hand side Such time-dependent finite-difference schemes are calledexplicit

As a key feature of explicit schemes one can easily solve for Tα+1i at the new time for known

values Tαi at the current time and Tαminus1i at the previous time without solving a system of

equations Specifically solving the above for Tα+1i yields the update rule

Tα+1i asymp Tαi + k∆t

(∆x)2(Tαi+1 minus 2Tαi + Tαiminus1) +∆t r(xi tα) (311)

By contrast when using the backward-Euler approximation we obtain

Tαi minus Tαminus1i

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (312)

which is a linear system to be solved for Tα+1i at the newest time step (which is here α) Such

a time-dependent finite-difference scheme which has unknown degrees of freedom at the newesttime step on both sides of the equation is called an implicit scheme

Let us rewrite the above implicit approximation of the heat equation as

minuscTαi+1 + (1 + 2c)Tαi minus cTαiminus1 asymp ∆t r(xi tα) + Tαminus1i with c = k∆t

(∆x)2 (313)

19

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The solution for a system of n grid points in space is obtained from solving

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

⋱⋱minusc 1 + 2c minusc

minusc 1 + 2c minuscminusc 1 + 2c minusc

⋱⋱

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

Tα1⋮⋮Tαi⋮⋮Tαn

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

∆t rα1 + Tαminus11

⋮⋮

∆t rαi + Tαminus1i

⋮⋮

∆t rαn + Tαminus1n

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

(314)

Note that suitable boundary conditions must be supplied For example if we have theessential boundary condition Tαi = Ti(tα) we may replace the equation for Tαi in the abovesystem (ie the αth row in (314)) by Tαi = Ti(tα) By contrast if we have a natural boundarycondition Tx(xi tα) = qi(tα) then we need to introduce a finite-difference stencil to Tx(xi tα)and again replace the respective equation in the above system

mdashmdashmdashmdash

Any of the above finite-difference schemes can be interpreted as a stencil (which may alsoreveal the required BCsICs) For example the explicit and implicit update rules given byrespectively (311) and (2430) have the stencils shown below revealing how information ispassed from time step to time step (and also revealing the explicit vs implicit nature of eachfinite-difference scheme)

i i +1i -1

Dx

Dt

a

a+1

a-1i i +1i -1

Dx

Dt

a

a+1

a-1

(a) explicit stencil (b) implicit stencil

Example 32 Bar under its own weight

Analogous finite difference approaches can be taken forquasistatic problems where a time-independent solutionis thought in one or several dimensions For exampleconsider a vertical elastic bar of constant Youngrsquos mod-ulus E and length L clamped at its top end deformingunder its own weight The unknown displacement field isu(x) as a function of the axial x-coordinate Gravity actsdownward In this case the governing equation is linearmomentum balance viz

divσ(x) + ρg = 0 rArr uxx = minusρg

E (315)

x

u(x) L

+

g

+

xi+1

xi

xi-1

ui

x0

xn

Dx

Boundary conditions are (assuming a free end at x = L)

u(0) = 0 and F (L) = EAux(L) = 0 hArr ux(L) = 0 (316)

We can easily find an analytical solution for this case by integrating (315) twice with respectto x and inserting the boundary conditions which yields

u(x) = ρg

2E(2L minus x)x (317)

20

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us discretize the bar into n+ 1 segments of equal lengths ∆x = L(n+ 1) so that the (n+ 1)grid points are located at xi = in for i = 0 n We may use a second-order central-differenceapproximation for the second derivative with respect to x leading to

ui+1 minus 2ui + uiminus1

(∆x)2= minusρg

Ewith u0 = 0 and

un+1 minus un∆x

= 0 (318)

where we introduced a ghost node at xn+1 = xn + ∆x to enforce the free traction boundarycondition via a first-order forward-Euler approximation and the central-difference stencil isapplied to update all nodes i = 1 n while nodes 0 and n + 1 are updated by the boundaryconditions u0 = 0 and un+1 = un This results in a linear system of equations

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

1 0 0 0 ⋱1 minus2 1

1 minus2 11 minus2 1

⋱1 minus2 1

minus1 1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

u0

⋮⋮ui⋮⋮unun+1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

0⋮ccc⋮c0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

with c = minusρgE

(∆x)2 (319)

Notice how we replaced the first and last row in the matrix and the respective entries in theright-hand-side vector in order to enforce the two boundary conditions This is a convenientstrategy to impose boundary conditions directly within the system to be solved (which we willalso exploit later in the context of finite elements) Solving the above linear systems yields theapproximate finite-difference solution

This is not a time-dependent problem hence our above definition of explicit vs implicit schemesdoes 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

Shown below is the solution obtained for n = 9 (green) n = 19 (purple) n = 29 (light blue)n = 49 (orange) and n = 99 (red) showing convergence with increasing number of grid pointstowards the exact solution u(x) which is included as the solid blue line (Results are normalizedsuch that u = uE

ρgL2 and x = xL) Note that convergence is from below ie the discretized bar

appears stiffer than it is in reality (a fact that we will get back to later)

02 04 06 08 10

01

02

03

04

05

x

u

mdashmdashmdashmdash

Notice that the above finite-difference approximation also admits a physical interpretation inthe following sense Imagine that we subdivide the bar into n bars each of length ∆x = Ln

21

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We can replace a bar by an elastic spring of effective stiffness k = EA∆x = nEAL At thesame time each bar carries a weight m = ρA∆x = ρALn which we may distribute evenly to itstwo ends As a result we arrive at a chain of n+1 masses (the inner ones being m the first andlast ones m2) connected by linear springs If we formulate the system of equations resultingfrom the static force equilibrium of eg the ith mass we obtain

nEA

L(ui minus uiminus1) minus

nEA

L(ui+1 minus ui) minus gρALn = 0 (320)

or (after some simplification)

ui+1 minus 2ui + uiminus1 = minusρgE(Ln)2 (321)

which is identical to (318) and (319) (for each inner mass while the first and last differ)

x

u(x) L

+

g+

xi+1

xi

xi-1

ui

x0

xn

Dx

+

ui

Dxmmm

mm2

m2

kkk

m2

m2kDx =

+ =

22

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

4 Stability of Finite Difference Schemes

So far we have derived first- and higher-order finite difference approximations in space and timeand discussed the explicit and implicit finite-difference schemes resulting from applying thoseapproximations to PDEs We still need to discuss the suitability of particular combinations offinite-difference combinations in space and time for a particular PDE This raises the questionof finite-difference stability which is classically associated with two names

the Courant-Friedrichs-Levy or CFL condition is a necessary condition for the sta-bility of a finite-difference scheme

von Neumann analysis yields a sufficient condition or the stability of a finite-differencescheme and is related to phase error analysis

We will discuss all three concepts at the example of the 1D wave equation below

41 CFL Condition

Every finite-difference stencil comes with a numerical domain of dependence For exampleconsider the 1D wave equation which when discretized by second-order central-difference ap-proximations in space and time becomes

uα+1i minus 2uαi + uαminus1

i

(∆t)2= c2u

αi+1 minus 2uαi + uαiminus1

(∆x)2 (41)

Drawing the stencil in the shape of a plus sign indicatesthat the solution for uα+1

i depends on information at theprevous time step specifically on uαi+1 uαi and uα+1

iminus1 (aswell as uαminus1

i from two time steps ago) When repeatingto apply this stencil on a large grid we may draw thenumerical domain of dependence as all those pointswhose information was affected the value uα+1

i For theabove example this turns into a triangular fan for whichany change to the value of u at a grid point interior tothe fan affects the value of uα+1

i whereas points outsidethe fan do not impact the value of uα+1

i The slope of thetwo curves limiting our fan in the x-t-diagram are simplyplusmn∆t∆x

Dx

Dt

mathematical domain of dependence

numerical domainof dependencec

We may also define the mathematical domain of dependence by studying the exact solution ofthe wave equation which we know is composed of characteristics of the type

u(x t) = f1(x + ct) + f2(x minus ct) (42)

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

x + ct = const and x minus ct = const (43)

are characteristics of the solution Now consider a grid point (xi tα) such that the character-istics through this point are defined by

x + ct = xi + ctα and x minus ct = xi minus ctα (44)

23

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The fan enclosed below these two lines is the mathematical domain of dependence sinceany point inside the fan can affect the solution on the bounding curves of the cone and hencecan affect u(xi tα) The latter does not apply to points outside the fan More mathematicallyspeaking we may invoke drsquoAlembertrsquos formula if the initial conditions are supplied as u(x t0) =u0(x) and u(x t0) = v0(x) then

u(xi tα) =u0(xi + ctα) + u0(xi minus ctα)

2+ 1

2cint

xi+ctα

ximinusctαv0(y)dy (45)

which again confirms that u(xi tα) depends only on information at time t0 = 0 contained withinxi minus ctα le x le xi + ctα

The Courant-Friedrichs-Levy (CFL) condition now states that convergence and thusstability requires that the mathematical domain of dependence is contained in the numericaldomain of dependence

For the above example of the 1D wave equation this implies that the fan of the mathematicaldomain of dependence must be enclosed by the fan of the numerical domain of dependencewhich ndash by comparing the slopes of the bounding lines ndash is equivalent to requiring that

minus∆x

∆tle c le ∆x

∆thArr minus 1 le c∆t

∆xle 1 hArr ∣c∆t

∆x∣ le 1 (46)

This is the CFL condition for the 1D wave equation which is only a necessary conditionof stability In order to determine the sufficient condition(s) of stability we need to discuss themethods described in the following

42 von Neumann Analysis and Phase Error Analysis

A sufficient condition of stability is obtained from so-called von Neumann analysis Sinceit is very closely related to phase error analysis we will discuss these two together Let usagain consider the stencil (41) for the 1D wave equation Losely speaking stability requiresthat small errors in the numerical solution uαi (which always occur due to round-off errors andmachine precision) remain bounded and do not grow over time when the finite-difference schemeis applied time and time again The latter would imply instability and result in exponentialgrowth of numerical noise over time

Let us assume that at any time t there is a small perturbation to the solution written as

uαj = ei(ωtαminuskxj) = ei(ωα∆tminusj∆xk) (47)

which is of harmonic type Note that any general noise function can always be decomposed asa Fourier series so if we can show that the above function does not grow over time for arbitraryω and k then any perturbation of the solution should remain stable Note that we deliberatelydid not include an amplitude since it does not affect the outcome of a linear PDE

Inserting (47) into (41) results in

ei(ω(α+1)∆tminusj∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ω(αminus1)∆tminusj∆xk)

= c2(∆t)2

(∆x)2[ei(ωα∆tminus(j+1)∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ωα∆tminus(jminus1)∆xk)]

(48)

Dividing by uαj = ei(ωα∆tminusj∆xk) yields

eiω∆t minus 2 + eminusiω∆t = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + eminusi∆xk] (49)

24

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or (dividing by 2 and using Eulerrsquos identity for the cosine)

cos(ω∆t) minus 1 = σ2 [cos(k∆x) minus 1] with σ = c∆t

∆x (410)

To establish a relation between ω and k we need to consider three cases

σ = 1 in this case we obtain cos(ω∆t) = cos(k∆x) or ω∆t = plusmnk∆x

∣σ∣ gt 1 in this case we have cos(ω∆t) = 1+σ2 [cos(k∆x) minus 1] and there are cases of k forwhich the right-hand side becomes lt minus1 meaning that there are solutions ω isin C Hencecertain wave vectors k cause instability in the form of expontential growth of solutions

∣σ∣ lt 1 in this case there are frequencies ω for which no k isin R exists (only solutions k isin C)This implies that waves at those frequencies vanish since they are damped out by thescheme

In summary the scheme is unstable if ∣σ∣ gt 1 or in other words the scheme is conditionallystable and stability requires that

∣σ∣ le 1 hArr ∣c∆t

∆x∣ le 1 hArr minus 1 le c∆t

∆xle 1 (411)

We also conclude that σ = 1 leads to no damping while ∣σ∣ lt 1 leads to numerical damping ofcertain frequencies

Classical von Neumann analysis is not interested in phase delays and therefore uses a slightlymodified approach writing z = eiω∆t so that

uαj = zαeminusikxj with z isin C (412)

This implies that for any grid point xj the solution from one time step to the next relates as

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

=uα+1j

uαj= z (413)

Stability hence requires that ∥z∥ le 1 since otherwise again exponential growth occurs over timeInsertion of (412) into the finite-difference approximated wave equation (41) and dividing byzα yields

z minus 2 + zminus1 = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + e+i∆xk] = 2σ2 [cos(k∆x) minus 1] (414)

Solving the above for z leads to

z = 1 + σ2 [cos(k∆x) minus 1] plusmn ∣σ∣radic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (415)

Now observe that if ∣σ∣ le 1 then the radicand is always non-positive and soradic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = iradicminus [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (416)

which leads to

∥z∥2 = (1 + σ2 [cos(k∆x) minus 1])2 minus σ2 [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = 1 (417)

Therefore ∣σ∣ le 1 implies a stable scheme Otherwise the scheme is unstable

Finally let us note that the Lax-Richtmyer theorem states that a finite-difference schemeconverges if and only if (1) the scheme is consistent (ie all truncation errors decay as∆x∆trarr 0) and (2) the scheme is stable

25

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 41 Advection equation by an implicit finite-difference scheme

As mentioned in Section 14 the advection equation governing eg fluid transport processesis given by

u(x t) + v ux(x t) = 0 (418)

here written for a 1D scenario for instructive purposes with a constant advection speed v isin RLet us introduce a regular grid in both space and time and introduce the dimensionless speed

c = v ∆t

∆x (419)

Let us discretize the advection equation by a backward-Euler approximation in time and afirst-order central difference approximation in space ie

u(xj tα) =uαj minus uαminus1

j

∆t+O(∆t) ux(xj tα) =

uαj+1 minus uαjminus1

2∆x+O(∆x2) (420)

Insertion into (418) leads to

uαj minus uαminus1j

∆t= minusv

uαj+1 minus uαjminus1

2∆xhArr uαj minus uαminus1

j = minus c2(uαj+1 minus uαjminus1) (421)

Note that this is an implicit stencil since it requires solving a system of equations for theunknown field u at time tα

Let us perform von Neumann stability analysis which starts by assuming an error of the type(note that wersquoll replace the spatial index i by j to not confuse it with i =

radicminus1)

uαj = zαeminusikxj with z isin C (422)

Insertion into uαj minus uαminus1j = minusc (uαj+1 minus uαjminus1) from (421) gives

zαeminusikxj minus zαminus1eminusikxj = minus c2(zαeminusikxj+1 minus zαeminusikxjminus1) (423)

Using that xjplusmn1 = xj plusmn∆x and dividing by zαeminusikxj results in

1 minus 1

z= minus c

2(eminusik∆x minus e+ik∆x) = c

2(eik∆x minus eminusik∆x) = c

22i sin(k∆x) = i c sin(k∆x) (424)

and isolating z isin C gives

1

z= 1 minus i c sin(k∆x) hArr 1

∥z∥2= 1 + c2 sin2(k∆x) (425)

and thus

∥z∥2 = 1

1 + c2 sin2(k∆x)le 1 (426)

We conclude that irrespective of k and ∆x the right-hand side is always less or equal to1 implying that ∥z∥ le 1 so that the scheme is unconditionally stable (not that this isindependent of the sign of v as may be expected) Unconditional stability is generally notobserved in explicit schemes and can be a significant advantage of an implicit scheme (if itapplies not every implicit scheme is unconditionally stable)

mdashmdashmdashmdash

26

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

43 Direct vs Indirect Methods

The above finite-difference schemes are powerful direct numerical techniques but they comewith significant disadvantages Problems associated with direct methods include the following

a regular grid is required (which is fine for many fluid mechanics problems but oftentimesproblematic for complex solid geometries especially when undergoing large deformation)

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 primaryfields and their errors are undefined between grid points) This can be problematic whenseeking approximate solutions that are ldquoglobally optimalrdquo Also the question needs toaddressed how BCsICs are applied in between grid points and how about moving BCsare imposed

stabilityefficiency issues arise due to the above stability restrictions choices of ∆t and∆x are not arbitrary but ndash aside from accuracy concerns ndash the stability of especially ofexplicit finite-difference schemes dictates the maximum step widths to be used (whichmay impose severe computational costs due to small steps sizes)

As an alternative indirect methods do not solve the ODEsPDEs directly but search forldquooptimalrdquo approximations Essentially one reduces the infinite-dimensional problem to a finite-dimensional problem by considering solutions uh(x t) asymp u(x t) that satisfy the BCs and ICsand approximate the exact solution as well as possible Particular questions to be addressedinclude

How do we choose uh(x t) For example are these globally or locally defined functionsWhich choices minimize the error

What does ldquooptimalrdquo mean in this context How do we quantify the error betweenapproximation and exact solution

What types of functions should be used for uh(x t) ndash eg polynomial or Fourier seriespiecewise-polynomial or maybe even piece-constant

We need a few more concepts to address those questions Note that in the following we willformulate most concepts in 1D with analogous generalizations possible for higher dimensionsunless specifically mentioned

27

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

5 Methods of Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh(x t) thatminimize the total error (which still needs to be defined) when comparing with the exact solutionu(x t) For simplicity let us drop the time dependence for now and only consider (quasi)staticproblems We will add dynamics later in the course for completeness but it is beneficial to firstdiscuss the instructive static scenario Also let us start with 1D problems seeking uh(x) andlater expand all concepts to higher dimensions as needed

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

uh(x) =n

suma=1

caφa(x) (51)

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-prioriExamples are polynomials ie φa(x) = xa or Fourier series with eg φa(x) = sin(πax)

ca are unknown coefficients to be determined

We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solvedfor n coefficients) Note that nrarrinfin yields the exact solution if a proper orthogonal set of basisfunctions is chosen (eg polynomials or Fourier series) while we deliberately choose n≪infin sothat the resulting finite-dimensional problem is computationally tractable

One constraint to be imposed is that the approximate function uh(x) must satisfy all Dirichlet(essential) boundary conditions (otherwise it does not qualify as a solution to the problem)One possible approach is to separate the boundary part from the interior part by defining

uh(x) = upartΩD(x) +

n

suma=1

caφa(x) with φa(x) = 0 on partΩD (52)

and upartΩD(x) satisfying all essential boundary conditions Alternatively one can impose the es-

sential boundary conditions onto the unknown coefficients as a direct constraint to be accountedfor while solving (we will use this latter strategy in most of the below examples)

As explored in Section 14 the general boundary value problem we aim to solve can be writtenin general as

find u(x) st L[u] = s for x isin Ω and Bj[u] = tj for x isin partΩj (j = 1 k) (53)

where L is a linear differential operator and Bj is a linear differential boundary operator Notethat we here account for the fact that we may have k different boundary conditions

We now insert our approximate solution uh(x) into the above set of PDEs knowing that itwill in general not satisfy those governing equations (otherwise we would have found an exactsolution) As a consequence we obtain residuals defined by

rΩ = L[uh] minus s and rpartΩj = Bj[uh] minus tj (54)

Unless we have found the exact solution we will have rΩ ne 0 and rpartΩj ne 0 and we seek coefficients

ca (a = 1 n) such that our approximate solution uh(x) satisfies rΩ asymp 0 and rpartΩj asymp 0 in somesense In order to find the n coefficients we need n equations

28

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

To this end the family of methods of weighted residuals defines n total residuals as

Ri = intΩrΩWidV + ξ2

k

sumj=1int

ΩrpartΩjwidS rArr Ri = 0 for i = 1 n (55)

where Wi and wi (i = 1 n) are weighting functions for the bulk and surface residualsrespectively which define ndash loosely speaking ndash the priority of where the residuals are to beevaluated ξ2 gt 0 is an in principle arbitrary constant introduced for unit compatibility (andwe write ξ2 instead of ξ to make sure the pre-factor in front of the second integral is positiveassuming ξ isin R) Now there are various ways to define the weights (each of different difficultyand accuracy levels) and this leads to the following methods of weighted residuals

51 Collocation Method

A straight-forward approach is to evaluate the residuals only at specific locations which resultsin the so-called collocation method

To this end we define

Wi = δ(x minus xi) for xi isin Ω i = 1 n minus kwi = δ(x minus xi) for xi isin partΩiminus(nminusk) i = n minus k + 1 n

(56)

so that the equations to be solved are

rΩ(xi) = 0 for i = 1 n minus krpartΩiminus(nminusk)(xi) = 0 for i = n minus k + 1 n

(57)W

+x1

+x2

+x3

+x4

+x5

t+

x6

Points xi (i = 1 n) are called collocation points This method is closest to the finite-difference techniques discussed before since it aims to minimize the error only at discretepoints (much like finite differences aimed to solve the PDE exactly only on a discrete grid)For convenience we here chose k collocation points on the k boundaries with natural boundaryconditions (one per boundary) while one could also choose this distribution differently as longas sufficiently many equations are available

52 Subdomain Method

The subdomain method is similar in spirit to the collocationmethod but instead of evaluating the residuals at specific colloca-tion points we subdivide the body and its boundary into subdo-mains and require the total residual to vanish on average over eachof the subdomains Therefore we define

Wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isinDi

0 elsefor i = 1 n minus k (58)

and

t

WD1

D2

D3

wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isin partΩiminus(nminusk)

0 elsefor i = n minus k + 1 n (59)

where Di sub Ω for i = 1 n minus k are (possibly overlapping) domains within the body whilepartΩi sub partΩ are the k boundary domains

29

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the n equations to be solved for the n coefficients ca are

intDirΩ dV = 0 for i = 1 n minus k

intpartΩi

rpartΩi dS = 0 for i = 1 k(510)

Keep in mind that we here aim to solve the PDE and boundary conditions only on averageacross the respective domains

53 Method of Least Squares

The least squares method is most intuitive and seeks to determine the unknown coefficientsby minimizing the bulk and boundary residuals To this end we introduce the total error

E = intΩr2

Ω dV + ξ2k

sumj=1intpartΩj

r2partΩj

dS (511)

and obtain the coefficients as the minimizers thereof ie

c1 cn = arg minE (512)

As before ξ2 gt 0 is an arbitrary (positive) parameter introduced for dimensional consistencyThe associated stationarity conditions become

partE

partca= 0 hArr int

ΩrΩpartrΩ

partcadV + ξ2

k

sumj=1intpartΩj

rpartΩj

partrpartΩj

partcadS = 0 for a = 1 n (513)

from which we realize by comparing to (55) that we have yet another method of weightedresiduals and that we have effectively chosen

Wa =partrΩ

partca and wa =

partrpartΩj

partcaon Neumann boundary partΩj (514)

Recalling our definitions and exploiting the properties of a linear operator we may write

uh(x) =n

suma=1

caφa(x) rArr rΩ = L[uh] minus s =n

suma=1

caL[φa(x)] minus s (515)

and

rpartΩj = Bj[uh] minus tj =

n

suma=1

caBj[φa(x)] minus tj (516)

so that

Wa =partrΩ

partca= L[φa(x)] wa =

partrpartΩj

partca= Bj[φa(x)] on Neumann boundary partΩj (517)

This turns the stationarity conditions (513) for a = 1 n into1

intΩ(n

sumb=1

cbL[φb(x)] minus s)L[φa(x)]dV

+ ξ2k

sumj=1intpartΩj

(n

sumb=1

cbBj[φb(x)] minus tj)Bj[φa(x)]dS = 0

(518)

1Here and everywhere in the following we will switch the summation index when multiplying to sums in orderto avoid duplicated indices and ambiguity eg rΩ

partrΩpartca

= (sumnb=1 c

bL[φb(x)] minus s)L[φa(x)] where summation index

b is used instead of a in parentheses in order to avoid ambiguity when multiplying by L[φa(x)]

30

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or after some re-arrangement (separating terms depending on cb from those independent of thecoefficients)

n

sumb=1

⎡⎢⎢⎢⎢⎣int

ΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS

⎤⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Kab

cb

= intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBi[φa(x)]dS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFa

for a = 1 n

(519)

This is a linear system of n equations which may be rewritten concisely as

n

sumb=1

Kabcb = F a for a = 1 n or Kc = F (520)

where we grouped all unknown coefficients into the vector

c = (c1 cn)T(521)

Matrix K and vector F are both constant and their components read respectively

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (522)

and

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (523)

We notice that K is by definition symmetric (Kab = Kba) For reasons to be explained laterwe here and in the following use the notation Kab for the matrix component associated withcoefficients a and b (instead of writing Kab) Let us accept this for now ndash we will get back to thisnotation when discussing higher dimensions where each coefficient ca isin Rd has d componentsso we need to find all cai with a = 1 n and i = 1 d and we will need matrices with Kab

ij

54 Higher Dimensions

Any of the above methods can be extended to higher spatial dimensions as needed (after all onlyfew real-world problems can be reduced to one dimension) In higher dimensions we generallyseek a function u(x) ∶ Ωrarr Rd and introduce the approximation

uh(x) = sumaisinT

caφa(x) (524)

where ca isin Rd are the unknown vector coefficients and φa(x) denote the basis functions Forexample we may again use polynomial or Fourier basis functions eg φa(x) = sin(πa sdotx) withappropriate choices of the vector set T Now we need d times n independent equations to solve forall components of the n coefficient vectors ca (d equations per any of the n coefficients) It issimplest to explain these concepts through practical examples which will follow later

31

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 51 Rotating bar with attached point mass

Consider a bar of length L constant Youngrsquos modulus E cross-sectional area A and mass density ρ which is hinged at the originand rotating about this hinge with a constant angular velocity ωIn addition a point mass m is attached at the free end of therotating bar

w

mEAr

L

xu(x)+

Let us first find the exact solution of the 1D displacement field u(x) inside the bar We considera co-rotating frame of reference with coordinate x running along the bar starting at the originLinear momentum balance with the centripetal acceleration a = minusω2x states that

divσ = ρa rArr (Eux)x = minusρω2x rArr uxx = minusρω2

Ex (525)

and the boundary conditions are (the force again coming from the cenitrpetal acceleration)

u(0) = 0 and F (L) = AEux(L) =mω2L (526)

Integration the ODE twice for u(x) and obtaining the two integration constants from the twoboundary conditions yields the exact solution

u(x) = minusρω2

6Ex3 + (mω

2L

EA+ ρω

2L2

2E)x (527)

Next let us find approximate solutions by the various methods of weighted residuals To thisend we first introduce an approximate solution with a polynomial basis φa(x) = xa such that

uh(x) =n

suma=0

caxa (528)

where we chose a polynomial function space of order n which is often abbreviated asuh(x) isin Pn The boundary condition u(0) = 0 requires that c0 = 0 Also for a practical example(which admits simple closed-form solutions) let us pick n = 3 Hence we in fact use

uh(x) =3

suma=1

caxa = c1x + c2x2 + c3x3 (529)

The bulk and surface residuals in this problem are written as respectively

rΩ(x) = Euhxx(x)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraL[uh]

+ ρω2xsup2minuss

for 0 le x le L

rpartΩ(x) = EAuhx(L)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraB[uh]

minusmω2Lacutesup1sup1sup1sup1cedilsup1sup1sup1sup1sup1paraminusF

(530)

Since there is only one Neumann boundary (viz the free end of the bar at x = L there is onlya single boundary residual and k = 1)

Collocation Method In order to use the collocation method we must choose a total of n = 3collocation points to obtain the same number of equations as we have unknown coefficients inthe approximation uh(x) isin P3 Since we have one boundary residual let us choose two pointsalong the bar (eg equally spaced) and one at the end x = L overall leading to

x1 = L3 x2 = 2L3 x3 = L (531)

32

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

With those collocation points the collocation method yields the three residuals that we set tozero

rΩ(x1) = E(2c2 + 2c3L) + ρω2L3 = 0

rΩ(x2) = E(2c2 + 4c3L) + 2ρω2L3 = 0

rpartΩ(x3) = EA(c1 + 2c2L + 3c3L2) minusmω2L = 0

(532)

In matrix form the above becomes the linear system of equations

⎡⎢⎢⎢⎢⎢⎣

0 2E 2EL0 2E 4ELEA 2EAL 3EAL2

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

minusρω2L3minus2ρω2L3mω2L

⎞⎟⎠ (533)

whose solution yields

c1 = mω2L

EA+ ρω

2L2

2E c2 = 0 c3 = minusρω

2

6E (534)

Insertion into (529) shows that

uh(x) = c1x + c2x2 + c3x3 = (mω2L

EA+ ρω

2L2

2E)x minus ρω

2

6Ex3 = u(x) (535)

is in fact the exact solution cf Eq (527) The chosen collocation points were chosen optimally(a different choice of the collocation points could have resulted in a different set of coefficientsand hence in a different solution)

Subdomain Method Let us repeat the above example using the subdomain method Tothis end we define two equally-sized subdomains in the bulk of the bar (simply by dividing thebar into two equal halfs)

D1 = x ∶ 0 le x le L2 D2 = x ∶ L2 le x le L (536)

and we have x = L as our third ldquodomainrdquo to satisfy the Neumann boundary condition Weinvite you to try this case as an exercise at home (you will again obtain the correct solutionuh(x) = u(x))

Least Squares Method Finally let us use the method of least squares for which we hadshown that the problem reduces to solving the linear system (520) with matrix components

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (537)

and vector components

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (538)

For this particular problem we have defined L[sdot] and B[sdot] in (530) which results in

Kab = intL

0L[xa]L[xb]Adx + ξ2[B[xa]B[xb]]

x=Lfor a b = 123 (539)

33

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = intL

0(minusρω2x)L[xa]Adx + ξ2mω2LB[xa]x=L (540)

We still need to choose an appropriate scaling parameter ξ such that the above forms make sensewith respect to their dimensions By comparison of the two terms we realize that ξ2 = (LA)minus1

(or any inverse volume in general) is a suitable choice

Carrying out the above integrals with L[sdot] and B[sdot] from (530) yields the linear system

⎡⎢⎢⎢⎢⎢⎣

AE2

L 2AE2 3AE2L2AE2 8AE2L 12AE2L2

3AE2L 12AE2L2 21AE2L3

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

Emω2

ELω2(2m minusALρ)EL2ω2(3m minus 2ALρ)

⎞⎟⎠ (541)

whose solution again recovers the exact solution (527) (the individual steps are left out herebut you are invited to solve the problem on your own at home)

mdashmdashmdashmdash

55 Galerkinrsquos Method

As introduced in basic mechanics and continuum mechanics courses (and therefore not discussedhere in detail) the equilibrium conditions of a mechanical boundary value problem can also bestated in terms of the principle of virtual work

intΩσijvij dV = int

ΩρbividV + int

ΩNtividS (542)

for any kinematically admissible virtual displacement field v(x) defined on the body Ω Inother words the virtual work done by the internal stresses equals the virtual work done bythe externally applied body forces and surface tractions Note that admissibility in particularrequires that v = 0 everywhere on partΩD since no virtual displacement can be applied to pointson the surface that are restrained from moving

Applying the divergence theorem to the first term in the principle of virtual work yields

intΩσijvij dV = int

partΩσijnjvidS minus int

ΩσijjvidV (543)

so that rewriting (542) leads to

intΩ(σijj + ρbi)vidV + int

partΩN(ti minus σijnj)vidS = 0 (544)

Since this equation must hold for all admissible virtual displacements v it is concluded that wemust have

σijj + ρbi = 0 in Ω and σijnj = ti on partΩN (545)

These are equivalent to the (static) balance of linear momentum and the associated tractionboundary condition so that (542) ndash when valid for all admissible virtual displacements v ndashindeed holds true and is an alternative expression of the balance of linear momentum and theassociated traction BCs as stated in (545)

Notice that the form of (544) is identical to the total residual (55) in the methods of weightedresiduals with the trial or weighting functions now being v(x) Hence the principle of virtual

34

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

work lends itself for a very natural way to formulate a total weighted residual (without the needto introduce a scaling parameter ξ and without having to pay separate attention to variousboundary terms) Note that v(x) is a continuous function so we here have in principle aninfinite-dimensional problem (and infinitely many admissible weighting functions v) Howeverwe can (and will) turn this problem into a finite-dimensional one by introducing approximateforms for both uh(x) asymp u(x) and vh(x) asymp v(x) which will form the basis of the finite elementformulation later

Example 52 Hanging bar under its own weight revisited

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

Euxx(x) + ρg = 0 with u(0) = 0 and F (L) = EAux(L) = F (546)

With σ = Eε = Eux the principle of virtual work here reads

intL

0σvxAdx = int

L

0ρgvAdx+F v(L) rArr int

L

0EuxvxAdx = int

L

0ρgvAdx+F v(L) (547)

Integration by parts on the first integral yields

[EuxvA]L0 minus intL

0EuxxvAdx = int

L

0ρgvAdx + F v(L) (548)

We exploit that v(0) = 0 (since u(0) = 0 is fixed virtual displacements at x = 0 must vanish)and re-arrange the integrals into

intL

0(Euxx + ρg) vAdx + [F minusEAux(L)] v(L) = 0 (549)

Since we want this equation to hold for any admissible function v(x) we thus conclude that thetwo terms in parentheses and brackets must vanish which in turn confirms that a function u(x)that satisfies (547) for any admissible virtual displacement v(x) is also a solution of (546)

Finally note that (547) can be rewritten as

R = intL

0EuxvxAdx minus int

L

0ρgvAdx minus F v(L) = 0 (550)

which is of the form (55) of the total residual discussed for the methods of weighted residualsand we can as before introduce a finite-dimensional representation for uh(x) asymp u(x) eg inthe form of a polynomial or a Fourier series and solve for the n unknown coefficients ca byintroducing n independent weight functions va(x) Since the residual R in (550) is linear inu(x) we would have to solve a linear system for the coefficients

mdashmdashmdashmdash

At the end of this section let us recap the basic principle of weighted residual methods discussedhere This indirect method set out to not solve the governing PDEs directly but instead tominimize the error made by an approximate solution as follows

(i) we first define an approximate solution space and an approximate solution uh(x) definedup to n unknown coefficients

35

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

(iii) we define a global residual R to be minimized and choose appropriate weighting functionsWi wi such as to produce n equations to be solved for the n unknown coefficients byminimizing the global residuals

(iv) we numerically solve the obtained linear system of equations

Although the methods of weighted residuals are handy simple and can be applied to in principleany physical problem of interest the solution depends significantly on the choice of the weightsand 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 thosechoices

It turns out that for most physical problems including the classical mechanical thermal and alsoelectromagnetic problems there is a more intuitive way to arrive at equations of the type (542)viz by considering the energetic (or so-called variational) basis of the underlying boundary valueproblems In simple terms we know that any physical system aims to minimize its energy ina stable equilibrium We will see that (542) is in fact nothing but the associated stationarityequation of such a minimization problem but to get there we first need to introduce some ofthe fundamentals of variational calculus

36

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

6 Variational Calculus

As a motivational example let us revisit a simple physics problem We knowfrom elementary physics that the energy stored in an elastic spring (stiffnessk) stretched by an amount ∆x is 1

2k(∆x)2 If a spring is hanging from the

ceiling and a weight mg is attached at its free end then the total energy is

I = 1

2kx2 minusmgx (61)

where x denotes the elongation of the spring and the second term enters asthe work done by the external force mg (or alternatively interpreted thepotential energy of the attached mass m)

m

k

x

In order to calculate the stretched equilibrium length of the spring we may minimize the totalenergy leading to

partI

partx= 0 = kx minusmg rArr x = mg

k (62)

Note that the stationarity equation kx =mg is nothing but (static) linear momentum balance(or Newtonrsquos second axiom) Hence we may minimize the total energy I in order to find theequilibrium solution and that solution is ensured to satisfy linear momentum balance

For the general continuum thermo-mechanical problems considered here we would like to havea similar concept at hand to turn equilibrium equations (such as the governing PDEs discussedabove) into energy minimization problems Unfortunately the situation is a bit more complexsince we here no longer seek to find equilibria described by variables (like x above) but by func-tions (such as the displacement field u(x)) We can intuitively imagine extending the conceptndash defining an energy I that depends on u(x) and being minimized by the exact solution How-ever we first need to verify some mathematical preliminaries related to the so-called functionalI and how to minimize a functional with respect to a function (we can no longer take simplederivatives to arrive at the stationarity conditions since we are minimizing not with respect toa set of variables but with respect to a function) The underlying mathematical concepts areknown as variational calculus

61 Functionals

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

I ∶ u isin U rarr I[u] isin R (63)

In simple terms a functional2 I is a ldquofunction of functionsrdquo ie a function whose argumentis another function you hand it a function u(x) and it returns a scalar I isin R (eg the energyassociated with u(x)) Functionals are to be distinguished from functions such as f(x) =x2 with f ∶ R rarr R+

0 Unlike a function which is a mapping from Rd rarr R a functional rsquosdomain is generally a function space U (eg all polynomial functions up to a certain degreen abbreviated as Pn or all continuously differentiable functions or all piecewise polynomialfunctions etc) For more information on vector and function spaces see Appendices A and B

When seeking solutions u(x) we typically seek solutions within a particular function space U For example a functional may impose constraints on the differentiability or integrability of

2To differentiate functionals from functions we will write I[u] with brackets instead of parantheses as in u(x)

37

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

function u(x) As an example consider the functional

I[u] = int1

0u2x(x) dx (64)

which is a functional requiring that u(x) is differentiable (ie possesses a first derivative ux)and that the first derivative squared can be integrated to yield a finite value as a counter-example a piecewise constant function u(x) would not be square-integrable (the first derivativeconsists of delta-functions which if squared yield infinity when integrated) Hence functionalI[u] in (64) restricts the function u(x) to belong to the function space

U = u ∶ (01)rarr R such that int1

0u2x(x) dx ltinfin (65)

In the following it will be important to define such spaces U of admissible functions

For convenience of notation let us introduce the Sobolev space3

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥Hk(Ω) ltinfin (66)

with the Sobolev norm (in 1D)

∥u∥Hk(Ω) =radicint

Ωu(x)2 dx + int

Ω[uprime(x)]2 dx + + int

Ω[u(k)(x)]2

dx (67)

In simple terms (and this is all we will need to remember in the following) Hk(Ω) denotes thespace of all functions whose derivatives up to kth order are square-integrable The aboveexample in (64) eg requires u isin U subH1(01) ie the first derivative of functions u(x) mustbe square-integrable on the interval (01) (Of course in this example u(x) need not be square-integrable itself (the functional only contains ux) yet there is no function u(x) which is notsquare-integrable while its first derivative is square-integrable)

Example 61 Energy of a strained bar

Consider bar of length L and with constant Youngrsquos modulus E and cross-sectional area A andstrain energy density W The total energy I of the bar as a function of the 1D displacementfield u(x) is

I[u] = intL

0W (ε)Adx = int

L

0

E

2[ux(x)]2 Adx (68)

where we used that W = E2 ε

2 and ε = ux Here we generally may want to impose the restrictionu isin H1(0 L) (unless when dealing with discontinuities such as cracks) to ensure that the firstderivative ux is square-integrable To replicate Example 52 of the hanging bar with an appliedend force F we have to append to the above energy by the work done by the external forcethus arriving at the total potential energy functional

I[u] = intL

0

E

2[ux(x)]2 Adx minus F u(L) (69)

Minimizing this functional with respect to the unknown function u(x) is expected to yield thesought solution Unfortunately we still do not know how to minimize a functional with respectto a function which will be discussed next

mdashmdashmdashmdash

3Though not needed for our purposes here more information on Sobolev norms and spaces is available inAppendix D

38

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

62 Variations

Consider a functional I ∶ U rarr R such as the potential energy Analogous to the stationaritycondition of classical optimization problems a necessary condition for an extremum of I is thatthe first variation of I vanishes ie δI[u] = 0 (this is the stationarity condition) Like infunctional analysis we are going to compute the analog of a derivative to identify maxima andminima of the functional To this end we perturb the functional around a point by a smallvariation and verify if the functional increases or decreases Complicating is the fact that aldquopointrdquo is now in fact a function and a perturbation must be a variation of that function Tothis end we define the following

A variation δu(x) is an arbitrary function that represents admissi-ble changes of u(x) If Ω sub Rd is the domain of u isin U with boundarypartΩ and we seek solutions

u isin U = u isinHk(Ω) ∶ u = u on partΩD (610) x

u

0+L

uu+du

+

du

then the variation must satisfy

δu isin U0 = δu isinHk(Ω) ∶ δu = 0 on partΩD (611)

k can be determined from the specific form of I[u] (and δu and u must lie in the same functionspace since we want to be able to compute I[u + δu]) The fact that variations δu must vanishon the Dirichlet boundary partΩD stems from the need for perturbations that allow the perturbedfunction 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 partΩD

With this we define the first variation of I (ie the analog of a first derivative) as

δI[u] = limεrarr0

I[u + ε δu] minus I[u]ε

= d

dεI[u + ε δu]∣

εrarr0

(612)

Analogously higher-order variations are defined recursively via

δkI[u] = δ (δkminus1I) for k ge 2 (613)

Note that a Taylor expansion of a functional I can now be written as

I[u + δu] = I[u] + δI[u] + 1

2δ2I[u] + 1

3δ3I[u] + (614)

The following are helpful relations (which follow directly from the definition of variations) Forany functions u v isin U functionals Ii ∶ U rarr R and constants αi isin R we have the following rules

δ (α1I1 + α2I2) = α1 δI1 + α2 δI2

δ(I1I2) = (δI1)I2 + I1(δI2)

δdu

dx=

d

dxδu (assuming differentiability of u)

δ intΩ u dx = intΩ δu dx (assuming Ω is independent of u)

δI[u v ] =d

dεI[u+ε δu v+ε δv ]εrarr0 (for functionals depending on several functions)

39

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 62 Calculation of variations

Let us consider

I[u] = int1

0u2 dx so that we seek u isin U =H0(01) (615)

The first second and k-th variations respectively follow as

δI = limεrarr0

d

dεint

1

0(u + ε δu)2 dx = lim

εrarr0int

1

02(u + ε δu)δu dx = 2int

1

0uδu dx

δ2I = limεrarr0

δI[u + ε δu] = limεrarr0

d

dεint

1

02(u + ε δu) δu dx = 2int

1

0(δu)2 dx

δkI = 0 for all k gt 2

(616)

Notice that we automatically recover the Taylor series

I[u + δu] = int1

0(u + δu)2 dx = int

1

0u2 dx + int

1

02uδu dx + int

1

0(δu)2 dx

= I[u] + δI[u] + 1

2δ2I[u]

(617)

mdashmdashmdashmdash

The above gives the formal definition of variations which can always be applied to derivevariations of arbitrary order As a practical shortcut note that for a functional

I[u] = intΩf(unablaunabla2u ) dx (618)

we may write

I[u] = d

dεint

Ωf(u + ε δunablau + ε δnablaunabla2u + ε δnabla2u ) dx∣

εrarr0

= intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx

(619)

so that we may use from now on that

δI[u] = intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx (620)

The analogous of course also applies in higher dimensions ndash which will become important inour later boundary value problems For example if we seek a displacement field u(x) ∶ Ωrarr Rdthe functional becomes

I[u] = intΩf(ui uij uijk ) dV (621)

so we can write

I[u] = intΩf(unablau ) dx rArr δI[u] = int

Ω( partfpartui

δui +partf

partuijδuij ) dV (622)

using classical index notation

Now that we have established the basics of variational calculus let us exploit the variationalstructure of our boundary value problems ie their solutions u isin U can be interpreted asextremal points over U of a functional I[u]

40

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 63 Hanging bar under its own weight revisited (again I know)

Once more let us consider a bar of length L (Youngrsquos modulus E cross-sectional area Adensity ρ) that is hanging from the ceiling and deforming under its own weight (gravitationalacceleration g) with a constant force F applied to its free end at x = L u(x) denotes the 1Ddisplacement field where x runs from top to bottom of the bar The total potential energy isthus the total strain energy of the elastic bar minus the work done by the graviational bodyforces and the constant end force

I[u] = intL

0

E

2u2x(x)Adx minus int

L

0ρg u(x)Adx minus F u(L) (623)

and

u(x) isin U = u isinH1(0 L) ∶ u(0) = 0 (624)

The first variation yields

δI[u] = 0 = intL

0Eux(x) δux(x)Adx minus int

L

0ρg δu(x)Adx minus F δu(L)

= minusintL

0[Euxx(x) + ρg] δu(x)Adx +EAux(L) δu(L) minusEAux(0) δu(0) minus F δu(L)

(625)

where we used integration by parts of the first integral to arrive at the final form Noting thatδux(0) = 0 because of essential boundary condition the above reduces to

intL

0[Euxx(x) + ρg] δu(x)Adx minus [F minusEAux(L)] δu(L) = 0 forall δu isin U0 (626)

As we noted above recall that (626) must vanish for all variations δu isin U0 This implies thatwe must in fact have

Euxx(x) + ρg = 0 and EAux(L) = F (627)

These are exactly the governing equation and traction boundary condition that the bar needsto satisfy cf Eq (546) Hence we have shown that rendering (623) stationary with respectto u(x) isin U is equivalent to solving (627) with u(0) = 0 That is we have a strategy to replacethe solution of a differential equation by an optimization problem and we would in both casesobtain the exact or classical solution

To see if the solution is a maximizer or minimizer of I let us compute the second variation

δ2I[u] = intL

0Eδux δuxA dx = int

L

0E(δux)2 dV ge 0 forall δux (628)

Hence δ2I[u] gt 0 in general (unless δu equiv 0) and as in classical functional analysis we concludethat the extremum is a minimizer We thereby tactily assume that E gt 0 E lt 0 would lead tosolutions being unstable energy maxima which implies that E gt 0 is a (necessary and sufficient)stability condition

Finally notice that the first line here is exactly the principle of virtual work discussed beforecf Eq (547) if we replace δu by v Thus our variations here are the same as virtual displace-ments in the principle of virtual work and we obtain the latter automatically from the energyfunctional as the first variation

mdashmdashmdashmdash

41

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us revisit the hanging bar problem once more to observe a particular structure of theproblem that will come handy shortly For the hanging bar (assuming that E = const) noticethat we can rewrite the energy functional for short as

I[u] = 1

2B[uu] minusL[u] (629)

where we introduced a bilinear form B and a linear form L defined as

B[a b] = intΩE(grada)(grad b) dV and L[a] = int

Ωρga dV minus int

partΩD

ta dS (630)

where we included tractions t applied to the surface ΩD

The above is in fact a recipe for a more general class of variational problems (the same structureapplies to heat conduction electrostatics or mechanical equilibrium as discussed later) Let usconsider an energy functional of the general form (629) Taking variations shows that

I[u] = 1

2B[uu] minusL[u] rArr δI[u] = B[u δu] minusL[δu] (631)

For example in the hanging bar problem compare the energy functional (623) and the firstvariation (625) to confirm the above relation

For convenience let us adopt the following notation found in various textbooks on finite ele-ments the first variation is usually abbreviated as an operator acting on both the unknownfield u and its variation δu ie we write G ∶ U times U0 rarr V sub R with

G[u δu] = limεrarr0

d

dεI[u + δu] (632)

Without proof we just note that one of the beauties of the above variational problem (631)(based on a bilinear and a linear form) is that a unique minimizer exists by the Lax-Milgramtheorem (for more information see Appendix F) Recall that for the linear heat problem abovewe already showed that the solution is a unique (global) minimizer if E gt 0

63 Rayleigh-Ritz Method

One way to exploit the above variational structure right away is the so-called Rayleigh-Ritzapproach which introduces an approximation uh(x) asymp u(x) eg a polynomial series

uh(x) =n

suma=0

caxa (633)

with unknown coefficients ca isin R Any choice of (linearly independent) ansatz functions ispermissible including eg Fourier series of cosine or sine terms as long as they satisfy anyexisting essential boundary conditions and the differentiabilityintegrability requirements ofthe problem (eg a piecewise linear guess for uh(x) would not be permissible if its derivativesmust be square-integrable etc) For example for the hanging bar problem we need to enforcec0 = 0 because of the boundary condition u(0) = 0

Next we insert uh(x) into the total energy functional I which then depends only on the coef-ficients ca as the only unknowns We know that the exact equilibrium solution u(x) minimzies

42

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

the total potential energy I[u] Therefore we conclude that we may want to minmize I[uh]with respect to ca giving a system of equations

0 = partI[uh]

partcaforall a = 0 n (634)

Recall that we had expressed the energy functional in operator form so that

I[uh] = 1

2B[uh uh] minusL[uh] = 1

2B[

n

suma=0

caxan

sumb=0

cbxb] minusL[n

suma=0

caxa]

= 1

2

n

suma=0

n

sumb=0

cacbB[xa xb] minusn

suma=0

caL[xa](635)

where we exploited the (bi)linear nature of the two forms B[sdot sdot] and L[sdot] This leads to

partI[uh]partca

=n

sumb=0

cbB[xa xb] minusL[xa] = 0 forall a = 0 n (636)

This is a linear system of equations to be solved for the unknown coefficients cb (with b = 0 n)which we abbreviate as

n

sumb=0

Kabcb = F a for a = 1 n or Kc = F (637)

with K isin Rntimesn and F c isin Rn having components

Kab = B[xa xb] F a = L[xa] and c = (c0 cn)T (638)

Notice that this is fully analogous to (520) 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 problemwhich is more physical)

Example 64 Hanging bar by Rayleigh-Ritz

For the problem of the freely hanging bar (no end force applied here for brevity) the totalenergy potential with the approximate solution uh(x) from (633) becomes

I[uh] = intL

0

E

2(uhx)2(x)Adx minus int

L

0ρg uh(x)Adx with uh(x) =

n

suma=1

caxa (639)

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

partI[uh]partca

= 0 for a = 1 n (640)

As we know from (636) the resulting system of stationarity equations is Kc = F with

Kab = B[xa xb] = intL

0E(xa)x(xb)xAdx

= intL

0Eaxaminus1bxbminus1Adx = abEAint

L

0xa+bminus2 dx = abEA La+bminus1

a + b minus 1

(641)

43

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = L[xa] = intL

0ρg xaAdx = ρgAint

L

0xadx = ρgAL

a+1

a + 1 (642)

Solving the linear system Kc = F for any n ge 2 (feel free to try this as an exercise at home)yields

c1 = ρgEL c2 = minus ρg

2E and ca = 0 for all a gt 2 (643)

which is in fact the exact solution see Eq (317)

u(x) = ρg

2E(2L minus x)x (644)

This could have been expected since we chose polynomial ansatz functions in (633) takinguh(x) isin Pn The exact solution is a polynomial of order 2 If we choose uh(x) isin Pn withn ge 2 the exact solution is contained in the solution space within which we are looking for theoptimal solution As a consequence the Rayleigh-Ritz approach recovers the exact solution asthe energy minimizer Choosing any Pn with n gt 2 does not affect the solution since P2 sub Pnfor n gt 2 so the solution is still contained in the solution space and therefore found

mdashmdashmdashmdash

44

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

7 The weak form

In the previous sections we have seen how indirect methods aim to find approximate solutionsto boundary value problems by introducing an approximate (finite-dimensional) solution spaceand solving for the unknowns describing the sought approximate solution by enforcing thestrong form in some average sense (rather than at every grid point as in finite differences)We have also seen how this ldquoaverage senserdquo can be defined in various ways eg by enforcingthe governing PDE only at collocation points on average over subdomains or by minimizingthe total error made across the entire body Finally we have seen how most boundary valueproblems can be linked to a variational structure implying that the strong form is in fact thestationarity condition of an energy minimization problem This in turn allowed us to replacethe strong form by an optimization problem which was exploited eg by the Rayleigh-Ritzapproach It is important to keep in mind that the variational approach gave us something evenmore powerful it gave us the stationarity conditions of the minimization problem which wewill call the weak form Those stationarity conditions combined with an approximate functionspace where shown to guide us to a linear system of equations to be solved for the unknowncoefficients of the approximate solution Here we would like to explore the underlying structurefurther and finally come to the general mechanical boundary value problem to be solved bymethods such as the finite element technique

71 Classical and weak solutions

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

(E ux)x + s = 0 in Ω

u = u on partΩD

Eux = t on partΩN

(71)

This general strong form applies to the mechanical problem (where u is the displacement field EYoungrsquos modulus s = ρb body forces u is a prescribed displacement and t a prescribed surfacetraction) as well as to electrical problems (where u denotes the electric voltage potential E isthe 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 andt 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 tothe above problem let us define that a function u is of class Ck(Ω) (or in the function spaceCk(Ω)) with an integer k ge 0 if it is k times continuously differentiable over Ω (ie u possessesderivatives up to the kth order and these derivatives are continuous functions) Hence thestrong form (71) imposes the requirement

u isin C2(Ω) (72)

That is we require the function to be twice continuously differentiable in order for the strongform to make sense4

4To be exact the strong form in fact requires that u isin C2(Ω) cap C0

(Ω) ie functions u must be twicecontinuously differentiable within Ω and at least continuous up to the boundary partΩ But this detail is of minorimportance here and in the following

45

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 71 Ck-continuity

Any kth-order polynomial u(x) with k ge 0 is generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks or shocks (or discontinuities in the BCsICs)we usually assume that the classical solution fields are Cinfin(Ω) so we may take derivativesotherwise derivatives exist almost everywhere (ae)

mdashmdashmdashmdash

As we showed previously the solution u can alternatively be found by using a variationalapproach viz as the minimizer of I[u] within a function space U which we write as

u = arg minI[u] ∶ u isin U with I[u] = 1

2B[uu] minusL[u] (73)

whose stationarity condition is

δI[u] = G[u δu] = B[u δu] minusL[δu] = 0 for all δu isin U0(Ω) (74)

Therefore we can reformulate the problem (71) (without in principle knowing anything aboutvariational calculus) as

find u isin U st G[u v] = B[u v] minusL[v] = 0 for all v isin U0(Ω) (75)

This is called Galerkinrsquos weak form and the resulting solution u is called weak solutionThis terminology has the following origin Notice that we no longer seek solutions u isin C2(Ω)but instead we seek solutions u within

U = u isinH1(Ω) ∶ u = u on partΩD (76)

which satisfy (75) for all v isin U0(Ω) There is one essential difference between the weak andstrong form solutions u of the weak form are required to be u isin H1(Ω) whereas the strongform required solutions u to be u isin C2(Ω) The latter is a considerably stronger constraintThus we have weakenedrelaxed the conditions on the family of solutions which is why theabove is called the weak form

To see this take eg functions u that are piecewise-linear (like a zig-zag curve) The firstderivative is piecewise-constant and is therefore square-integrable (we can easily integrate apiecewise-constant function) hence u satisfies u isin H1(Ω) By contrast if you take a secondderivative differentiating the piecewise-constant first derivative leads to a sum of delta functions(which are certainly not continuous functions) so u notin C2(Ω) Such a function does not qualifyas a solution to the strong form as the governing PDE makes little sense with sums of deltafunctions Hence piecewise-linear functions qualify as approximate solutions of the weak formbut not necessarily of the strong form Thus we have relaxed the requirements on our function

Recall that if v is interpreted as a virtual displacement field then (75) is equivalent to theprinciple of virtual work and the form agrees with (542) (or (547) for the 1D bar problem)This is important because even if no variational basis exists we could still formulate the weakform by starting from the principle of virtual work Whether or not a variational structure

46

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

exists for a given strong form can be verified by the use of Vainbergrsquos theorem summarizedin Appendix G

Computationally solving the weak form is usually preferable over the strong form for (at least)two reasons First u isin H1(Ω) is simpler to satisfy than u isin C2(Ω) (eg piecewise linearinterpolation is sufficient in the weak form but not in the strong form) Second as we showedalready for the Rayleigh-Ritz approach the weak form boils down to solving a system of algebraicequations (rather than solving PDEs)

72 Equivalence of strong and weak forms

We now have two equivalent principles for finding the solution of the BVP described by (71)

Given a function space

U = u isinHk(Ω) ∶ u = u on partΩD (77)

a functional I ∶ U rarr R and the associated bilinear form B(sdot sdot) and linear form L(sdot) both definedon functions u isin U we seek to

(A) find u isin U st u = arg min I[u] (78)

(B) find u isin U st B[u v] = L[v] for all v isin U0 (79)

We know that the two have a unique connection since δI = B[u δu]minusL[δu] Thus we also knowthat

(A)hArr (B) (710)

with a unique solution for this particular type of problem (if it is stable ie if E gt 0)

73 Approximate solutions

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

Uh sub U (711)

in which we seek a solution uh where h stands for the discretization size

An n-dimensional space Uh is defined by a set of n basis or shape functions N1 Nnalong with the approximate functions

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (712)

When we use the same approximation space for uh and vh we make the so-called the Bubnov-Galerkin approximation Alternatively one can choose different function spaces for theapproximations uh and vh which leads to the so-called Petrov-Galerkin method The lattergains importance when solving overunderconstrained problems since it allows us to control thenumber of equations by the choice of the dimension of the space of vh

47

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Assume that the approximation space is chosen wisely so the the exact solution can be attainedwith infinite refinement ie we assume that

for all u isin U there exists uh(v) isin Uh such that limhrarr0

∥uh(v) minus u∥ = 0 (713)

Then we can formulate the discrete problem

(C) find uh isin Uh st B[uh vh] = L[vh] for all vh isin Uh0 (714)

It is a relatively simple exercise to verify that the above form reduces again to a linear systemof equations to be solved To this end insert the approximations (712) into (714) to obtain

B [n

suma=1

uaNan

sumb=1

vbN b] = L [n

sumb=1

vbN b] for all vb (715)

Exploiting that B is bilinear and L is linear lets us transform the above into

n

sumb=1

vb (n

suma=1

uaB [NaN b] minusL [N b]) = 0 for all vb (716)

Since this must hold for all (admissible) vb we conclude that

n

suma=1

uaB [NaN b] = L [N b] for b = 1 n (717)

This is a linear system to be solved for ua (a = 1 n) Comparison to Eq (636) shows thatthe linear equations are identical to those derived for the Rayleigh-Ritz method This is in factnot surprising for the Rayleigh-Ritz method we inserted the approximate solution uh directlyinto I and minimized I[uh] with respect to the unknown coefficients ca Here we first obtainedthe stationarity equation G[u v] = 0 from I[u] exactly and then inserted uh and vh Yet if wechoose the very same function space for uh and vh then both methods lead to the very samesystem of equations Thus we may also re-interpret the Bubnov-Galerkin scheme as computingthe coefficients ua as the minimizers of I[uh]

As before let us define a vector of all unknown coefficients

Uh = u1 unT (718)

Further we define a (symmetric) matrix K isin Rntimesn and vector F isin Rn with components

Kab = B [NaN b] F b = L [N b] (719)

Then the linear system reads

KUh = F hArr Kabub = F a (720)

Note that this system of equations is identical to (638) which was derived by the Rayleigh-Ritzmethod

48

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

8 The mechanical variational problem at small strains

81 General case

After all those precursors let us analyze the mechanical variational problem and start with thesimplest problem quasistatics in linearized kinematics Here the strong form is

σijj + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(81)

and in the special case of linear elasticity (using σij = Cijklεkl = Cijklukl) the above strongform reduces to

(Cijklukl)j + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(82)

From this we see that classical solutions must satisfy u isin C2(Ω)

In the following let us first treat the general case ndash based on (81) ndash and then study linearelasticity ndash given by (82) ndash as a special case The total potential energy functional associatedwith (81) is

I[u] = intΩW (ε) dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parainternal stored energy

minus [intΩρb sdotu dV + int

partΩNt sdotu dS]

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parawork by external forces

(83)

and we seek displacement field solutions

u = arg minI[u] ∶ u = u on partΩD (84)

For the special case of linear elasticity we know that the strain energy density takes the form

W (ε) = 1

2εijCijklεkl =

1

2uijCijklukl (85)

from which we may conclude that the variational problem seeks solutions u isin U subH1(Ω)

We compute the first variation defining sym(sdot) = 12(sdot + sdot

T)

δI[u] = intΩ

partW

partεijsym(δuij) dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS

= intΩσijδuij dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS = 0 forall δu isin U0

(86)

where we used σij = partW partεij and σij = σji (by angular momentum balance) This form isindeed equivalent to the principle of virtual work if we replace δui by vi see Eq (542)

Application of the divergence theorem to the first term above proves the equivalence of the twoforms since

δI[u] = 0 = intpartΩN

(σijnj minus ti)δuidS minus intΩ(σijj + ρbi)δuidV forall δu isin U0 (87)

49

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since this must hold for all arbitrary variations δu isin U0 the two terms in brackets must vanishwhich yields indeed the strong form (81)

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

G(uv) = A(uv) minusL(v) = 0 forall v isin U0 (88)

with

A[uv] = intΩσijvij dV and L[v] = int

ΩρbividV + int

partΩNtividS (89)

Note that the dependence of A on u is not directly obvious but the stresses depend throughthe strains on the displacement field ie σij = σij(ε) and εij = ( sym(uij)) A(sdot sdot) is thereforein general not a bilinear operator while L(sdot) is a linear operator

In the special case of linear elasticity

σij = Cijklεkl = Cijklukl rArr σijvij = Cijkluklvij = Cijkluijvkl (810)

exploiting the symmetries Cijkl = Cijlk = Cklij This leads to

A[uv] = intΩσijvij dV = int

ΩCijkluijvkl = B[uv] (811)

Thus we see that for linear elasticity A is indeed a bilinear operator

Next we introduce the discrete weak form A(uhvh) minus L(vh) = 0 with the Bubnov-Galerkinapproximation

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (812)

so that we arrive at (in component form)

n

suma=1

vai [intΩσij(nablauh)Na

j dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para[F int]

ai

minusintΩρbiN

adV minus intpartΩN

tiNadS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraminus[F ext]

ai

] = 0 for all adm va (813)

which is equivalent to

Fint(Uh) minusFext = 0 with Uh = u1 unT (814)

where we introduced FintFext isin Rdsdotn with components

F ainti = intΩσij(nablauh)Na

j dV and F aexti = intΩρbiN

adV + intpartΩN

tiNadS (815)

As mentioned above for the special case of linear elasticity we have a bilinear form describingthe weak form Inserting the approximate fields (815) then becomes

F ainti = intΩCijkluhklN

aj dV =

n

sumb=1int

ΩCijklubkN

blN

aj dV =

n

sumb=1

ubk intΩCijklNa

jNbl dV

=n

sumb=1

Kabik u

bk with Kab

ik = intΩCijklNa

jNbl dV

(816)

50

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so we arrive at a linear problem to be solved for the unknown coefficients Uh = u1 un

Fint =KUh rArr KUh minusFext = 0 rArr Uh =Kminus1Fext if detK ne 0 (817)

As before matrix K isin Rdsdotntimesdsdotn is by definition symmetric and positive definite as long as theelastic modulus tensor C is strongly elliptic (ie for stable elastic moduli)

For computational purposes notice that vectors Uh isin Rdsdotn and FintFext isin Rdsdotn eg in 3D arerespectively (dropping the superscripts on F for universality)

[Uh] =⎛⎜⎝

u1

un

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

u11

u12

u13

un1un2un3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

[F ] =⎛⎜⎝

F 1

F n

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

F 11

F 12

F 13

Fn1Fn2Fn3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(818)

Here we used 1-index notation like in Matlab (ie we sum over a = 1 n and not a =0 n minus 1 as eg in CC++) so that

uai is the (d sdot (a minus 1) + i)th component of vector Uh in d dimensions (819)

Similarly we apply the same rule to the rows and columns of matrix K so that

Kabik is the component at (d sdot (aminus 1)+ i d sdot (bminus 1)+ k) of matrix K in d dimensions (820)

Note that we now use super- and subscripts on K and F since our unknown coefficients arevector-valued here Any superscript a refers to the a-th coefficient while a subscript i refers tothe i-th component of the coefficient

82 Linear elasticity

In the simplified framework of linear elasticity (already introduced above) the governing equa-tions are oftentimes written in a more condensed version that allows for a simple extraction ofmatrix K We here start with

uh(x) =n

suma=1

uaNa(x) rArr εhij =1

2(uhij + uhji) =

1

2

n

suma=1

[uaiNaj(x) + uajNa

i(x)] (821)

which allows us to write (eg in 3D)

[ε] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

ε11

ε22

ε33

2ε23

2ε13

2ε12

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

N11 0 0 N2

1 0 0 Nn1 0 0

0 N12 0 0 N2

2 0 0 Nn2 0

0 0 N13 0 0 N2

3 0 0 Nn3

0 N13 N1

2 0 N23 N2

2 0 Nn3 Nn

2

N13 0 N1

1 N23 0 N2

1 Nn3 0 Nn

1

N12 N1

1 0 N22 N2

1 0 Nn2 Nn

1 0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

B

Uh (822)

where we introduced the matrix B isin R3ntimes6 in 3D (and analogously B isin R2nsdot3 in 2D) in order towrite for short

ε(x) =B(x)Uh (823)

51

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here use Voigt notation to condense the strain tensor into a strain vector with only uniquecomponents Since ε is symmetric one usually stores only the six independent components ina vector which leads to the above Voigt notation The factor 2 in the shear strain componentsin Voigt notation (which is not found in the stresses) is required so the energy density isconveniently given by W = 1

2σijεij =12 ε sdot σ

Hence we may define the stress vector σ in Voigt notation and the associated linear elasticconstitutive law as (again in in 3D)

σ = (σ11 σ22 σ33 σ23 σ13 σ12)T rArr σ = E ε rArr σ = EBUh (824)

where E denotes an elastic stiffness matrix whose components are deduced from C and followfrom the definitions of stresses and strains For example for an isotropic linear elastic materialcharacterized by Youngrsquos modulus E and Poissonrsquos ratio ν the E-matrix in 3D reads

[E3D] = E

(1 + ν)(1 minus 2ν)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 minus ν ν ν 0 0 0ν 1 minus ν ν 0 0 0ν ν 1 minus ν 0 0 0

0 0 0 1minus2ν2 0 0

0 0 0 0 1minus2ν2 0

0 0 0 0 0 1minus2ν2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(825)

while the 2D version depends on the plane stress vs plane strain scenario

[Eplane stress] =E

1 minus ν2

⎛⎜⎝

1 ν 0ν 1 0

0 0 1minusν2

⎞⎟⎠ [Eplane strain] =

E

(1 + ν)(1 minus 2ν)

⎛⎜⎝

1 minus ν ν 0ν 1 minus ν 0

0 0 1minus2ν2

⎞⎟⎠

(826)

Analogous matrices can be derived for other elasticities eg for general linear elastic anisotropicmedia

Altogether we thus arrive at the stored internal energy

I int = intΩW dV = int

Ω

1

2σ sdot ε dV = int

Ω

1

2ε sdotE ε dV = 1

2Uh sdot int

ΩBTEB dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraK

Uh (827)

so that we observe that

I int = 1

2Uh sdotKUh rArr F int = partI

int

partUh=KUh (828)

and the matrix K can be computed quickly as

K = intΩBTEB dV (829)

with B from (822) and E depending on the material model (note that B contains only ba-sistrial function derivatives so that ndash once a basis Na for a = 1 n has been chosen ndash B isknown and can be compted)

52

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

9 Interpolation spaces

So far we have assumed that the approximate solution uh (or uh in higher dimensions) is basedon a choice of basisshape functions Na(x) with a = 1 n Before discussing particular suchbasis functions it is important to consider what conditions those shape functions Na(x) mustsatisfy We have seen already that polynomial or Fourier series may lead to simpler integralswhen computing matrixK and right-hand-side vector F Yet this is only an observation and norigorous constraint on the basis functions Let us here discuss the requirements of appropriateinterpolation spaces

91 Shape functions

We consider approximations uh isin Uh of the type

uh(x) =n

suma=1

uaNa(x) (91)

which are defined through the shape functions Na(x)

In general there are two possible choices for the nature of Na(x)

global shape functions are defined everywhere in Ω ie ∣suppNa∣ sim ∣Ω∣eg polynomials Na(x) = xa or trigonometric polynomials Na(x) = cos (π(a minus 1)x)

local shape functions are defined only locally ∣suppNa∣ ≪ ∣Ω∣eg picewise linear shape functions

Here we introduced the support of a continuous function f ∶ Ω rarr R as the set of all points5

where f(x) ne 0 ie

supp f = x isin Ω ∶ f(x) ne 0 (92)

This means that f(x) = 0 for all points outside the support ie for x isin Ω supp f

x

x

Na Na

suppNa suppNa

local shape functions global shape functions

Irrespective of global or local shape function choices for any set of shape functions the followingshape function properties must be satisfied

(I) For any x isin Ω there must be at least one a with 1 le a le n such that Na(x) ne 0 (iethe whole domain must be covered) Otherwise no approximation would exist in certainregions or at certain points in the body

5To be more specific the support is the closure in Ω of the set of all points with non-zero f(x) Yet this isof minor importance here so we will not make that differentiation

53

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(II) The chosen shape functions Na should allow us in some ldquosimplerdquo manner to satisfy anyDirichlet boundary conditions where required (recall that uh should satisfy the essentialBCs)

(III) All shape functions must be linearly independent ie

n

suma=1

uaNa = 0 hArr ua = 0 for all a = 1 n (93)

In other words given any function uh isin Uh there exists a unique set of parametersu1 un such that

uh =n

suma=1

uaNa (94)

Linear independence is important since it avoids ill-posed problems For example takeUh = P2 and N1N2N3 = 1 x x2 so that uh = u1N1 + u2N2 + u3N3 Hence if eguh = a+bx then we immediately conclude that u1 = a u2 = b u3 = 0 uniquely By contrastif we chose the not linearly independent functions N1N2N3 = 1 x1+x there wouldbe no unique choice of the coefficients since uh = a + bx in this case would have solutionsu1 = a minus s u2 = b minus s u3 = s for arbitrary s isin R

More generally if there existed a set α1 αn ne 0 such that sumna=1 αaNa = 0 then this

set of parameters could be added on top of any solution u1 un such that

uh =n

suma=1

uaNa =n

suma=1

(ua + αa)Na = uhα (95)

which means both uh and uhα are solutions (hence the problem is not well-posed)

For these reasons we must define shape functions that are linearly independent If func-tions N1 Nn are indeed linearly independent then we call them a basis of Uh

(IV) The shape functions Na must satisfy the differentiabilityintegrability requirements of theweak form (this depends on the problem to be solved as discussed before in the contextof the weak form in Section 7)

(V) The shape functions must possess ldquosufficient approximation powerrdquo In other wordsconsider uh isin Uh sub U we should ensure that uh = sumna=1 u

aNa rarr u as n rarr infin Thisrequirement is important and will be discussed below in Section 93

92 Approximation power and completeness

Condition (V) above tells us that for an approximation uh to converge to u we must pick anapproximate function space Uh which gives the solution uh ldquoa chance to convergerdquo to u Forexample assume you aim to approximate a high-order polynomial u isin Pn (with n ≫ 1) by anapproximation uh using shape functions 1 x x2 x3 xn This is expected to converge asnrarrinfin because the coefficients of u will approach the coefficients of uh However choosing thebasis functions poorly as 1 x x3 xn (notice the x2-term is omitted) will never converge asnrarrinfin If all terms are present and none is omitted then polynomials are expected to convergeby the following theorem

Weierstrass approximation theorem Given a continuous function f ∶ [a b] sub R rarr R andany scalar ε gt 0 then there exists a polynomial

pn(x) isin Pinfin such that ∣f(x) minus pn(x)∣ lt ε for all x isin [a b] (96)

54

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This means every continuous function u can be approximated by a polynomial approximiationuh isin Pn to within any level of accuracy Therefore N i = 1 x x2 x3 ie the polynomialsin R is a suitable choice for the shape functions that satisfy the so-called completenessproperty (and we have shown their linear independence)

Note that as discussed above one cannot omit any intermediate-order terms from the set

1 x x2 x3 (97)

As an extension the Weierstrass approximation theorem also applies to trigonometric poly-nomials (cf Fourier series)

93 Completeness in higher dimensions

When going to higher dimensions we need to specify what complete polynomials are A poly-nomial approximation in Rd is complete up to order q if it contains independently allmonomials xα with ∣α∣ = α1 + + αd le q ie using multi-indices we write

uh =q

sumβ=0

sum∣α∣=β

cαxα (98)

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

1D For d = 1 the above reduces to

uh =q

sumβ=0

sumα=β

cαxα =

q

sumβ=0

cβxβ (99)

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 93

2D for d = 2 with coordinates x1 and x2 we use the above definition of complete polynomialsFrom the above definition we conclude

uh =q

sumβ=0

sumα1+α2=β

c(α1α2)xα11 xα2

2 (910)

This results in the following bases for increasing q-values

q = 0 ∶ 1q = 1 ∶ 1 x1 x2q = 2 ∶ 1 x1 x2 x

21 x1x2 x

22

q = 3 ∶ 1 x1 x2 x21 x1x2 x

22 x

31 x

21x2 x1x

22 x

32

(911)

The number of independent monomials in 2D is (q + 1)(q + 2)2

The same definition can be extended to higher dimensions

55

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

10 The Finite Element Method

All of the shape functions discussed in previous sections were global ie they were defined overthe entire body Ω This is quite disadvantageous for (at least) two reasons First using globalshape functions such as polynomials xa (for a = 0 n) results in a dense matrix K whenforming the linear system to be solved for the unknown coefficients by the various methodsintroduced before That is because integrals of the type B[NaN b] ne 0 in general The denseK-matrix creates high computational costs (by contrast a sparse matrix admits more efficientsolving of the system of equations) Second global shape functions are problematic when itcomes to Dirichlet BCs imagine eg prescribing the displacements at both ends of a 1D barEnforcing uh(0) = 0 is simple whereas setting uh(0) = 0 and uh(L) = ∆u is more involved asthe latter leads to a condition involving all unknown coefficients

uh(x) =n

suma=0

uaNa(x) rArr uh(0) = u0 = 0 uh(L) =n

suma=1

uaNa(L) = ∆u (101)

Such global coefficient constraints as given by the latter form are especially cumbersome whendealing with multiple essential BCs in higher dimensions The motivation for the finite elementmethod was hence to construct local shape functions that admit the relatively easy implemen-tation of essential BCs (while also resulting in sparse matrices)

The main idea is to introduce a discretization Th which splits Ωinto a finite number of subdomains Ωe the so-called elementssuch that

Ωe sube Ω Ω =⋃e

Ωe partΩ sube⋃epartΩe (102)

The discretization Th is defined by the collection of nodes andelements it is called a mesh

nodeelement

mesh

Mathematically (and computationally) a finite element (FE) is an object that has

(i) a (sub)domain Ωe sube Ω

(ii) a space of shape functions Nae (defined within Ωe and suppNa

e = Ωe)

(iii) a set of degrees of freedom (dofs) viz the uae-coefficients associated with those Nae

The Finite Element Method (FEM) defines continuous piecewise-polynomial shape func-tions such that

Na(xb) = δab for all a b isin 1 n (103)

In other words each shape function Na is 1 when evaluated at exactly one node a and itvanishes at all other nodes This is the defining relation that determines the shape functionsNotice that if we evaluate the approximation uh(x) at one of the nodes xb then

uh(xb) =n

suma=1

uaNa(xb) =n

suma=1

uaδab = ub (104)

That is the coefficient ub can now be identified as the value of approximate function uh atnode b This makes for a very beneficial interpretation of the (yet to be determined) shapefunction coefficients

56

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us check if FE shape functions satisfying (103) also satisfy the requirements for shapefunctions discussed in Section 91

(I) is automatically satisfied if x isin Ω then we must have x isin Ωe for some element e Conse-quently there must be element shape functions Na(x) ne 0

(II) can be satisfied (approximately) by fixing those degrees of freedom associated with theboundary nodes (while leaving the entire nodes unaffected and vice-versa) For example ifour 1D bar is discretized into n nodes and nminus1 elements such that uh(x) = sumna=1 u

aNa(x)then imposing uh(0) = 0 and uh(L) = ∆u is simply enforced by fixing the coefficientsu1 = 0 and un = ∆u

(III) Linear independence can be shown by contradiction assume that uh(x) = 0 for all x isin Ωwhile there is indeed some ua ne 0 for 1 le a le n Now evaluate uh at any node b

0 = uh(xb) =n

suma=1

uaNa(xb) = ub rArr ub = 0 forall b = 1 n (105)

which contradicts the assumption that some ua ne 0 Thus (103) ensures that we havelinearly independent shape functions

(IV) Integrabilitydifferentiability requirements depend on the variational problem to be solvedand must be ensured For example for the mechanical BVP we have seen that Uh sub H1ie 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 onthe type of piecewise-polynomial interpolation functions to be used

(V) Completeness requires uh rarr u (and thus Uh rarr U) to within desirable accuracy In the FEmethod one commonly enriches Uh by one of the following methods (shown below)

h-refinement refining the discretization Th while keeping the polynomial interpo-lation order within elements fixed (ie decreasing the element size while using thesame type of shape functions)

p-refinement increasing the polynomial interpolation order within a fixed dis-cretization Th (ie keeping the elements but using higher-order polynomial shapefunctions)

hp-refinement a combination of the two above (ie increasing the number ofelements while also increasing the polynomial order of shape functions)

r-refinement repositioning of nodes while keeping the discretization and interpo-lation order fixed (eg moving nodes into regions requiring higher accuracy)

element element element

element

original mesh h-refinement p-refinement r-refinement

linear interpol

linear interpol

quadratic interpolation

linear interpol

When using either of these refinement techniques appropriately within the FE context wemay expect that Uh rarr U and hence that the approximate solution uh converges to the exactsolution u

57

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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 isin Ω so that within a small h-neighborhood of x(and h being interpretable as the element size) we may expand

u(x + h) = u(x) + huprime(x) + 1

2h2uprimeprime(x) + + 1

qhqu(q)(x) +O(hq+1) (106)

Assume that Uh contains all polynomials complete up to degree q (ie Uh = Pq) then thereexists

uh isin Uh such that u(x) = uh(x) +O(hq+1) (107)

Let p denote the highest derivative in the weak form then

dpu

dxp= dpuh

dxp+O(hq+1minusp) (108)

For the solution to converge as h rarr 0 we need the errors to be at least of order O(h) whichimplies that we must have q + 1 minus p ge 1 Thus we must ensure that

q ge p (109)

For example for the mechanicalthermalelectromagnetic variational problem discussed previ-ously we had the requirement uuh isinH1(Ω) since the energy and resulting weak form containedfirst derivatives of u only Hence we have p = 1 and interpolations must satisfy q ge p = 1 There-fore shape functions to be used for solving mechanical BVPs require at least piecewise-linearshape functions

58

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

11 Finite element spaces polynomial shape functions in 1D

Let us start with the simplest of all choices continuous piecewise-polynomial interpolation func-tions As explained above we need q ge 1 since p = 1 for the mechanicalthermalelectromagneticvariational problem ie we need at least linear interpolation within elements

111 2-node bar element

The simplest example for our discussion of shape functions is the2-node bar element in 1D Since the element has only two nodes(which we call nodes 1 and 2) we employ shape functions for theinterpolation of the element dofs Ue = u1

e u2e so that

uhe(x) = N1e (x)u1

e +N2e (x)u2

e (111)

and we must have uhe(0) = u1e and uhe(∆x) = u2

e for an elementdefined on x isin [0∆x] as shown on the right

1 2

Dx

1u 2u

x

2N 1Ne e

e e

We know that the shape functions must be linear polynomials (q = 1) so that uhe(x) = c1e + c2

ex(we have only two nodes and therefore must have an interpolation with two coefficients)

Imposing those two constraints implies

uhe(0) = c1e = u1

e uhe(∆x) = c1e + c2

e∆x = u2e hArr c2

e =u2e minus c1

∆x= u

2e minus u1

e

∆x(112)

and hence

uhe(x) = c1e + c2

ex = (1 minus x

∆x)u1

e +x

∆xu2e (113)

Comparison with (111) yields the element shape functions (plotted above) as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (114)

Notice that these functions automatically satisfy (103) ie each shape function a is 1 at nodea and 0 at the respective other node

Differentiating the above linear shape functions yields

N1ex(x) =

d

dx(1 minus x

∆x) = minus 1

∆x N2

ex(x) =d

dx

x

∆x= 1

∆x (115)

so that the (only non-zero) axial strain inside the bar element is constant since

εhxx = uhex(x) =n

sumi=1

uieNiex(x) = u1

eN1ex(x) + u2

eN2ex(x) =

u2e minus u1

e

∆x= const (116)

If we assume a linear elastic bar so σ = E ε we obtain from (815)

F ainte = intΩσxx(εhxx)Na

xdV = int∆x

0Eu2e minus u1

e

∆xNaxA dx = EA

∆x(u2

e minus u1e)int

∆x

0Naxdx (117)

and inserting the constant shape function derivatives finally yields

F 1inte =

EA

∆x(u2

e minus u1e) (minus

1

∆x)∆x = minusEA

∆x(u2

e minus u1e) and F 2

int = minusF 1int (118)

59

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The components of the element stiffness matrix Ke follow as

[Ke] = [partF iint

partuje] = EA

∆x( 1 minus1minus1 1

) (119)

which has the typical form known from 1D assemblies of linear springs of effective stiffnessk = EA∆x We could alternatively have used our definition obtained from the linear elasticmechanical weak form

Kab = intΩeB[NaN b] dV = int

∆x

0ENa

exNbexAdx = EA∆xNa

exNbex =

EA

∆x

⎧⎪⎪⎨⎪⎪⎩

1 if a = bminus1 else

(1110)

where inserting the constant shape function derivatives again led to (119)

Note that the two nodal forces F 1inte and F 2

inte depend linearly on the nodal displacements (ascan be expected from a linear elastic bar) so that

[Finte] = (F1int

F 2int

) = EA∆x

( 1 minus1minus1 1

)(u1e

u2e) hArr Finte =KeUe (1111)

Further we realize that indeed

Ie(Ue) = int∆x

0

E

2(εhxx)

2Adx = 1

2Ue sdotKeUe so Finte =

partIepartUe

(1112)

So far we have only considered axial (ie 1D) deformation of the bar element In general thebar may be part of a 2D or 3D structure so it is important to generalize the above frameworkto higher dimensions This can be achieved by projecting the 2D or 3D displacements of theelement nodes onto the orientation of the bar element as follows

In d dimensions the nodal displacements of the bar element are

Ue = (u1eu

2e)

Twith uae = (uae1 uaed)

T (1113)

That is in 2D we deal with four nodal dofs (viz the u1- and u2-displacement components ofeach of the two nodes in the x1- and x2-directions respectively) while in 3D we have six nodaldofs (the u1- u2- and u3-displacement components of each of the two nodes)

We obtain the orientation of the bar element in space from its

nodal coordinates in the reference configuration Xe = (x1ex

2e)

T

such that ∆xe = ∥x2e minusx1

e∥ In 2D the angle with the x1-axis isobtained from geometry as

ϕe = arctan⎛⎝x2e2 minus x1

e2

x2e1 minus x1

e1

⎞⎠ (1114)

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

1(xe1

1 x )e2

2(xe1

2 x )e2

Dxe

The projection of the nodal displacements Ue onto the bar axis identifies the axial displacementsUe of the two nodes (written with a tilde to avoid ambiguity) as

(u1e

u2e) = (cosϕe sinϕe 0 0

0 0 cosϕe sinϕe)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[R(ϕe)]

⎛⎜⎜⎜⎜⎝

u1e1

u1e2

u2e1

u2e2

⎞⎟⎟⎟⎟⎠

hArr Ue =R(ϕe)Ue (1115)

60

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice further that the resulting axial forces acting at the two nodes Finte = (F 1inte F

2inte)

T

can be decomposed into the nodal forces in 2D Finte = (F 1inte1 F

1inte2 F

2inte1 F

2inte2)

T via

⎛⎜⎜⎜⎜⎝

F 1inte1

F 1inte2

F 2inte1

F 2inte2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

cosϕe 0sinϕe 0

0 cosϕe0 sinϕe

⎞⎟⎟⎟⎠(F 1

inte

F 2inte

) hArr Finte =RT(ϕe)Finte (1116)

Recall that we showed

Finte =KeUe rArr RT(ϕe)Finte =KeRT(ϕe)Ue hArr Finte =R(ϕe)KeR

T(ϕe)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

=Ke

Ue

with the axial stiffness matrix determined above as

[Ke] =EA

∆xe( 1 minus1minus1 1

) (1117)

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

R(ϕe)KeRT(ϕe) = Ke hArr Ke =RT(ϕe)KeR(ϕe) (1118)

Without derivation we mention that the same relations apply in 3D with the rotation matrix

R = ( l m n 0 0 00 0 0 l m n

) (1119)

where l m and n are respectively the direction cosines with the x1- x2- and x3-axes iel = cosang(xe1) where x is the unit vector pointing along the bar axis m = cosang(xe2) etc

Example 111 Truss consisting of three bars in 2D

Consider a truss consisting of three linear elastic bars connected byhinges and supported by a rigid impenetrable ground as shownon the right Loading the truss by a vertical force F we seek thedisplacements of the three nodal hinges

We first compute the stiffness matrix of each bar element individ-ually accounting for two displacement dofs per node By reusingthe stiffness matrix derived in (1117) and (1118) the horizontalbar (bar 1 connecting nodes 1 and 2) with ϕe = 0 has

L L

L1 2

3

F

sbquoƒ

EA

[K1] =RT(0)KeR(0) = EAL

⎛⎜⎜⎜⎝

1 0 minus1 00 0 0 0minus1 0 1 00 0 0 0

⎞⎟⎟⎟⎠ (1120)

Similarly bar 2 on the right (connecting nodes 2 and 3) with ϕe = 2π3 has

[K2] =RT(2π3 )KeR(2π

3 ) = EA4L

⎛⎜⎜⎜⎜⎝

1 minusradic

3 minus1radic

3

minusradic

3 3radic

3 minus3

minus1radic

3 1 minusradic

3radic3 minus3 minus

radic3 3

⎞⎟⎟⎟⎟⎠

(1121)

61

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly bar 3 on the left (connecting nodes 1 and 3) with ϕe = π3 has

[K3] =RT(π3 )KeR(π3 ) =EA

4L

⎛⎜⎜⎜⎜⎝

1radic

3 minus1 minusradic

3radic3 3 minus

radic3 minus3

minus1 minusradic

3 1radic

3

minusradic

3 minus3radic

3 3

⎞⎟⎟⎟⎟⎠

(1122)

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 barrsquosreference axis with the x1-axis with the first node being the center of rotation)

mdashmdashmdashmdash

112 Problem assembly

In order to solve the above truss problem we need to formulate the system of equations tobe solved This requires an important step known as the assembly of the global stiffnessmatrix Each of the above stiffness matrices represents a local stiffness matrix ie each ofthe matrices K1 K2 and K3 are each valid only for one particular element and the matricesare therefore associated with the displacements of the nodes of the respective elements In orderto solve the truss problem we need to formulate the global system of equations for the unknowndisplacements U = (u1

1 u12 u

21 u

22 u

31 u

32)T of the three nodes

Notice that to this end we need to differentiate between local and global dofs eg beamelement 2 (on the right) locally links its two nodes with dofs (u1

e1 u1e2) and (u1

e1 u1e2) However

taking the global view it is linking the global nodes 2 and 3 Hence local node 1 correspondsto the global node 2 and local node 2 corresponds to the global node 3 This local-to-globalmap is an essential book-keeping task within the FEM To avoid confusion we introduced thesubscripts e for local element-internal quantities For example for element 2 we have u1

e = u2

and u2e = u3 For element 3 we have analogously u1

e = u1 and u2e = u3 etc

Example 112 Three-bar truss in 2D (continued)

Let us continue Problem 111 using the above local-to-global map Now that we have understoodhow local nodes (1 and 2 for each beam element) are linked to global nodes (1 2 and 3) wecan assemble the global system All we must do is add the components of the local stiffnessmatrices to the right spots in the global stiffness matrix For example K1 (linking nodes 1 and2) in the global system with U = (u1

1 u12 u

21 u

22 u

31 u

32)T becomes

[K1]global =EA

L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 minus1 0 0 00 0 0 0 0 0minus1 0 1 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1123)

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

[K2]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 0 0 0 0 0

0 0 1 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

0 0 minus1radic

3 1 minusradic

3

0 0radic

3 minus3 minusradic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1124)

62

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

1radic

3 0 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

0 0 0 0 0 00 0 0 0 0 0

minus1 minusradic

3 0 0 1radic

3

minusradic

3 minus3 0 0radic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1125)

Now we obtain the global stiffness matrix simply from the assembly of the local matrices ie

[K] = [K1]global+[K2]global+[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

5radic

3 minus4 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

minus4 0 5 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

minus1 minusradic

3 minus1radic

3 2 0

minusradic

3 minus3radic

3 minus3 0 6

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1126)

In order to solve for the deformation of the truss in Problem 111 we may now use the assembledstiffness matrix (1126) but we must impose proper boundary conditions First we have anexternal force F applied vertically downwards at node 3 The global external force vector(collecting all external forces applied to the truss) reads

[Fext] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

000minusF

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1127)

where we left question marks for the two unknown support reactions in the vertical directionof the two sliders on the ground The natural boundary conditions (here the force F ) are thusimposed through the external force vector Fext

When it comes to essential BCs we must constrain nodes 1 and 2 from moving off the groundso we have u1

2 = 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 wefurther impose arbitrarily u3

1 = 0 (which will result in symmetric deformation)

Let us impose the essential BCs by eliminating the respective rows and columns from the systemConsequently we only retain rows and colums 1 3 and 6 of K and analogously we only retainrows 1 3 and 6 of Fext (which automatically removes the question marks in the external forcevector) Overall we arrive at the linear system

EA

4L

⎛⎜⎝

5 minus4 minusradic

3

minus4 5radic

3

minusradic

3radic

3 6

⎞⎟⎠

⎛⎜⎝

u11

u21

u32

⎞⎟⎠=⎛⎜⎝

00minusF

⎞⎟⎠

rArr⎛⎜⎝

u11

u21

u32

⎞⎟⎠= FL

4radic

3EA

⎛⎜⎝

minus11

minus3radic

3

⎞⎟⎠

(1128)

Hence we see that the truss deforms indeed symmetrically as u11 = minusu2

1 and the top node movesdownwards under the applied load while the bottom nodes move outwards Note that we canalso compute the unknown nodal reactions from Fext = Fint =KU

mdashmdashmdashmdash

63

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order

So far we have only considered linear shape functions When going to higher-order polynomialinterpolation (as required eg for p-refinement but also for BVPs with higher-order derivativesin the weak form) various choices are possible for the definition of the element shape functionsWe here discuss two such approaches

1131 Lagrangian interpolation

The above scenario is a special case (ie the simplest case possible) of Lagrangian interpo-lation in 1D which can be extended to higher orders as follows Assume an interpolation upto degree q ie 1 x x2 xq such that

uhe(x) =q+1

suma=1

Nae (x)uae = a0 + a1x + a2x

2 + + aqxq (1129)

In general shape functions Nae (x) for a = 1 q + 1 can be determined by solving the q + 1

equations

uhe(xi) = ui for all i = 1 q + 1 (1130)

for the q + 1 coefficients ai (i = 0 q) Then rearranging the resulting polynomial allows toextract the shape functions Na

e (x) by comparison of the coefficients of uae cf (113) for the 1Dbar element

Alternatively we can solve

Nae (xb) = δab for all nodes b = 1 q + 1 (1131)

The solution to this problem is quite intuitive

Nae (x) =

(x minus x1) sdot sdot (x minus xaminus1) sdot (x minus xa+1) sdot sdot (x minus xq+1)(xa minus x1) sdot sdot (xa minus xaminus1) sdot (xa minus xa+1) sdot sdot (xa minus xq+1)

(1132)

so that Nae (x) is by definition 1 if x = xa and it vanishes at all

other nodes Hence one can readily verify that Nae (xb) = δab

These shape functions are called Lagrange polynomials Thedenominator is known and depends only on the nodal locationswhile the numerator is indeed a polynomial of order q

Shown on the right is an example of quadratic shape functionsinterpolating the displacement field in a bar element with threenodes

1 2

Dx

1u 2u

x

2N 1Ne e

e e33ue

3Ne

1132 Hierarchical interpolation

An alternative to the above Lagrangian interpolation is so-called hierarchical interpolationHere we construct higher-order interpolations based on lower-order shape functions For ex-ample we start with a 2-node bar element

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (1133)

64

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us enrich the interpolation to reach q = 2 by defining

uhe(x) = N1e (x)u1

e +N2e (x)u2

e + N3e (x)αe (1134)

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

N3e (x) = a0 + a1x + a2x

2 (1135)

which is associated with the newly introduced dof α To identify the coefficients ai recall thatwe must have

N3e (0) = N3

e (∆x) = 0 rArr N3e (x) = c

x

∆x(1 minus x

∆x) (1136)

with some arbitrary non-zero constant c ne 0 (which is to be chosen)

Note that αe does not have to be continuous across elements and can hence be determinedlocally (ie given u1

e and u2e αe can be determined internally for each element which allows

for condensation of the αe-dof with efficiency advantages)

114 2-node beam element

A practical example of elements with higher-order interpolation are beam element Unlikethe 2-node bar element (which only captures stretching of the bar see Section 111) beamelements account for bending (and can be superposed with the bar element to result in generalelements ready for stretching and bending) The linear elastic Euler-Bernoulli beam isthe most common structural element for this purpose whose deformation is defined by thedeflection w(x) Let us first review the underlying governing equations

Consider a continuous linear elastic beam of length L (constant Young modulus E and areamoment Iy) loaded by a distributed transverse load q(x) as well as bending moments My (aboutthe y-axis) and transverse forces Fz (in the positive z-direction) applied at its two ends Thestrong form of this problem (assuming EIy = const) reads

EIywxxxx(x) = q(x) with x isin (0 L) (1137)

with the boundary conditions (flipped signs at the negative cut)

minusF 1z = minusE Iy wxxx(0) minusM1

y = minusEIywxx(0)F 2z = minusEIywxxx(L) M2

y = minusEIywxx(L)(1138)

wxz 1F

z

2F

y

2My

1ML

z

q

The potential energy functional for the variational problem with deflection w(x) is

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1139)

where the plus-signs in the terms involving bending moments result from May being against

the rotation direction of wx The first variation yields the weak form (which must hold for alladmissible v(x))

G[w v] = intL

0[EIywxxvxx minus qv] dxminusF 1

z v(0)minusF 2z v(L)+M1

y vx(0)+M2y vx(L) = 0 (1140)

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

w isin U = w isinH2(0 L) ∶ w = w on partΩD (1141)

65

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Following our definitions from Section 7 we identify from (1140) the bilinear form

B[w v] = intL

0EIywxxvxxdx (1142)

and the linear boundary operator

L[v] = intL

0q vdx + F 1

z v(0) + F 2z v(L) minusM1

y vx(0) minusM2y vx(L) (1143)

such that

G[w v] = B[w v] minusL[v] = 0 forall v isin Uh0 = v isinH2(0 L) ∶ v = 0 on partΩD (1144)

As shown in Section 73 introducing an approximate solution

wh(x) =n

suma=1

waNa(x) (1145)

transforms the continuous problem into a linear problem for the n unknown coefficients wa andthe stiffness matrix associated with the linear problem has components

Kab = B[NaN b] = intL

0EIyN

axxN

bxxdx (1146)

To identify suitable shape functions Na(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 beamelement We know from the weak form that q ge 2 so the simplest admissible interpolation forthe unknown deflection w(x) would be based on 1 x x2 However this would introduce onlythree unknown coefficients (for two nodes) which is why we deliberately go one order higherand choose the basis 1 x x2 x3 This leads to the approximate deflection

whe (x) = c0 + c1x + c2x2 + c3x

3 for x isin [0 Le] (1147)

Since the four coefficients ci are hard to interpret physically in general we instead assign toeach node a deflection w and a deflection angle θ = wx and we use those as the four unknownsdefining the element interpolation The four coefficients ci are thus uniquely defined by thenodal conditions (shown below schematically)

whe (0) = w1e whe (Le) = w2

e whex(0) = θ1e whex(Le) = θ2

e (1148)

In order to clearly associate the shape functions with the nodal dofs let us alternatively writethe element interpolation as

whe (x) =2

suma=1

[Nae (x)wae +Ma

e (x)θae ] (1149)

with the four shape functions N1e and N2

e (associated with the nodal deflections) as well as M1e

and M2e (associated with the nodal rotations)

1 2

Le

1w2w

x

ee

2qe1qe

66

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Inserting the interpolation (1149) into the four conditions (1148) we obtain four equations tosolve for the unknown shape functions The resulting shape functions are known as Hermitianpolynomials which for a beam with x isin [0 Le] evaluate to

N1e (x) = 1 minus 3( x

Le)

2

+ 2( xLe

)3

N2e (x) = 3( x

Le)

2

minus 2( xLe

)3

M1e (x) = x(1 minus x

Le)

2

M2e (x) =

x2

Le( xLe

minus 1) (1150)

We can easily verify that eg N1e (0) = 1 while N2

e (0) = 0 and analogously N1e (Le) = 0 while

N2e (Le) = 1 Further we need to have N1

ex(0) = N1ex(Le) = N2

ex(0) = N2ex(Le) = 0 as well

as M1e (0) = M1

e (Le) = M2e (0) = M2

e (Le) = 0 Note the difference in units between N ie and

M ie because they multiply deflections and deflection angles respectively in the interpolation

(1149) Shown below are the four shape functions

02 04 06 08 10

02

04

06

08

10

02 04 06 08 10

-015

-010

-005

005

010

015

xLe

xLe

2N 1Ne

e

1M Lee

2M Dxee

1 1

Note that this approximation is only one possible choice we could also define alternative nodesand nodal values However the above choice ensures that both deflection and angle are contin-uous across elements (since nodal values are shared by neighboring elements)

Having established the shape functions we proceed to deriving the resulting element stiffnessmatrix where we follow the analogous procedure as for the bar element in Section 111 we firstcompute Ke the stiffness matrix for a beam element that is horizontal and then generalize theformulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke

Let us sort the nodal dofs as Ue = (w1e θ

1e w

2e θ

2e)

T Using (1146) with N1

e M1e N2

e and M2e

(in that order to comply with the nodal dof sorting) we obtain

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠ (1151)

and the nodal reactions (including transverse forces F az and bending moments May conjugate to

the deflections wae and deflection angles θae respectively) are

Finte = KeUe with Finte = (F 1inteM

1inte F

2inteM

2inte)

T (1152)

Here forces and moments have the same directions as the conjugate deflections and rotationangles In conclusion the nodal dofs and the nodal reactions are related linearly via

⎛⎜⎜⎜⎜⎝

F 1inte

M1inte

F 2inte

M2inte

⎞⎟⎟⎟⎟⎠

=2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

w1e

θ1e

w2e

θ2e

⎞⎟⎟⎟⎠ (1153)

67

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Next let us generalize the beam element discussed above by considering a beam in 2D whose

nodal dofs are Ue = (u1e1 u

1e2 θ

1 u2e1 u

2e2 θ

2)T ie each node is now displacing in 2D and

rotating Since the above beam formulation only considers bending let us superimpose the barelement from Section 111 so that the resulting element can stretch and bend (otherwise thenodal dofs would not be independent as the length of the bar would have to remain unchangedwithout the ability of the element to stretch axially)

Consider a horizontal 2-node beam with nodal dofs Ue = (u1e w

1e θ

1 u2e w

2e θ

2)T so that wie

and θi describe the beam deflection while u2e minus u1

e defines the change in length of the beamelement 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 beamelements yielding

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 6 3Le 0 minus6 3Le0 3Le 2L2

e 0 minus3Le L2e

0 0 0 0 0 00 minus6 minus3Le 0 6 minus3Le0 3Le L2

e 0 minus3Le 2L2e

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

+ EALe

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 0 minus1 0 00 0 0 0 0 00 0 0 0 0 0minus1 0 0 1 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1154)

Note that we must carefully associate the stiffness matrix components with the correct nodaldofs as done above for the bending and stretching contributions

Now we can apply a coordinate transformation to generalize the above to beams with arbitraryorientation in 2D with ϕe denoting the angle of the beam elementrsquos reference orientation againstthe horizontal axis (see the schematic below where we flipped the directions of both deflectionsand rotation angles for consistency) as defined in (1114)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e

w1e

θ1

u2e

w2e

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraR(ϕe)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e1

u1e2

θ1

u2e1

u2e2

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Ue =R(ϕe)Ue (1155)

By using the same argument as for the 2-node bar element thestiffness matrix of the generally oriented 2-node beam element isthus obtained as

Ke =RT(ϕe)KeR(ϕe) (1156)

with R(ϕe) and Ke from (1155) and (1154) respectively Ofcourse the same can also be extended to beams in 3D where anappropriate transformation matrix R based on direction cosines isintroduced

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

L

2we~

1we~

1qe

2qe

The key difference between bar and beam elements lies in the deformation modes capturedby each Bars only undergo axial stretching and bar networks are hinged (ie bars carryno transverse forces nor bending moments) The above beam element supports both axial andbending deformation and beam networks are rigidly connected at nodes (angles between beamsat nodal junctions remain constant)

68

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

115 A note on beam elements and boundary conditions

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

The potential energy functional for the variational problem of an Euler-Bernoulli beam withthe deflection field w(x) was given by

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1157)

so that the first variation reads (dropping the dependence on x in the integral for brevity)

δI = intL

0[EIywxxδwxx minus q δw] dxminusF 1

z δw(0)minusF 2z δw(L)+M1

y δwx(0)+M2y δwx(L) (1158)

In order to recover the strong form (whose PDE is EIywxxxx minus q = 0) we integrate the firstterm by parts to obtain

δI = minusintL

0EIywxxxδwxdx + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1159)

and integrating the first term by parts again finally gives

δI = intL

0EIywxxxxδwdx minus [EIywxxxδw]L0 + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1160)

Re-arranging the above leads to the stationarity condition

δI = 0 = intL

0(EIywxxxx minus q) δw dx

minus [F 1z minusEIywxxx(0)] δw(0) minus [F 2

z +EIywxxx(L)] δw(L)minus [minusM1

y +EIywxx(0)] δwx(0) + [M2y +EIywxx(L)] δwx(L) forall δw isin U0

(1161)

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

EIywxxxx minus q = 0 for 0 lt x lt L (1162)

Furthermore the remaining four terms in (1161) must also vanish individually (since we can inprinciple choose the variations at the ends individually and δI = 0 must hold for all admissiblevariations) For example we must have

[F 1z minusEIywxxx(0)] δw(0) = 0 (1163)

which means that either F 1z minus EIywxxx(0) = 0 (ie a transverse force F 1

z is imposed at theend x = 0) or δw(0) = 0 (which implies that w(0) = w1 must be an essential BC) Likewise[minusM1

y +EIywxx(0)] δwx(0) means that either M1y = EIywxx(0) (ie a bending moment is

imposed at x = 0) or δwx = 0 (which implies that wx(0) = θ1 must be an essential BC)Therefore the above form of the first variation (in which the integral term matches the PDEof the strong form) reveals all possible boundary conditions both natural and essential (ieNeumann and Dirichlet respectively)

69

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We thus also need to revise our definition of a Dirichlet boundary condition not neces-sarily every derivative of the primary field u imposed implies a Neumann boundary conditionInstead we extract the notion of Dirichlet vs Neumann boundary conditions from the firstvariation of a variational problem As a rule of thumb essentialDirichlet BCs imposethe function itself as well as derivatives up to order (pminus 1) where p is half the order ofthe PDE in the strong form or the matching order of u and v in weak form (eg for a beamthe PDE is of fourth-order the matching-order weak form contains second derivatives essentialBCs impose the deflection itself or its first derivative)

70

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

12 Shape Functions in higher dimensions

So far we have used polynomial shape functions for element interpolations in 1D and we sawthat the shape functions depend on the element size ∆xe or Le In higher dimensions it wouldbe quite cumbersome to define polynomial shape functions on the actual shape of the elementthus depending on the nodal locations and the geometry of the element in space unless oneuses regular structured meshes (eg grids where all elements have the same shape) In generalall elements have different shapes and it is beneficial to define shape functions independent ofthe specific element shape

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 shapefunctions in the reference configuration to those in real physical space

To this end we introduce a (bijective) mapping φ from a reference domain (with referencecoordinates ξ = ξ η ζ) onto the physical domain (with coordinates x = x1 x2 x3) of anelement e

x = φ(ξ) ie in 3D for i = 123 xi = xi(ξ η ζ) (121)

A schematic of the parametric mapping concept is shown below in 2D for a quadrilateral (bi-linear) element which will be introduced soon The mapping links the element in its referenceconfiguration or space described by coordinates (ξ η) to the elementrsquos representation in realphysical space described by Cartesian coordinates (x1 x2) in 2D

For simplicity we reuse the interpolation concepts from before

so far we used uhe =n

sumi=1

N ie(x)uie

now we use uhe =n

sumi=1

N ie(ξ)uie and x =

m

sumi=1

N ie(ξ)xie

(122)

where we have three options for the mapping

(i) isoparametric mapping n =m and N ie = N i

e (same interpolation of positionsdofs)

(ii) subparametric mapping n gtm (lower-order interpolation of positions)

(iii) superparametric mapping n ltm (higher-order interpolation of positions)

The strategy is now to define N ie(ξ) in the reference configuration We will first discuss this

concept for simplicial elements in the next section before proceeding to more general classes ofpolynomial element interpolations

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

4 4 3

1 2

mapping

element in physical space element in its reference space

71

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

13 Simplicial elements

The probably simplest type of finite element are so-called simplicial elements (and we havealready seen one) These are characterized by having the minimum number of nodes possible ina given dimension Mathematically speaking a simplex of order k is a k-dimensional polytopewhich is the convex hull of its k + 1 vertices

In plain English a simplex in d dimensions is a convex body made up of d + 1 nodes

in 1D a 2-node bar whose interpolation basis is 1 x

in 2D a 3-node triangle (T3) whose interpolation basis is 1 x1 x2

in 3D a 4-node tetrahedron (T4) whose interpolation basis is 1 x1 x2 x3

Overall this shows that the element interpolation in each case is of degree q = 1 (linear) andthe space of shape functions is complete up to linear order for a simplicial element in everydimension

Although one could in principle derive the shape functions for any arbitrary element geometrythis turns out to be cumbersome in general Consider eg a simplicial element in 2D (a triangle)whose three nodes are equipped with some nodal dofs u1 u2 and u3 One could now write

uh(x) =n

suma=1

uaNa(x) (131)

and enforce the conditions uh(xa) = ua to solve the resulting system of equations for the shapefunctions Na(x) as done at the beginning of Section 111 However such an approach isinconvenient as the resulting shape functions will inevitably depend on the nodal locationsxa in a complex manner and therefore vary from element to element based on the elementlocation and geometry As a remedy one resorts to the concept of isoparametric mappings(see Section 12) to introduce general shape functions whose definition does not depend on theelement geometry For simplices one commonly introduces so-called barycentric coordinates

131 Linear Triangle (T3)

In order to derive the shape functions and resulting element inter-polation for a 3-node triangular element (T3) in 2D one definesthe barycentric coordinates

lae(x) =Aae(x)Ae

for a = 123 (132)

where Ae = ∣Ωe∣ is the total area of the triangular element and Aae isthe sub-area opposite from node a when splitting the triangle intothree parts by connecting the nodes to point x (see the schematicon the right) Consequently we have A1

e +A2e +A3

e = Ae 1

23

x

A1

A3A2

Note that by finite element convention we always number the local nodes of an element in 2Dcounter-clockwise

We now have two ways to describe a point inside the triangular element we either use itscoordinate x or the three barycentric coordinates lae to describe the point and there is a uniquerelation (a mapping) between (x1 x2) harr (l1a l2a l3a) In general we need only two coordinates

72

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

to describe a point in 2D space and here we notice that indeed we need only two of thebarycentric coordinates to uniquely describe a point in space (if two of the lae are known thenthe third is known as well since l1e + l2e + l3e = 1) For example we may define

ξ = l1e and η = l2e (133)

as the two coordinates (ξ η) to uniquely describe points within the triangle

Furthermore notice that the barycentric coordinates also satisfy the relation

lae(xb) = δab (134)

(eg if x is one of the nodal locations then two of the three areas Aae are zero and one areaequals Ae) This indicates that the three barycentric coordinates also qualify as shape functionsie we may choose Na(x) = lae(x) Note that also 0 le lie le 1 and sum3

i=1 lie(x) = 1 for all x isin Ωe

The shape functions associated with the three nodes now become

N1e (ξ η) = ξ N2

e (ξ η) = η N3e (ξ η) = 1 minus ξ minus η (135)

The beauty of these shape functions lies in the fact that in the above form they are independentof the element geometry In addition computing shape function derivatives with respect to (ξ η)is obviously trivial N1

eξ = 1 N1eη = 0 etc

We still need to find the link between the Cartesian coordinates (x1 x2) and the barycentriccoordinates (ξ η) To this end let us exploit that we know Na(xb) = δab and further the factthat the shape functions introduced above define a linear interpolation across the element in 2DThe latter is easy to realize when eg moving from one node a to another ndoe b and realizingthat the barycentric coordinates linearly vary between 0 and 1 between these two nodes (Na

e

will decrease from 1 to 0 while N be 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 Asa consequence we may introduce the isoparametric mapping

x(ξ η) =3

suma=1

Nae (ξ η)xae (136)

which applies the interpolation rules (classically used for the dofs) to the nodal locations of theelement Given the nodal locations x1

e x2e and x3

e the above mapping uniquely assigns a pointx in real space to any barycentric coordinates (ξ η) (136) thus presents the link the mappingbetween (x1 x2) and (ξ η)

Of course we may exploit the same interpolation for any nodal degrees of freedom (thus usingan isoparametric mapping) so

uh(ξ η) =3

suma=1

Nae (ξ η)uae (137)

A difficulty arises though when using this interpolation in the finite element context because weneed to compute shape function derivatives Na

xi in real space (needed eg for the calculationof Ke or Fint) It is easy to compute Na

ξ and Naη but that is not what we need (136) defines

(x1 x2) in terms of (ξ η) but not the other way around

Instead of inverting (136) let us use a mathematical shortcut known as the inverse functiontheorem To exploit this relation let us formally write x1 = x1(ξ η) and x2 = x2(ξ η) so thechain rule gives

( uhξuhη

) = ( uhx1x1ξ + uhx2

x2ξ

uhx1x1η + uhx2

x2η) = (x1ξ x2ξ

x1η x2η)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[J]

( uhx1

uhx2

) = [J] ( uhx1

uhx2

) (138)

73

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

with the Jacobian6 matrix

[J] = (x1ξ x2ξ

x1η x2η) (139)

and its determinant

J = detJ = partx1

partξ

partx2

partηminus partx1

partη

partx2

partξ (1310)

Note that like for the deformation mapping F = Gradϕ in continuum mechanics for theisoparametric mapping to be invertible we need to have J gt 0 This implies that elementscannot be distorted (inverted for simplicial elements or non-convex for general elements later)

By substituting our isoparametric mapping (136) for x1 and x2 in (139) we obtain

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξx

a1e

3

sumi=1

Naeξx

a2e

3

suma=1

Naeηx

a1e

3

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

(1311)

This solves the problem as we may now use (138) to switch between derivatives in the referenceconfiguration and in real space As discussed we need to have J gt 0 Thus we can invert J toarrive at (by the inverse function theorem)

( uhx1

uhx2

) = [J]minus1 ( uhξuhη

) = [J]minus1

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξu

ae

3

suma=1

Naeηu

ae

⎞⎟⎟⎟⎟⎠

but also ( uhx1

uhx2

) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naex1

uae

3

suma=1

Naex2

uae

⎞⎟⎟⎟⎟⎠

(1312)

By equating these two and comparing the coefficients of uae we thus obtain

(Naex1

Naex2

) = [J]minus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (1313)

where for brevity we summarized the barycentric coordinates into ξ = (ξ η)T Relation (1313)is generally applicable for any isoparametric mapping and will be valuable in the future

Applying the inverse function theorem to the specific shape functions (135) yields the Jacobianmatrix

[J] = (xξ x2ξ

xη x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naerx

a1e

3

suma=1

Naeξx

a2e

3

suma=1

Naesx

a1e

3

suma=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= (x11e minus x3

1e x12e minus x3

2e

x21e minus x3

1e x22e minus x3

2e) = const (1314)

and

J = detJ = (x11e minus x3

1e)(x22e minus x3

2e) minus (x21e minus x3

1e)(x12e minus x3

2e) = 2Ae = const (1315)

6The Jacobian in mathematics is usually defined as the transpose of J defined in (139) In the FE contextour definition is chosen for convenience so that we do not need a transpose in (1313) while J = detF remainsthe same

74

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice that J and hence J are constant and do not depend on (ξ η)

Further we have

(Naex1

Naex2

) = [J]minus1 (Naeη

Naeξ

) (1316)

As we had seen from (135) that all shape function derivatives Naξ and Na

η are constant (minus1+1 or 0) and since J = const as well we may also conclude that

Naex1

= const Naex2

= const and also dA = dx1 dx2 = J dξ dη = 2Aedξ dη (1317)

The constant shape function derivatives have an important consequence they indicate that allderivatives partuhpartxj within the triangular element are constant

For example for a mechanical boundary value problem we have two nodal dof components in2D uae = (uae1 uae2) and the interpolation of the displacement field reads

uh =3

suma=1

uaeNae (ξ) or uhi =

3

suma=1

uaeiNae (ξ) for i = 12 (1318)

The resulting strains are

εhij =1

2(uhij + uhji) =

1

2

3

suma=1

(uaeiNaxj + u

aejN

axi) = const (1319)

Consequently all strain components are constant within the element This is why the 3-nodetriangular element is also called the Constant Strain Triangle or CST element It also hasthe important consequence that integration of force vectors or stiffness matrices can easily beperformed exactly since the integrands (for the element energy nodal forces and stiffness) areconstant across the element

In case of higher-order triangular elements the following relation is helpful for evaluating inte-grals over the triangular element (shown without proof)

intΩeξαηβ dA = αβ

(α + β + 2)2Ae (1320)

132 Extension to three dimensions

The extension to three dimensions is straight-forward and results in the 4-node tetrahedron(constant strain tetrahedron) with reference coordinates (ξ η ζ) and shape functions

N1e (ξ η ζ) = ξ N2

e (ξ η ζ) = η N3e (ξ η ζ) = ζ N4

e (ξ η ζ) = 1minusξminusηminusζ (1321)

Here the barycentric coordinates are defined via the ratios of the partial tetrahedron volumes(obtained by splitting the tetrahedral element into four tetrahedra based on the location ofpoint x analogous to the above procedure in 2D) Like in 2D the resulting interpolated strainsare constant in the linear tetrahedron and dV = 6Vedξ dη dζ

The following relation is analogous to (1320)

intΩeξαηβζγ dA = αβγ

(α + β + γ + 2)2Ae (1322)

75

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

133 Finite element implementation

When using the above simplicial elements (like any finite element based on an isoparametricformulation) the finite element implementation can make use of the isoparametric mappingSpecifically for the simplicial elements we showed that

nablaxNae = Jminus1nablaξNa

e = const and Je = detJ = 2Ae (1323)

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

εhij = const rArr σij = σij(εh) = const (1324)

The key integrals to be evaluated (eg in 2D with an element thickness t) following Section 8now become

F aintei = intΩeσijN

aexj dV = int

ΩeσijN

aexj tdA = sum

r=ξη

σijJminus1jr N

aer

Jet

2 (1325)

where the classical summation convention (here over j is implied and not written out for concise-ness) Note that if we pre-compute and store the following constant quantities for each elemente (which only depend on the reference element geometry and not on its degrees of freedom)viz

we =Jet

2= const and Na

exj = sumr=ξη

Jminus1jr N

aer = const (1326)

then the calculation of the nodal force vectors reduces to

F aintei = σij(εh)Naexjwe (1327)

where only the stresses must be recomputed each time for given strains (which do depend onthe nodal dofs) Similarly we compute the element energy as

Ie = intΩeW (εh)dV = int

ΩeW (εh) tdA =W (εh)we (1328)

The analogous definition of a B-matrix as introduced in Section 82 can be applied here asfollows 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 straincomponents in Voigt notation using (1314) are computed as

[εh] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

uh11uh22

uh12 + uh21

⎞⎟⎠=⎛⎜⎝

sumea=1 uae1N

aex1

sumea=1 uae2N

aex2

sumea=1 [uae1Naex2

+ uae2Naex1

]

⎞⎟⎠

= 1

2Ae

⎛⎜⎝

y23e 0 y31

e 0 y12e 0

0 x32e 0 x13

e 0 x21e

x32e y23

e x13e y31

e x21e y12

e

⎞⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[B]

Ue with

xije = xie1 minus xje1

yije = xie2 minus xje2

2Ae = x21e y

31e minus x31

e y21e

(1329)

Note that we exploited J = const and we defined Ue = (u1e1 u

1e2 u

2e1 u

2e2 u

3e1 u

3e2)

T Fur-

thermore (xae1 xae2) denotes the 2D-location of the elementrsquos node a

76

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1331 Special case linear elasticity

For the special case of linear elasticity we may write

εh =BUe rArr σ = Eεh = EBUe (1330)

and the same relations apply as in Section 82 (see the definition of the elastic E-matrix there)Consequently we have the element stiffness matrix nodal internal force vector and internalenergy of element e as respectively

Ke = intΩeBTEBdV =BTEBtAe Finte =KeUe Ie =

1

2Ue sdotKeUe (1331)

where we exploited that BTEB = const and the volume of element e is ∣Ωe∣ = tAe for a 2DCST element Even though not wise for reasons of memory consumption the element stiffnessmatrices Ke can be computed and stored a-priori for each element for faster calculation of forcesand stiffness matrices during simulations

1332 General case of non-linear elastic materials

For the more general case of a material that is not linear elastic we may still write

W =W (ε) rArr σ = partWpartε

= σ(ε) C = partσpartε

= C(ε) (1332)

so that

Ie = intΩeW (εh)dV (1333)

and the internal force vector follows as

Finte =partI int

e

partUe= int

ΩeBTσ dV =BTσ(εh)tAe (1334)

while the incremental stiffness matrix (the analog of the stiffness matrix for nonlinearmaterial behavior) becomes

Te =partF int

e

partUe= int

ΩeBTCB dV =BTC(εh)B tAe (1335)

Note that if σ = Eε the above equations recover the linear elastic definitions with C = E = const

134 Higher-order triangles and tetrahedra

Following the above recipe for the simplicial elements one can also define higher-order triangularand tetrahedral elements based on the barycentric coordinates introduced here For examplethe quadratic triangle (T6) element has six nodes so that the interpolation function space is1 x1 x2 x

21 x1x2 x

22 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

With the same barycentric reference coordinates (ξ η) as for the T3 element the shape functionscan be found as

N1e (ξ η) = ξ(2ξ minus 1) N2

e (ξ η) = η(2η minus 1) N3e (ξ η) = θ(2θ minus 1)

N4e (ξ η) = 4ξη N5

e (ξ η) = 4ηθ N6e (ξ η) = 4ξθ with θ = 1 minus ξ minus η

(1336)

77

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since derivatives of the above shape functions are linear strains (and thus stresses) also varylinearly 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 curvedwhereas those of the CST element remained straight during deformation due to the linearinterpolation A schematic T6LST element is shown below

1

23

4

5

6

1

2

3

4

1

2

3

4

56

79

108

LST (T6) CST (T4) LST (T10)

Analogously the quadratic tetrahedron (T10 also shown above) has four corner nodes andsix nodes at edge midpoints resulting in linear strains within the element By our definitionboth T6 and T10 elements make use of a subparametric mapping since displacements areinterpolated based on higher-order polynomials while the mapping of positions between referenceand real space relies on the same linear interpolation based on barycentric coordinates

The same concepts can be extended to higher dimensions and to higher-order interpolation

78

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 The bilinear quadrilateral element

The above simplicial elements are simple to implement and their constant strains within el-ements admit an exact integration of the element energy nodal forces and stiffness matrixHowever the constant fields within the simplicial elements may not be ideal eg fine FEmeshes may be required to achieve the sought accuracy especially in regions with spatiallystrongly 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 elementsas well as elements in 3D

For the same reason as for the simplicial elements (where we aimed for shape function definitionsindependent 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 quadrilateralelement by definition the reference configuration is Ωe = [minus11]2 and node numbering starts inthe bottom left corner and is counterclockwise

Shape functions must satisfy the FE relation Nae (ξb) = δab in the reference configuration with

nodal positions ξb (b = 1 4) In fact these shape functions can be obtained from the 2-nodebar (whose shape functions we derived in Section 111) by scaling the linear scaling of the shapefunctions up to 2D Consider a 2-node bar whose nodes are positioned7 at ξ = plusmn1 whose shapefunctions are

N1e (ξ) =

1

2(1 minus ξ) N2

e (ξ) =1

2(1 + ξ) (141)

It can easily be verified that N1e (minus1) = 1 N1

e (1) = 0 and N2e (minus1) = 0 N2

e (1) = 1

The 2D quadrilateral element in its reference configuration is Ωe = [minus11]2 ie a square whosecorners are located at ξ = (plusmn1plusmn1) The shape functions can thus be obtained by combining theabove 1D bar shape functions independently in the ξ- and η-directions

N1e (ξ η) = N1

e (ξ)N1e (η) =

1

4(1 minus ξ)(1 minus η)

N2e (ξ η) = N2

e (ξ)N1e (η) =

1

4(1 + ξ)(1 minus η)

N3e (ξ η) = N2

e (ξ)N2e (η) =

1

4(1 + ξ)(1 + η)

N4e (ξ η) = N1

e (ξ)N2e (η) =

1

4(1 minus ξ)(1 + η)

(142)

One can easily verify that Nae (ξb ηb) = δab and sum4

a=1Nae (ξ η) = 1 for all ξ = (ξ η)

1 2x

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

44 3

1 2

mapping

Q4 element in physical spaceQ4 element in its reference space

-1 1

2-node bar in itsreference space

7We note that this choice of ξ isin [minus11] for the bar in the reference configuration is arbitrary one could alsohave chosen eg ξ isin [01]

79

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The isoparametric mapping here implies that the (x1 x2)-coordinates are interpolated across theelement using the same shape functions (viz the above ones) as those used for the interpolationof the fields of interest Therefore we have

x1 =4

suma=1

Nae (ξ η)xae1 x2 =

4

suma=1

Nae (ξ η)xae2 (143)

Notice that this implies straight edges (in the reference configuration) remain straight (in theactual mesh) For example take the bottom edge (characterized by η = minus1) the interpolationalong this edge is

x =4

suma=1

Nae (ξminus1)xae =

1 minus ξ2x1e +

1 + ξ2x2e =

x1e +x2

e

2+ x

2e minusx1

e

2ξ (144)

which is a linear interpolation in ξ Therefore the bottom edge in the real mesh in physicalspace is a linear interpolation between the two adjacent nodes Similar arguments hold for alledges so that this element has only straight edges in physical space

Looking at the shape functions we notice that completeness of the polynomial interpolationis up to q = 1 (even though the interpolation basis 1 ξ η ξη contains the bilinear term it isnot complete up to quadratic order see Section 93) This means we must be able to representlinear solutions of the type

uh(x1 x2) = c0 + c1x1 + c2x2 (145)

exactly As simple check reveals that this is indeed the case since our interpolation based onthe four nodal values uae = uh(xae) recovers the exact solution

uh(x1 x2) =4

suma=1

Nae u

ae =

4

suma=1

Nae u

h(xae1 xae2) =4

suma=1

Nae (c0 + c1x

ae1 + c2x

ae2)

= (4

suma=1

Nae ) c0 + c1

4

suma=1

Nae x

ae1 + c2

4

suma=1

Nae x

ae2 = c0 + c1x1 + c2x2

(146)

Hence we know that the chosen isoparametric element interpolation is capable of representinglinear solutions exactly

Furthermore notice that this interpolation scheme ensures that uh is continuous across ele-ments To see this recall from (144) that on any element edge only those two shape functionsare non-zero whose nodes are adjacent to that edge while the other shape functions are zeroThis implies that the interpolated field uh on any edge is simply a linear interpolation betweenthe 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 adjacentelements As a further consequence the above interpolation also ensures integrability in theweak form as a continuous piecewise polynomial field uh guarantees that uh isinH1(Ω)

As for the simplicial element computing shape function derivatives requires the use of theinverse function theorem first introduced in Section 131 In analogy to the simplicial elementwe use x = x(ξ η) and y = y(ξ η) so the inverse function theorem states

(Naex

Naey

) = Jminus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (147)

By contrast to the simplicial elements we no longer have that J nor nablaξNa are constant becauseof the bilinear term ξη in the shape functions Therefore strains and stresses will no longer beconstant within an element

80

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 141 2-node bar revisited

As a simple example recall the 2-node bar element whose shape functions we computed as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (148)

For a reference bar element with nodes at ξ = plusmn1 the analogous shape functions in 1D read

N1e (ξ) =

1 minus ξ2

N2e (ξ) =

1 + ξ2

(149)

It is simple to verify that these indeed evaluate to 0 and 1 at ξ = plusmn1 Applying the inversefunction theorem to this 1D problem gives the scalar Jacobian

J = partxpartξ

= partN1e

partξx1e +

partN2e

partξx2e =

x2e minus x1

e

2= ∆x

2(1410)

and further the relation between the shape function derivatives in physical and reference spaceas

Naex = Jminus1Na

eξ =2

∆xeNaeξ with N1

eξ = minus1

2 N2

eξ =1

2 (1411)

so that we obtain correctly

N1ex = minus

1

2

2

∆xe= minus 1

∆xe N1

ex =1

2

2

∆xe= 1

∆xe (1412)

mdashmdashmdashmdash

When applying the inverse function theorem and the above relations to the bilinear quadrilateral(Q4) element we obtain the Jacobian

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

4

suma=1

Naeξx

a1e

4

sumi=1

Naeξx

a2e

4

suma=1

Naeηx

a1e

4

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= 1

4(minus(1 minus η) (1 minus η) (1 + η) minus(1 minus η)minus(1 minus ξ) minus(1 + ξ) (1 + ξ) (1 minus ξ) )

⎛⎜⎜⎜⎜⎝

x1e1 x1

e2

x2e1 x2

e2

x3e1 x3

e2

x4e1 x4

e2

⎞⎟⎟⎟⎟⎠

(1413)

and J = detJ We notice that J indeed is not constant across the element but varies with ξand η For convenience let us define

[Γ] = [Jminus1] = (Γ11 Γ12

Γ21 Γ22) (1414)

Towards the FE implementation let us also introduce the B-matrix notation To this end wewrite

[ε] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

(1415)

81

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We further exploit the inverse function theorem viz

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

(1416)

Finally we also have

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

Ue (1417)

with the element dofs Ue = (u1e1 u

1e2 u

4e1 u

4e2)

T Altogether this shows that ε =BUe with

B =⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

(1418)

which defines theB-matrix for the Q4 element Again note thatB =B(ξ) ie theB-matrix isnot constant within an element but depends on ξ and η (through the shape function derivativesas well as through Γ = Jminus1 which are both not constant)

Analogous to the simplicial element a useful relation to evaluate area integrals over theelement in the following is (e1e2 being reference unit vectors)

dA = dx times dy = (partxpartξ

dξ e1 +partx

partηdη e2) times (party

partξdξ e1 +

party

partηdη e2) = J dξ dη e1 times e2 (1419)

so that

dA = ∣dA∣ = J dξ dη (1420)

Like for the simplicial elements the above can be used to compute the element energy

Ie = intΩeW (εh)dV (1421)

the internal force vector

Finte =partI int

e

partUe= int

ΩeBTσ dV (1422)

and the incremental stiffness matrix

Te =partF int

e

partUe= int

ΩeBTCB dV (1423)

For the special case of linear elasticity the above reduces to

Ke = intΩeBTEBdV Finte =KeUe Ie =

1

2Ue sdotKeUe (1424)

82

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

15 Higher-order elements Q8 Q9 8-node brick

The bilinear quadrilateral (Q4) element discussed in the previous section was the simplestexample of a (non-simplicial) element in 2D Of course the same concepts can be extended tomore complex elements using higher-order interpolation as well as to 3D elements Here wewould 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 whichinstead uses quadratic interpolation It derives its shape functions from applying the 1D shapefunctions of the 3-node bar (using Lagrangian interpolation) to the 2D case For example thefirst few shape functions are defined as

N1e (ξ η) =

ξ(1 minus ξ)η(1 minus η)4

N2e (ξ η) = minus

ξ(1 + ξ)η(1 minus η)4

N3e (ξ η) =

ξ(1 + ξ)η(1 + η)4

(151)

and all other shape functions follow analogously Overall the resulting interpolation uses thebasis (ie the above shape functions include these monomials)

1 ξ η ξη ξ2 η2 ξ2η ξη2 ξ2η2 (152)

which is complete up to order q = 2 (quadratic)

We notice that the above interpolation apparently includes far more monomials terms thanrequired for a quadratic interpolation (specifically ξ2η ξη2 and ξ2η2 are not required for acomplete quadratic interpolation) Therefore one can also construct elements with less nodesthat still provide a complete quadratic interpolation

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 consequenceshape functions are constructed in a different way than defined by (151) One starts by definingthose shape functions associated with the mid-edge nodes 5 6 7 and 8

N5e (ξ η) =

(1 minus η)(1 minus ξ2)2

N6e (ξ η) =

(1 minus η2)(1 + ξ)2

N7e (ξ η) =

(1 + η)(1 minus ξ2)2

N8e (ξ η) =

(1 minus η2)(1 minus ξ)2

(153)

and concludes the remaining four shape functions (serendipitously) as combinations of the aboveeg

N1e (ξ η) =

(1 minus η)(1 minus ξ)4

minus 1

2(N5+N8) N2

e (ξ η) =(1 minus η)(1 + ξ)

4minus 1

2(N5+N6) etc (154)

Both the Q8 and Q9 element are schematically shown below in their reference configurations

x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q9 in its reference space

5

6

7

8 9x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q8 in its reference space

5

6

7

8

83

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We may also extend the above construction of elements to three dimensions The simplestexample in 3D was the Constant-Strain Tetrahedron already discussed in Section Here wemay introduce further 3D elements by extending eg the definition of the bilinear quadrilateral(Q4) element into 3D

This results in the so-called 8-node brick element Here the 3D reference configuration isdescribed by coordinates (ξ η ζ) and the shape functions are a direction extension of (142)now to 3D which gives

N1e (ξ η ζ) =

1

8(1 minus ξ)(1 minus η)(1 minus ζ) N2

e (ξ η ζ) =1

8(1 + ξ)(1 minus η)(1 minus ζ)

N3e (ξ η ζ) =

1

8(1 + ξ)(1 + η)(1 minus ζ) etc

(155)

The link between the reference and actual configuration is again given by an isoparametricmapping so that shape function derivatives again follow from the inverse function theorem as

nablaxNae = Jminus1nablaξNa

e (156)

and volume integrals make use of

dV = J dξ dη dζ (157)

x

h

(-1-1-1) (1-1-1)

(111)

41 2

brick element in its reference space

z

3

85 6

7

(11-1)

84

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

16 Numerical quadrature

The Q4 Q8 Q9 and brick element are perfect examples to motivate the concepts discussed inthis section viz the use of numerical quadrature Recall that in order to perform finite elementsimulations we may need to compute the element energy nodal forces andor tangent matrix

Ie = intΩeW (εh)dV Finte = int

ΩeBTσ dV Te = int

ΩeBTCB dV (161)

each of which requires computing an integral over the element Ωe In general (unlike for thespecial case of simplicial elements) the integrands are not constant but may be complex func-tions of position (even in the linear elastic case) As a consequence the above integrals cannoteasily be calculated analytically which is why we make use of numerical integration schemes

As a clean mathematical example we start by considering an integral in 1D eg

I[u] = intb

au(x) dx (162)

which can later be extended to higher dimensions For convenience let us introduce the coor-dinate transformation

ξ = 2x minus ab minus a

minus 1 rArr ξ(x = a) = minus1 ξ(x = b) = 1 dξ = 2 dx

b minus a (163)

so that

I[u] = int1

minus1f(ξ) dξ where f(ξ) = b minus a

2u(x(ξ)) (164)

with

x = ξ + 1

2(b minus a) + a (165)

Instead of considering general integrals of the type (162) we concentrate on integrals of thetype (164) (and we have seen that we can transform one into the other) The goal is now toapproximate the integral (164) numerically

161 Example Riemann sums

As an example for numerical integration consider a partition of the range from minus1 to 1 into nsegments separated by n + 1 nodes

P = [ξ0 ξ1] [ξ1 ξ2] [ξnminus1 ξn] such that minus1 = ξ0 lt ξ1 lt ξ2 lt lt ξn = 1 (166)

The Riemann sum is probably the simplest approach to computing the above integral numer-ically by simply summing the contributions from all segments thus defining the approximateintegral S as

I asymp S =n

sumi=1

f(ξlowasti )(ξi minus ξiminus1) with ξiminus1 le ξlowasti le ξi (167)

Here the choice of ξlowasti within each interval is in principle arbitrary It should be somehowrepresentative of the function f within the interval [ξiminus1 ξi]

85

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Different choices of ξlowasti lead to different definitions of S eg including

(i) the left Riemann sum ξlowasti = ξiminus1

(ii) the right Riemann sum ξlowasti = ξi(iii) the middle Riemann sum ξlowasti =

12(ξiminus1 + ξi)

(iv) the trapezoidal sum average of left and right

(v) the upper Riemann sum ξlowasti st g(ξlowasti ) = supξisin[ξiminus1ξi] g(ξ)(vi) the lower Riemann sum ξlowasti st g(ξlowasti ) = infξisin[ξiminus1ξi] g(ξ)

More refined formulations can be found in the so-called Newton-Cotes formulas (the trape-zoidal rule is the Newton-Cotes formula of degree 1) While these Riemann and Newton-Cotesformulas are indeed viable schemes to carry out integration numerically they are rather ineffi-cient as they require the breaking down of the integrand into many segments in general Thefollowing concept of Gaussian quadrature aims to circumvent those computational expenses

x-1 +1

f(x)

xx0

f(x )i

xnxi-1xi

xx0

f(x )i

xi-1 +1

exact integral (middle) Riemann sum quadrature rule

162 Gauss quadrature

An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-ture rules in 3D) which are best suited for integrating polynomial functions The idea is toapproximate the integral by a weighted sum over integration points (as shown in the schematicabove on the right) ie we define

I[u] = int1

minus1f(ξ) dξ asymp

nQPminus1

sumi=0

Wi f(ξi) (168)

The challenge now is to choose the number of integration points nQP as well as the weightsW0 WnQPminus1 and locations ξ0 ξnQPminus1 of all each integration point That choiceshould depend on the function to be integrated (more specifically on its smoothness one caneasily imagine that smooth polynomials require few integration points while strongly fluctuat-ing functions require larger numbers of integration points) For the FE context most functionsof interest will be of polynomial type since our shape functions are commonly defined as poly-nomials

We say a quadrature rule is exact of order q if it integrates exactly all polynomial functionsg isin Pq([minus11]) Gauss quadrature generally chooses nQP quadrature points and associatedweights such that the quadrature rule is exact of order q = 2nQP minus 1 Let us find the optimalweights and integration points for Gaussian quadrature

86

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1621 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mo-ments micro are computed exactly In other words we find the weights and locations by requiringthat

microk = int1

minus1ξkdξ

=nQPminus1

sumi=0

Wi ξki k = 01 2nQP minus 1 (169)

These are 2nQP equations for the 2nQP free parameters (Wi ξi) for i = 0 nQP minus 1 Theequations are generally nonlinear and thus hard to solve analytically Yet we can find solutionsfor the lowest few orders in 1D as follows

a single quadrature point ie nQP = 1 approximates the integral by evaluating the func-tion only at a single location ξ0 isin [minus11]The two equations for the two unknowns (the weight W0 and location ξ0) are obtainedfrom requiring the any constant function f(ξ) = ξ0 and any linear function f(ξ) = ξ1must be integrated exactly This implies that

int1

minus1ξ0 dξ = 2

=W0 ξ00 =W0 and int

1

minus1ξ1 dξ = 0

=W0 ξ10 =W0ξ0 (1610)

From these two equations the first-order quadrature rule follows with

W0 = 2 ξ0 = 0 (1611)

That is only a single quadrature point at location ξ0 = 0 is required to integrate any linearfunction exactly Hence since linear functions are integrated exactly this quadrature ruleis exact to order q = 1

two quadrature points ie nQP = 2 require the calculation of the two weights and asso-ciated quadrature point locations

In close analogy to the above case we now have four unknowns (two weights W0 andW1 and two integration point locations ξ0 and ξ1) and construct the four equations tosolve for those by requiring that any constant linear quadratic or cubic function mustbe integrated exactly

int1

minus1ξ0 dξ = 2

=W0 +W1 int1

minus1ξ1 dξ = 0

=W0 ξ0 +W1 ξ1

int1

minus1ξ2 dξ = 2

3

=W0 ξ20 +W1 ξ

21 int

1

minus1ξ3 dξ = 0

=W0 ξ30 +W1 ξ

31

(1612)

While this is a nonlinear system of equations a simple solution can be found by assumingsymmetric quadrature points with respect to the origin ie ξ0 = minusξ1 In this case wemay conclude that

W0 =W1 = 1 ξ0 = minus1radic3 ξ1 =

1radic3 (1613)

Since this quadrature rule integrates cubic polynomials exactly it is exact to order q = 3

higher-order quadrature rules

Quadrature weights and points for arbitrary orders can be obtained in analogous fashionand most importantly can be found in numerous look-up tables (cf the classical FEMtextbooks) A more systematic way to compute Gauss-Legendre quadrature weights andpoints is given in Appendix I

87

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1622 Other Gauss quadrature rules

Note that for general functions f (which are not necessarily of polynomial type) one cansometimes find a decomposition f(ξ) = w(ξ)g(ξ) where w(sdot) is a known weighting function andg(ξ) is (approxiately) polynomial so that a more suitable quadrature rule may be found via

I[u] = int1

minus1f(ξ)dξ = int

1

minus1w(ξ) g(ξ)dξ asymp

nQPminus1

sumi=0

w(ξi) g(ξi) (1614)

Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type whichare obtained form a weighting function w(ξ) = (1 minus ξ2)minus12 and the quadrature points are theroots of Chebyshew polynomials Gauss-Hermite quadrature uses a weighting function w(ξ) =exp(minusξ2) (and the integral is taken over the entire real axis) Gauss-Legendre quadrature isincluded 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 degree2nQP minus 3 viz

I[u] = int1

minus1f(ξ) dξ asymp 2

nQP (nQP minus 1)[f(minus1) + f(1)] +

nQPminus1

sumi=2

Wi f(ξi) (1615)

163 Higher dimensions

Like the polynomial shape functions the above quadrature rules can easily be extended to 2Dand 3D eg

int1

minus1int

1

minus1f(ξ η)dξ dη = int

1

minus1[Nminus1

sumi=0

Wi f(ξi η)] dη =Nminus1

sumj=0

Wj [Nminus1

sumi=0

Wi f(ξi ηj)]

=nQPminus1

sumk=0

W lowastk f(ξk)

(1616)

with the combined weights W lowastk = WiWj and points ξk = (ξi ηj) obtained from the individual

quadrature rules in each direction By symmetry we choose N = radicnQP so that N2 = nQP

For example consider the Q4 element By using the 1D Gauss-Legendre weights and pointswe now have

first-order quadrature (q = 1) as in 1D has only a single quadrature point (nQP = 1)

W0 = 22 = 4 and (ξ0 η0) = (00) (1617)

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

third-order quadrature (q = 3) now has four quadrature points in 2D (nQP = 22 = 4)

W0 =W1 =W2 =W3 = 1 and (ξi ηi) = (plusmn 1radic3 plusmn 1radic

3) (1618)

Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly

88

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly in 3D the brick element may use Gauss-Legendre quadrature resulting in thefollowing schemes

first-order quadrature (q = 1) still has a single quadrature point (nQP = 1)

W0 = 23 = 8 and (ξ0 η0 ζ0) = (000) (1619)

third-order quadrature (q = 3) now has eight quadrature points (nQP = 23 = 8)

Wi = 1 and (ξi ηi ζi) = (plusmn 1radic3 plusmn 1radic

3 plusmn 1radic

3) (1620)

higher-order schemes follow analogously

Shown below are schematics of the quadrature point locations for Gauss-Legendre quadratureof orders q = 1 and q = 3 in both 1D and 2D

xx0

f(x )0

-1 +1

q = 1 in 1D

xx0

f(x )0

-1 +1x

x0

f(x )0

-1 +1x1

f(x )1

x

h

-1

-1

+1

+1

x0x1

x2x3

q = 3 in 1D

x

h

-1

-1

+1

+1

x0

q = 1 in 2D q = 3 in 2D

Ultimately the choice of a specific quadrature rule in any dimension depends on the functionf(ξ) to be integrated If the latter is of polynomial type then we may choose a Gaussianquadrature rule that leads to exact integration Else we may choose a quadrature rule basedon the smoothness of the function (Appendix J shows that the error introduced by a numericalquadrature rule strongly depends on the smoothness of function f) In general the choice of aquadrature rule is often a compromise between accuracy and efficiency

89

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

17 FEM which quadrature rule to use

171 Integrals in the FE context

The key integrals to be evaluated numerically within the FE context are (eg for a 2D quadri-lateral element with out-of-plane element thickness t) the element energy

Ie = intΩeW (εh)dV = int

1

minus1int

1

minus1W (εh(ξ))J(ξ)tedξdη asymp

nQPminus1

sumk=0

WkW (εh(ξk))J(ξk)te

as well as the nodal force vectors

F aintei = intΩeσij(εh)Na

j dV = int1

minus1int

1

minus1σij(εh(ξ))Na

j(ξ)J(ξ)tedξdη

asympnQPminus1

sumk=0

Wk σij(εh(ξk))Naj(ξk)J(ξk)te

(171)

Fruther we compute the element tangent matrix as

(Te)abik = intΩe

Cijkl(εh(ξk))NajN

bldV = int

1

minus1int

1

minus1Cijkl(εh(ξk))Na

j(ξ)N bl(ξ)J(ξ)tedξ dη

asympnQPminus1

sumk=0

WkCijkl(εh(ξk))Naj(ξk)N b

l(ξk)J(ξk)te(172)

Recall that in those relations the shape function derivatives and the strains are computed asrespectively

nablaxNa = Jminus1nablaξNa and εhij(ξ) =1

2suma

(uaeiNaej(ξ) + uaejNa

ei(ξ)) (173)

Of course the above can also be reformulate in terms of the B-matrix For example for a linearelastic element in 2D we have seen that

Te =Ke = intΩeB(ξ)TEB(ξ)dV asymp

nQPminus1

sumk=0

WkBT(ξk)EB(ξk)J(ξk)te (174)

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

172 Which quadrature rule to use

In all of the above integrals the required quadrature rule depends on the smoothness (orpolynomial order) of the integrands Since stresses shape function derivatives Jacobians andB-matrices are not necessarily smooth polynomials one often cannot (or due to computationalexpenses is not willing to) achieve exact integration for each element For example for the Q4element we have seen that J is linear in ξ hence Γ = Jminus1 is a fractional polynomial and Binvolves both Γ and nablaξNa

e As a consequence BTEB is some fractional polynomial that ishard to integrate exactly in general Therefore we introduce a minimum requirement forthe 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 anglesare preserved or in other words if J = const

90

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 171 Full integration for various element types

Let us determine full integration for the element types discussed before

The 4-node bilinear quadrilateral (Q4) is undistorted if the physical element has theshape of a rectangle (side lengths a and b) so that

J = ab4= const (175)

Then for a linear elastic Q4 element we have

F aintei = int1

minus1int

1

minus1Cijkl εhkl(ξ)N

aj(ξ)

ab

4tedξ dη = abte

4Cijkl int

1

minus1int

1

minus1εhkl(ξ)N

aj(ξ)dξ dη

(176)

where εh = sym(nablaxuh) is at most linear (since the interpolation of uh is bilinear) nablaxNa

is also at most linear for the same reason Overall the integrand is at most a quadraticpolynomial so that we need integration order q ge 2 Recall that in 1D we showed thatq = 2nQP minus 1 so that full integration of the Q4 element in 2D requires nQP = 2 times 2 = 4quadrature points

Full integration of the quadratic 2D elements Q8Q9 requires nQP = 32 = 9 quadraturepoints (the derivation is analogous to the above and is therefore omitted here)

Full integration of the 8-node brick element requires nQP = 8 quadrature points

For simplicial elements we showed that strains and stresses are constant across anelement so that a single quadrature point (nQP = 1) at an arbitrary location inside theelement is sufficient to integrate exactly Usually one chooses the element center whichgives

W0 = 1 ξ0 = η0 =1

3(in 2D) and ξ0 = η0 = ζ0 =

1

4(in 3D) (177)

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 simplicialquadrature rules (instead of Gaussian quadrature rules) whose weights and quadraturepoint locations can be found in look-up tables

mdashmdashmdashmdash

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 elementtangent matrix we make the same observation (ie those are integrated exactly as well) Forexample the energy reads

Ie = intΩeW dV = abte

4

1

2Cijkl int

1

minus1int

1

minus1εhij(ξ)εhkl(ξ)dξ dη

(Te)abij =abte

4Cijkl int

1

minus1int

1

minus1Naj(ξ)N b

l(ξ)dξ dη

(178)

where both Naj(ξ) and N b

l(ξ) are linear in ξ so that the resulting integrand is a quadraticpolynomial for the Q4 element in analogy to the above discussion of the nodal forces

Using an integration rule less than full integration is called under-integration or reducedintegration the opposite is called over-integration Which integration order to use dependsvery much on the element type the material model etc Sometimes under-integration can evenbe beneficial (eg to avoid locking) we will discuss one such example in Section 18

91

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

18 Element defects shear locking and hourglassing

The bilinear Q4 element is a classical example for an element type which displays a so-called element defect ie a spurious numerical artifact when using full integration in certainscenarios ndash specifically when used to simulate beam bending To demonstrate this we considera rectangular element having side lengths a and b in the x1- and x2-directions If bendingmoments M are applied to the two vertical edges then the element is expected to undergo purebending

In an actual (slender) Euler-Bernoulli beam we know from elastic beam theory that the stressesin the beam vary linearly across the thickness and that the only non-zero stress component isthe axial stress Therefore we may write (for an element of size a times b as shown below)

σ11 = minusx2

b2σmax σ22 = σ12 = 0 (181)

where σmax is the maximum tensile stress reached on the surface of the beam (at x2 = plusmnb2)From Hookersquos law in 1D we obtain

ε11 = minusσ11

E= minusx2σmax

Eb2 ε22 = minusν

σ11

E= ν x2σmax

Eb2 ε12 = 0 (182)

Let us try to find this solution using a single Q4 element To this end we apply horizontalforces to all four nodes of the element obtained from lumping the distributed beam stresses tothe nodes according to relation (815) found for the externally applied forces

Fext1 = intpartΩe

σ11N1e dS = minusint

1

minus1(minus x2

b2σmax)N1

e (ξ = minus1 η) t b2

= int1

minus1η σmax

(1 minus (minus1))(1 minus η)4

tb

2dη = minusσmaxtb

6= minusF with F = σmaxtb

6

(183)

(Note the minus stems from the negative cut so the traction at the left edge of the elementresponsible for the forces is in fact minusσ11) Analogously one obtains

Fext2 = F Fext3 = minusF Fext4 = F (184)

That is the bottom edge is stretched while the top edge is compressed (as in beam bending)

a

x1

x2

b MyMy

a

x1

x2

smax

smaxsmax

smax

x

hF

F

F

F

x

hU

U

U

U

beam loaded in bending stress distribution due tothe applied moments

Q4 element with equivalent nodal forces

elastic Q4 element deformedby the nodal forces

1 2

3 4

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 outhere for brevity but assume the exact stiffness matrix)

KeUhe = Fext =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusF0F0minusF0F0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Uhe =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusU0U0minusU0U0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

with U = aσmax

E

(1 + ν)(1 minus 2ν)2(1 minus ν) + (ab)2(1 minus 2ν)

92

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(185)

where we evaluated the element forces and stiffness matrix exactly (since the element is undis-torted we can easily reach full integration with 2 times 2 quadrature points)

The resulting strains within the element are evaluated as

εh11 = minusU

aη εh22 = 0 εh12 = minus

U

bξ (186)

While the axial strain component εh11 is physically reasonable (and the lack of a transverse shearεh22 ndash worst case ndash makes the element too soft against bending) the presence of a non-zero shearstress εh12 is problematic This so-called parasitic shear is not physical but a numerical artifact(elastic Euler beams produce no shear stresses cf (182)) This parasitic shear contributes tothe energy of the element so that ndash when minimizing the potential energy in a boundaryvalue problem ndash this shear component introduces artificial stiffness This becomes apparentwhen calculating eg the angle of bending θ of the beam in the above problem Comparingthe exact one (obtained form beam theory) to the approximate one (obtained from the aboveconstruction) one finds

θapprox

θexact=

1 minus ν2

1 +1 minus ν

2(a

b)

2 (187)

Notice that as the Q4 element becomes more and more slender (ab rarr infin) the numericallyobtained angle approaches 0 That is the element shows what is known as locking or morespecifically shear locking in case of long and slender elements (ab≫ 1) the high shear strainand associated elastic energy prevents the element from deformting it ldquolocksrdquo

MyMy

FF

F F

qapprox qexact

Next let us use numerical quadrature to evaluate the element quantities of interest For exam-ple for the energy we have

Ie = intΩe

1

2εh sdotCεhdV asymp t

2

nQPminus1

sumk=0

Wk εh(ξk) sdotCεh(ξk)J(ξk) (188)

We showed before that full integration requires nQP = 2 times 2 quadrature points (and we havedemonstrated above that exact integration leads to element locking under bending)

If instead we use reduced integration with only a single quadrature point (nQP = 1) locatedat ξ0 = 0 then notice that the strain fields in (186) vanish at the quadrature point locationξ = η = 0 Therefore the strains in this case produce no energy In other words any strain fieldof the form (186) can appear without causing any energy and therefore also without causingany resistance from the element in terms of nodal forces This is a zero-energy mode ofthe under-integrated Q4 element and a serious defect The resulting deformation of elements

93

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

undergoing alternating strains (186) is a numerical artifact and often referred to as hourglassmode or chicken-wire mode because of its appearance

Note that note only the underintegrated Q4 element has such a zero-energy mode For examplethe Q8Q9 elements have a similar zero-energy mode with curved element edges

+ + + +

+ + + +

+ + + +

++

++

underintegrated Q4 mesh showing hourglassing zero-energy mode of anunderintegrated Q8 element

simulation example with hourglassing

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 a2times 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with asingle quadrature point at ξk = 0 for the shear strain εh12 removes the spurious shear contributionwhile 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 deformationmodes) and should hence be used with caution

Overall take-home messages are (i) to not use Q4 elements to simulate beam bending (andinstead chose another type of element) and (ii) to be careful with reduced integration as zero-energy modes can appear as spurious deformation modes in the obtained solution

94

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

19 Assembly

Irrespective of the particular finite element type that is being used to solve a boundary valueproblem its solution requires the assembly of global vectors and matrices Specifically recallthat shape functions associated with a node a are non-zero only in elements adjacent to nodea in the FE context When computing eg the total energy E of a body (not accounting forexternal work) discretized into ne non-overlapping elements we may exploit that

E = intΩW (εh)dV =

ne

sume=1int

ΩeW (εh)dV =

ne

sume=1

Ie (191)

ie the total energy is the sum over all element energies When computing the global forcevectors and incremental stiffness matrices the situation is more complex which is why onecommonly introduces an assembly operator A such that

Fint =neAe=1Finte T =

neAe=1Te (192)

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 andglobal node numbering (and it is the reason elements must have ldquoknowledgerdquo of their node IDs)

Similarly the inverse operator extracts local element quantities from the global vector

Ue = Ae

minus1(U) (193)

For practical purposes it is helpful to recall that entry Uai (where a = 1 n is the node numberand i = 1 d refers to the coordinate) is located at position (a minus 1) sdot d + i in the assembledglobal vector Uh (using MATLAB notation with 1-indexed lists) For example consider a 2Dproblem using 2-node bar elements If an element connecting nodes 1 and 3 computes the nodalforce vectors F 1

inte and F 3inte then those are to be added onto the global force vector as

Fint =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+ F 1inte1

+ F 1inte2

sdotsdot

+ F 3inte1

+ F 3inte2

sdotsdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(194)

Analogously if the element connecting nodes 1 and 3 computes a stiffness matrix K13e then its

components must be added onto the global tangent stiffness matrix as

T =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+K1311 +K13

12 sdot sdot +K1313 +K13

14 sdot sdotK13

21 +K1322 sdot sdot +K13

23 +K1324 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdotsdot sdot sdot sdot sdot sdot sdot sdot

K1331 +K13

32 sdot sdot +K1333 +K13

34 sdot sdotK13

41 +K1342 sdot sdot +K13

43 +K1344 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(195)

Note that because nodes have non-zero FE shape functions only in adjacent elements the abovematrix is generally sparse (which comes with significant computational advantages)

95

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

20 Iterative solvers

The solution of linear elastic problems is easily found by solving a linear system of equations vizKU = Fext so that U = Kminus1Fext (assuming that rigid-body modes have been suppressed) Incase of nonlinear problems ndash such as those arising from more complex material models and fromthe geometric nonlinearity stemming from large deformations ndash an iterative solution method isrequired to solve the generally nonlinear system Fint(U) = Fext(U) (the external forces may ormay not depend on the deformation) Here we discuss a few common examples of such iterativesolvers the most important one being Newton-Raphson iteration

The problem to be solved can be written in the general form

f(U) = Fint(U) minusFext(U) = 0 (201)

where in many cases we assume that Fext is independent of U This however is not generallytrue ndash consider eg nodes attached to elastic springs so the nodal force depends on the positionof the node or a so-called follower force whose direction depends on the bodyrsquos deformation

All iterative solvers start with an initial guess U0 (eg U0 = 0) which is then corrected to find

Un+1 = Un +∆Un (202)

repeatedly until convergence is achieved An iterative scheme converges8 if ∆Un rarr 0 as nrarrinfinor equivalently f(Un) rarr 0 as n rarrinfin The various solution methods discussed in the followingdiffer primarily in the way ∆Un is computed based on a given vector Un

201 Netwon-Raphson (NR) method

The Newton-Raphson method (introduced by Newton in 1669 and generalized by Raphsonin 1690) is the most common technique for solving nonlinear systems of the above type Itstarts with a Taylor expansion assuming a small correction ∆Un

0 = f(Un+1) = f(Un +∆Un)

= f(Un) +partf

partU(Un)∆Un +O (∣∆Un∣2)

(203)

If we neglect higher-order terms then the above can be solved for the increment

∆Un = minus [T (Un)]minus1 f(Un) where T (Un) =partf

partU(Un) (204)

is the tangent matrix Note that we have thus broken the nonlinear problem (which is hardto solve) into many incremental linear problems (that are easy to solve)

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

T abik (Uhn ) =

partF aipartubk

(Un) =part

partubk(int

ΩσijN

aj dV minus F aexti)

= intΩ

partσij

partεhklN blN

aj dV minus

partF aexti

partubk

= intΩCijklNa

jNbldV minus

partF aexti

partubk

(205)

8The fact that an iterative solver converges does not necessarily imply that it converges to the correct equi-librium solution For the special case of linear elasticity indeed unique solution exists

96

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

We note that in general C = C(ε) ie for nonlinear problems the incremental tangent dependson the current state of deformation and hence on the nodal displacements U Only for thespecial case of linear elasticity is C a constant tensor containing the elastic moduli and beingindependent of deformation As shown before we can also write for each element e

Te(U) = intΩeBTCBdV (206)

where C is again the incremental stiffness matrix of the material model In the special caseof linear elasticity we saw that C = E = const and Te = intΩe

BTEB dV = Ke is the constantelement stiffness matrix

The Newton-Raphson solver requires that detT ne 0 in order to find a soltion which is guaranteedin linear elasticity if no rigid body mode exists as discussed in Section 214 (ie the linearizedsystem has no zero-energy mode so that U sdot T U ne 0 for all admissible U ne 0)

For linear elastic problems with constant external forces the Newton-Raphson solver convergesin only a single step since Fint =KU and therefore T =K = const so that

Un+1 = Un +∆Un = Un minus T minus1 [Fint minusFext]= Un minusKminus1 [KUn minusFext]= Un minusUn +Kminus1Fext

=Kminus1Fext

(207)

Let us close by mentioning the (dis)advantages of the Newton-Raphson scheme On thedownside the Newton-Raphson method requires the tangent matrix which may be expensiveto compute it may not always be available analytically and it may require significant com-puter memory (based on the matrix size for a mesh having n nodes in d dimensions we haveT isin Rndtimesnd) In addition the tangent matrix in nonlinear problems is not guaranteed to beinvertible this is particularly problematic in case of problems involving mechanical instabilityOn the plus side the Newton-Raphson method generally displays quadratic convergencewhile iterating which is why it is favorable for the solution of nonlinear problems (and it alsosolves linear problems in one step as shown above) If Newton-Raphson is not a viable optionthen the following techniques offer alternatives

202 Damped Newton-Raphson (dNR) method

A slight modification of the Newton-Raphson method the damped Newton-Raphson methodis beneficial eg when the NR method tends to overshoot (eg in case of oscillatory energylandscapes or multiple minima such as in large-strain elasticity)

The iterative scheme is identical to the classical NR method described above except that

Un+1 = Un + α∆Un with α isin (01) (208)

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

203 Quasi-Newton (QN) method

The Quasi-Newton method is the same as the classical NR method with the exception thatone does not use the actual tangent matrix T for computational simplicity or efficiency Its goal

97

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

is hence to avoid the expensive computation of T (U) and its inversion at each iteration stepTo this end one introduces a matrix Bn and updates its inverse directly

The general algorithm is as follows

(1) start with an initial guess U0 and matrix B0 = T (U0)(2) compute ∆Un = minusBminus1

n f(Un) and Un+1 = Un +∆Un and

Bminus1n+1 =Bminus1

n minus(Bminus1

n zn minus∆Un)otimes∆UnBminus1n

∆Un sdotBminus1n zn

with zn = f(Un+1)minus f(Un) (209)

We omit the full derivation of the update for Bminus1n+1 here for brevity The idea is that Bminus1

n+1 andBminus1n are approximately rank-one-connected using the Sherman-Morrison formula The added

benefit is that not only does T not have to be recomputed exactly but also can the inversion orlinear solver be skipped since the updated inverse is computed explicitly

204 Line search method

The line search method can be used as an improvement for other nonlinear iterative solversSimilar to the damped Newton-Raphson scheme updates are made according to

Un+1 = Un + β∆Un (2010)

where unlike in Section 202 β is not a constant but chosen such that f(Un+1) = 0 Forexample we may find β from solving

∆Un sdot f(Un + β∆Un) = 0 (2011)

This is generally a nonlinear but scalar problem to be solved for β isin R which can be solved bybisection regula falsi secant and other methods

Notice that (2011) is in fact the stationarity condition of the minimization problem

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

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

205 Nonlinear Least Squares

The family of methods based on nonlinear least squares aim to minimize

r(U) = ∥f(U)∥2 = f(U) sdot f(U) (2013)

which results in the stationarity condition

partr

partU(U) = 0 (2014)

This approach is helpful eg in case of over-constrained systems since the formulation ofthe residual r does not require as many equations as U has unknowns Application of theNewton-Raphson technique to this nonlinear system of stationarity equations leads to

∆U = minus [ part

partU

partr

partU]minus1

Un

partr

partU(Un)

= minus [TT(Un)partf

partU(Un)f(Un) +

partTT

partU(Un)f(Un)]

minus1

TT(Un)f(Un)(2015)

98

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

∆U = minus [TT(Un)T (Un)]minus1TT(Un)f(Un) (2016)

This latetr form is known as the Gauss-Newton method Note that this reduces to Newton-Raphson for standard problems (ie those with as many equations as unknowns) HoweverGauss-Newton can also be applied to overdetermined systems (ie more equations than un-knowns)

206 Gradient flow method

Although not necessarily with a proper physical meaning the gradient flow method (alsoknown as gradient descent) has become popular as an iterative solver for quasistatic problems

The idea is to replace the equation

0 = f(Un+1) (2017)

by a dynamic evolution equation

CUn+12 = minusf(Un) and Un+1 = Un +∆t Un+12 (2018)

with eg C = cI with c gt 0 It is obvious that as f rarr 0 we have Un+12 rarr 0 and thus themethod converges Although there is no guarantee to reach an extremum the method is popularbecause it does not require a tangent matrix and is quite robust

For example using a simple backward-Euler discretization for the time derivative and C = cIwe obtain

Un+1 = Un minus1

cf(Un) (2019)

207 Conjugate Gradient (CG) method

The conjugate gradient method follows the idea of iterating into the direction of steepestdescent in order to minimize the total potential energy (as a variation it can also be applied tothe nonlinear least squares problem)

Here the update is

Un+1 = Un + αnSn (2020)

where both the direction Sn and increment αn are determined in an optimal way as follows

The conjugate direction is updated according to

Sn = minusf(Un) + βnSnminus1 (2021)

with β computed from the current solution Un and the previous solution Un according to one ofseveral options (Polak-Ribiere Fletcher-Reeves etc) Then the scalar increment αn is obtainedfrom a line search to find

αn = arg min r (Un + αSn) (2022)

A benefit of the conjugate gradient technique is that as for gradient flow no tangent matrixis required A variation of this scheme originally developed for atomistics but also applicableto the FE method (and oftentimes converging faster than CG) is the so-called Fast InertialRelaxation Engine (FIRE)

99

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

21 Boundary conditions

We recall that the solving a mechanical boundary value problem by the finite element methodreduces to solving the global system of equations given by

Fint(U) = Fext(U) (211)

for the vector of all nodal dofs U If the material is linear elastic then Fint(U) = KU andsystem (211) is linear In general (ie for anything but linear elastic behavior) the system ofequations in (211) is nonlinear In Section 20 we discussed solution strategies for the abovesystem of equations but we still need to turn our attention to boundary conditions which hehave not discussed in detail so far This includes both Neumann boundary conditions (leadingto the specific form of Fext(U)) and Dirichlet boundary conditions (imposing restraints on thedegrees of freedom) These will be discussed in the following

211 Neumann boundary conditions

The right-hand side vector Fext in (211) includes the combined effects of externally appliedbody forces ρb and surface tractions t in general Of course if forces are applied only to FEnodes 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 nodalforces first

In Section 8 we derived the components of the external force vector as

F aexti = intΩρbiN

adV + intpartΩtiN

adS =sume

(intΩeρbiN

adV + intpartΩe

tiNadS) (212)

These integrals can be computed in the same fashion as all FE quantities (such as eg nodalforces and stiffness matrices) and it is convenient to use numerical quadrature to approximatethe above integrals in general For example for a 2D quadrilateral element (such as the Q4 Q8or Q9) we may write the contribution from element e to nodal force component F aexti due tobody forces as

F aextei = intΩeρbiN

adV = int1

minus1int

1

minus1ρbi(ξ)Na

e (ξ)J(ξ)tdξ dη asympnQPminus1

sumk=0

Wk ρbi(ξk)Nae (ξk) tJ(ξk)

(213)

Analogously surface tractions result in an external force on node a in direction i again for a2D isoparametric element e given by

F aextei = intpartΩe

tiNadS = int

1

minus1ti(ζ)Na

e (ζ)Jζ(ζ)tdζ asympnQPminus1

sumk=0

Wk ti(ζk)Nae (ζk) tJ(ζk) (214)

Note that the surface traction term integrates over the boundary of the element (ζ stands foreither ξ or η depending on the orientation of the surface on which the tractions are acting) soin d dimensions we can use a quadrature rule for d minus 1 dimensions (eg for a 2D element weuse 1D quadrature rule on an element edge)

Like for internal forces the global external force vector Fext results from assembling all elementcontributions ie from adding the contributions of all external element force vectors onto theglobal external force vector (see Section 19)

100

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

When using a variational formulation we may interpret external forces also in a variationalsense Specifically we can formulate the work done by the external force on element e as

Wexte = intΩeρb sdotu dV + int

partΩet sdotu dS (215)

The resulting force vector F aexte = partWextepartua acting on node a is given by the sum of (213)

and (214) We note that if t and ρb are independent of the nodal displacements ie Fext isindependent of U then the right-hand side of the system of equations to be solved is constantOtherwise Fint(U) minus Fext(U) = 0 is to be solved where the external forces also depend ondisplacements

Several examples of typical external forces in the FEM context are given below

P

PMy

k

n

au

Dx au

ll0

constant forceconstant moment

linear spring(linearized deform)

linear spring(nonlinear deform)

pressure loading(Q4 elements)

p

p

n2

n1

L1

L2

pL 22

pL 22

pL 21

pL 21

Before we dive into specific examples we point out one important aspect with regards to theimplementation and assembly of the overall problem So far we have primarily consideredproblems with context external forces so that we had to solve Fint(U) = Fext When theexternal forces also depend on the nodal unknowns (as eg in Examples 213 and 213 below)then the problem to be solved is in fact

f(U) = Fint(U) minusFext(U) = 0 (216)

Here we can still establish a variational structure exploiting that

I(U) = E(U)minusW (U)rarrminU

with E(U) = Anee=1Ie(Ue) W (U) = Anee=1Wexte(Ue)

(217)

so that

f(U) = partI

partU(U) = partE

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFint

minus partWpartU

(U)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFext

= Fint(U) minusFext(U) (218)

Here iterative solvers (discussed in Secion 20) need the complete tangent matrix (includingboth those contributions from internal and external forces) so that

T (U) = partf

partU(U) = partFint

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraTint from before

minus partFext

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraText∶ new contribution

= Tint(U) minus Text(U) (219)

Therefore when discussing the specific examples in the following we will define the work done bythe external force Wext along with the resulting external nodal forces F a

ext and the associatedexternal stiffness matrix contribution Text as introduced above When assembling the globalsystem both contributions ndash from internal and external forces ndash must be considered

101

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 211 Constant force

Consider a constant force P applied to a particular node b whose position is displacing with ubThe work done by this external force vector is

Wext = P sdotub (2110)

Therefore the resulting external force vector on any node a is

F aext =

partWext

partua= P δab (2111)

ie the constnat external force P is applied only to node b We note that the associated stiffnessmatrix (which would be needed for iterative solution schemes) vanishes since

T abext =partF a

ext

partub= 0 (2112)

Finally we note that the analogous formulation holds for applying a constant external bendingmoment My in case of beam elements with rotational dofs eg to node b in 2D

Wext =Myθb rArr Ma

ext =partWext

partθa=Myδab (2113)

mdashmdashmdashmdash

Example 212 Linear spring undergoing small deformations

Consider a linear elastic spring (stiffness k) attached to a node a along the n-direction (withunit vector ∣n∣ = 1 pointing in the direction of stretching the spring) which undergoes onlysmall deformations so that linearized kinematics can be used (the change of length ∆x of thespring is given by the projection of the displacement ua onto n) In this case the spring energyas a function of the displacement ua is

Espring =k

2∆x2 = k

2(ua sdotn)2 (2114)

To compute the nodal force vectors we need to be careful since Espring is the spring energyand not the work Wext performed by the spring Therefore one would add Espring to thepotential energy functional instead of substracting it as external work Recalling concepts fromundergraduate dynamics we know that the work done by the spring on the body must equalthe potential difference so Wext = Espring0 minus Espring where Espring0 = 0 in our case since thespring is initially unstretched Hence we have Wext = minusEspring The resulting force vector onnode a (all other nodal forces being zero) thus follows as

F aext =

partWext

partua= minus

partEspring

partua= minusk(ua sdotn)n (2115)

where the minus sign enters due to the use of E instead of Wext (and it makes sense physicallyif node a is displaced along the positive n direction the spring is stretched and hence the forceon node a must be acting in the opposite direction since the spring is pulling node a back)

The spring is an example where the external force vector does indeed depend on the nodaldisplacement ua The associated tangent stiffness matrix has the only non-zero component(sub)matrix T aaext and in general

T abext =partF a

ext

partub= minusknotimesn δab = const (2116)

mdashmdashmdashmdash

102

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 213 Linear spring undergoing large deformations

For comparison if the linear elastic spring from the previous example undergoes large defor-mations then the elastic energy in the spring ndash accounting for the nonlinear exact change inlength of the spring ndash is

E = k2( ∣xa +ua minusx0∣ minus ∣xa minusx0∣ )

2

(2117)

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 ie its anchor point and xa + ua with displacement ua is thedeformed position of node a (so that xa minus x0 is the undeformed spring length) External forcevector and stiffness matrix follow as before by differentiation

mdashmdashmdashmdash

Example 214 Pressure in linearized kinematics

A uniform pressure p is a common boundary condition in engineering applications (from pressurevessels to structures under snow loads etc) In this case the pressure p acting on a surface partΩwithin linearized kinematics results in tractions t = minuspn where n is the outward surface normal(with ∣n∣ = 1) Such a boundary condition is realized rather easily via (214) Specifically for asingle element surface partΩe with outward normal n the work done by a uniform pressure p is

Wexte = intpartΩe

t sdotuhdS = intpartΩe

(minusp)n sdotn

suma=1

uaeNae dS = minusp

n

suma=1

uae sdot intpartΩe

nNae dS (2118)

and the external force contribution from element e (associated with node a) follows as

F aexte =

partWexte

partuae= minuspint

partΩenNa

e dS (2119)

For example for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edgesare straight so that the normal n is constant along each element edge Further assume thatpressure p acts only on one edge partΩprime

e of length Le (and an out-of-plane thickness t) In thisspecial case the above simplifies to

F aext = minuspint

partΩprimee

nNae dS = minuspn

2intpartΩprime

e

Nae dS = minuspLet

2n (2120)

where we exploited that the shape function Na (varying linearly between 0 and 1 on the edgeif a is a node on the edge) integrates to 12 The total external force on node a due to pressureagain follows from summing over all element contributions so

F aext = sum

eisinNa

pLet

2(minusne) (2121)

where we need to sum over all elements adjacent to node a (here denoted by the set Na)pLet2 is nothing but the magnitude of the resultant force due to the uniform pressure p overthe element edge of length Le which is evenly distributed to the two nodes on that edge Notethat each edge has its own surface normal ne so that the above implies the net effect summedover all adjacent elements to node a One such example is shown in the rightmost graphicabove

We close by noting that the external forces are constant only because of the assumption ofsmall deformations If we considered large deformations then the force on the element edge

103

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

would change with deformation (as the surface area increases due to deformation so doesthe resultant force due to a uniform pressure) Therefore the finite-deformation scenario isconsiderably more complex and the work done by a constant external pressure acting on abody of deformed volume v = v(U) is Wext = pv

mdashmdashmdashmdash

Example 215 Linearly and quadratically varying surface tractions

In case of a linearly varying surface traction t(x) acting on the edge of an element e thecorresponding nodal forces can be obtained form the above equations Assume eg a (bi-)linear element in 2D (such as the CST or Q4) with straight edges for which a linearly varyingpressure p(x) (which varies between pa and pb see below) applied to an edge of length Le (andout-of-plane thickness t) translates into the two nodal forces

(Faexte

F bexte) = Let

6(2 1

1 2)(p

a

pb) (2122)

Similarly having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadraticelement (such as the LST Q8 Q9) leads to the equivalent nodal forces

⎛⎜⎝

F aexte

F bexte

F cexte

⎞⎟⎠= Let

30

⎛⎜⎝

4 2 minus12 16 2minus1 2 4

⎞⎟⎠

⎛⎜⎝

pa

pb

pc

⎞⎟⎠ (2123)

We note that of course one can also apply higher-order tractions to lower-order elements (ega quadratically varying load to a linearly interpolated edge) In this case however the workdone Wext is approximated by the FE discretization In the above two examples (which areshown schematically below) the equivalence is exact

pa

Le Le

a F

pb

a

bb F

pa

LeLe

a F

pc

a

bb F

c

pb

c F

linearly varying pressureon a linear element edge

quadratically varying pressureon a quadratic element edge

For more complex element types or more complex loading integration over the element edgeor surface can again be carried out using numerical quadrature on the element boundary (eachelement boundary normal ne is computed from the nodal locations) Again forces and stiffnessmatrix follow by differentiation (forces are constant and the stiffness matrix vanishes)

104

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

212 Dirichlet boundary conditions

Essential boundary conditions of the type uai = uai must be imposed onto the system of equationsFint(U) = Fext This is usually accomplished computationally in one of the two ways discussedin the following9 We here limit our discussion to linear elastic examples we will later reconsiderthe procedure for nonlinear systems when discussing iterative solvers in Section 213

2121 Substitution

Brute-force substitution is a simple method (which we already used in in Exercise 4) wereplace the respective equation for uai in the system KU = Fext by uai = uai eg if we wantu3 = u3 (using an example with only a single dof per node) then we replace the correspondingequation (ie the entries in the stiffness matrix and external force vector) resulting in

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 sdot sdotsdot sdot sdot sdot sdot0 0 1 0 0sdot sdot sdot sdot sdotsdot sdot sdot sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

u3

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

(2125)

2122 Condensation

The substitution method discussed above is simple to implement However it can be quiteexpensive computationally since the number of equations remains the same when imposingessential boundary conditions (this becomes a concern when a significant fraction of the dofsis constraint by essential boundary conditions) The condensation method removes from thelinear system to be solved those equations imposing essential boundary conditions

To understand this let us rewrite the above system of equations (2125) by moving the thirdcolumn to the right-hand side and inserting u3 = u3

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 0 K14 sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

F 3ext

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

minus

⎛⎜⎜⎜⎜⎜⎜⎝

K13

K23

K33

K43

K53

⎞⎟⎟⎟⎟⎟⎟⎠

u3 (2126)

so that we can eliminate the third row and column from the system

⎛⎜⎜⎜⎝

K11 K12 K14 sdotsdot sdot sdot sdotsdot sdot sdot sdotsdot sdot sdot K55

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

u1

u2

u4

u5

⎞⎟⎟⎟⎠=⎛⎜⎜⎜⎝

F 1ext

F 2ext

F 4ext

F 5ext

⎞⎟⎟⎟⎠minus⎛⎜⎜⎜⎝

K13

K23

K43

K53

⎞⎟⎟⎟⎠u3 (2127)

9We mention that similar techniques can also be employed to impose more complex conditions such as con-straints of the general type

f(uaub ) = 0 (2124)

which become important eg when enforcing rigid links between nodes (∣xa+uaminus(xb+ub)∣ = const) or systemsof bodies including rigid bodies (ie rigid links plus rigid angles) or imposing deformationmotion of a nodealong an inclined surfaces (ua = uan with fixed known unit vector n) Such constraints can be implemented ina similar fashion but are not discussed here further (we refer to the rich FEM literature)

105

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which we must solve for the unknowns (u1 u2 u4 u5) so that U = (u1 u2 u3 u4 u5)T

The clear advantage of this method is the reduction in size of the system to be solved Thedisadvantage is that it is computationally more involved (indeed it can be even more expensivethan the substitution technique when a small number of essential boundary conditions must beapplied to a large system)

x1

x2

x3

e1

e2

e3

+

x

paraW

u( p

P

g

paraWe

au p

P

g

x)

paraWe

au

1F

2F

3F

1P

2P

continuous BVP FE-discretized body FE-discretized BVP

213 A note on Dirichlet boundary conditions in iterative solvers

We would like to briefly re-assess the enforcement of Dirichlet boundary conditions in the contextof iterative solvers where we do not solve a simple linear system but we use iterative techniquesto solve a nonlinear system in incremental linear steps In order to impose uai = uai we discusstwo implementation strategies

Strategy I To impose uai = uai we can include this Dirichlet boundary condition directly in theinitial guess (ie make sure that uai = uai within vector U) and subsequently iterate accordingto

Un+1 = Un +∆Un (2128)

where the system of equations is modified such that ∆uain = 0 for all iterative steps n Thelatter can be accomplished in the same fashion as we imposed essential boundary conditionsearlier For example when using a Newton-Raphson solver we must solve

T (Un)∆Un = minusf(Un) (2129)

where we now modify the row of the tangent stiffness matrix T (Un) and right-hand-side vectorf(Un) such that ∆uain = 0 is enforced (see Section 212)

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 212) itcomes with one disadvantages when we enforce the boundary condition uai = uai directly in theinitial guess U0 (while using eg the solution from a previous load step as the initial guessfor all remaining dofs in U0) the resulting initial guess U0 may include a rather strong localdeformation 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 nonlinearproblems

Strategy II As a remedy to the above problems we may alternatively choose to not set uai = uaiin the initial guess and simply chose U0 as eg the solution from the previous load step (or

106

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

any other more or less sophisticated guess) In subsequent iterations we then solve

T (Un)∆Un = minusf(Un) (2130)

where we modify both T (Un) and f(Un) to enforce

∆uain = uai minus uain (2131)

so that the incremental update at iteration step n

Un+1 = Un +∆Un rArr uain+1 = uain +∆uain = uain + (uai minus uain) = uai (2132)

imposes uai = uai in a more natural incremental fashion without modifying the initial guess

214 Rigid body motion

For the linear elastic case the stiffness matrix K (and in the general nonlinear case the tan-gent matrix T ) has as many zero eigenvalues as it has rigid-body modes or zero-energymodes Ulowast This can easily be understood by recalling that the total potential energy of theFE-discretized body with global stiffness matrix K and in the absence of any external forcesreads

I = 1

2U sdotKU (2133)

If a particular global vector of the nodal displacements Ulowast ne 0 corresponds to rigid-bodymotion (ie 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 energyConsequently we must have

Ulowast sdotKUlowast = 0 (2134)

This in turn implies that Ulowast is an eigenvector of K with a corresponding zero eigenvalue(KUlowast = 0 which we also understand physically since rigid-body modes cause no nodal forcesso Fint = KUlowast = 0) Hence K has (at least) one zero eigenvalue and is thus not invertibleSince this holds true for each rigid-body mode Ulowast K has as many zero eigenvalues as rigidbody modes If such rigid-body modes exist then no unique solution can be found since bothU and U + Ulowast could be a solution (since K(U + Ulowast) = KU +KUlowast = KU = Fext) Thismanifests in K not being invertible so trying to find U =Kminus1Fext fails We saw this problemarise in Example 112

Therefore we must suppress each rigid body mode via appropriate essential boundary conditionsbefore solving a boundary value problem In 2D we need three essential boundary conditionsto suppress rigid-body translations and rotations in 3D we need a total of six (assuming thatnodes carry only displacement dofs) as shown below

107

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

rigid-body modes in 2D

rigid-body modes in 3D

We close by mentioning that when considering large nonlinear deformation mechanisms instructures may also constitute zero-energy modes (eg a pinned-pinned buckled beam has twostable equilibria and the displacement from one to the other is a so-called mechanism ie azero-energy body which is not rigid-body motion)

Finally if nodes carry further dofs beyond displacements (eg in case of beam elements orcoupled problems) the situation must be reassessed to make sure all possible rigid modes aresuppressed

108

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

22 Dynamics

Our discussion of mechanical boundary value problems so far has been limited to quasistaticsThe term quasistatics refers to the assumption of negligible inertial effects This does notnecessary 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 ofthe type σ = σ(ε ε) which clearly depend on the loading rate and hence on time irrespectiveof 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 eg vibrationsThis is intimately tied the boundary conditions of a problem and creates an initial boundaryvalue problem Static loading is generally time-independent Dynamic loads are time-dependentones for which inertial effects are not negligible Quasistatic loading is time-dependent but issufficiently slow such that inertial effects can be safely ignored

Here we will consider the extension of the mechanical boundary value problem discussed pre-viously to dynamic problems where inertial effects matter In an extension of the (quasi-)staticversion of Section 8 the strong form of the dynamic problem in linearized kinematics reads

⎡⎢⎢⎢⎢⎢⎢⎣

σijj + ρ bi = ρ ui in Ω

ui(x t) = ui(x t) on partΩD

σijnj(x t) = t(x t) on partΩN

(221)

with suitable initial conditions Now we have u ∶ ΩtimesRrarr Rd (ie the displacement field u(x t)varies with position x isin Ω and time t isin R) and it requires sufficient differentiability in bothspace and time Notice that the quasistatic case is easily recovered by neglecting the inertialterm ρu ie if the mass density ρ or the acceleration a(x t) = u(x t) vanish

Analogous to the quasistatic case we can cast the above strong form into a variational structureby making use of the so-called action principle To this end we define the action

A[u] = intt2

t1L[u]dt (222)

with the Lagrangian

L[u] = T [u] minus I[u] (223)

where I is the potential energy functional introduced in Section 6 and T denotes the kineticenergy functional

T [u] = intΩ

ρ

2∣u∣2 dV (224)

For a variational material model with energy density W and assuming that body forces ρb andsurface tractions t are imposed we thus arrive at the action

A[u] = intt2

t1[int

Ω(ρ

2∣u∣2 minusW (ε)) dV + int

Ωρb sdotu dV + int

partΩNt sdotu dS] dt (225)

The action principle (also known as the principle of stationary action10) states that thesolution u(x t) renders A stationary under suitable initial conditions ie

u = arg statA[u] ∶ st ICs (226)

10Various references call this dynamic variational principle the ldquoprinciple of least actionrdquo which is in generalnot correct since the solution must not necessarily be a minimizer of A it is merely guaranteed to be a stationarypoint

109

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This condition is analogous to the minimization of the total potential energy we used so far inthe quasistatic context Here we no longer minimize the total potential energy but we renderthe total action stationary with respect to the displacement field

Taking the first variation of the action A with respect to u (again using the divergence on thestress-term as done in quasistatic) we obtain the stationarity condition

δA[u] = intt2

t1[int

Ω(ρ ui δui minus σijδuij) dV + int

Ωρbiδui dV + int

partΩNtiδuidS] dt = 0 (227)

The dynamic weak form is thus given by

G[uv] = intt2

t1[int

Ω(ρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (228)

Let us for simplicity of the derivation assume that instead of giving two initial conditionsper point (eg imposing initial displacements and velocities) we seek a stationary solutionu(x t) which satisfies the conditions u(x t1) = u1(x) and u(x t2) = u2(x) (ie we assume thedisplacements are known at the initial and final times t1 and t2 respectively) Of course thisis hardly ever the case in reality ndash and the derived concepts apply equally to the case of knowninitial displacements and velocities yet this assumption simplifies our derivation significantly

The above weak form indicates the space of solutions and it particularly lets us conclude that

v isin U0 = v isinH1(Ω) timesH1(R) ∶ v = 0 on partΩD and at t = t1 or t = t2 (229)

where the last two conditions stem from our assumption of u(x t1) = u1(x) and u(x t2) =u2(x) being known

To remove the time derivative v we integrate by parts in time (the ldquoboundary termrdquo vanishessince v = 0 at t = t1 and t = t2)

G[uv] = minusintt2

t1[int

Ω(ρ uivi + σijvij) dV minus int

Ωρbivi dV minus int

partΩNtividS] dt = 0 (2210)

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

Since in the dynamic problem the displacement field depends on time we here introduce a semi-discretization ie we discretize the solution in space but not (yet) in time This implies thatwe introduce shape functions for the interpolation in space where ndash now ndash the nodal unknownsua become functions of time

uh(x t) =n

suma=1

ua(t)Na(x) and vh(x t) =n

suma=1

va(t)Na(x) (2211)

This also allows us to calculate time derivatives eg the approximate velocity and accelerationfields

uh(x t) =n

suma=1

ua(t)Na(x) and uh(x t) =n

suma=1

ua(t)Na(x) (2212)

Insertion into (2210) results in the semi-discrete weak form

G[uhvh] = minusintt2

t1

n

sumb=1

vbi [n

suma=1

uai intΩρNaN bdV + int

ΩσijN

bj dV

minusintΩρbiN

b dV minus intpartΩN

tiNbdS] dt = 0

(2213)

110

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which must hold for all vb(t) histories that vanish at t1 and t2 Because it must hold for allvb(t) histories we may conclude that the term in brackets must vanish vor all b = 1 n andi = 1 d (n being the number of nodes d the number of dimensions) These n times d equationsare discretized equations of motion

Analogous to before we collect all (now time-dependent) nodal dofs in the vector

U(t) = u1(t) un(t) (2214)

so that solving (2213) for all vb(t) is equivalent to solving the equation of motion

MU +Fint(U) minusFext(t) = 0 (2215)

with

Mabij = δij int

ΩρNaN bdV F binti = int

ΩσijN

bj dV F bexti = int

ΩρbiN

b dV +intpartΩN

tiNbdS

(2216)

Matrix M is called the consistent mass matrix and we write Fext = Fext(t) to indicate thatexternal forces are likely to depend on time (and they may also depend on displacements asdiscussed before)

Example 221 Consistent mass matrix of the 2-node bar element

The consistent mass matrix for a 2-node bar element (using theisoparametric formulation) is computed from its shape functions

N1(ξ) = 1 minus ξ2

N2(ξ) = 1 + ξ2

with ξ isin [minus11] (2217)

1 21

u 2ux

Specifically we have (with the total bar element mass me = ρALe)

Mab = intΩρNaN bdV = int

1

minus1ρNaN bA

Le2

dξ rArr Mbar1D = me

6(2 1

1 2) (2218)

Note that this is the consistent mass matrix for 1D motion ieU = (u1 u2)T If each node moves in 2D and hence has two dofsper node in the plane ie U = (u1

1 u12 u

21 u

22)T then each pair of

dofs (horizontal and vertical) is linked by the above mass matrixso that the total consistent mass matrix in 2D becomes

1 22u

x

1u1

1u

1u2u

1

2

2u

Mbar2D = me

6

⎛⎜⎜⎜⎝

2 0 1 00 0 0 01 0 2 00 0 0 0

⎞⎟⎟⎟⎠+ me

6

⎛⎜⎜⎜⎝

0 0 0 00 2 0 10 0 0 00 1 0 2

⎞⎟⎟⎟⎠= me

6

⎛⎜⎜⎜⎝

2 0 1 00 2 0 11 0 2 00 1 0 2

⎞⎟⎟⎟⎠ (2219)

mdashmdashmdashmdash

Example 222 Consistent mass matrix of the CST element

The consistent mass matrix of the constant-strain triangular element is computed analogouslyby integration of the shape functions Again starting with a single dof per node ie U =(u1 u2 u3)T the consistent mass matrix is obtained as (with element area Ae thickness te)

MCST1D = me

12

⎛⎜⎝

2 1 11 2 11 1 2

⎞⎟⎠

with me = ρAete (2220)

111

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The extension to 2D motion with dofs U = (u11 u

12 u

21 u

22 u

31 u

32)T follows from apply in the 1D

mass matrix to the horizontal and vertical dofs independently leading to

MCST2D = me

12

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

2 0 1 0 1 00 2 0 1 0 11 0 2 0 1 00 1 0 2 0 11 0 1 0 2 00 1 0 1 0 2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

with me = ρAete (2221)

mdashmdashmdashmdash

For all other elements the consistent mass matrix can be evaluated analogously or computedby numerical quadrature

Mab1D = int

ΩeρNaN bdV asymp

nQPminus1

sumk=0

WkρNa(ξk)N b(ξk)J(ξk) (2222)

We note that irrespective of the element type the (approximate) kinetic energy of an elementis computed as follows

T = intΩ

ρ

2∥uh∥2

dV = intΩ

ρ

2

n

suma=1

uaNa sdotn

sumb=1

ubN bdV = 1

2

n

suma=1

n

sumb=1

ua sdot ubintΩρNaN bdV (2223)

which can be conveniently recast into

T = 1

2U sdotM U (2224)

From the above examples we observe that the consistent mass matrix leads to a dynamiccoupling between the dofs ie the consistent mass matrix is not diagonal but includes significantoff-diagonal terms From a numerical perspective this is rather inconvenient as it may requireinverting M (as will be discussed soon) Therefore one often resorts to the so-called lumpedmass matrix which is an approximation that is diagonal

One such approach is the so-called particle-mass lumping which aims toevenly distribute the element mass me among its nodes and therefore simplyassumes that for an arbitrary element having ne nodes with d dofs per nodeMlumped isin Rnedtimesned is given by

Mlumpede =me

neI (2225)

m 2e m 2e

m 3e m 3e

m 3e

Example 223 Lumped mass matrix of the 2-node bar element

For example by using particle-mass lumping for a 2-node bar element one distributes the massme evenly to the two nodes resulting in

Mlumped1De =me

2(1 0

0 1) Mlumped2De =

me

2

⎛⎜⎜⎜⎝

1 0 0 00 1 0 00 0 1 00 0 0 1

⎞⎟⎟⎟⎠ (2226)

112

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that a comparison of the kinetic energies (eg in 1D) reveals

Tlumped =1

2Ue sdotMlumpedeUe =

me

4[(u1

e)2 + (u2e)2] (2227)

and

Tconsistent =1

2Ue sdotMconsistenteUe =

me

6[(u1

e)2 + (u2e)2 + u1

eu2e] (2228)

Hence using the lumped mass matrix implies an approximation of the kinetic energy (which isgenerally not exact)

mdashmdashmdashmdash

If defined properly then the solutions obtained from using either the consistent or lumpedmass matrix in the finite element context converge under h-refinement (As the element sizedecreases the differences between the two formulations also decrease so that in the limit ofinfinitely 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 matrixboth at the element and at the global level As a consequence all assembly operationsintroduced 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 androtational inertia must be considered (which is not discussed here in detail and no uniquesolution exists for the lumped mass matrix but various proposed approximations can be used ndashwhich either approximate the kinetic energy or the mass moments of inertia of the beam)

113

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

23 Vibrations

As shown in the previous section treating the dynamic mechanical problem in linearized kine-matics by the finite element method leads to the semi-discretized equations of motion

M U +Fint(U) = Fext(t) (231)

which are to be solved for the time-dependent vector of nodal dofs U = U(t) This solution isusually obtained in one of two ways we either solve for a time-continuous solution U(t) or wediscretize not only in space but also in time and introduce finite differences in time to solve forUα = U(tα) at discrete intervals tα = α∆t Time-continuous solutions in analytical form canusually be found only for special cases ndash vibrations are one such case discussed in the following

For our purposes vibrations are small-amplitude oscillations about a stable equilibrium con-figuration If a body is freely vibrating without any external excitation we speak of free vibra-tions otherwise (eg if harmonic forces or displacement boundary conditions are applied) weconsider forced vibrations In both cases we assume small amplitudes which leads to linearwaves and we consider oscillations about a stable equilibrium defined by nodal displacementsU0 (eg the undeformed configuration U0 = 0 is one such stable equilibrium)

231 Free undamped vibrations

Starting with the general nonlinear equations of motion (231) we linearize about a stableequilibrium configuration U0 with constant external forces Fext(t) = Fext = const such that thestatic equilibrium satisfies

Fint(U0) = Fext (232)

Next consider a small time-varying perturbation V (t) such that insertion of

U(t) = U0 +V (t) rArr U(t) = V (t) (233)

into the equations of motion leads to

MV +Fint(U0 +V ) = Fext (234)

Expanding the above for small ∣V ∣ ≪ ∣U0∣ to leading order gives

MV +Fint(U0) +partFint

partU(U0)V + hot = Fext (235)

or invoking equilibrium (232) and dropping all higher-order terms

MV + T (U0)V = 0 (236)

When considering free vibrations about the undeformed configuration of an elastic body theabove reduces to

MU +KU = 0 (237)

In general the form of the linearized equations of motion for free vibrations without externalforcing and without damping is

MU + TU = 0 (238)

114

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The general type of solution of the above ODE is of the harmonic form11

U = Ulowast exp(iωt) with ω isin R Ulowast isin Cdn (239)

Insertion into (238) leads to (exploiting that the equation must hold for all times t)

(T minus ω2M) U = 0 (2310)

which is an eigenvalue problem to be solved for the unknown ω isin R known as the eigen-frequency and the corresponding eigenvector U isin R known as the associated eigenmodeWe point out that M is positive-definite by definition (both for the consistent and lumpedmass matrix) and T = part2IpartU2(U0) is also positive-semi-definite because it is the tangent stiff-ness matrix associated with a stable equilibrium U0 As a consequence Mminus1T has only realeigenvalues ω determined from

det (T minus ω2M) = 0 (2311)

Further Ulowast = U isin Rnd is also real-valued (which is why we omitted the asterisk in (2310))Finally if ω is a solution of (2310) then so is minusω Since the sign if of minor importance herewe only consider the positive frequencies

For a FE discretization with ntimes d degrees of freedom (n nodes in d dimensions) the eigenvalueproblem (2310) has n times d eigenfrequencies ωj and associated eigenmodes Uj It is commonconvention to label the eigenfrequencies (and associated modes) in ascending order

0 le ω0 le ω1 le le ωntimesdminus1 (2312)

Recall that each rigid-body mode of the FE problem corresponds to a zero eigenfrequencyTherefore a 2D (3D) free vibration problem without essential BCs to suppress rigid-bodymotion has three (six) zero eigenfrequencies When all zero-energy modes have been removedthe lowest non-zero eigenfrequency is known as the natural frequency

Due to the linear nature of the ODE system the complete solution to the free-vibrationproblem is a superposition of the type

U(t) =ntimesd

sumj=1

clowastj Uj exp(iωjt) clowastj isin C for j = 1 n times d (2313)

for whose coefficients clowastj we must solve for a given set of initial conditions Recall that for amechanical initial boundary value problem we have two initial conditions per node and perdegree of freedom (eg imposing an initial displacement and velocity vector for each node)This provides the 2timesntimesd equations from which the coefficients clowastj isin C can be found (since thoseare complex we have in fact 2 times n times d unknowns viz the real and imaginary parts of each ofthe ntimesd coefficients) Roughly speaking free vibrations are characterized by the superpositionof vibrations at all eigenfrequencies with their respective eigenmodes

Example 231 Free vibration of a bar

Let us study the example of a freely vibrating linear elastic 2-node bar which we use to assessthe influence of the different types of mass matrices Consider a 2-node bar element with only

11The solution can alternatively be written in terms of trigonometric functions We here use the exponentialformulation U = Ulowast exp(iωt) for notational simplicity which by Eulerrsquos identity exp(iωt) = cos(ωt) + i sin(ωt)can be transformed into trigonometric solutions to obtain U = U1 cos(ωt) + U2 sin(ωt) To avoid confusion weuse the asterix lowast here and in the following to denote complex-valued variables

115

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

axial displacements in 1D so that each node has only a single dof ua The mass matrices andthe stiffness matrix for this case were derived previously as

Mconsistent =m

6(2 1

1 2) Mlumped =

m

2(1 0

0 1) K = EA

L( 1 minus1minus1 1

) (2314)

For each of the two mass matrices we compute the two eigenfrequencies and eigenmodes bysolving the eigenvalue problem

(K minus ω2M)U = 0 rArr det (K minus ω2M) = 0 (2315)

Insertion of the stiffness and consistent mass matrix results in the two solutions

ωconsistent0 = 0 ωconsistent

1 =radic

12EA

mL= 2

radic3

radicEA

mLasymp 3464

radicEA

mL (2316)

The corresponding eigenvectors follow from insertion of the eigen-frequencies into the eigenvalue problem giving

U consistent0 = (1

1) U consistent

1 = ( 1minus1

) (2317)

1 2

1 2

U0

U1

As expected we have one zero eigenfrequency associated with rigid body translation and onenon-zero eigenfrequency

When repeating the above procedure with the lumped mass matrix we instead obtain

ωlumped0 = 0 ωlumped

1 = 2

radicEA

mL (2318)

and

U lumped0 = (1

1) U lumped

1 = ( 1minus1

) (2319)

Hence the two cases yield the same eigenmodes U0 and U1 but they differ significantly in thefundamental frequency ωconsistent

1 vs ωlumped1

For comparison let us compute the exact solution by studying the free vibration of a continuoushomogeneous linear elastic bar Linear momentum balance ie

Euxx = ρu (2320)

admits the separable solution

u(x t) = u(x) exp(iωt) rArr Euxx(x) = minusω2ρ u(x) (2321)

Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L so that

ux(0) = ux(L) rArr u(x) = A cos(nπxL

) (2322)

with an integer n isin Z and a constant A isin R Insertion into (2320) leads to

minusE (nπL

)2

= minusω2ρ rArr ωn = nπradic

EA

mL (2323)

116

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the lowest two eigenfrequencies are obtained as

ω0 = 0 ω1 = πradic

EA

mL (2324)

Comparison with the above two approximate formulations reveals that

ωlumped1 le ω1 le ωconsistent

1 (2325)

mdashmdashmdashmdash

We can generalize the above observation to vibrational problems (here without proof) Theeigenfrequencies obtained from the consistent mass matrix generally over-estimate theeigenfrequencies while the lumped mass matrix usually provides under-estimates of theeigenfrequencies (the latter is not rigorous though since it depends on the choice of the lumpedmass matrix)

232 Forced vibrations

As defined above forced vibrations result from small-amplitude harmonic excitation of astructure We again start with the linearized governing equations

MU + TU = Fext(t) (2326)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext(t) = Fext cos(Ωt) (2327)

with an excitation frequency Ω isin R and an amplitude vector Fext isin Rdn (2326) showsthat the solution vector generally consists of a homogeneous solution and a particular solutionaccording to

U(t) = Uhom(t) +Upart(t) = Uhom(t) + U cos(Ωt) where U isin Rdn (2328)

The homogeneous solution corresponds to a free vibration (see Section 231) and is usuallyof little interest (any realistic system has a minimum amount of damping which makes thehomogeneous solution of a free vibration decay over time while the particular solution of theforced vibration assumes a steady state) Insertion of the particular solution into (2326) gives

(minusΩ2M + T ) U = Fext (2329)

which is a linear system of equations to be solved for the displacement amplitude vector U Specifically if

det (minusΩ2M + T ) ne 0 hArr Ω is not an eigenfrequency of the system (2330)

then

U = (minusΩ2M + T )minus1Fext rArr Upart(t) = (minusΩ2M + T )minus1

Fext cos(Ωt) (2331)

Hence the system responds to a harmonic excitation ndash at steady state ndash with a harmonicvibration at the excitation frequency As the excitation frequency approaches an eigenfrequency(Ω rarr ωj) the above matrix becomes singular and the displacement amplitude vector U tendsto infinity (this is characteristic of resonant effects)

117

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

233 Modal decomposition

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations thentime-continuous solutions are usually hard to find and one may resort to finite-difference schemes(as discussed next in Section 24) Alternatively one may find time-continuous solutions by themethod of modal decomposition which is based on the above eigenfrequency analysis

The starting point of the concept of modal decomposition is to express the unknown time historyof the vector of nodal dofs through a carefully chosen basis viz

U(t) =ntimesd

sumi=1

zi(t) Ui (2332)

where we use the (somehow normalized) eigenvectors Ui 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 ndash for which to understand we need toinclude a somewhat longer derivation By considering the eigenvalue problem for two distincteigenmodeseigenfrequencies i and j we may write

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0

(T minus ω2jM) Uj = 0 rArr Ui sdot (T minus ω2

jM) Uj = 0(2333)

where we pre-multiplied each of the two equations by the respective other eigenvector Sub-traction of the two equations (using that T is by definition symmetric) results in

(ω2i minus ω2

j ) Ui sdotM Uj = 0 hArr ωi = ωj or Ui sdotM Uj = 0 (2334)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ui sdotM Uj If weassume that we have only distinct eigenfrequencies12 then we may conclude that

Ui sdotM Uj = 0 if i ne j (2335)

We can normalize the eigenvectors in the following fashion

Ui larrUiradic

Ui sdotM UirArr Ui sdotM Ui = 1 (2336)

so that overall

Ui sdotM Uj = δij (2337)

Next if we start with

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0 (2338)

then we may also conclude that by invoking (2337)

Uj sdot T Ui = 0 if i ne j (2339)

12Theoretically we may surely have repeated eigenvalues and hence duplicated eigenfrequencies However anumerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (andrigid-body modes are usually removed unless the simulated response requires rigid-body motion) In case of anyduplicated eigenfrequencies one could still introduce eg Gram-Schmid orthonormalization to produce a set ofeigenmodes that do satisfy the below condition

118

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly by pre-multiplying by the respective same eigenvector ie

Ui sdot (T minus ω2iM) Ui = 0 (2340)

we solve for ω2i and obtain Rayleighrsquos quotient which here simplifies due to the normalization

(no summation over i implied)

ω2i =

U(i) sdot T U(i)

U(i) sdotMU(i)

= U(i) sdot T U(i) rArr Ui sdot T Uj =⎧⎪⎪⎨⎪⎪⎩

ω2i if i = j

0 else(2341)

Let us now return to the modal decomposition of a linearized elastic system using the Fourierrepresentation

U(t) =ntimesd

sumi=1

zi(t) Ui (2342)

where U1 Un 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 scalarcoefficients that are continuous functions of time (maintaining the semi -discretization)

We substitute (2342) into the linearized equations of motion with external forces Eq (2326)or MU + TU = Fext so we arrive at

ntimesd

sumi=1

[zi(t)MUi + zi(t)T Ui] = Fext(t) (2343)

Pre-multiplying by Uj gives

ntimesd

sumi=1

[zi(t) Uj sdotMUi + zi(t)Uj sdot T Ui] = Uj sdotFext(t) (2344)

and exploiting the above orthogonality relations leads to

zj(t) + ω2j zj(t) = Uj sdotFext(t) for j = 1 n times d (2345)

This equation is quite remarkable as it is a scalar linear ODE for each unknown function zj(t)Moreover the system of equations for the n times d unknown functions zi(t) (with i = 1 n times d)has decoupled into n times d uncoupled scalar ODEs to be solved independently for the zi(t) Thestrategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes Uj so that thecoefficients and right-hand sides in (2345) are known The resulting system of decoupled linearODEs can relatively inexpensively be solved for the functions zj(t)

For many practical problems only a limited number of modes are important so we may restrictthe representation (2342) to include only the lowest m lt n times d modes (corresponding to the mlowest eigenfrequencies) Therefore significant numerical efficiency can be gained by truncatingthe Fourier sum and only using the m lowest modes which is referred to as order reduction

U(t) =m

sumi=1

zi(t) Ui m lt n times d (2346)

119

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

234 Structural damping

In structural dynamics (ie in the analysis of structures involving bars beams plates etc)one often includes velocity-proportional damping in an approximate average sense by the intro-duction of a damping matrix C such that the equations of motion (2215) become

MU +CU +Fint(U) minusFext(t) = 0 (2347)

This is the higher-dimensional analog to the classical 1D system consisting of masses springsand dashpots as discussed in undergraduate Dynamics The C-matrix serves as the analog ofthe dashpot which provides velocity-proportional damping The most common form of C usedin structural FEA is mass- and stiffness-proportional damping which assumes

C = αM + βK α β isin R+ (2348)

That is C is a combination of the mass and stiffness matrices M and K respectively Thechoice of parameter α ge 0 controls low-frequency vibration attenuation while parameter β ge 0suppresses high-frequency vibrations We skip the detailed derivation here and refer to FEAliterature on structural damping

If damping is included in a problem of free or forced vibrations then the above strategies andrelations ndash in principle ndash still apply As a major difference solutionsU = U(t) will include a timedelay implying that the energy dissipation due to damping results in forces and displacementsnot being ldquoin syncrdquo anymore but the bodyrsquos deformation lagging behind any applied forces thatcause the deformation This is best captured by starting with an ansatz

U(t) = Ulowast exp(iωlowastt) with ωlowast isin C and Ulowast isin Cdn (2349)

solving for the complex valued solutions and finally extracting the displacement solution as thereal part ie U(t) = Re [Ulowast exp(iωlowastt)]

For example for a forced vibration with structural damping we now have

Upart(t) = Re [(minusΩ2M + iΩC + T )minus1Fext] cos(Ωt) (2350)

120

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

24 Time-dependent transient solutions

If the time-dependent solution for the nodal variables U(t) cannot be obtained in a continuousmanner (eg as discussed above for free vibrations or via modal decomposition) then one usu-ally seeks solutions in a time-discretized fashion (eg by using finite-difference approximationsin time) This turns the previously introduced semi -discretization of our fields of interest intoa proper discretization in both space and time

As discussed in Section 3 at the beginning of this course finitedifferences are a convenient technique when the discretization isapplied to a regular grid with uncomplicated boundary conditions(such as when choosing constant time increments ∆t with knowninitial conditions) We here re-use those techniques introduced backin Section 3 for the discretization in time Specifically we define aconstant time increment ∆t gt 0 and seek solutions at discrete timeintervals writing

∆t = tα+1 minus tα ua(tα) = uaα Uα = U(tα) forall α ge 0

and arbitrarily choosing t0 = 0

au

au

au

au

Dt

t

In order to solve the equations of motion we must choose between explicit and implicit inte-gration schemes ndash which come with all the advantages and disadvantages discussed in generalin Section 3 Let us first turn to the simpler case of explicit time integration13

241 Explicit time integration

The most frequent choice ensuring quadratic convergence while maintaining small finite-differencestencils is the use of central-difference approximations in time which turn the nodal velocityand acceleration vectors into respectively

U(tα) = Uα+1 minusUαminus1

2∆t+O(∆t2) U(tα) = U

α+1 minus 2Uα +Uαminus1

(∆t)2+O(∆t2) (241)

Insertion into the equations of motion (2347) (here including damping for completeness anddropping higher-order terms) leads to the time-discretized equations of motion

MUα+1 minus 2Uα +Uαminus1

(∆t)2+CU

α+1 minusUαminus1

2∆t+Fint(Uα) minusFext(tα) = 0 (242)

which can be reorganized into

[ M

(∆t)2+ C

2∆t]Uα+1 = 2M

(∆t)2Uα + [ C

2∆tminus M

(∆t)2]Uαminus1 minusFint (Uα) +Fext(tα) (243)

This is an update rule for Uα+1 resulting in a scheme of explicit time integration (ie vectorUα+1 can be computed directly from the known previous solutions Uα and Uαminus1 We note theabove relation indicates that solving for Uα+1 still requires the solution of a linear system (dueto the matrix in brackets in front of Uα+1) Yet all nonlinearity that is possibly inherent inFint (U) is irrelevant to the solution procedure as the internal forces in (243) depend only onthe previous known solution Uα

13We note that similar concepts can also be applied when the time increment ∆t is not constant or is adaptivelymodified during the course of a simulation However we here restrict our discussion to constant time steps ∆t

121

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Stability generally limits the choice of the time step ∆t in explicit schemes as discussed inSection 3 This also applies to the dynamic FE formulation described above Without proof wemention that stability requires

∆t le ∆tmax =2

ωmax (244)

with ωmax being the highest eigenfrequency of the FE problem (see Section 231) It is importantto realize that the highest eigenfrequency generally scales inversely with the size of the smallestelement in the mesh ie

ωmax prop1

hmin (245)

For example we showed in Example 231 that the fundamental frequency of a two-node barwas of the form ω1 prop 1

L

radicEρ with L being the element size

Despite the explicit scheme being straight-forward to implement and inexpensive to solve atthe time-step level the above stability constraint has unfortunate consequences The maximumallowed time step ∆tmax decreases with decreasing mesh size ie dynamic FE problems thatare already expensive because of high mesh resolution are even more expensive when usingexplicit time integration due to the required small time step size Moreover what matters isthe absolute smallest element size hmin and not the average element size Therefore the smallestelement in a FE mesh generally dictates the critical step size ∆tmax (even if the average elementsize is considerably larger)

242 A reinterpretation of finite differences

Instead of introducing finite-difference schemes in time as discussed above we could alterna-tively introduce interpolations in time analogous to the interpolation in space introduced withinthe FE context based on shape functions and nodal values We here aim to show that such aninterpolation in time is indeed feasible and that in fact the above explicit central-differencediscretization can be re-interpreted as such an interpolation

To start consider a discretization in time which evaluates U at discrete time intervals ∆t andthen uses a quadratic interpolation in time to define U(t) at all times t ge 0 ie we define

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t) for t isin [tα minus ∆t2 t

α + ∆t2 ] (246)

Shape functions Nα(t) interpolate in time and analogous to thespatial discretization of the FE method we define Nα(tβ) = δαβThe resulting quadratic shape functions are

Nα+1(t) = (t minus tα)(t minus tαminus1)2(∆t)2

Nα(t) = (tα+1 minus t)(t minus tαminus1)(∆t)2

and

Nαminus1(t) = (tα+1 minus t)(tα minus t)2(∆t)2

(247) Dt

t

aN

a+1N

a-1N

at +Dt2

at -Dt2

at

a+1t

a-1t

This piecewise-quadratic interpolation with the above range of validity ensures that U(t) istwice differentiable (as needed for the acceleration) It further guarantess that not only is U(t)continuous over time but also

part

parttNα+1(tα minus ∆t

2 ) = 0 andpart

parttNαminus1(tα + ∆t

2 ) = 0 (248)

122

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that U(t) is continuous as well Consequently the acceleration

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t)

= Uα+1

(∆t)2minus 2

(∆t)2+ U

αminus1

(∆t)2= U

α+1 minus 2Uα +Uαminus1

(∆t)2for t isin [tα minus ∆t

2 tα + ∆t

2 ](249)

is piecewise-constant and recovers the second-order central-difference scheme in time cf (241)

The approximate displacement field now discretized in both space and time has become

uh(x t) =n

suma=1

α+1

sumγ=αminus1

uaγNγ(t)Na(x) for t isin [tα minus ∆t2 t

α + ∆t2 ] x isin Ωh (2410)

where uaγ = uh(xa tγ) is the displacement of node a at time tγ The acceleration field followsas the piecewise-constant (in time) approximation

uh(x t) =n

suma=1

uaα+1 minus 2uaα +uaαminus1

(∆t)2Na(x) for t isin [tα minus ∆t

2 tα + ∆t

2 ] x isin Ωh (2411)

Next we must insert the discretization into the weak form (2210) which also requires a choicefor the trial function vh(x t) We can either choose a Bubnov-Galerkin scheme where vh(x t)is discretized in the same fashion as uh(x t) the consequence is that we arrive at an implicitsystem in time to solve for all nodal unknowns (ie one cannot simply march forward in timebut has to solve for the nodal solution at all times at once) Alternatively we may choose aPetrov-Galerkin scheme in time and ndash having in mind that we wish to evaluate informationonly at the discrete time steps ndash define the trial function (assuming nt time steps) as

vh(x t) =n

sumb=1

vb(t)N b(x) =n

sumb=1

nt

sumα=1

vbαN b(x)δ(t minus tα) (2412)

This approximation of collocation type leads to the weak form being reduced to only the discretetime steps When this choice of vh along with uh is inserted into the weak form (2210) ie

G[u v] = intt2

t1[int

Ω(minusρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (2413)

the integration over time reduces the delta functions to the simple form

nt

sumb=1

vbi

⎡⎢⎢⎢⎢⎣int

Ω

⎛⎝minusρuaα+1i minus 2uaαi + uaαminus1

i

(∆t)2NaN b minus σij(εhα)N b

j

⎞⎠

dV

+intΩρbi(tα)N b dV + int

partΩNti(tα)N bdS] = 0

(2414)

for each time step α (0 le tα le nt∆t) and for all admissible choices of vbi The latter implies thatthe above terms in brackets must vanish or that we must have

intΩρNaN b dV

uaα+1i minus 2uaαi + uaαminus1

i

(∆t)2+ int

Ωσij(εhα)N b

j dV

minus intΩρbi(tα)N b dV minus int

partΩNti(tα)N bdS = 0

(2415)

When inserting our definitions of the consistent mass matrix and the internalexternal forcevectors (cf (2216)) the above is equivalent to

MUα+1 minus 2Uα +Uαminus1

(∆t)2+Fint(Uα) minusFext(tα) = 0 (2416)

which was derived above for a second-order finite-difference time discretization see (242) Ofcourse the same procedure can also be applied to other choices of vh which leads to differenttime discretization schemes

123

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

243 Implicit time integration

Following the above explicit schemes we proceed to discuss implicit time integration whichuses the same discretization in time but requires solving a generally nonlinear system of equa-tions for Uα+1 Various techniques exist the most prominent ones of which we summarize inthe following

2431 Newmark-β method

The most popular scheme for mechanical problems is the so-called Newmark-β method (itwas originally developed for problems in structural mechanics in 1959 by Nathan M Newmarkof the University of Illinois at UrbanandashChampaign after whom it was later named)

We start with the mean value theorem which tells as that

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2417)

and analogously

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2418)

Particular schemes now differ by how U(t) is defined during an interval (tα tα+1) so that theabove two equations can be integrated to find U(t) and U(t)

The so-called average acceleration method eg assumes that the acceleration is piecewiseconstant between two time steps and specifically that

U(t) = Uα+1 + Uα

2= const for t isin (tα tα+1) (2419)

Insertion into (2418) along with U(tα) = Uα leads to

U(t) = Uα + (Uα+1 + Uα) t minus tα

2 (2420)

and inserting this into (2417) with U(tα) = Uα gives

U(t) = Uα + Uα(t minus tα) + (Uα+1 + Uα) (t minus tα)2

4 (2421)

Finally evaluating (2420) and (2421) at the new time step α + 1 yields respectively

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + Uα) (∆t)2

4

(2422)

This is apparently an implicit definition of the new velocity and displacement vectors sincethey involve the unknown acceleration Uα+1 at the new time

As an alternative the linear acceleration method assumes a linear interpolation instead of apiecewise-constant one thus starting with

U(t) = Uα + (Uα+1 minus Uα) t minus tα

∆tfor t isin (tα tα+1) (2423)

124

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Carrying out the same substitutions and integrations as above for the average accelerationscheme we here arrive at

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + 2Uα) (∆t)2

6

(2424)

which is yet another implicit definition of the new velocity and displacement vectors

We note that we can also cast our explicit central-difference scheme from before into theabove framework if we assume a piecewise-constant acceleration

U(t) =⎧⎪⎪⎨⎪⎪⎩

Uα for t isin (tα tα+tα+1

2 )Uα+1 for t isin ( tα+tα+1

2 tα+1) (2425)

The Newmark-β method generalizes the above cases into a single framework which definesthe new displacements and velocities as

Uα+1 = Uα +∆t Uα + (∆t)2

2[2β Uα+1 + (1 minus 2β)Uα] (2426a)

Uα+1 = Uα +∆t [γUα+1 + (1 minus γ)Uα] (2426b)

where 0 le β le 1 and 0 le γ le 1 are parameters to be chosen The above schemes are included asspecial cases

β = 14 γ = 1

2 leads to the most popular average acceleration scheme (which turns outto be unconditionally stable and to have no numerical damping)

β = 16 γ = 1

2 is the linear acceleration scheme (which is conditionally stable and showsnumerical damping)

β = 0 γ = 12 recovers the explicit central-difference scheme (241)

As a major benefit of the Newmark schemes for linear structural problems the method canprovide unconditional stability Specifically

γ ge 12 and β ge γ2 guarantees that the method is unconditionally stable

γ ge 12 and β lt γ2 leads to methods being conditionally stable where as discussed before∆tcr prop ωminus1

max

For γ = 12 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-differencemethods introduce artificial numerical damping (see the discussion in Section 42 on phaseerror analysis) Whenever γ gt 12 the Newmark family of methods produces numerical damp-ing The average acceleration scheme (β = 1

4 γ = 12) 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 definitionsof velocities and displacements (2426a) into a form that allows us to perform algorithmic timestepping To this end let us first solve (2426a) for the acceleration at the new time tα+1

Uα+1 = 1

β(∆t)2(Uα+1 minusUα minus∆t Uα) minus 1 minus 2β

2βUα (2427)

125

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Insertion into (2426b) yields

Uα+1 = Uα +∆t(1 minus γ)Uα + γ

β∆t(Uα+1 minusUα +∆t Uα) minus γ∆t

1 minus 2β

2βUα

= (1 minus γβ) Uα + γ

β∆t(Uα+1 minusUα) minus∆t( γ

2βminus 1) Uα

(2428)

Next inserting both velocity (2427) and acceleration (2428) into the equation of motion atthe new time tα+1

MUα+1 +CUα+1 +Fint(Uα+1) minusFext(tα+1) = 0 (2429)

leads ndash after some rearrangement ndash to

( 1

β(∆t)2M + γ

β∆tC)Uα+1 +Fint(Uα+1) minusFext(tα+1)

=M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2430)

The right-hand side of (2430) is fully known as it only involves Uα Uα and Uα from theprevious time step The left-hand side is generally nonlinear and requires an iterative solverunless the problem is linear elastic in which case Fint(Uα+1) =KUα+1 and the above left-handside is linear in Uα+1

Note that the implementation is quite similar to that of the quasistatic problem using eg theNewton-Raphson solver discussed in Section 201 Specifically we now have

f(Uα+1) =MlowastUα+1 +Fint(Uα+1) minusF lowastext(tα+1Uα Uα Uα) = 0 (2431)

where

Mlowast = 1

β(∆t)2M + γ

β∆tC = const (2432)

and

F lowastext(tα+1Uα Uα Uα) = Fext(tα+1) +M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2433)

Note that Mlowast is constant while F lowastext is fully known from the previous time step and the applied

external forces Therefore the problem is quite similar to the quasistatic problem The tangentmatrix used for iterations is

T lowast =Mlowast + T = 1

β(∆t)2M + γ

β∆tC + T (2434)

Boundary conditions can be implemented in the same fashion as for the quasistatic solversdiscussed in Section 213

In the special case of a linear elastic problem the nonlinear system of equations turns into alinear one viz

f(Uα+1) =MlowastUα+1 +KUα+1 minusF lowastext(tα+1Uα Uα Uα) = 0 (2435)

126

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that

Uα+1 = (Mlowast +K)minus1F lowast

ext(tα+1Uα Uα Uα) (2436)

The algorithmic structure is as follows At each time step we solve (2430) for Uα+1 (usingan iterative solver such as Newton-Raphson for nonlinear problems) based on the informationfrom the previous time step Uα Uα and Uα along with information about the applied externalforces Fext(tα+1) This implies we must store vectors Uα Uα and Uα after each converged timestep Once the new solution Uα+1 has been found we compute Uα+1 from (2427) and Uα+1

from (2428) store all of those vectors and move on to the next time step

244 HHT-α method

The HHT method (also known as the HHT-α method) is a modification of the above implicitNewmark scheme It is named after its inventors Hilber Hughes and Taylor and has gainedpopularity in commercial codes The idea is to use the same Newmark relations (2426a) and(2426b) but to modify the equations of motion into which they are inserted viz assuming

MUα+1 +C [(1 minus α)Uα+1 + α Uα] + (1 minus α)Fint(Uα+1) + αFint(Uα)= (1 minus α)Fext(tα+1) + αFext(tα)

(2437)

with a newly introduced parameter α (using the overline to avoid confusion with our timestep α) α = 0 recovers the Newmark-β scheme If one chooses

0 le α le 1

3 β = (1 + α)2

4 γ = 1

2+ α (2438)

then the HHT method is unconditionally stable and at least second-order accurate Increas-ing α decreases the simulated displacements at high frequencies (thus removing high-frequencynoise from simulated dynamics problems) which can be beneficial in structural dynamics

245 Use of mass matrices

Let us close this section by discussing the use of consistent vs lumped mass matrices in thecontext of explicitimplicit time stepping Recall that for free vibrations we had observedthat the consistent mass matrix generally overpredicts eigenfrequencies while the lumped massmatrix tends to underpredict those Unfortunately we do not have the time here but we coulddo a careful phase error analysis for the explicit and implicit time-stepping schemes derivedabove (recall that we discussed phase error analysis in the context of finite differences see Sec-tion 42) The outcome is that implicit schemes generally introduce numerical error in the formof so-called period elongation ie using implicit schemes like the average-acceleration one(although having no numerical damping) leads to vibrational frequencies being underestimatedHence combining implicit schemes with consistent mass matrices compensates for the errorsintroduced by the two Likewise explicit schemes like the central-difference one tend to exhibitperiod contraction hence compensating for the error introduced by lumped mass matricesThis shows that it is therefore recommended to use

explicit schemes with lumped mass matrices

implicit schemes with consistent mass matrices

This choice is also computationally beneficial lumped mass matrices may allow for solving theexplicit update rule (243) without the need for iterations whereas consistent mass matricescan be conveniently used in the implicit update rule (2430) where a system of equations mustbe solved anyways

127

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

25 Extensions

Many of the finite element tools we have discussed so far (from discretization principles andfunction spaces to elements types and quadrature rules and beyond) apply not only to theframework of small-strain mechanics problems but they extend to a much broader contextwhere they may be conveniently used In this section let us briefly summarize two extensionsof the theory developed so far towards common engineering applications

251 Finite kinematics

When going beyond small strains we need to work with a theory of large (finite) strains whichis commonly referred to as finite kinematics Classical examples are the simulation of rubberymaterials or of biological tissues which generally undergo large strains Here we do not onlyneed to introduce more complex constitutive laws (going well beyond linear elasticity) but wemust 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 strainsHere one typically introduces a deformation mapping of the type

ϕ(X t) ∶ Ω timesRrarr Rd such that x = ϕ(X t) (251)

which assignes to each undeformed point X isin Ω in the undeformed body Ω a point x isin ϕ(Ω)within the deformed body ϕ(Ω) For simplicity we assume that the two points are linked inthe same fashion as in small strains meaning we define a displacement field u ∶ Ω timesR rarr Rdsuch that

x(X t) =X +u(X t) (252)

To describe finite strains inside the deformed body one usually does not resort to ε but insteadintroduces the deformation gradient which is a second-order tensor

F = partx

partXhArr Fij =

partxipartXj

(253)

When inserting the relation (252) we notice that

Fij =partxipartXj

= δij + uij hArr F = I +nablau (254)

This strain measure is frequently used in finite-strain continuum mechanics (besides variousother strain measures that we do not want to introduce here for brevity)

Starting with quasistatics the variational problem in this finite-deformation setting is analogousto the small-strain version The functional of the total potential energy is

I[u] = intΩW (F ) dV minus int

Ωρ0b sdotu dV minus int

partΩNt sdotu dS (255)

where W is still the strain energy density (now depending on F ) ρ0 denotes the mass densityin the undeformed reference configuration (and we integrate over the reference configuration)We seek solutions

u isin U = u isinH1(Ω) ∶ u = u on partΩD such that u = arg min I[u] (256)

128

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The first variation follows as

δI[u] = intΩ

partW

partFijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS

= intΩPijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS = 0

(257)

where we introduced the first Piola-Kirchhoff stress tensor with components

Pij =partW

partFij (258)

which generally differs from the Cauchy stress tensor σ and is furthermore not symmetric Atfinite strains there exists a variety of stress measures we here simply make this choice becauseit emerges naturally from the variation Be alerted that commercial FEA software uses all sortsof strain and stress measures (absolute and incremental ones as well as rates) Only in the limitof small (infinitesimal) strains all stress measures tend to coincide and Pij rarr σij

The above form of the first variation looks quite similar to the small-strain version cf (86)Consequently applying a finite element discretizatio of Bubnov-Galerkin type leads to an FEgoverning equation analogous to (815) That is we again arrive at

Fint(Uh) minusFext = 0 (259)

this time with

F ainti = intΩPij(F h)Na

j dV and F aexti = intΩρ0biN

adV + intpartΩN

tiNadS (2510)

In a nutshell the linearized and finite variational problems result in the same system of equa-tions (259) For the special case of linearized kinematics we have Pij rarr σij so that we recoverthe small-strain version (815) Otherwise the above problem is generally nonlinear (even whenconsidering 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 significantnonlinearity and dependence on U In the above variational formulation we assumed that t =const ie that the externally applied forces are constant and do not depend on deformation Asdiscussed in Section 211 that may not always be the case and especially in finite deformationsit is oftentimes not the case eg consider pressure loading t = pn where n is the deformedsurface normal depending on the deformation and hence on U In such cases one needs torevise the external force term appropriately (For pressure loading eg we know the work doneby pressure is Wext = pv which must replace the traction term in the above total potentialenergy)

Despite all the above differences between large and small strains the key take-home messageis that the general finite element setup is fully analogous between both formulations In bothcases we seek displacement field solutions within the same function space and the governingequations are analogous In fact the above description of quasistatics can be extended todynamics again arriving at

MU +Fint(Uh) minusFext = 0 (2511)

with the consisten mass matrix M now having components

Mabij = δij int

Ωρ0N

aN bdV (2512)

Since the overall setup is equivalent this also implies that all finite element concepts discussedso far can be applied to finite-deformation problems That is all element types quadraturerules solvers etc are fully applicable here as well

129

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

252 Thermal problems

The second extension we would like to discuss aims at solving a thermal problem To this endlet us neglect mechanical boundary value problems and instead discuss how temperature evolvesin a body with heat sources and sinks heat conduction and heat fluxes across its boundaryTo give the punchline right away we will again observe that we can repurpose all our finiteelement tools to this new setting which admits the numerical solution of thermal problems Thereason is that as mentioned before mechanical thermal and also electromagnetic variationalproblems have a common structure of their governing equations (see Section 71)

For a thermal problem in d dimensions we aim to find the generally time-dependent temper-ature field

T = T (x t) (2513)

by solving the strong form

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

κnabla2T + ρs = ρcvT in Ω

T = T on partΩD

q = minusκnablaT sdotn = q on partΩN

T = T0 at t = 0

(2514)

with the following variables

κ equiv thermal conductivity (assuming Fourierrsquos law of heat conduction)

ρ equiv mass density

s equiv heat source (or sink) per mass

cv equiv specific heat

T equiv Dirichlet boundary conditions (imposing a temperature field on the boundary)

q equiv Neumann boundary conditions (imposing a heat flux across the boundary)

q equiv heat flux

n equiv outward unit normal vector on a surface

(2515)

Let us first consider the time-independent problem for simplicity (ie we take ρcvT rarr 0) Inthis case the resulting steady-state problem has a variational structure with the total potentialenergy defined by the functional I ∶ U rarr R with

I[T ] = intΩ(κ

2∥nablaT ∥2 minus ρsT) dV + int

partΩNq T dS (2516)

This functional indicates that we need to weak seek solutions T = T (x) from within the space

U = T isinH1(Ω) ∶ T = T on partΩD and U0 = δT isinH1(Ω) ∶ δT = 0 on partΩD (2517)

which is analogous to the mechanical problem ie we seek solutions from within the samefunction space (except that we now look for a scalar-value field T instead of the vector-valueddisplacement field u which simplifies relations even)

We know that the solution must render I[T ] stationary so we compute the first variation as

δI[T ] = intΩ(κTiδTi minus ρs δT ) dV + int

partΩNq δT dS = 0 for all δT isin U0 (2518)

130

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and we read out the weak form

G[T v] = intΩ(κTivi minus ρs v) dV + int

partΩNq v dS = 0 for all v isin U0 (2519)

Notice that the last term (due to the work by external fluxes) has a plus instead of the usualminus sign in the mechanical problem This arises because of the minus sign in the definitionof fluxes q = minusκnablaT To see this let us apply the divergence theorem to the first term andrearrange terms (with δT = 0 on partΩD) to reformulate the first variation as

δI[T ] = minusintΩ(κTii + ρs) δT dV + int

partΩN(κTini + q) δT dS = 0 for all δT isin U0 (2520)

This must hold for all admissible variations δT isin U0 Therefore (2520) is equivalent to stating

κnabla2T + ρs = 0 in Ω minusκnablaT sdotn = q on partΩN and T = T on partΩD (2521)

Ergo the signs are correct as we recover the (time-independent) strong form (2514) We henceconclude that extremal points T isin U of (2516) are indeed guaranteed to satisfy the governingequations (2514) and are thus classical solutions Differently put functional (2516) is thecorrect energy functional corresponding to the (static) strong form given by (2514) We canfurther show that the solution is a minimizer of I since the second variation is

δ2I[T ] = intΩκδTi δTidV = int

Ωκ ∥δnablaT ∥2 dV ge 0 for all δT isin U0 (2522)

The energy functional (2516) and the resulting weak form (2519) are quite similar to thoseof the mechanical boundary value problem To visualize this we rewrite functional I for thethermal problem for short as

I[T ] = 1

2B(TT ) minusL(T ) (2523)

with the bilinear form B and the linear form L defined by respectively

B(a b) = intΩκnablaa sdot nablab dV and L(a) = int

ΩρsadV minus int

partΩNq a dS (2524)

This form is analogous to eg that of the mechanical problem of a bar whose energy functionalwas derived as (631)

The weak form can be expressed using the above forms as

G[T v] = B[T v] minusL[v] = 0 for all δT isin U0 (2525)

Let us define a spatial finite element discretization of Bubnov-Galerkin-type viz

T h(x) =n

sumb=1

T bN b(x) vh(x) =n

suma=1

vaNa(x) (2526)

Insertion into the weak form (2525) which must hold for all choices of va allows us to deducethe governing equations as

(intΩκNa

iNbj dV )T b

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraQaint(T )

minus [intΩρsNadV minus int

partΩN

qNadS]acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Qaext

= 0 for all a = 1 n (2527)

131

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This implies a system of equations that is quite similar and fully analogous to that of linearelastic mechanical boundary value problems Specifically (2527) balances the internal heat fluxQaint(T ) due to heat conduction with the external heat flux Qaext due to heat sources and due toheat flux across the surface ndash for each node a This is of course the analog of the mechanicalsystem Fint(U) = Fext

When introducing the global vector of the unknown nodal temperatures as T = T 1 Tnthe above system conveniently shows that

Qint(T ) =KT with Kab = intΩκNa

iNbj dV (2528)

denoting the components of a conductivity matrix Note that like in linear elasticity weobserve a linear relation between Qint(T ) and vector T (which is a consequence of the assump-tion of Fourierrsquos law of heat conduction which is linear itself) This results in a linear systemof equations KT =Qext to be solved for the nodal temperatures

When considering time-dependent thermal problems we must extend the above to includetime dependence in the temperature field T = T (x t) Without showing all details (one canderive this form eg from the principle of virtual work) we arrive at the governing equation

CT +Qint(T ) minusQext(t) = 0 (2529)

with a matrix C that is similar to the mass matrix and has components

Cab = intΩρcvN

aN bdV (2530)

The time derivative can be approximated eg by using finite differences which leads to atime-incremental problem as in the dynamic FEA formulation of Section 22

We close by pointing out that (2529) bears great similarity to the dynamic mechanical FEgoverning equations of Section 22 and we seek solutions from within the same function space(except replacing vector-valued displacements by scalar-valued temperatures) As a conse-quence all element types quadrature rules solvers etc that we derived for mechanical (initial)boundary value problems are fully applicable here as well We may thus conveniently re-purposeour FE tools for the analysis of thermal problems

Shown below is an example of solution of the steady-state heat equation illustrating the tem-perature field in a pump casing model (more information can be found online)

132

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

26 Error analysis and adaptivity common mistakes

Having discussed the finite element method the equations to be solved the ways in which acontinuous problem is turned into a discrete one and the various choices of element typesquadrature rules solvers etc to be made it is important to understand the potential errorsources and ways to reduce errors In this section we first discuss the numerical error sourcesinherent in the finite element method then introduce mesh adaptivity and error estimates andfinally review common pitfalls in FE analysis

261 Finite element error analysis

Solving (initial) boundary value problems by the finite element method introduces numeroussources of errors that one should be aware of

(i) The discretization error (also known as the first fundamental error) arises fromdiscretizing the domain into elements of finite size h As a result the body Ω is notrepresented correctly and the model (eg the outer boundary) may not match the trueboundary partΩ (eg think of approximating a circular domain Ω by CST or Q4 elementswith straight edges) This error can be reduced by mesh refinement (and we discussedr-refinement h-refinement p-refinement and hp-refinement in Section 10)

(ii) The numerical integration error results from the application of numerical quadraturefor the evaluation of element force vectors and stiffness matrices in general as discussedin Section 17 (unless in exceptional cases like the simplicial elements integration can becarried out exactly)

intΩef(ξ)dξ cong

nQP

sumq=1

Wqf(ξq) (261)

For an integrand f isin Ck+1(Ω) the error in 1D is bounded by

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQP

sumq=1

Wq f(ξq)RRRRRRRRRRRle C ∥Ω∥hk+1 max

ξisin[minus11]∣α∣=k+1

∥Dαf(ξ)∥ (262)

with an element-dependent constant C gt 0 In other words the error due to numericalquadrature grows with element size h as hk+1 The error is smaller the smoother thefunction f to be integrated (The extension to higher dimensions is analogous) Hencethe numerical integration error depends on the smoothness of the integrand and calls fora proper choice of the integration order

(iii) The solution error stems from numerically solving linear systems TUh = F In generalthe accuracy of the solution depends on the condition number of the matrix

κ = ∥T ∥ sdot ∥T minus1∥ = ∣λmax

λmin∣ (263)

with λmax (λmin) being the largest (smallest) eigenvalue of T The higher the conditionnumber the larger the numerical errorA 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 alinear elastic simulation it is advisable to normalize elastic constants by 1 GPa insteadof assigning eg E = 210 sdot 109 (instead use E = 21 and know that your results will be in100 GParsquos)

133

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(iv) An approximation error is introduced by approximating the functional space U (inwhich to find the solution u(x)) by a finite-dimensional subspace Uh sub U As an example consider an exact solution u(x) in 1D which is approximated by a piece-wise linear polynomial function uh(x) The bar hanging from the ceiling under its ownweight was one such example for which the solution was found to be exact at the nodeswith an error e(x) = u(x)minus uh(x) arising within elements Therefore we can find a pointz within each element such that

parte

partx(z) = 0 for xi le z le xi+1 (264)

Consequently we can expand the error to find the solution at a node as

e(xi) = 0 = e(z) + (xi minus z)parte

partx(z) + (xi minus z)2

2

part2e

partx2(z) +O((xi minus z)3) (265)

Using (264) we find that

e(z) = minus(xi minus z)2

2

part2e

partx2(z) +O(h3) (266)

Note that

(xi minus z)2 le (xi+1 minus xi2

)2

= h2

4 (267)

where h denotes the nodal spacing Altogether we have thus shown that the maximumerror in an element is bounded by

∣e(x)∣max leh2

8max

xilexlexi+1

∣part2u

partx2∣ (268)

As shown in Appendix C the above error bound can be significantly generalized Forpolynomial shape functions of order k and u isinHk+1(Ω) we have

∣uh minus u∣H1(Ω) lehk

πk∣u∣Hk+1(Ω) and ∥uh minus u∥H1(Ω) le ch

k ∣u∣Hk+1(Ω) (269)

using Sobolev norms In simple terms the error is again determined by the smoothnessof the function to be interpolated and it is expected to decrease with decreasing elementsize (as hrarr 0) ndash the faster the higher the interpolation orderNote that special caution is required if stress concentrations of any kind are to be rep-resented (eg imagine a linear elastic fracture problem and the issues arising from usingpolynomial-type elements to capture the stress singularity near the crack tip)

(v) A truncation error is made by every computer when storing and operating numericvalues with only a finite number of digits (eg floats doubles etc) This is unavoidableand one should be aware of what this error is (especially when choosing eg solvertolerances) Choosing a solver tolerance ε in itself produces truncation error becausewe contend with a solution U that satisfies ∣Fint(U) minusFext∣ le ε (instead of being zero)

(vi) Finally no simulation is free of modeling errors which refers to the large collectionof errors made by the selection of the analytical model to be solved (before starting anynumerical approximation) For example we make choices about an appropriate materialmodel choose material parameters boundary conditions and geometric simplificationsincluding reductions to lower dimensions (eg plane strain or plane stress instead of a 3Dsimulation) Any such decision is prone to introducing errors

The sum of all of the above error sources makes up the numerical error inherent in everysimulation

134

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

262 Smoothing and adaptivity

Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (egthe stress and strain fields in case of simplicial elements) and computes a smooth approximationdefined by smoothed nodal values of the discontinuous quantities

In case of simplicial elements the stresses and strains are constantwithin elements Here one can define nodal quantities eg as

(εa)lowast =sumnnbj=1 εejVejsumnnbj=1 1Vej

(2610)

where the element quantities εe of all nnb neighboring elementsmeeting at a node a are weighted by the respective element volumeVe This weighting results in smaller elements (whose quadraturepoints are closer to the node) having a larger weight than largeelements (where quadrature points are far from the node)

a (e )

ee5+

+

++

+ee1

ee2ee3

ee4

In case of higher-order elements such as eg the Q4 element one can extrapolate elementquantities that are defined at the quadrature points ξk to the nodes For example for the Q4element there are four nodes and four quadrature points so that one can uniquely solve forthe four nodal values Once the smoothed nodal values are known one again uses a smooth-ing relation like (2610) with the element quantities εej replaced by the nodal value εae fromthe respective element and element volume Ve replaced by the nodal weight (obtained fromextrapolating the quadrature point weights WqJqt to the nodes)

When performing adaptive mesh refinement we need an error norm where as an example wediscuss the ZZ error estimator named after its inventors Zienkiewicz and Zhu If we usea smoothing scheme like the above we can define smoothed continuous strains εlowast which iscontrasted with the approximate solution εh so that one may define the error per element e byusing the energy norm viz

∥ε minus εlowast∥2e = int

ΩeW (εlowast minus ε)dV (2611)

Note that this definition is not unique and one could also use the L2-norm

∥ε minus εlowast∥2e = int

Ωe∥εlowast minus ε∥2

dV (2612)

or any other sensible norm These norms indicate the quality of a solution εh (if the solutionto be found is smooth or if the mesh is very fine then the piecewise constant solution εh canbe expected to be close to the interpolated smoothed solution εlowast)

In order to define an element-wise error estimate it makes senseto introduce the normalization

ηe =∥ε minus εlowast∥e

∥ε minus 0∥e + ∥ε minus εlowast∥e (2613)

ie the error is divided by the energy in the element so as to notover- or underestimate element errors based on element sizes as wellas in case of vast differences in element strain energies (the abovedenominator may be interpreted as an expansion for small errorsand avoids division by zero)

he

e

e

he

135

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The mesh refinement criterion states that an element e is refined if

ηe gt ηtol (2614)

with some tolerance ηtol determined as a compromise between accuracy and efficiency Basedon the above refinement criterion a set of elements flagged for refinement is identified after asolution uh has be found The elements of highest error ηe are refined and the error estimatesare re-evaluated until sufficiently low element errors are achieved

Needed next is a mesh refinement algorithm For example a frequent choice for triangularelements is longest edge bisection which identifies the longest edge in an element to berefined and inserts a new node at this edgersquos midpoint followed by an update of the elementconnectivity (thus replacing two existing elements by four new elements as schematically shownbelow) Note that this involves some book-keeping since adjacent elements flagged for refinementinterfere so that one needs an algorithmic decision about which elements to refine first and howto handle adjacent elements identified for refinement etc

element to be refined new node inserted atlongest-edge midpoint

new elements createdby connecting nodes

263 Common errors

As Cook Malkus Plesha and Wit put it in their FEA textbook man-made errors in FEAanalysis usually result from unfamiliarity of the user with (i) the physics of the problem (ii) theelement type and its behavior (iii) the limitations of the chosen analysis method and (iv) thesoftware being used Although it is difficult to list all possible error sources in FE analysis letus mention a few common pitfalls to be avoided

poor mesh quality is a very frequent error source The mesh size must be appropriatelyfine (eg one cannot hope to accurately represent stress concentrations near notches orcorners by a few large elements as was done in the Sleipner A oil platform examplediscussed at the very beginning see the mesh shown below) Gradients in mesh sizeshould be smooth rather than abrupt for improved accuracy of solutions Caution isrequired when mixing element types While this is generally possible there must not beany ldquohangingrdquo or unconnected nodes or element edges with different numbers of nodeswhen seen from both adjacent elements One should also avoid large element distortionssince this can lead (through the Jacobian J) to a considerable loss in accuracy Distortionsinclude large aspect ratios poorly shaped elements strongly curved or warped elementsetc For the same reason one should avoid warping of elements in 3D Several examplesare shown below

poor mesh (strong constrast)

better mesh (smooth gradient)poor mesh used in the

Sleipner A study

136

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

poor aspect ratio

ab

near-triangle Q4 off-centered mid-nodes

highly skewed element near-triangle Q4 strongly curved edge

warped Q8 element

Q8

CST

bad element combination

Many codes define the so-called Jacobian ratio j in order to quantify the distortion ofan element When using numerical quadrature all fields of interest are only evaluatedat the quadrature points (q = 0 nQP minus 1) which is where one needs to calculate theJacobian J(ξq) = detF (ξq) The Jacobian ratio of an element e is thus defined as

je =maxq J(ξq)minq J(ξq)

(2615)

ie we compare the minimum to the maximum value of the Jacobian within an elemente Ideally for an undistorted element we have J(ξq) = conts and hence maxq J(ξq) =minq J(ξq) or je = 1 If je ne 1 then the element is distorted ndash the more the further je isaway from 1

wrong element types are a common reason for trouble (eg us-ing structural vs solid elements or using 2D vs 3D elements) 2Delements can effectively be used only if the problem is plane-strainor plane-stress (and the element thickness must be set correctly)Structural elements are significantly more efficient than solid el-ements but they come with strong limitations and eg cannotaccurately represent stress concentrations encountered near sharpcorners (as shown on the right)

solid model beam model

stress concentration

linear vs nonlinear analysis are deformations expected to be large or small (so thatfinite or infinitesimal strains can be used respectively) Is the material model linearelastic or should a finite-deformation model be used

boundary conditions must be chosen appropriately (at the right locations of the righttype and magnitude) If symmetries can be exploited only a reduced system can bemodeled efficiently but boundary conditions must be chosen correctly and it must beensured that the solution is indeed symmetric (eg when studying buckling problemsthe assumption of symmetry automatically rules out asymmetric buckling modes thesame applies to vibrational eigenmodes)

step sizes (ie the load step size in quasistatic studies and the time step size ∆t indynamic studies) must be chosen to ensure convergence and stability of the solver

units must be chosen properly and entered consistently (eg always stick to SI units ndashbut bare in mind the problems associated with large numbers cf Section 261)

the interpretation of results requires caution Are color plots of fields of interest theraw data or smoothed fields Are the units correct are global or local coordinates being

137

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

used for eg the definition of tensor components Can a simple test case be comparedto an analytical or simplified solution

All commercial FEA codes have internal sanity checks which eg for an implicit analysisverify that the tangent or stiffness matrix has no zero diagonal entries The occurrence of suchwould imply eg nodes that are not connected to any element duplicated nodes or materialmoduli 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(eg a Riks path-following or line-search solver rather than a Newton-Raphson-type solver)The same applies to structures with mechanisms (ie zero-energy modes that are not rigid-body modes) For example discretizing a long bar into several 2-node bar elements leads tomechanisms since the 2-node bar element has only axial stiffness To identify the cause of zeroeigenvalues of the stiffness matrix it may be insightful to visualize the corresponding eigenmode

138

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

27 FEM ndash Extensions amp Applications

Through this Introduction to FEA we have discussed the foundations of the finite elementmethod and its applications particularly for solid and structural analysis within the frameworkof linearized kinematics (small strains) and primarily within linear elasticity with extensionsto (small-strain) inelastic behavior In this final section we would like to briefly point outextensions of the basics introduced so far along with practical hints

commercial codes most commercially available FE codes follow a similar structure tothe one discussed here in class as well as during exercises The FEM software providestools for assembling and solving boundary value problems further implementations ofthe most common element types and material models If the user cannot use existingimplementations then there is the common option to implement onersquos own element (so-called user element or UEL) or onersquos own material model (so-called user material modelor UMAT) The UMAT is usually the simpler and most often used option It is of utmostimportance to adhere to the exact strain and stress measures used in the code sinceconfusion thereof leads to nonsensical results In addition most commercial codes do nothave a variational basis and instead define the constitutive law as a relation between strainand stress rates (σ vs ε) or increments ( dσ vs dε) Especially at large strains it isagain essential to adhere to the correct rates or increments (there is a myriad of alternatedefinitions that can be used) improper use of non-conjugate rates is a common pitfall ofcommercial codes14

static vs dynamic FEA if at all possible a quasistatic implicit solution of mechanicalboundary value problems is generally preferable as it ensures that an equilibrium solutionhas been found However this may not always be possible eg because no consistenttangent T is available (because the material model lacks an analytical form of Cijkl orbecause the element implementation does not permit the analytical calculation of thetangent matrix T ) or because the tangent matrix is so large that its calculation and storageis disadvantageous if not impossible computationally We note that an approximatetangent matrix can always be compute numerically by employing finite differences

T abij (U) =partF ainti

partubj(U) asymp

F ainti(U + δebj) minus F ainti(U)δ

(271)

with vector ebi = (0 010 0)T of the length of U with a 1 placed at the locationof component ubj and 0 lt δ ≪ 1 This procedure has the disadvantage that it is compu-tationally expensive (the numerical calculation of T requires perturbing each and everyentry 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 replacethe static simulation to solve for U by a dynamic one to solve for U(t) including sufficientdamping leads to solutions that converge over time to a steady-state Uinfin = limtrarrinfinU(t)and it is expected that this steady state coincides with the static solution ie Uinfin = U Such solvers must be used with caution First it is important to check if the solution hasindeed converged over time (if vibrations or waves are still present in the solution thosemay over- or under-predict local strains and stresses by considerable amounts) Secondunless in a static linear elastic study (which surely should not be solved dynamically butstatically since an analytical tangent is available) the dynamic solver may converge toone of many equilibrium solutions and depending on the initial conditions may take onequite far from the sought solution

14Studies of errors resulting from improper use of rates can be found here and here

139

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

large deformations in this course we focused on linearized kinematics (commonly re-ferred to as ldquosmall strainsrdquo and valid up to at the very most a few percent strain)When larger deformations are to be considered one must employ a finite-strain formu-lation (eg working with deformation and velocity gradients as well as finite-kinematicsstress measures) As a consequence nodal element forces depend not only on the stressesinside the element but also the current deformed state of the element This in turn leadsto the tangent matrix T containing both material stiffness and as a new contributiongeometric stiffness Therefore even when assuming linear elastic material behaviorthe resulting problem is not linear and T is not constant in general As a further conse-quence one may experience mechanical instability and bifurcation which is problematicfor numerical solvers (as also discussed further below for damage and failure)

total-Lagrangian vs updated-Lagrangian so far we only discussed finite elementswhose initial geometry remains unchanged during a simulation For example even thoughloads vary with time we always use the same reference configuration of an element This iscalled a total-Lagrangian formulation By contrast we could also update the referenceconfiguration after each solution step ie once U(tα) has been found we update all nodalpositions xa(tα)larr xa(tα)+ua(tα) recompute the shape functions and ndash at the next timestep tα+1 solve for U(tα+1) based on the new reference configuration This approach isemployed to avoid large mesh distortions and is referred to as updated-LagrangianWhile both have their advantages and disadvantages one computational challange of theupdated-Lagrangian implementation is the accummulation of numerical errors over timeA further alternative generally used in fluid mechanics is the Eulerian formulation inwhich all governing equations are formulated in the currentdeformed configuration

incompressibility especially in large deformations the assumption of incompressibility(ie of zero volume change) is common when modeling eg problems of rubber elastic-ity or generally of soft matter such as tissues and polymers but also in metal plasticityModeling incompressibility is not straight-forward since it imposes a constraint on thedeformation within elements (the nodal dofs of an element are no longer independentsince the element must maintain a constant volume under incompressible deformation)This case calls for a special type of element that can handle incompressibility such asthe so-called family of augmented finite elements or mixed finite elements whichhave mixed dofs including both displacements and the pressure inside the element Theseelements are often referred to as PkQl elements where k denotes the order of interpo-lation of the displacement field while l stands for the polynomial interpolation order ofpressure (and one generally seeks l le k) Common choices of lowest order are eg P1Q0and P1Q1

singularities the FE method is based on polynomial shape functions to interpolateall fields of interest When boundary value problems involve singularities (such as themechanical fields around a crack tip or a sharp notch or the thermal fields around apoint heat source) then the polynomial interpolation inherently cannot lead to a goodapproximate solution As a consequence results are usually mesh-dependent the smallerthe elements (eg at the crack tip) the higher the calculated stress values within thoseelements adjacent to the crack tip It is for this reason that classical FEM is problematicwhen dealing with fracture problems (or generally any problem involving singularities)and results must be interpreted with utmost care An h-convergence study usually revealsthe diverging solution quickly

As a remedy techniques like the extended FE method (XFEM) have been introducedwhich enrich the interpolation space Uh by singularities of the expected type For examplefor fracture problems within linearized kinematics the stress is expected to diverge as

140

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1radicr at the crack tip with r gt 0 being the distance from the tip Hence including shape

functions of this type allows the interpolation to capture the diverging mechanical fieldsthus removing the singularity and yielding reasonable solutions

damage and failure when a material model includes damage or failure it generallysoftens under increasing loads (as the material suffers from damage its stiffness ultimatelytends to zero under increased loading) Such behavior also causes numerical difficultiesbecause the softening branch of the stress-strain response leads to instability (eg mostiterative solvers fail when the tangent matrix T is no longer positive-definite which isgenerally the case during mechanical softening) This manifests not only in solver failurebut also in mesh-dependence (again a study of h-convergence should reveal such issues)

141

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

A Vector Spaces

We define a set Ω as a collection of points X isin Ω

We further say Ω is a (proper) subset of all space if Ω sube Rd in d dimensions (proper if Ω sub Rd)

We usually take Ω to be an open set ie Ω cap partΩ = empty with boundary partΩ

Deformation and motion are described by a mapping

ϕ ∶ X isin Ωrarr ϕ(X) isin Rd or ϕ ∶ Ωrarr Rd (A1)

where Ω is the domain and Rd the range of ϕ The mapped (current) configuration of Ω isϕ(Ω)

Every function f(x) ∶ Rrarr R is a mapping from R to R

We call a mapping injective (or one-to-one) if for each x isin ϕ(Ω) there is one unique X isin Ωsuch that x = ϕ(X) In other words no two points X isin Ω are mapped onto the same positionx A mapping is surjective (or onto) if the entire set Ω is mapped onto the entire set ϕ(Ω)ie for every X isin Ω there exists at least one x isin ϕ(Ω) such that x = ϕ(X) If a mapping is bothinjective and surjective (or one-to-one and onto) we say it is bijective A bijective mapping isalso called an isomorphism

For example ϕ ∶ Ωrarr Rd is injective whereas ϕ ∶ Ωrarr ϕ(Ω) would be bijective

For time-dependent problems we have ϕ ∶ ΩtimesRrarr Rd and x = ϕ(X t) This describes a familyof configurations ϕ(Ω t) from which we arbitrarily define a reference configuration Ω for whichϕ = id (the identity mapping)

A linearvector space Ω+R sdot is defined by the following identities For any uvw isin Ωand αβ isin R it holds that

(i) closure α sdotu + β sdot v isin Ω

(ii) associativity wrt + (u + v) +w = u + (v +w)(iii) null element exist 0 isin Ω such that u + 0 = u(iv) negative element for all u isin Ω exist minusu isin Ω such that u + (minusu) = 0

(v) commutativity u + v = v +u(vi) associativity wrt sdot (αβ) sdotu = α(β sdotu)

(vii) distributivity wrt R (α + β) sdotu = α sdotu + β sdotu(viii) distributivity wrt Ω α sdot (u + v) = α sdotu + α sdot v

(ix) identity 1 sdotu = u

examples

Rd is a vector space By contrast Ω sub Rd is not a vector space since ndash in general ndash itviolates eg (i) closure and (iv) null element

P2 = ax2+bx+c ∶ a b c isin R is the space of all second-order polynomial functionsor an ordered triad (a b c) isin R3 More generally Pk(Ω) is the space of all kth-orderpolynomial functions defined on Ω Pk(Ω) is a linear space

We call P2 a linear subspace of Pk with k ge 2 and we write P2 sube Pk

142

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

B Function Spaces

Consider a function u(x) ∶ Ωrarr R and Ω sub R

u is continuous at a point x if given any scalar ε gt 0 there is a r(ε) isin R such that

∣u(y) minus u(x)∣ lt ε provided that ∣y minus x∣ lt r (B1)

A function u is continuous over Ω if it is continuous at all points x isin Ω

u is of class Ck(Ω) with an integer k ge 0 if it is k times continuously differentiable over Ω (ieu possesses derivatives up to the kth order and these derivatives are continuous functions)

Examples

Functions u(x) isin Pk with k ge 0 are generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks shocks etc (or discontinuities in the BCsICs) weusually assume the solution fields are Cinfin(Ω) so we may take derivatives otherwise derivativesexist almost everywhere (ae)

To evaluate the global errors of functions we need norms

Consider a linear space U +R sdot A mapping ⟨sdot sdot⟩ ∶ U times U rarr R is called inner product onU times U if for all u vw isin U and α isin R

(i) ⟨u + vw⟩ = ⟨uw⟩ + ⟨vw⟩(ii) ⟨u v⟩ = ⟨v u⟩

(iii) ⟨α sdot u v⟩ = α ⟨u v⟩(iv) ⟨uu⟩ ge 0 and ⟨uu⟩ = 0hArr u = 0

A linear space U endowed with an inner product is called an inner product space

Examples

⟨uv⟩ = uivi = u sdot v defines an inner product for uv isin Rd

The L2-inner product for functions u v isin U with domain Ω

⟨u v⟩L2(Ω) = intΩu(x) v(x)dx and often just ⟨u v⟩ = ⟨u v⟩L2(Ω) (B2)

Note that if ⟨u v⟩ = 0 we say u and v are orthogonal

Examples

Legendre polynomials

pn(x) =1

2nn

dn

dxn(x2 minus1)n so that p0 = 1 p1 = x p2 =

1

2(3x2 minus1) (B3)

orthogonality on Ω = (minus11)

int1

minus1pn(x)pm(x)dx = 2

2n + 1δmn (B4)

143

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

trigonometric functions

pn(x) = cos(πnxL

) (B5)

orthogonality on Ω = (minusLL)

intL

minusLpn(x)pm(x)dx =

⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩

2L if m = n = 0

L if m = n ne 0

0 else

(B6)

Now we are in place to define the distance between x1 and x2

d(x1 x2) =radic

⟨x1 minus x2 x1 minus x2⟩ (B7)

We need this concept not only for points in space but also to define the closeness or proximityof functions

Consider a linear space U +R sdot A mapping ∥sdot∥ ∶ U rarr R+ is called a norm on U if for allu v isin U and α isin R

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (triangle inequality)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥(iii) ∥u∥ ge 0 and ∥u∥ = 0 hArr u = 0

A linear space Ω endowed with a norm is called a normed linear space (NLS)

Examples of norms

Consider the d-dimensional Euclidean space so x = x1 xdT Then we define

ndash the 1-norm ∥x∥1 = sumdi=1 ∣xi∣

ndash the 2-norm ∥x∥2 = (sumdi=1 ∣xi∣2)12

(Euclidean norm)

ndash the n-norm ∥x∥n = (sumdi=1 ∣xi∣n)1n

ndash the infin-norm ∥x∥infin = max1leilen ∣xi∣

Now turning to functions the Lp-norm of a function u ∶ Ωrarr R

∥u∥Lp(Ω) = (intΩup dx)

1p

(B8)

The most common norm is the L2-norm

∥u∥L2(Ω) = ⟨uu⟩12L2(Ω)

= (intΩu2(x)dx)

12

(B9)

Furthermore notice that

∥u∥Linfin(Ω) = ess supxisinΩ

∣u(x)∣ (B10)

where we introduced the essential supremum

ess supxisinΩ

∣u(x)∣ =M with the smallest M that satisfies ∣u(x)∣ leM for ae x isin Ω (B11)

144

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Now that we have norms we can generalize our definition of the distance If un u isin U equippedwith a norm ∥sdot∥ ∶ U rarr R then we define the distance as

d(un u) = ∥un minus u∥ (B12)

Now we are in place to define the convergence of a sequence of functions un to u in U wesay un rarr u isin U if for all ε gt 0 there exists N(ε) such that d(un u) lt ε for all n gt N

Examples

Consider un isin U = P2(Ω) with L2-norm and Ω sub R

un(x) = (1 + 1

n)x2 rarr u(x) = x2 since d(un minus u) =

1

nint x2 dx (B13)

with u isin U = P2(Ω) For example for d(un minus u) lt ε we need n gt N = intΩ x2 dxε

Fourier series

u(x) =infin

sumi=0

ci xi rArr un(x) =

n

sumi=0

ci xi such that un rarr u as nrarrinfin (B14)

Given a point u in a normed linear space U a neighborhood Nr(u) of radius r gt 0 is definedas the set of points v isin U for which d(u v) lt r Now we can define sets properly

A subset V sub U is called open if for each point u isin V there exists a neighborhood Nr(u) whichis fully contained in V The complement V of an open set V is by definition a closed set Theclosure V of an open set V is the smallest closed set that contains V In simple terms a closedset is defined as a set which contains all its limit points Therefore note that

supxisinΩ

∣u(x)∣ = maxxisinΩ

∣u(x)∣ (B15)

For example (01) is an open set in R [01] is a closed set and [01] is the closure of (01)

A linear space U is a complete space if every sequence un in U converges to u isin U In simpleterms the space must contain all limit points

A complete normed linear space is called a Banach space ie U +R sdot with a norm ∥sdot∥ andun rarr u isin U A complete inner product space is called a Hilbert space

Note that ∥sdot∥ = ⟨sdot sdot⟩12 defines a norm Hence every Hilbert space is also a Banach space (butnot the other way around)

As an example consider U = Pn (the space of all polynomial functions of order n isin N) This is alinear space which we equip with a norm eg the L2-norm It is complete since (an bn cn )rarr(a b c ) for a b c isin R And an inner product is defined via ⟨u v⟩ = intΩ uv dx With allthese definitions U is a Hilbert space

We can use these norms to define function spaces eg the L2-space of functions

L2(Ω) = u ∶ Ωrarr R ∶ intΩu2 dx ltinfin (B16)

We say L2(Ω) contains all functions that are square-integrable on Ω

145

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Examples

u ∶ Ωrarr R with u isin Pk(Ω) and ess supxisinΩ ∣u(x)∣ ltinfin Then u isin L2(Ω)

f ∶ Rrarr R with f(x) = xminus2 is not in L2(Ω) if 0 isin Ω

Piecewise constant functions u (with ess supxisinΩ ∣u(x)∣ ltinfin) are square-integrable and thusin L2

Note that we can write alternatively

L2(Ω) = u ∶ Ωrarr R ∶ ∥u∥L2(Ω) ltinfin (B17)

146

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

C Approximation Theory

Motivation in computational mechanics we seek approximate solutions uh(x) = sumNa=1 uaNa(x)eg a linear combination of basis functions Na(x) with amplitudes ua isin R

Questions How does uh(x) converge to u(x) if at all Can we find an error estimate ∥uh minus u∥What is the rate of convergence (how fast does it converge cf the truncation error argumentsfor grid-based direct methods)

Fundamental tools for estimating errors are the Poincare inequalities

(i) Dirichlet-Poincare inequality

inth

0∣v(x)∣2 dx le chint

h

0[vprime(x)]2

dx if v(0) = v(h) = 0 (C1)

with a constant ch gt 0 that depends on the interval size h

(ii) Neumann-Poincare (or Poincare-Wirtinger) inequality

inth

0∣v(x) minus v∣2 dx le chint

h

0[vprime(x)]2

dx with v = 1

hint

h

0u(x) dx (C2)

In 1D an optimal constant can be found ch = h2π2

(iii) extension

inth

0∣v(x)∣2 dx le h

2

π2[int

h

0[vprime(x)]2

dx + ∣v(x0)∣2] with x0 isin [0 h] (C3)

Now let us use those inequalities to find error bounds Suppose a general function u(x) isapproximated by a piecewise linear approximation uh(x) Letrsquos first find a local error estimate

Consider v(x) = uprimeh(x) minus uprime(x) and note that by Rollersquos theorem

uprimeh(x0) minus uprime(x0) = 0 for some x0 isin (0 h) (C4)

Next use inequality (iii)

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprimeh(x) minus u

primeprime(x)∣2 dx (C5)

but since uh(x) is piecewise linear we have uprimeprimeh(x) = 0 so that we arrive at the local errorestimate

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprime(x)∣2 dx (C6)

Now letrsquos seek a global error estimate by using

intb

a(sdot) dx =

n

sumi=0int

xi+1

xi(sdot) dx with x0 = a xn+1 = b xi+1 = xi + h (C7)

so that

intb

a∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 intb

a∣uprimeprime(x)∣2 dx (C8)

147

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Taking square roots we see that for Ω = (a b)

∥uprimeh minus uprime∥L2(Ω)

le hπ

∥uprimeprime∥L2(Ω)

(C9)

and hence that ∥uprimeh minus uprime∥L2(Ω)

rarr 0 as hrarr 0 linearly in h

We want to write this a bit more concise Let us define the Sobolev semi-norm

∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

or for short ∣u∣k = ∣u∣Hk(Ω) (C10)

where in 1D Dku = u(k) A semi-norm in general must satisfy the following conditions

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (like for a norm)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥ (like for a norm)

(iii) ∥u∥ ge 0 (a norm also requires ∥u∥ = 0 iff u = 0 not so for a semi-norm)

Examples in 1D

from before

∣u∣H1(ab) = [intb

a∣uprime(x)∣2 dx]

12

(C11)

analogously

∣u∣H2(ab) = [intb

a∣uprimeprime(x)∣2 dx]

12

(C12)

so that we can write (C8) as

∣uh minus u∣2H1(ab) leh2

π2∣u∣2H2(ab) rArr ∣uh minus u∣H1(ab) le

h

π∣u∣H2(ab) (C13)

Hence the topology of convergence is bounded by the regularity of u Convergence withh-refinement is linear

note the special case

∣u∣2H0 = intΩu(x)2 dx = ∥u∥2

L2 (L2-norm) (C14)

We can extend this to higher-order interpolation For example use a piecewise quadraticinterpolation uh From Poincare

inth

0∣uprimeh minus u

prime∣2 dx le h2

π2 inth

0∣uprimeprimeh minus u

primeprime∣2 dx le h4

π4 inth

0∣uprimeprimeprimeh minus uprimeprimeprime∣2 dx = h

4

π4 inth

0∣uprimeprimeprime∣2 dx (C15)

Extension into a global error estimate with quadratic h-convergence

∣uh minus u∣H1(ab) leh2

π2∣u∣H3(ab) (C16)

For a general interpolation of order k

∣uh minus u∣H1(ab) lehk

πk∣u∣Hk+1(ab) (C17)

148

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Why is the Sobolev semi-norm not a norm Simply consider the example u(x) = c gt 0 Allhigher derivatives vanish on R so that ∣u∣Hk(Ω) = 0 for Ω sub R and k ge 1 However that does notimply that u = 0 (in fact it is not)

Let us introduce the Sobolev norm (notice the double norm bars)

∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

or for short ∥u∥k = ∥u∥Hk(Ω) (C18)

For example in one dimension

∥u∥2H1(Ω) = ∣u∣20 + ∣u∣21 = int

Ωu(x)2 dx + int

Ω[uprime(x)]2

dx = ∥u∥2L2(Ω) + ∣u∣2H1(Ω) (C19)

Note that this also shows that more generally

∥u∥2Hk(Ω) ge ∣u∣2Hk(Ω) (C20)

Let us derive a final global error estimate one that involves proper norms ndash here for the exampleof a piecewise linear uh Start with Poincare inequality (i)

∥uh minus u∥2L2(ab)

= intb

a∣uh minus u∣2 dx le chint

b

a∣uprimeh minus u

prime∣2 dx = ch ∣uh minus u∣2H1(ab) (C21)

and from (C19)

∥uh minus u∥2H1(Ω) = ∥uh minus u∥2

L2(Ω) + ∣uh minus u∣2H1(Ω)

le (1 + ch) ∣uh minus u∣2H1(ab) le clowasth ∣u∣2H2(ab)

(C22)

which along with (C13) gives

∥uh minus u∥H1(ab) le ch ∣u∣H2(ab) le ch ∥u∥H2(ab) (C23)

Summary and Extension of Norms

Lp-norm ∥u∥Lp(Ω) = (intΩup dx)

1p

Sobolev semi-norm ∶ ∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

= ∣u∣k

Sobolev norm ∶ ∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

= ∥u∥k

generalization ∶ ∣u∣Wkp(Ω) = [intΩ∣Dku∣p dx]

1p

= ∣u∣kp

∥u∥Wkp(Ω) = (k

summ=0

∣u∣pWmp(Ω)

)1p

= ∥u∥kp

149

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

D Sobolev spaces

The Sobolev norm is used to define a Sobolev space

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥k ltinfin (D1)

which includes all functions whose kth-order derivatives are square-integrable

Examples

Consider a piecewise linear function u isin C0 defined on Ω = (02) Then u isin H1(Ω) sincethe first derivative is piecewise constant and therefore square-integrable

Consider the Heavyside step function H(x) isin Cminus1 defined on R Then eg h isin H0(Ω)with Ω = (minus11) since the first derivative (the Dirac delta function) is not square-integrableover (minus11)

Overall note that the above examples imply that

Hm(Ω) sub Ck(Ω) with m gt k (D2)

For example if a function has a kth continuous derivative then the (k + 1)th derivative isdefined piecewise and therefore square-integrable

Higher dimensions

To extend the above concepts to higher dimensions we need multi-indices A multi-index isan array of non-negative integers

α = (α1 αn) isin (Z+0)n (D3)

The degree of a multi-index is defined as

∣α∣ = α1 + + αn (D4)

This can be used to define a monomial for x isin Rn

xα = xα11 sdot sdot xαnn (D5)

For example we can now extend our definition of polynomials to higher dimensions

p(x) isin Pk(R2) rArr p(x) =k

sumβ=0

sum∣α∣=β

aαxα (D6)

Specifically the monomials above for x isin R2 are

for ∣α∣ = 0 ∶ x0y0 = 1for ∣α∣ = 1 ∶ x1y0 x1y0 = x yfor ∣α∣ = 2 ∶ x2y0 x1 y1 x0y2 = x2 xy y2

(D7)

so that

p(x) = a(00) + a(10)x1 + a(01)x2 + a(20)x21 + a(11)x1x2 + a(02)x2

2 + (D8)

150

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that this defines a complete polynomial of degree k

Now we can use multi-indices to define partial derivatives via

Dαu = part ∣α∣u

partxα11 sdot sdot partxαnn

and D0u = u (D9)

A common notation is

sum∣α∣=β

Dαu = sumα1αnst ∣α∣=β

part ∣α∣u

partxα11 sdot sdot partxαnn

(D10)

With the above derivatives we may redefine the inner product

⟨u v⟩Hm(Ω) = intΩ

m

sumβ=0

sum∣α∣=β

DβuDβu dx (D11)

and the Sobolev norm

∥u∥Hm(Ω) = ⟨uu⟩12Hm(Ω)

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

intΩ(Dαu)2 dx

⎤⎥⎥⎥⎥⎦

12

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

∥Dαu∥2L2(Ω)

⎤⎥⎥⎥⎥⎦

12

(D12)

Letrsquos look at some examples eg consider Ω = R2 and m = 1 Then we have

D0u = u and D1u = partupartx1

partu

partx2 (D13)

so that

⟨u v⟩H1(R2) = intR2(uv + partu

partx1

partv

partx1+ partu

partx2

partv

partx2) dx1 dx2 (D14)

and

∥u∥2H1(R2) = intR2

[u2 + ( partupartx1

)2

+ ( partupartx2

)2

] dx1 dx2 (D15)

Altogether we can now properly define a Sobolev space in arbitrary dimensions

Hm(Ω) = u ∶ Ωrarr R ∶ Dαu isin L2(Ω) forall α lem (D16)

This is the set of all functions whose derivatives up to mth order all exist and are square-integrable

As an example u isin H1(Ω) implies that u and all its first partial derivatives must be square-integrable over Ω because (D15) must be finite

Let us look at the example u(x) = ∣x∣ and take Ω = (minus11) Then we have uprime(x) = H(x) (theHeaviside jump function) and uprimeprime(x) = δ(x) (the Dirac delta function) Therefore

intb

au2(x) dx ltinfin rArr u isin L2(Ω) =H0(Ω)

intb

a(partupartx

)2

dx = intb

aH2(x)dx ltinfin rArr partu

partxisin L2(Ω) and u isinH1(Ω)

intb

a(part

2u

partx2)

2

dx = intb

aδ2(x)dx =infin rArr part2u

partx2notin L2(Ω) and u notinH2(Ω)

(D17)

151

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that one usually indicates the highest order k that applies (since this is what matters forpractical purposes) so here we thus conclude that u isinH1(Ω)

From the above we also see that

Hinfin sub subH2 subH1 subH0 = L2 (D18)

Notice that even though polynomials u isin Pk(Ω) are generally in Hinfin(Ω) for any bounded Ω sub Rdthey are not square-integrable over Ω = Rd Luckily in practical problems we usually consideronly finite bodies Ω To more properly address this issue let us introduce the support of acontinuous function u defined on the open set Ω isin Rd as the closure in Ω of the set of all pointswhere u(x) ne 0 ie

suppu = x isin Ω ∶ u(x) ne 0 (D19)

This means that u(x) = 0 for x isin Ω ∖ suppu We may state eg that functions u ∶ Ω rarr R witha finite support Ω sub Rd and ess supΩ ltinfin are square-integrable over Ω

Finally let us define by Ck0 (Ω) the set of all functions contained in Ck(Ω) whose support is abounded subset of Ω Also notice that

Ck0 (Ω) subHk0 (Ω) (D20)

and

Cinfin0 (Ω) = ⋂

kge0

Ck0 (Ω) (D21)

152

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

E Operators

Energies are often defined via operators Generally we call A an operator if

A ∶ u isin U rarr A(u) isin V (E1)

where both U and V are function spaces

A simple example is

A(u) = cdu

dx (E2)

which is a (linear differential) operator requiring u isin C1

An operator A ∶ U rarr V is linear if for all u1 u2 isin U and αβ isin R

A(α sdot u1 + β sdot u2) = α sdotA(u1) + β sdotA(u2) (E3)

For example L is a linear operator in

auxx + bux = c hArr L(u) = c with L(sdot) = a(sdot)xx + b(sdot)x (E4)

Operators (such as the inner product operator) can also act on more than one function Con-sider eg an operator B ∶ U times V rarr R where U V are Hilbert spaces B is called a bilinearoperator if for all uu1 u2 isin U and v v1 v2 isin V and αβ isin R

(i) B(α sdot u1 + β sdot u2 v) = α sdot B(u1 v) + β sdot B(u2 v)(ii) B(uα sdot v1 + β sdot v2) = α sdot B(u v1) + β sdot B(u v2)

An example of a bilinear operator is the inner product ⟨sdot sdot⟩ ∶ U times U rarr R for some Hilbert spaceU

An operator A ∶ U rarr V is called symmetric if

⟨A(u) v⟩ = ⟨uA(v)⟩ for all u v isin U (E5)

Furthermore the operator is positive if

⟨A(u) u⟩ ge 0 for all u isin U (E6)

An example of a symmetric operator is A(u) = Mu with u isin Rd and M isin Rdtimesd which ispositive if M is positive-semidefinite

153

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

F Uniqueness of solutions

One of the beauties of the above variational problem () is that a unique minimizer exists bythe Lax-Milgram theorem This is grounded in (assuming ∣Ω∣ lt infin and u v isin U with someHilbert space U)

boundedness of the bilinear form

∣B(u v)∣ le C ∥u∥ ∥v∥ for some C gt 0 (F1)

For a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by the Cauchy-Schwarzinequality (using L2-norms)

∣B(u v)∣ le C ∥Gradu∥L2(Ω) ∥Grad v∥L2(Ω) le C ∥Gradu∥H1(Ω) ∥Grad v∥H1(Ω) (F2)

coercivity of the bilinear form (ellipticity)

B(uu) ge c ∥u∥2 for some c gt 0 (F3)

Again for a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by Poincarersquos inequal-ity

B(uu) = ∥Gradu∥2L2(Ω) ge c ∥u∥

2L2(Ω) (F4)

These two requirements imply the well-posedness of the variational problem and thus imply theexistence of a unique solution (or that the potential has a unique global minimizer) In simpleterms the two conditions that the functional has sufficient growth properties (ie the bilinearform has upper and lower bounds)

154

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

G Vainbergrsquos theorem

The question arises whether or not a general form like (631) always exists for any set ofPDEsODEs as governing equations Vainbergrsquos theorem helps us answer this question Con-sider a weak form

G[u v] = 0 forall v isin U0(Ω) (G1)

Let us see if G derives from a potential I via its first variation That would imply that

G(u δu) =DδuI[u] = limεrarr0

d

dεI[u + δu] (G2)

Now recall from calculus that for any continuously differentiable function f(x y) we must haveby Schwartzrsquo theorem

part

party

partf

partx= part

partx

partf

party (G3)

We can use the same strategy to formulate whether or not a weak form derives from a potentialSpecifically we can take one more variation and state that

Dδu2G(u δu1) =Dδu1G(u δu2) if and only if I[u] exists (G4)

This is known as Vainbergrsquos theorem

We can easily verify this for the general form given in (631)

G(u δu1) =Dδu1I[u] = intΩ[λGradu Grad δu1 minus S δu1] dx minus int

partΩNQ δu1 dx

rArr Dδu1G(u δ2) = intΩλGrad δu2 Grad δu1 dx =Dδu2G(u δu1)

(G5)

In simple terms (and not most generally) Vainbergrsquos theorem holds if the potential obeyssymmetry This in turn implies that the governing PDE contains derivatives of even order (suchas linear momentum balance which is second-order in both spatial and temporal derivatives orthe equilibrium equations of beams which are fourth-order in space and second-order in time)If the PDEs are of odd order (such as eg the time-dependent diffusion or heat equation) thenno direct potential I exists ndash there are work-arounds using so-called effective potentials thatwill be discussed later in the context of internal variables

Of course knowing that a variational structure exists is beneficial but it does not reveal anythingabout the actual solution u which will be obtained by solving the above system of equations

155

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

H Energy norm

For many purposes it is convenient to introduce the so-called energy norm

∣sdot∣E =radicB(sdot sdot) (H1)

For example if we find an approximate solution uh for the displacement or temperature fieldthen the error can be quantified by

∣u minus uh∣E=radicB(u minus uh uuh) (H2)

Notice that unlike for eg the Euclidean norm ∥u minus uh∥E

does not necessarily imply uminusuh = 0so that strictly speaking the above energy norm is only a semi-norm To turn it into a propernorm we need to exclude solutions corresponding to rigid-body motion (ie solutions thatimply uniform translations or rotations of the u-field but without producing gradients in u) Ifwe assume that essential boundary conditions are chosen appropriately to suppress rigid bodymotion by seeking solutions

u isin U = u isinH1 ∶ u = u on partΩD (H3)

then for this space ∥sdot∥E is indeed a proper norm

156

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

I Gauss quadrature

A systematic way to deriving Gaussian quadrature rules involves the use of Legendre polyno-mials We here give a brief overview

We start by noticing that monomials 1 ξ ξ2 ξ3 although complete are not orthogonalbasis functions We can turn them into orthogonal polynomials Pn(ξ) by eg the Gram-Schmidt orthogonalization procedure To this end let us start with

P0(ξ) = 1 (I1)

and obtain the next basis function by starting with the linear momonial ξ and computing

P1(ξ) = ξ minus⟨1 ξ⟩⟨11⟩

1 = ξ (I2)

where we used the inner product

⟨u v⟩ = int1

minus1u(ξ)v(ξ)dξ (I3)

Similarly the next higher basis function is obtained by starting from ξ2 so that

P2(ξ) = ξ2 minus ⟨ξ ξ2⟩⟨ξ ξ⟩

ξ minus ⟨1 ξ2⟩⟨11⟩

1 = ξ2 minus 1

3 (I4)

Analogously one finds

P3(ξ) = ξ3 minus 3

5ξ (I5)

By continuing analogously we create a countably infinite set of orthogonal basis functions Pn(ξ)such that

int1

minus1Pn(ξ)Pm(ξ)dξ = 0 if n nem (I6)

These polynomials are known as Legendre polynomials Note that they are defined only upto a constant so one can renormalize them which is commonly done by enforcing that Pn(1) = 1for all n The result is the well known Legendre polynomials which can alternatively be definedvia

Pn(ξ) =1

2nn

dn

dξn[(ξ2 minus 1)n] (I7)

These polynomials have another interesting feature viz by orthogonality with P0(ξ) = 1 weknow that

int1

minus1Pn(ξ)dξ = ⟨1 Pn⟩ =

⎧⎪⎪⎨⎪⎪⎩

2 if n = 0

0 else(I8)

Pn(ξ) has exactly n roots in the interval [minus11] Also for n ne 0 we know that

Pn(ξ) = minusPn(minusξ) for odd n

Pn(ξ) = Pn(minusξ) for even n(I9)

157

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Moreover Pn(0) = 0 for odd n

With this new set of basis functions we can define the Gauss-Legendre quadrature rule toenforce

int1

minus1Pk(ξ)dξ

=nQPminus1

sumi=0

Wi Pk(ξi) k = 01 2nQP minus 1 (I10)

If nQP = 1 then the solution is simple because the above equations simplify to

W0 = 2 and 0 =W0P1(ξ0) (I11)

Therefore the weight is as before W0 = 2 and the quadrature point is the root of P1(ξ) vizξ0 = 0

If nQP = 2 then the four equations to be solved are

W0 +W1 = 2 and 0 =W0P1(ξ0) +W1P1(ξ1)0 =W0P2(ξ0) +W1P2(ξ1) and 0 =W0P3(ξ0) +W1P3(ξ1)

(I12)

By analogy we choose the quadrature points to be the roots of P2(ξ) so that

P2(ξ0) = P2(ξ1) = 0 rArr ξ0 =1radic3 ξ1 = minus

1radic3 (I13)

Using Pn(ξ) = minusPn(minusξ) the above equations reduce to

W0 =W1 = 1 (I14)

Further note that Pn(0) = 0 for odd n Therefore the same procedure can be continued asfollows For an arbitrary number of quadrature points nQP the Gauss-Legendre quadraturepoints and associated weights are defined by

PnQP (ξi) = 0 wi =2

(1 minus ξ2i )[P prime

nQP(ξi)]2

i = 0 nQP minus 1 (I15)

As a check take eg nQP = 1 so that P1(ξ) = ξ with root ξ0 = 0 The weight is computed as

w0 =2

(1 minus ξ20)[P prime

nQP(ξ)]2

= 2 (I16)

as determined above Similarly for nQP = 2 we have P2(ξ) = 12(3ξ

2 minus 1) with the above roots of

plusmn1radic

3 The associated weights are computed as

w0 =2

(1 minus ξ20)[P prime

2(ξ0)]2= 2

(1 minus ξ20)[3ξ0]2

= 223

32

3

= 1 = w1 (I17)

which agrees with our prior solution in Section 1621

158

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

J Quadrature error estimates

Using numerical quadrature to approximate an exact integral introduces a quadrature errorwhich is bounded as follows For a function f(ξ) isin C2nQP (Ω) we have that (without proof here)

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQPminus1

sumk=0

Wk f(ξk)RRRRRRRRRRRle Ch2nQP max

ξisin[minus11]∣f (2nQP )(ξ)∣ (J1)

with a constant C gt 0 This shows that as can be expected the quadrature error decreases withdecreasing mesh size h and with increasing smoothness of function f The rate of convergenceunder h-refinement also depends on the smoothness of the function

The exact error depends on the chosen quadrature rule For example for Gauss-Legendrequadrature an error estimate is given by

e =22nQP+1(nQP )4

(2nQP + 1)[(2nQP )]3maxξisin[minus11]

∥f (2nQP )(ξ)∥ (J2)

159

Index

L2-norm 144h-refinement 57hp-refinement 57n-dimensional space 47p-refinement 57r-refinement 57(proper) subset 1422-node bar element 592-node beam element 664-node bilinear quadrilateral 794-node tetrahedron 758-node brick element 848-node quadratic quadrilateral 839-node quadratic quadrilateral 83

ae 143acceleration field 7action 109action principle 109amplitude 117approximation error 134assembly 62assembly operator 95augmented finite elements 140average acceleration 124 125

backward-Euler 19balance of energy 10balance of linear momentum 9Banach space 145barycentric coordinates 72basis 54basis functions 28bijective 142bilinear form 42bilinear operator 153boundary 142boundary conditions 13Bubnov-Galerkin approximation 47

CFL condition 23chicken-wire mode 94class Ck(Ω) 45 143classical solution 41closure 145collocation method 29collocation points 29commercial codes 139

complete polynomial 151complete space 145complete up to order q 55completeness property 55condensation 105condition number 133conditionally stable 25conductivity matrix 132conjugate gradient 99consistent mass matrix 111Constant Strain Triangle 75constitutive relations 8continuous at a point x 143continuous over Ω 143convergence 145Courant-Friedrichs-Levy 23Courant-Friedrichs-Levy (CFL) condition 24CST 75cubature rules 86

damage and failure 141damped Newton-Raphson method 97damping matrix 120deformation gradient 128deformation mapping 128degree 150degrees of freedom 56Direct methods 18Dirichlet boundary 13Dirichlet boundary condition 70Dirichlet boundary conditions 69Dirichlet-Poincare inequality 147discrete problem 48discretization error 133discretization errors 12displacement field 7 128distance 144 145divergence of a vector 11domain 142dummy index 7dynamic 109

eigenfrequency 115eigenmode 115elasticity tensor 8element defect 92elements 56energy norm 156

160

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

equation of motion 111error estimate 135essential supremum 144Euclidean norm 144Euler-Bernoulli beam 65Eulerian 140excitation frequency 117explicit 19explicit time integration 121extensive 11external forces 101

Fast Inertial Relaxation Engine 99FE 56FEM 56finite differences 18finite element 56Finite Element Method 56finite-difference stability 23first fundamental error 133first Piola-Kirchhoff stress tensor 129first variation 39first-derivative central difference 18forced vibrations 114 117forward-Euler 19free vibrations 114full integration 90function 142function space 37functional 37

Gauss quadrature 86Gauss-Chebyshew 88Gauss-Hermite 88Gauss-Legendre 88Gauss-Legendre quadrature 87 158Gauss-Lobatto quadrature 88Gauss-Newton method 99geometric stiffness 140ghost node 21global 53 95global error estimate 147 148global stiffness matrix 62gradient flow method 99Gram-Schmidt orthogonalization 157

heat equation 11Hermitian polynomials 67HHT method 127HHT-α 127hierarchical interpolation 64higher-order interpolation 148

Hilbert space 145hourglass mode 94

identity mapping 142implicit 19 21implicit time integration 124incompressibility 140incremental stiffness matrix 77indirect methods 27initial boundary value problem 13initial conditions 13injective 142inner product 143inner product space 143instability 141integration point 86intensive 11internal energy 10inverse function theorem 73 74isomorphism 142isoparametric mapping 71isotropy 8

Jacobian 74Jacobian ratio 137

kinetic energy 109

L2-inner product 143L2-space of functions 145Lp-norm 144Lagrange polynomials 64Lagrangian 109Lagrangian interpolation 64Laplace equation 11large deformations 140Lax-Milgram theorem 42 154Lax-Richtmyer theorem 25least squares method 30Legendre polynomials 157line search method 98linear 153linear acceleration 124 125linear elasticity 8 49 50linear form 42linear operator 13linear strain triangle 78linear subspace 142linearvector space 142local 53local energy balance 11local error estimate 147

161

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

local stiffness matrix 62local-to-global map 62locking 93longest edge bisection 136LST 78lumped mass matrix 112

mapping 71 142material points 7mathematical domain of dependence 24maximizer 41mechanical instability 138mechanisms 108 138mesh 56mesh refinement algorithm 136mesh refinement criterion 136methods of weighted residuals 29minimizer 41mixed finite elements 140modal decomposition 118modeling errors 12 134monomial 150monomials 55multi-index 150multi-indices 55

natural frequency 115Navier equation 10neighborhood 145Neumann boundary 13Neumann-Poincare 147Newmark-β 124 125Newton-Cotes 86Newton-Raphson method 96nodes 56nominal strains 8nominal stresses 8nonlinear least squares 98norm 144normed linear space 144numerical damping 125numerical domain of dependence 23numerical integration 85numerical integration error 133

one-to-one 142onto 142open 145open set 142operator 153order of a PDE 13order reduction 119

ordered triad 142orthogonal 143over-integration 91

PkQl elements 140parasitic shear 93particle-mass lumping 112period contraction 127period elongation 127Petrov-Galerkin 47phase error analysis 23Poincare inequalities 147Poisson equation 12polynomial function space 32positive 153principle of stationary action 109principle of virtual work 34 46

Q4 79Q8 83Q9 83quadratic tetrahedron 78quadratic triangle 77quadrature error 159quadrature rules 86Quasi-Newton method 97quasistatics 109

range 142Rayleighrsquos quotient 119Rayleigh-Ritz 42reduced integration 91reference configuration 7residuals 28Riemann sum 85rigid-body mode 115rigid-body modes 107rigid-body motion 107

second-derivative central difference 18selective integration 94semi-discretization 110semi-norm 148serendipity element 83set 142shape function properties 53shape functions 47 53shear locking 93shear strains 8shear stresses 8simplex 72simplicial quadrature 91

162

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

singularities 140smoothing 135Sobolev norm 38 149Sobolev semi-norm 148Sobolev space 38 150 151solution error 133solution errors 12solver tolerance 134space of all second-order polynomial functions

142square-integrable 38 145 150static vs dynamic FEA 139statics 10stationarity condition 39stencil 20strain tensor 7stress tensor 8strong form 45 49subdomain method 29subparametric mapping 71substitution 105superparametric mapping 71support 53 152surjective 142symmetric 153

tangent matrix 96Taylor expansions 18temperature field 130thermal problem 130time delay 120total-Lagrangian 140trial functions 28triangle inequality 144truncation error 134

UEL 139UMAT 139unconditionally stable 26undeformed 7under-integration 91units 133update rule 19updated-Lagrangian 140

Vainbergrsquos theorem 47 155validation 12variation 39variational calculus 37variational structure 40velocity field 7verification 12

vibrations 114Voigt notation 52von Neumann analysis 23 25

wave equation 10weak form 46 110weak solution 46Weierstrass approximation theorem 54

XFEM 140

zero-energy mode 93zero-energy modes 107zeroth derivative 46 143ZZ error estimator 135

163

  • Preface
  • Introduction Continuum Mechanics and Notation
    • Kinematics
    • Kinetics
    • Computational Mechanics
    • (Initial) Boundary Value Problems
      • Dimensionless Forms
      • Direct Numerical Methods Finite Differences
      • Stability of Finite Difference Schemes
        • CFL Condition
        • von Neumann Analysis and Phase Error Analysis
        • Direct vs Indirect Methods
          • Methods of Weighted Residuals
            • Collocation Method
            • Subdomain Method
            • Method of Least Squares
            • Higher Dimensions
            • Galerkins Method
              • Variational Calculus
                • Functionals
                • Variations
                • Rayleigh-Ritz Method
                  • The weak form
                    • Classical and weak solutions
                    • Equivalence of strong and weak forms
                    • Approximate solutions
                      • The mechanical variational problem at small strains
                        • General case
                        • Linear elasticity
                          • Interpolation spaces
                            • Shape functions
                            • Approximation power and completeness
                            • Completeness in higher dimensions
                              • The Finite Element Method
                              • Finite element spaces polynomial shape functions in 1D
                                • 2-node bar element
                                • Problem assembly
                                • Polynomial interpolation of higher order
                                  • Lagrangian interpolation
                                  • Hierarchical interpolation
                                    • 2-node beam element
                                    • A note on beam elements and boundary conditions
                                      • Shape Functions in higher dimensions
                                      • Simplicial elements
                                        • Linear Triangle (T3)
                                        • Extension to three dimensions
                                        • Finite element implementation
                                          • Special case linear elasticity
                                          • General case of non-linear elastic materials
                                            • Higher-order triangles and tetrahedra
                                              • The bilinear quadrilateral element
                                              • Higher-order elements Q8 Q9 8-node brick
                                              • Numerical quadrature
                                                • Example Riemann sums
                                                • Gauss quadrature
                                                  • Gauss-Legendre quadrature
                                                  • Other Gauss quadrature rules
                                                    • Higher dimensions
                                                      • FEM which quadrature rule to use
                                                        • Integrals in the FE context
                                                        • Which quadrature rule to use
                                                          • Element defects shear locking and hourglassing
                                                          • Assembly
                                                          • Iterative solvers
                                                            • Netwon-Raphson (NR) method
                                                            • Damped Newton-Raphson (dNR) method
                                                            • Quasi-Newton (QN) method
                                                            • Line search method
                                                            • Nonlinear Least Squares
                                                            • Gradient flow method
                                                            • Conjugate Gradient (CG) method
                                                              • Boundary conditions
                                                                • Neumann boundary conditions
                                                                • Dirichlet boundary conditions
                                                                  • Substitution
                                                                  • Condensation
                                                                    • A note on Dirichlet boundary conditions in iterative solvers
                                                                    • Rigid body motion
                                                                      • Dynamics
                                                                      • Vibrations
                                                                        • Free undamped vibrations
                                                                        • Forced vibrations
                                                                        • Modal decomposition
                                                                        • Structural damping
                                                                          • Time-dependent transient solutions
                                                                            • Explicit time integration
                                                                            • A reinterpretation of finite differences
                                                                            • Implicit time integration
                                                                              • Newmark- method
                                                                                • HHT- method
                                                                                • Use of mass matrices
                                                                                  • Extensions
                                                                                    • Finite kinematics
                                                                                    • Thermal problems
                                                                                      • Error analysis and adaptivity common mistakes
                                                                                        • Finite element error analysis
                                                                                        • Smoothing and adaptivity
                                                                                        • Common errors
                                                                                          • FEM ndash Extensions amp Applications
                                                                                          • Appendices
                                                                                          • Vector Spaces
                                                                                          • Function Spaces
                                                                                          • Approximation Theory
                                                                                          • Sobolev spaces
                                                                                          • Operators
                                                                                          • Uniqueness of solutions
                                                                                          • Vainbergs theorem
                                                                                          • Energy norm
                                                                                          • Gauss quadrature
                                                                                          • Quadrature error estimates
                                                                                          • Index
Page 5: Computational Mechanics I { Introduction to FEA

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

214 Rigid body motion 107

22 Dynamics 109

23 Vibrations 114

231 Free undamped vibrations 114

232 Forced vibrations 117

233 Modal decomposition 118

234 Structural damping 120

24 Time-dependent transient solutions 121

241 Explicit time integration 121

242 A reinterpretation of finite differences 122

243 Implicit time integration 124

2431 Newmark-β method 124

244 HHT-α method 127

245 Use of mass matrices 127

25 Extensions 128

251 Finite kinematics 128

252 Thermal problems 130

26 Error analysis and adaptivity common mistakes 133

261 Finite element error analysis 133

262 Smoothing and adaptivity 135

263 Common errors 136

27 FEM ndash Extensions amp Applications 139

Appendices 142

A Vector Spaces 142

B Function Spaces 143

C Approximation Theory 147

D Sobolev spaces 150

E Operators 153

F Uniqueness of solutions 154

G Vainbergrsquos theorem 155

H Energy norm 156

I Gauss quadrature 157

J Quadrature error estimates 159

Index 160

5

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

0 Preface

Finite Element Analysis (FEA) has become a ubiquitous tool used by engineers and scientistsacross all disciplines Whether it is commercial software like Abaqusreg Ansysreg and LS-Dynareg

or open-source libraries such as fenics or FEAP ndash FEA techniques are available in variousflavors and have become an essential ingredient for the analysis of mechanical thermal andmulti-physics initial boundary value problems

The availability and ease of use of FEA tools comes with a risk though the ability to producecolorful plots by the push of a button does not obviate the userrsquos expert knowledge in deploy-ing FEA tools properly and responsibly (ultimately lives could be endangered and significanteconomic losses incurred if engineering design is flawed) What element types to use whatquadrature rules to use what stress components to plot how to interpolate or extrapolate andhow to present results those are questions to be answered by the FEA user and they requirea background knowledge on what the ldquoblack box FEArdquo does for us

To turn the black box into an versatile and understandable toolbox this course discusses thefundamentals of numerical methods and in particular the finite element method Rather thanstudying and using commercial software packages we study FEA from the basics and with thegoal in mind of understanding the theoretical underpinning and the details of numerical imple-mentations This of course requires us to review the underlying mechanical and mathematicaltheory and to discuss the wide variety of finite element types and choices to be made whenusing FEA

Since no course on computational methods would be effective without a computational compo-nent we will write our own finite element code (using MATLABreg) starting with simple barand beam elements for truss and frame problems and advancing to solid elements for static anddynamic analysis Throughout the course we will complete a total of five projects that buildupon each other and grow our finite element code over time in a modular fashion ndash ultimatelyproviding a simple but versatile FEA code that is no longer a black box but whose every singleline we will understand

In order to follow the course contents is assumed that you have a background in solid andstructural mechanics (equivalent to Mechanics 1-2 and Dynamics at ETH Zurich) as well asknowledge in analysis and linear algebra We will begin with a brief review of continuummechanics and an introduction to the notation used in this course after which we will dive intothe discussion of numerical methods

I apologize in advance for any typos that may have found their way into these lecture notesThis is a truly evolving set of notes which was started in the spring semester of 2019 and hasevolved significantly over time Note that this set of notes is not meant as a complete textbookand you are encouraged to take notes during lectures Though I made a great effort to ensurethese notes are free of essential typos I cannot rule out that some have remained If you spotany mistakes feel free to send me a highlighted PDF at the end of the semester so I can makesure those typos are corrected for future years

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

Dennis M KochmannZurich March 2021

6

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1 Introduction Continuum Mechanics and Notation

11 Kinematics

We describe a body Ω sub Rd with boundary partΩ as a collection of material points Each pointhas a position x isin Ω in a Cartesian coordinate system (x1 xd) in d dimensions with origin O

Points are described by vectors with respect to O which in turn are defined by components inthe Cartesian reference frame with basis e1 ed Therefore we write

x =d

sumi=1

xiei = xiei (11)

Here and in the following we use Einsteinrsquos summation convention which implies a summationover an index that appears twice in any product (for a thorough review of index notation seethe tensor notes available online) In the above example i is a dummy index and can bereplace by any other index For example an inner product of two vectors is written as

u sdot v = (d

sumi=1

uiei) sdot⎛⎝

d

sumj=1

vjej⎞⎠=

d

sumi=1

d

sumj=1

uivi(ei sdot ej) =d

sumi=1

uivi = uivi = ukvk (12)

Likewise the norm of a vector is

∥u∥ =radicu sdotu =

radicuiui (13)

The deformation and motion of a body Ω is described bya displacement field

u = u(x t) (14)

which to every undeformed point x isin Ω in its referenceconfiguration defines a unique deformed location y isin Rdsuch that

y(x t) = x +u(x t) (15)

x1

+

x2

x3

e1

e2

e3

+

x

WparaW

y

u

From the displacement field we may derive kinematic variables such as the velocity field

v(x t) = d

dtu(x t) (16)

and the acceleration field

a(x t) = d

dtv(x t) = d2

dt2u(x t) (17)

For convenience we also use dots to denote derivatives with respect to time so that v = u anda = v = u

Deformation is best described not by the displacement field (which would also include rigidbody motion) but by the strain tensor which is a second-order tensor with components

εij =1

2(partuipartxj

+partuj

partxi) = 1

2(uij + uji) rArr ε = 1

2[gradu + (gradu)T] (18)

7

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here used index notation again and to define the second-order tensor Specifically we usedthe gradient of a vector field defined as a second-order tensor with components

[gradu]ij =partuipartxj

= uij (19)

Here and in the following a comma in an index implies differentation with respect to the spatialx-component(s) following the comma

Recall that ε11 ε22 and ε33 are the nominal strains along in the three coordinate directionsof an infinitesimal cube of material εij (with i ne j) by contrast represent shear strains Bydefinition εij = εji or ε = εT ie the strain tensor is symmetric

12 Kinetics

In order to deform body Ω forces (or displacements) must be ap-plied Consider again an infinitesimal cube with (infinitesimal)force vectors dFi applied to each surface dAi normal to the xi-axis(positive in the +xi-direction negative in the minusxi-direction) Wedefine the components of the stress tensor σ as

σij =dFidAj

(110)

x1

x2

x3

s11

s21

s31

s22

s12s32

s13

s23

s33t1

-t1

t3

t2

Analogous to the strains components σ11 σ22 and σ33 represent nominal stresses (resultingin extension or compression of the cube along its axes) while σij (with i ne j) imply a shearstresses acting parallel to the surface that it is acting on (and resulting in angle changes withinthe cube) The complete (infinitesimal) force vector acting on a surface with normal n is givenby

t(n) = σn rArr [t(ei)] =⎛⎜⎝

t1t2t3

⎞⎟⎠=⎛⎜⎝

σ1i

σ2i

σ3i

⎞⎟⎠ (111)

ie the ith column of σ is the traction vector on a surface normal to ei Here and in thefollowing we use brackets to indicate vector (or tensor) components in the Cartesian frameNote that by angular momentum balance on the cube (and in close analogy to the strain tensor)we must have σ = σT (ie σ is symmetric)

Stresses and strains are linked by constitutive relations that depend on the material of whichbody Ω is made The simplest material model is linear elasticity for which stresses and strainsare linearly linked via the linear relation

σij = Cijklεkl hArr σ = Cε (112)

with a fourth-order elasticity tensor whose component Cijkl describes the linear dependenceof the stress component σij to the strain component εkl In principle C has d4 entries yetthe symmetry of both the stress and strain tensors as well as any existing material symmetriesreduce the number of independent material parameters required to describe C For the simplestcase of isotropy (ie the material behavior is the same in every direction) C can be describedby only two constants eg Youngrsquos modulus E and Poissionrsquos ratio ν or the Lame moduli λand micro

8

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

As a convenient alternative to defining the constitutive relation as a link between stresses andstrain we can encode the constitutive response in a strain energy density W = W (ε) whicheg for the case of linear elasticity reads

W = 1

2ε sdotCε hArr W = 1

2εijCijklεkl (113)

so that

σij =partW

partεij Cijkl =

partσij

partεkl (114)

Vector or tensor derivatives of the above type are to be understood component-wise (for detailsand a proper tensorial definition see the tensor notes available online)

In order to solve any mechanical problem we need governing equations that describe howstresses and strains vary over time and space These are given by the conservation or balancelaws First we consider the balance of linear momentum which for a macroscopic body Ωstates that

sumi

Fi =maCM (115)

which equates the sum of all forces applied externally to Ω to its total (constant) mass m andthe acceleration of its center of mass aCM Let us now consider body Ω as a deformable objectfor which we can write the above balance law using integrals over Ω Specifically (115) isequivalent to

intpartΩσn dS + int

ΩρbdV = int

Ωρa dV (116)

where the first term represents all external forces applied to the boundary partΩ of the bodythrough tractions σn the second term denotes external forces in the form of distributed bodyforces and the right-hand side stems from applying the definition of the center of mass and itsacceleration since

aCM = d2

dt2uCM = d2

dt2intΩ ρu dV

intΩ ρ dV= 1

mint

Ωρ

d2u

dt2dV = 1

mint

Ωρa dV (117)

Applying the divergence theorem to the first term in (116) viz

intpartΩσijnj dS = int

Ωσijj dV (118)

which defines the divergence of a second-order tensor as a vector with components

[divσ]i = σijj (119)

Rewriting the resulting equation gives

intΩ(divσ + ρb minus ρa) dV = 0 (120)

This relation must hold not only for the whole body Ω but also for any sub-body cut free fromΩ (as discussed in Mechanics 2 and 3) For the integral to vanish for any arbitrary subset of Ωwe must have

divσ + ρb minus ρa = 0 hArr divσ + ρb = ρa or σijj + ρbi = ρai (121)

which is the local form of the balance of linear momentum

9

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 11 One-dimensional elastic rod

Consider a long and slender rod that is deforming only along its x-axis The displacement field u = u(x t) describes the axial motionof each point on the rod so the associated acceleration field issimply a = a(x t) = u(x t) x

+

u(xt)

The only non-zero strain component is the axial strain εxx(x t) = ε(x t) = ux(x t) and theonly non-zero stress is the axial stress σxx(x t) = σ(x t) which for linear elasticity obeysσ(x t) = E(x)ε(x t) with Youngrsquos modulus E(x) that may vary with position x

Inserting all of this into the balance law of linear momentum gives

ρ(x)a(x t) = divσ(x t) rArr ρ(x)u(x t) = (σ(x t))x= (E(x)ux(x t))x (122)

For the special case of a constant density ρ(x) = ρ = const and constant modulus E(x) = E =const the above reduces to

ρu(x t) = Euxx(x t) hArr u(x t) = c2uxx(x t) with c =radic

E

ρ(123)

This is the one-dimensional wave equation governing the deformation and motion of the rodin one dimension and c is the longitudinal wave speed in the rod For the special case of staticswe have u(x t) = 0 for all x isin Ω and times t

mdashmdashmdashmdash

Example 12 Wave equation in higher dimensions

For the more general case of a body Ω undergoing linear elastic deformation over time thebalance law of linear momentum reads

ρ(x)a(x t) = divσ(x t) hArr ρ(x)ui(x t) = [Cijkl(x)ukl(x t)]j (124)

For the special case of a constant density ρ(x) = ρ = const and constant elastic modulus tensordsC(x) = C = const the above reduces to

ρui(x t) = Cijkl(x)ukjl(x t) (125)

This is sometimes referred to as the Navier equation governing the deformation and motionof a linear elastic body in higher dimensions As before for the special case of statics we haveu(x t) = 0 for all x isin Ω and for all times t

mdashmdashmdashmdash

The balance of energy provides another governing equation which is particularly of interst fornon-elastic problems as wel as for thermal problems The balance of energy states that thechange of internal energy E in a body Ω over time t balances the inward and outward flux ofenergy and the energy being produced inside the body (by some heat source density s) as wellas mechanical power P imposed on the body through mechanical work Mathematically thisimplies

d

dtE = int

Ωs dV minus int

partΩq sdotn dS + P (126)

We can use the divergence theorem to write

intpartΩq sdotn dS = int

partΩqini dS = int

Ωqii dS = int

Ωdivq dS (127)

10

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which defines the divergence of a vector as the scalar quantity

div(sdot) = (sdot)ii (128)

Energy is an extensive variable ie the total energy doubles when adding to bodies of thesame energy This is in contrast to intensive variables such as temperature or pressure whenadding to bosides having the same eg temperature Since energy is an extensive variable wecan introduce an energy density e and write

E = intΩe dV rArr d

dtE = int

Ωe dV (129)

The analogous applies to the mechanical work being a change in strain energy density so

P = d

dtint

ΩW dV = int

ΩW dV (130)

Rewriting the balance law of energy now yields

intΩe dV = int

Ωs dV minus int

Ωdivq dV + int

ΩW dV (131)

This can be rewritten as

intΩ(e minus s + divq minus W ) dV = 0 (132)

Since the balance of energy does not only have to hold for Ω but for any subbody ω sub Ω wemay conclude that the local energy balance equation is

e = W + s minus divq (133)

This is the local (ie pointwise) counterpart to the macroscopic energy balance and states thatat each point x isin Ω the rate of energy change (e) is given by the local production of heat (ρs)plus the local mechanical power supplied (W ) minus the heat lost by outward fluxes q awayfrom the point

Example 13 Heat conduction

Consider a purely thermal problem without mechanical energy (so W = 0) Thermally storedenergy is given by e = ρcvT with mass density ρ(x) constant specific heat capacity cv(x) andan unknown temperature field T = T (x t) Let us assume that heat conduction follows Fourierrsquoslaw ie

q(x t) = minusκ(x)gradT (x t) hArr qi(x t) = minusκ(x)Ti(x t) (134)

with a heat conductivity κ(x) The local energy balance equation then becomes

ρ(x)cv(x)T (x t) = [κ(x)Ti(x t)]i + s(x t) (135)

and for the special case of a homogeneous body with spatially constant material properties wearrive at the well-known heat equation (also known as the inhomogeneous Laplace equa-tion)

ρcvT (x t) = κnabla2T (x t) + s(x t) (136)

11

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

where we used the definition of the Laplacian viz Tii = nabla2T = ∆T Whenever we consider astatic problem we assume that the body is in equilibrium and the temperature field is constantwhich reduces the above to the Poisson equation

κ∆T = minuss (137)

Also for a 1D problem the heat equation with T = T (x t) reduces to

ρcvT (x t) = κTxx(x t) + s(x t) (138)

mdashmdashmdashmdash

13 Computational Mechanics

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

from reality to mathematical model a practical problem is turned into an abstractproblem by making a series of simplifications and assumptions thus introducing modelingerrors in order to define a proper mathematical problem

from mathematical model to numerical model if the mathematical model cannotbe solved analytically the sought infinite-dimensional solution is turned into a finite-dimensional solution by making approximations here discretizing the body Ω so that itsdescription involves a finite number of unknowns This incurrs discretization errors

from numerical model to results solving the numerical problem computationally gen-erally involves solution errors that stem from round-offfloating-point errors iterativesolution approaches etc

Ensuring that the results agree with the mathematical model (eg by comparing the numericalsolution to an analytical solution where available) is the step of verification while ensuringthat the obtained results properly reflects reality (eg by comparing the numerical solution toexperimental data) is the validation step

12

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 (Initial) Boundary Value Problems

So far we have seen how partial differential equations governthe thermal and mechanical behavior of solid bodies (and ofcourse those two can be coupled as well to describe the thermo-mechanical behavior of deformable bodies) In order to solve aproblem we need an initial boundary value problem (IBVP)which furnishes the above equations with appropriate boundaryconditions (BCs) and initial conditions (ICs)

To this end we subdivide the boundary partΩ of a body Ω into

t

u = u

W

paraWD

paraWN

partΩD equiv Dirichlet boundary prescribing the primary field (eg u T etc)

eg u(x t) = u(x t) on partΩD or T (x t) = T (x t) on partΩD (139)

partΩN equiv Neumann boundary prescribing derivatives of the primary field (eg εgradT etc)

eg t(x t) = σ(x t)n(x t) = t(x t) on partΩN or q(x t) = q(x t) on partΩN

(140)

Note that we may generally assume that

partΩD cup partΩN = partΩ and in most problems also partΩD cap partΩN = empty (141)

In addition all time-dependent problems require initial conditions eg

T (x0) = T0(x) forall x isin Ω

or u(x0) = u0(x) and v(x0) = v0(x) forall x isin Ω(142)

The number of required BCsICs depends on the order of a PDE eg

ρcvT = div(K gradT ) + ρs (143)

is first-order in time and therefore requires one IC eg T (x0) = T0(x) It is second-order inspace and hence requires BCs along all partΩ (eg two conditions per xi coordinate)

In summary we will have governing PDEs supplemented by ICs and BCs as required (egquasistatic problems of course do not require any initial conditions) Those need to be solvedfor the primary fields (eg temperature T or displacements u)

Any of the aforementioned PDEs can be written in an operator form introducing an operatorL For example we may abbreviate the 1D wave equation

u minus c2uxx = 0 rArr L[u] = 0 with L = part

partt2minus c2 part

partx2(144)

One key feature of all PDEs discussed so far (including the heat and wave equations) is thattheir operators are linear A linear operator L is characterized by

L[α1u1 + βu2] = α1L[u1] +α2L[u2] forall α1 α2 isin R and for all functions u1 u2 (145)

In the following we will need to be more specific about what we mean by all functions (since wemay need to classify admissible or useful classes of functions) but this is left for the examplesin the following sections A few examples involving linear operators are summarized here

13

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

wave equation in one dimension (second order in space and time)

L[u] = 0 with L = part

partt2minus c2 part

partx2hArr u = c2uxx (146)

heat equation in one dimension (second order in space first order in time)

L[T ] = s with L = ρcvpart

parttminus κ part

2

partx2hArr ρcvT = κTxx + s (147)

advection or transport equation (first order in space and time) with flow speed v

L[u] = 0 with L = part

partt+ v part

partxhArr u + v ux = 0 (148)

Similarly boundary conditions can also be expressed by linear operators For example for wemay define boundary operators for

boundary tractions of a one-dimensional bar

B[u] = t with B = E part

partxhArr Eux = t (149)

boundary flux in a one-dimensional rod

B[T ] = q with B = minusκ partpartx

hArr minus κTx = q (150)

Unfortunately analytical solutions (I)BVPs of the above type are hardly ever available ndash exceptfor relatively simple problems involving

simple geometries

simple material behavior

simple ICsBCs

For realistic geometries materials andor ICsBCs one usually requires numerical techniquesto obtain approximate solutions numerically

We point out that computing machines have two main shortcomings that require the discussionof topics in the following few sections

First computers do not know any units To this end any numerical technique must cope withthe intrinsic units present in physical problems This is commonly in done in one of two wayseither one defines a set of consistent units (eg only SI units) and tacitly implies that thoseunits are being used throughout (this is common practice in most commercial FEA codes) orone reduces the physical system to a dimensionless problem This will be discussed in Section 2

Second computers cannot deal with infinity For this reason any numerical technique has theobjective to turn an infinite-dimensional problem into a finite-dimensional one The exactsolution to any of the above systems of IBVPs lives within an inifinite-dimensional functionspace In other words we donrsquot know much about the sought function fields u(x t) or T (x t) a-priori so the problem is not to simply identify the coefficients of some known type of polynomialbut to find an arbitrary function (with some differentiability constraints) Numerical techniquesreduce such problems commonly to finite-dimensional ones Let us consider a few examples

14

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Any function can be expressed as an infinite Fourier series or as a polynomial series(those series have an infinite number of terms and hence coefficients) We can aim forapproximations by considering eg only the lowest n terms of such a truncated seriesand find the respective coefficients by some numerical method This way we have reducedthe infinite-dimensional problem to an n-dimensional one

Any computer stores and operates rational numbers (with infinite precision) with a finitenumber 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 isin Ω andfor all times we could set out to find solutions that are known only at certain discretepoints xi and possibly also at discrete time steps tα This defines the concept of finitedifferences which will be discussed in Section 3

15

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

2 Dimensionless Forms

Computer programming languages have no notion of units which is why one usually definesa set of units that are commonly agreed upon or as an elegant alternative one introducesdimensionless forms before solving problems numerically Let us illustrate the procedure throughan example

Example 21 Linear elastic spring vibration

Consider a particle of mass m attached to a linear elastic spring of stiffness k subjected toan external force F (t) The vibration of the particle is described by the equation of motionalong with an initial condition (here assuming that the spring is unstretched initially) Let u(t)denote the position of the mass then

mu(t) = minusku + F (t)u(0) = u0

(21)

We start by making the unknown displacement u dimensionless by the normalization

u = u

u0 (22)

Note that we do not need to use the initial condition u0 (which would not make sense if u0 = 0eg) but we could use any non-zero length for this normalization Insertion into the equationof motion and dividing by m yields

part2

partt2u = minus k

mu + F (t)

u0m

u(0) = 1

(23)

The first equation shows thatradicmk must have the units of time so we may define

t = tradicmk

= tradic

k

mrArr part2

partt2u = minusu + F (t)

ku0(24)

Finally introducing a dimensionless force as follows leads to the dimensionless form of theoriginal problem

f(t) =F (t

radicmk)

ku0rArr

part2

partt2u = minusu + f (t)

u(0) = 1

(25)

mdashmdashmdashmdash

Example 22 Heat equation

Let us consider the heat equation derived above as

ρcV T = sh + knabla2T for x isin Ω (26)

with some suitable boundary and initial conditions We start by introducing a reference lengthL (eg the size of the body) and a reference temperature T0 (eg the initial temperature ofthe body) and defining

x = xL

rArr part

partx= 1

L

part

partxand T = T

T0 (27)

16

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This turns the heat equation into

ρcV T0T = sh + kT0

L2nabla2T with nabla = ( part

partx1

part

partxd)

T

(28)

Next we may re-arrange the equation (by dividing by the factor in front of the Laplacian) into

ρcV T0L2

kT0T = shL

2

kT0+nabla2

T (29)

Obviously the last term on the right-hand side is dimensionless which implies that also theremaining two terms must be dimensionless This allows us to make two more definitions ofdimensionless type viz

sh =shL

2

kT0and

ρcV T0L2

kT0

part

partt= part

partthArr t = kT0

ρcV T0L2t (210)

This finally leads to the dimensionless heat equation

T t = sh +nabla2T (211)

Note that in an analogous fashion the boundary and initial conditions can also be made dimen-sionless Dirichlet boundary conditions simply use the definition of the dimensionless temper-ature directly converting T = T T0 Neumann boundary conditions of the type q = minusknablaT = qcan be transformed according to

minuskT0

LnablaT = q rArr minusnablaT = q with q = qL

kT0 (212)

mdashmdashmdashmdash

Analogously any other problem can be made dimensionless by introducing proper normaliza-tions and rewriting the governing equations and any initial andor boundary conditions A moregeneral protocol for finding dimensionless definitions based on a given set of system parametersis given by Buckinghamrsquos Π-theorem which is not discussed In the following we typicallyassume that any given problem is dimensionless (even though not showing the normalizationspecifically)

17

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

3 Direct Numerical Methods Finite Differences

To numerically solve such ODEsPDEs we generally have so-called direct and indirect methods

Direct methods aim to solve the governing PDEsdirectly for example by approximating all spatial andtemporal derivatives using finite differences (FD)Consider eg an unknown scalar field u(x t) whosederivatives appear in the governing PDEs (for simplifictylet us consider only a 1D problem whose results caneasily be extended to higher dimensions by applying thederivatives component-wise)

We introduce a regular (∆x∆t)-grid with constant spac-ings ∆x = xi+1 = xi and ∆t = tα+1 minus tα and we define thesought field u only at the grid points writing

uαi = u(xi tα) (31)

x

tDx

Dt

xi xi+1xi-1

+at

a+1ta-1t

a(t x )i

In order to approximate derivatives at the grid points we use Taylor expansions eg inspace

u(xi+1 tα) = uαi+1 = uαi +∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

+ (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(32)

u(ximinus1 tα) = uαiminus1 = uαi minus∆x

partu

partx∣xitα

+ (∆x)2

2

part2u

partx2∣xitα

minus (∆x)3

3

part3u

partx3∣xitα

+O(∆x4)

(33)

where O(sdot) denotes on the order of (sdot) Addition of the two equations leads to

uαi+1+uαiminus1 = 2uαi +(∆x)2 part2u

partx2∣xitα

+O(∆x4) rArr part2u

partx2(xi tα) =

uαi+1 minus 2uαi + uαiminus1

(∆x)2+O(∆x2)

(34)

This is the second-derivative central difference approximation (which is second-order ac-curate as evident from O(∆x2))

Analogously subtraction of the two equations gives the first-derivative central differenceapproximation (which is second-order accurate as well)

uαi+1 minus uαiminus1 = 2∆xpartu

partx∣xitα

+O(∆x3) rArr partu

partx(xi tα) =

uαi+1 minus uαiminus1

2∆x+O(∆x2) (35)

Of course the same can be carried out for derivatives in time yielding analogously eg

uα+1i minus uαminus1

i = 2∆tpartu

partt∣xitα

+O(∆t3) rArr partu

partt(xi tα) =

uα+1i minus uαminus1

i

2∆t+O(∆t2) (36)

Many other such finite-difference approximations of derivatives can be obtained in a similarfashion For example a simpler first-derivative stencil is obtained from the first Taylor equa-tion (32) alone

uα+1i minus uαi = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uα+1i minus uαi

∆t+O(∆t) (37)

18

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which is known as the (first-order accurate) first-derivative forward-Euler approximation

Analogously we use the second Taylor expansion (33) to obtain the first-derivative backward-Euler approximation (which is first-order accurate)

uαi minus uαminus1i = ∆t

partu

partt∣xitα

+O(∆t2) rArr partu

partt(xi tα) =

uαi minus uαminus1i

∆t+O(∆t) (38)

In order to numerically solve a PDE directly we choose suitable finite-difference approximationsfor all appearing derivatives Of course an extension of the above to non-constant grid spacings∆tα and ∆xi is straight-forward Also when dealing with higher dimensions any chosen stencilis applied to each partial derivative

Example 31 Heat equation by finite differences in 1D

Consider the general form of the 1D heat equation

T (x t) = k Txx(x t) + r(x t) (39)

When using the second-order central-difference approximation for the spatial and the forward-Euler approximation for the temporal derivative in the heat equation the discretized governingequation becomes

Tα+1i minus Tαi

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (310)

which in the limit ∆t∆xrarr 0 is expected to converge towards the same solution as the governingequation (this is the requirement of consistency of the discretized equation) Notice that theright-hand side of (310) does not involve Tα+1

i nor any information at the new time tα+1 whichis found only on the left-hand side Such time-dependent finite-difference schemes are calledexplicit

As a key feature of explicit schemes one can easily solve for Tα+1i at the new time for known

values Tαi at the current time and Tαminus1i at the previous time without solving a system of

equations Specifically solving the above for Tα+1i yields the update rule

Tα+1i asymp Tαi + k∆t

(∆x)2(Tαi+1 minus 2Tαi + Tαiminus1) +∆t r(xi tα) (311)

By contrast when using the backward-Euler approximation we obtain

Tαi minus Tαminus1i

∆t= k

Tαi+1 minus 2Tαi + Tαiminus1

(∆x)2+ r(xi tα) +O(∆t∆x2) (312)

which is a linear system to be solved for Tα+1i at the newest time step (which is here α) Such

a time-dependent finite-difference scheme which has unknown degrees of freedom at the newesttime step on both sides of the equation is called an implicit scheme

Let us rewrite the above implicit approximation of the heat equation as

minuscTαi+1 + (1 + 2c)Tαi minus cTαiminus1 asymp ∆t r(xi tα) + Tαminus1i with c = k∆t

(∆x)2 (313)

19

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The solution for a system of n grid points in space is obtained from solving

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

⋱⋱minusc 1 + 2c minusc

minusc 1 + 2c minuscminusc 1 + 2c minusc

⋱⋱

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

Tα1⋮⋮Tαi⋮⋮Tαn

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

∆t rα1 + Tαminus11

⋮⋮

∆t rαi + Tαminus1i

⋮⋮

∆t rαn + Tαminus1n

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

(314)

Note that suitable boundary conditions must be supplied For example if we have theessential boundary condition Tαi = Ti(tα) we may replace the equation for Tαi in the abovesystem (ie the αth row in (314)) by Tαi = Ti(tα) By contrast if we have a natural boundarycondition Tx(xi tα) = qi(tα) then we need to introduce a finite-difference stencil to Tx(xi tα)and again replace the respective equation in the above system

mdashmdashmdashmdash

Any of the above finite-difference schemes can be interpreted as a stencil (which may alsoreveal the required BCsICs) For example the explicit and implicit update rules given byrespectively (311) and (2430) have the stencils shown below revealing how information ispassed from time step to time step (and also revealing the explicit vs implicit nature of eachfinite-difference scheme)

i i +1i -1

Dx

Dt

a

a+1

a-1i i +1i -1

Dx

Dt

a

a+1

a-1

(a) explicit stencil (b) implicit stencil

Example 32 Bar under its own weight

Analogous finite difference approaches can be taken forquasistatic problems where a time-independent solutionis thought in one or several dimensions For exampleconsider a vertical elastic bar of constant Youngrsquos mod-ulus E and length L clamped at its top end deformingunder its own weight The unknown displacement field isu(x) as a function of the axial x-coordinate Gravity actsdownward In this case the governing equation is linearmomentum balance viz

divσ(x) + ρg = 0 rArr uxx = minusρg

E (315)

x

u(x) L

+

g

+

xi+1

xi

xi-1

ui

x0

xn

Dx

Boundary conditions are (assuming a free end at x = L)

u(0) = 0 and F (L) = EAux(L) = 0 hArr ux(L) = 0 (316)

We can easily find an analytical solution for this case by integrating (315) twice with respectto x and inserting the boundary conditions which yields

u(x) = ρg

2E(2L minus x)x (317)

20

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us discretize the bar into n+ 1 segments of equal lengths ∆x = L(n+ 1) so that the (n+ 1)grid points are located at xi = in for i = 0 n We may use a second-order central-differenceapproximation for the second derivative with respect to x leading to

ui+1 minus 2ui + uiminus1

(∆x)2= minusρg

Ewith u0 = 0 and

un+1 minus un∆x

= 0 (318)

where we introduced a ghost node at xn+1 = xn + ∆x to enforce the free traction boundarycondition via a first-order forward-Euler approximation and the central-difference stencil isapplied to update all nodes i = 1 n while nodes 0 and n + 1 are updated by the boundaryconditions u0 = 0 and un+1 = un This results in a linear system of equations

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

1 0 0 0 ⋱1 minus2 1

1 minus2 11 minus2 1

⋱1 minus2 1

minus1 1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

u0

⋮⋮ui⋮⋮unun+1

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

0⋮ccc⋮c0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦

with c = minusρgE

(∆x)2 (319)

Notice how we replaced the first and last row in the matrix and the respective entries in theright-hand-side vector in order to enforce the two boundary conditions This is a convenientstrategy to impose boundary conditions directly within the system to be solved (which we willalso exploit later in the context of finite elements) Solving the above linear systems yields theapproximate finite-difference solution

This is not a time-dependent problem hence our above definition of explicit vs implicit schemesdoes 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

Shown below is the solution obtained for n = 9 (green) n = 19 (purple) n = 29 (light blue)n = 49 (orange) and n = 99 (red) showing convergence with increasing number of grid pointstowards the exact solution u(x) which is included as the solid blue line (Results are normalizedsuch that u = uE

ρgL2 and x = xL) Note that convergence is from below ie the discretized bar

appears stiffer than it is in reality (a fact that we will get back to later)

02 04 06 08 10

01

02

03

04

05

x

u

mdashmdashmdashmdash

Notice that the above finite-difference approximation also admits a physical interpretation inthe following sense Imagine that we subdivide the bar into n bars each of length ∆x = Ln

21

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We can replace a bar by an elastic spring of effective stiffness k = EA∆x = nEAL At thesame time each bar carries a weight m = ρA∆x = ρALn which we may distribute evenly to itstwo ends As a result we arrive at a chain of n+1 masses (the inner ones being m the first andlast ones m2) connected by linear springs If we formulate the system of equations resultingfrom the static force equilibrium of eg the ith mass we obtain

nEA

L(ui minus uiminus1) minus

nEA

L(ui+1 minus ui) minus gρALn = 0 (320)

or (after some simplification)

ui+1 minus 2ui + uiminus1 = minusρgE(Ln)2 (321)

which is identical to (318) and (319) (for each inner mass while the first and last differ)

x

u(x) L

+

g+

xi+1

xi

xi-1

ui

x0

xn

Dx

+

ui

Dxmmm

mm2

m2

kkk

m2

m2kDx =

+ =

22

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

4 Stability of Finite Difference Schemes

So far we have derived first- and higher-order finite difference approximations in space and timeand discussed the explicit and implicit finite-difference schemes resulting from applying thoseapproximations to PDEs We still need to discuss the suitability of particular combinations offinite-difference combinations in space and time for a particular PDE This raises the questionof finite-difference stability which is classically associated with two names

the Courant-Friedrichs-Levy or CFL condition is a necessary condition for the sta-bility of a finite-difference scheme

von Neumann analysis yields a sufficient condition or the stability of a finite-differencescheme and is related to phase error analysis

We will discuss all three concepts at the example of the 1D wave equation below

41 CFL Condition

Every finite-difference stencil comes with a numerical domain of dependence For exampleconsider the 1D wave equation which when discretized by second-order central-difference ap-proximations in space and time becomes

uα+1i minus 2uαi + uαminus1

i

(∆t)2= c2u

αi+1 minus 2uαi + uαiminus1

(∆x)2 (41)

Drawing the stencil in the shape of a plus sign indicatesthat the solution for uα+1

i depends on information at theprevous time step specifically on uαi+1 uαi and uα+1

iminus1 (aswell as uαminus1

i from two time steps ago) When repeatingto apply this stencil on a large grid we may draw thenumerical domain of dependence as all those pointswhose information was affected the value uα+1

i For theabove example this turns into a triangular fan for whichany change to the value of u at a grid point interior tothe fan affects the value of uα+1

i whereas points outsidethe fan do not impact the value of uα+1

i The slope of thetwo curves limiting our fan in the x-t-diagram are simplyplusmn∆t∆x

Dx

Dt

mathematical domain of dependence

numerical domainof dependencec

We may also define the mathematical domain of dependence by studying the exact solution ofthe wave equation which we know is composed of characteristics of the type

u(x t) = f1(x + ct) + f2(x minus ct) (42)

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

x + ct = const and x minus ct = const (43)

are characteristics of the solution Now consider a grid point (xi tα) such that the character-istics through this point are defined by

x + ct = xi + ctα and x minus ct = xi minus ctα (44)

23

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The fan enclosed below these two lines is the mathematical domain of dependence sinceany point inside the fan can affect the solution on the bounding curves of the cone and hencecan affect u(xi tα) The latter does not apply to points outside the fan More mathematicallyspeaking we may invoke drsquoAlembertrsquos formula if the initial conditions are supplied as u(x t0) =u0(x) and u(x t0) = v0(x) then

u(xi tα) =u0(xi + ctα) + u0(xi minus ctα)

2+ 1

2cint

xi+ctα

ximinusctαv0(y)dy (45)

which again confirms that u(xi tα) depends only on information at time t0 = 0 contained withinxi minus ctα le x le xi + ctα

The Courant-Friedrichs-Levy (CFL) condition now states that convergence and thusstability requires that the mathematical domain of dependence is contained in the numericaldomain of dependence

For the above example of the 1D wave equation this implies that the fan of the mathematicaldomain of dependence must be enclosed by the fan of the numerical domain of dependencewhich ndash by comparing the slopes of the bounding lines ndash is equivalent to requiring that

minus∆x

∆tle c le ∆x

∆thArr minus 1 le c∆t

∆xle 1 hArr ∣c∆t

∆x∣ le 1 (46)

This is the CFL condition for the 1D wave equation which is only a necessary conditionof stability In order to determine the sufficient condition(s) of stability we need to discuss themethods described in the following

42 von Neumann Analysis and Phase Error Analysis

A sufficient condition of stability is obtained from so-called von Neumann analysis Sinceit is very closely related to phase error analysis we will discuss these two together Let usagain consider the stencil (41) for the 1D wave equation Losely speaking stability requiresthat small errors in the numerical solution uαi (which always occur due to round-off errors andmachine precision) remain bounded and do not grow over time when the finite-difference schemeis applied time and time again The latter would imply instability and result in exponentialgrowth of numerical noise over time

Let us assume that at any time t there is a small perturbation to the solution written as

uαj = ei(ωtαminuskxj) = ei(ωα∆tminusj∆xk) (47)

which is of harmonic type Note that any general noise function can always be decomposed asa Fourier series so if we can show that the above function does not grow over time for arbitraryω and k then any perturbation of the solution should remain stable Note that we deliberatelydid not include an amplitude since it does not affect the outcome of a linear PDE

Inserting (47) into (41) results in

ei(ω(α+1)∆tminusj∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ω(αminus1)∆tminusj∆xk)

= c2(∆t)2

(∆x)2[ei(ωα∆tminus(j+1)∆xk) minus 2ei(ωα∆tminusj∆xk) + ei(ωα∆tminus(jminus1)∆xk)]

(48)

Dividing by uαj = ei(ωα∆tminusj∆xk) yields

eiω∆t minus 2 + eminusiω∆t = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + eminusi∆xk] (49)

24

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or (dividing by 2 and using Eulerrsquos identity for the cosine)

cos(ω∆t) minus 1 = σ2 [cos(k∆x) minus 1] with σ = c∆t

∆x (410)

To establish a relation between ω and k we need to consider three cases

σ = 1 in this case we obtain cos(ω∆t) = cos(k∆x) or ω∆t = plusmnk∆x

∣σ∣ gt 1 in this case we have cos(ω∆t) = 1+σ2 [cos(k∆x) minus 1] and there are cases of k forwhich the right-hand side becomes lt minus1 meaning that there are solutions ω isin C Hencecertain wave vectors k cause instability in the form of expontential growth of solutions

∣σ∣ lt 1 in this case there are frequencies ω for which no k isin R exists (only solutions k isin C)This implies that waves at those frequencies vanish since they are damped out by thescheme

In summary the scheme is unstable if ∣σ∣ gt 1 or in other words the scheme is conditionallystable and stability requires that

∣σ∣ le 1 hArr ∣c∆t

∆x∣ le 1 hArr minus 1 le c∆t

∆xle 1 (411)

We also conclude that σ = 1 leads to no damping while ∣σ∣ lt 1 leads to numerical damping ofcertain frequencies

Classical von Neumann analysis is not interested in phase delays and therefore uses a slightlymodified approach writing z = eiω∆t so that

uαj = zαeminusikxj with z isin C (412)

This implies that for any grid point xj the solution from one time step to the next relates as

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

=uα+1j

uαj= z (413)

Stability hence requires that ∥z∥ le 1 since otherwise again exponential growth occurs over timeInsertion of (412) into the finite-difference approximated wave equation (41) and dividing byzα yields

z minus 2 + zminus1 = c2(∆t)2

(∆x)2[eminusi∆xk minus 2 + e+i∆xk] = 2σ2 [cos(k∆x) minus 1] (414)

Solving the above for z leads to

z = 1 + σ2 [cos(k∆x) minus 1] plusmn ∣σ∣radic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (415)

Now observe that if ∣σ∣ le 1 then the radicand is always non-positive and soradic

[cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = iradicminus [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) (416)

which leads to

∥z∥2 = (1 + σ2 [cos(k∆x) minus 1])2 minus σ2 [cos(k∆x) minus 1] (2 + σ2 [cos(k∆x) minus 1]) = 1 (417)

Therefore ∣σ∣ le 1 implies a stable scheme Otherwise the scheme is unstable

Finally let us note that the Lax-Richtmyer theorem states that a finite-difference schemeconverges if and only if (1) the scheme is consistent (ie all truncation errors decay as∆x∆trarr 0) and (2) the scheme is stable

25

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 41 Advection equation by an implicit finite-difference scheme

As mentioned in Section 14 the advection equation governing eg fluid transport processesis given by

u(x t) + v ux(x t) = 0 (418)

here written for a 1D scenario for instructive purposes with a constant advection speed v isin RLet us introduce a regular grid in both space and time and introduce the dimensionless speed

c = v ∆t

∆x (419)

Let us discretize the advection equation by a backward-Euler approximation in time and afirst-order central difference approximation in space ie

u(xj tα) =uαj minus uαminus1

j

∆t+O(∆t) ux(xj tα) =

uαj+1 minus uαjminus1

2∆x+O(∆x2) (420)

Insertion into (418) leads to

uαj minus uαminus1j

∆t= minusv

uαj+1 minus uαjminus1

2∆xhArr uαj minus uαminus1

j = minus c2(uαj+1 minus uαjminus1) (421)

Note that this is an implicit stencil since it requires solving a system of equations for theunknown field u at time tα

Let us perform von Neumann stability analysis which starts by assuming an error of the type(note that wersquoll replace the spatial index i by j to not confuse it with i =

radicminus1)

uαj = zαeminusikxj with z isin C (422)

Insertion into uαj minus uαminus1j = minusc (uαj+1 minus uαjminus1) from (421) gives

zαeminusikxj minus zαminus1eminusikxj = minus c2(zαeminusikxj+1 minus zαeminusikxjminus1) (423)

Using that xjplusmn1 = xj plusmn∆x and dividing by zαeminusikxj results in

1 minus 1

z= minus c

2(eminusik∆x minus e+ik∆x) = c

2(eik∆x minus eminusik∆x) = c

22i sin(k∆x) = i c sin(k∆x) (424)

and isolating z isin C gives

1

z= 1 minus i c sin(k∆x) hArr 1

∥z∥2= 1 + c2 sin2(k∆x) (425)

and thus

∥z∥2 = 1

1 + c2 sin2(k∆x)le 1 (426)

We conclude that irrespective of k and ∆x the right-hand side is always less or equal to1 implying that ∥z∥ le 1 so that the scheme is unconditionally stable (not that this isindependent of the sign of v as may be expected) Unconditional stability is generally notobserved in explicit schemes and can be a significant advantage of an implicit scheme (if itapplies not every implicit scheme is unconditionally stable)

mdashmdashmdashmdash

26

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

43 Direct vs Indirect Methods

The above finite-difference schemes are powerful direct numerical techniques but they comewith significant disadvantages Problems associated with direct methods include the following

a regular grid is required (which is fine for many fluid mechanics problems but oftentimesproblematic for complex solid geometries especially when undergoing large deformation)

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 primaryfields and their errors are undefined between grid points) This can be problematic whenseeking approximate solutions that are ldquoglobally optimalrdquo Also the question needs toaddressed how BCsICs are applied in between grid points and how about moving BCsare imposed

stabilityefficiency issues arise due to the above stability restrictions choices of ∆t and∆x are not arbitrary but ndash aside from accuracy concerns ndash the stability of especially ofexplicit finite-difference schemes dictates the maximum step widths to be used (whichmay impose severe computational costs due to small steps sizes)

As an alternative indirect methods do not solve the ODEsPDEs directly but search forldquooptimalrdquo approximations Essentially one reduces the infinite-dimensional problem to a finite-dimensional problem by considering solutions uh(x t) asymp u(x t) that satisfy the BCs and ICsand approximate the exact solution as well as possible Particular questions to be addressedinclude

How do we choose uh(x t) For example are these globally or locally defined functionsWhich choices minimize the error

What does ldquooptimalrdquo mean in this context How do we quantify the error betweenapproximation and exact solution

What types of functions should be used for uh(x t) ndash eg polynomial or Fourier seriespiecewise-polynomial or maybe even piece-constant

We need a few more concepts to address those questions Note that in the following we willformulate most concepts in 1D with analogous generalizations possible for higher dimensionsunless specifically mentioned

27

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

5 Methods of Weighted Residuals

The objective of all weighted residual methods is to find approximate solutions uh(x t) thatminimize the total error (which still needs to be defined) when comparing with the exact solutionu(x t) For simplicity let us drop the time dependence for now and only consider (quasi)staticproblems We will add dynamics later in the course for completeness but it is beneficial to firstdiscuss the instructive static scenario Also let us start with 1D problems seeking uh(x) andlater expand all concepts to higher dimensions as needed

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

uh(x) =n

suma=1

caφa(x) (51)

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-prioriExamples are polynomials ie φa(x) = xa or Fourier series with eg φa(x) = sin(πax)

ca are unknown coefficients to be determined

We have thus reduced the infinite-dimensional problem to a finite-dimensional one (to be solvedfor n coefficients) Note that nrarrinfin yields the exact solution if a proper orthogonal set of basisfunctions is chosen (eg polynomials or Fourier series) while we deliberately choose n≪infin sothat the resulting finite-dimensional problem is computationally tractable

One constraint to be imposed is that the approximate function uh(x) must satisfy all Dirichlet(essential) boundary conditions (otherwise it does not qualify as a solution to the problem)One possible approach is to separate the boundary part from the interior part by defining

uh(x) = upartΩD(x) +

n

suma=1

caφa(x) with φa(x) = 0 on partΩD (52)

and upartΩD(x) satisfying all essential boundary conditions Alternatively one can impose the es-

sential boundary conditions onto the unknown coefficients as a direct constraint to be accountedfor while solving (we will use this latter strategy in most of the below examples)

As explored in Section 14 the general boundary value problem we aim to solve can be writtenin general as

find u(x) st L[u] = s for x isin Ω and Bj[u] = tj for x isin partΩj (j = 1 k) (53)

where L is a linear differential operator and Bj is a linear differential boundary operator Notethat we here account for the fact that we may have k different boundary conditions

We now insert our approximate solution uh(x) into the above set of PDEs knowing that itwill in general not satisfy those governing equations (otherwise we would have found an exactsolution) As a consequence we obtain residuals defined by

rΩ = L[uh] minus s and rpartΩj = Bj[uh] minus tj (54)

Unless we have found the exact solution we will have rΩ ne 0 and rpartΩj ne 0 and we seek coefficients

ca (a = 1 n) such that our approximate solution uh(x) satisfies rΩ asymp 0 and rpartΩj asymp 0 in somesense In order to find the n coefficients we need n equations

28

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

To this end the family of methods of weighted residuals defines n total residuals as

Ri = intΩrΩWidV + ξ2

k

sumj=1int

ΩrpartΩjwidS rArr Ri = 0 for i = 1 n (55)

where Wi and wi (i = 1 n) are weighting functions for the bulk and surface residualsrespectively which define ndash loosely speaking ndash the priority of where the residuals are to beevaluated ξ2 gt 0 is an in principle arbitrary constant introduced for unit compatibility (andwe write ξ2 instead of ξ to make sure the pre-factor in front of the second integral is positiveassuming ξ isin R) Now there are various ways to define the weights (each of different difficultyand accuracy levels) and this leads to the following methods of weighted residuals

51 Collocation Method

A straight-forward approach is to evaluate the residuals only at specific locations which resultsin the so-called collocation method

To this end we define

Wi = δ(x minus xi) for xi isin Ω i = 1 n minus kwi = δ(x minus xi) for xi isin partΩiminus(nminusk) i = n minus k + 1 n

(56)

so that the equations to be solved are

rΩ(xi) = 0 for i = 1 n minus krpartΩiminus(nminusk)(xi) = 0 for i = n minus k + 1 n

(57)W

+x1

+x2

+x3

+x4

+x5

t+

x6

Points xi (i = 1 n) are called collocation points This method is closest to the finite-difference techniques discussed before since it aims to minimize the error only at discretepoints (much like finite differences aimed to solve the PDE exactly only on a discrete grid)For convenience we here chose k collocation points on the k boundaries with natural boundaryconditions (one per boundary) while one could also choose this distribution differently as longas sufficiently many equations are available

52 Subdomain Method

The subdomain method is similar in spirit to the collocationmethod but instead of evaluating the residuals at specific colloca-tion points we subdivide the body and its boundary into subdo-mains and require the total residual to vanish on average over eachof the subdomains Therefore we define

Wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isinDi

0 elsefor i = 1 n minus k (58)

and

t

WD1

D2

D3

wi =⎧⎪⎪⎨⎪⎪⎩

1 if x isin partΩiminus(nminusk)

0 elsefor i = n minus k + 1 n (59)

where Di sub Ω for i = 1 n minus k are (possibly overlapping) domains within the body whilepartΩi sub partΩ are the k boundary domains

29

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the n equations to be solved for the n coefficients ca are

intDirΩ dV = 0 for i = 1 n minus k

intpartΩi

rpartΩi dS = 0 for i = 1 k(510)

Keep in mind that we here aim to solve the PDE and boundary conditions only on averageacross the respective domains

53 Method of Least Squares

The least squares method is most intuitive and seeks to determine the unknown coefficientsby minimizing the bulk and boundary residuals To this end we introduce the total error

E = intΩr2

Ω dV + ξ2k

sumj=1intpartΩj

r2partΩj

dS (511)

and obtain the coefficients as the minimizers thereof ie

c1 cn = arg minE (512)

As before ξ2 gt 0 is an arbitrary (positive) parameter introduced for dimensional consistencyThe associated stationarity conditions become

partE

partca= 0 hArr int

ΩrΩpartrΩ

partcadV + ξ2

k

sumj=1intpartΩj

rpartΩj

partrpartΩj

partcadS = 0 for a = 1 n (513)

from which we realize by comparing to (55) that we have yet another method of weightedresiduals and that we have effectively chosen

Wa =partrΩ

partca and wa =

partrpartΩj

partcaon Neumann boundary partΩj (514)

Recalling our definitions and exploiting the properties of a linear operator we may write

uh(x) =n

suma=1

caφa(x) rArr rΩ = L[uh] minus s =n

suma=1

caL[φa(x)] minus s (515)

and

rpartΩj = Bj[uh] minus tj =

n

suma=1

caBj[φa(x)] minus tj (516)

so that

Wa =partrΩ

partca= L[φa(x)] wa =

partrpartΩj

partca= Bj[φa(x)] on Neumann boundary partΩj (517)

This turns the stationarity conditions (513) for a = 1 n into1

intΩ(n

sumb=1

cbL[φb(x)] minus s)L[φa(x)]dV

+ ξ2k

sumj=1intpartΩj

(n

sumb=1

cbBj[φb(x)] minus tj)Bj[φa(x)]dS = 0

(518)

1Here and everywhere in the following we will switch the summation index when multiplying to sums in orderto avoid duplicated indices and ambiguity eg rΩ

partrΩpartca

= (sumnb=1 c

bL[φb(x)] minus s)L[φa(x)] where summation index

b is used instead of a in parentheses in order to avoid ambiguity when multiplying by L[φa(x)]

30

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

or after some re-arrangement (separating terms depending on cb from those independent of thecoefficients)

n

sumb=1

⎡⎢⎢⎢⎢⎣int

ΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS

⎤⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Kab

cb

= intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBi[φa(x)]dS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFa

for a = 1 n

(519)

This is a linear system of n equations which may be rewritten concisely as

n

sumb=1

Kabcb = F a for a = 1 n or Kc = F (520)

where we grouped all unknown coefficients into the vector

c = (c1 cn)T(521)

Matrix K and vector F are both constant and their components read respectively

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (522)

and

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (523)

We notice that K is by definition symmetric (Kab = Kba) For reasons to be explained laterwe here and in the following use the notation Kab for the matrix component associated withcoefficients a and b (instead of writing Kab) Let us accept this for now ndash we will get back to thisnotation when discussing higher dimensions where each coefficient ca isin Rd has d componentsso we need to find all cai with a = 1 n and i = 1 d and we will need matrices with Kab

ij

54 Higher Dimensions

Any of the above methods can be extended to higher spatial dimensions as needed (after all onlyfew real-world problems can be reduced to one dimension) In higher dimensions we generallyseek a function u(x) ∶ Ωrarr Rd and introduce the approximation

uh(x) = sumaisinT

caφa(x) (524)

where ca isin Rd are the unknown vector coefficients and φa(x) denote the basis functions Forexample we may again use polynomial or Fourier basis functions eg φa(x) = sin(πa sdotx) withappropriate choices of the vector set T Now we need d times n independent equations to solve forall components of the n coefficient vectors ca (d equations per any of the n coefficients) It issimplest to explain these concepts through practical examples which will follow later

31

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 51 Rotating bar with attached point mass

Consider a bar of length L constant Youngrsquos modulus E cross-sectional area A and mass density ρ which is hinged at the originand rotating about this hinge with a constant angular velocity ωIn addition a point mass m is attached at the free end of therotating bar

w

mEAr

L

xu(x)+

Let us first find the exact solution of the 1D displacement field u(x) inside the bar We considera co-rotating frame of reference with coordinate x running along the bar starting at the originLinear momentum balance with the centripetal acceleration a = minusω2x states that

divσ = ρa rArr (Eux)x = minusρω2x rArr uxx = minusρω2

Ex (525)

and the boundary conditions are (the force again coming from the cenitrpetal acceleration)

u(0) = 0 and F (L) = AEux(L) =mω2L (526)

Integration the ODE twice for u(x) and obtaining the two integration constants from the twoboundary conditions yields the exact solution

u(x) = minusρω2

6Ex3 + (mω

2L

EA+ ρω

2L2

2E)x (527)

Next let us find approximate solutions by the various methods of weighted residuals To thisend we first introduce an approximate solution with a polynomial basis φa(x) = xa such that

uh(x) =n

suma=0

caxa (528)

where we chose a polynomial function space of order n which is often abbreviated asuh(x) isin Pn The boundary condition u(0) = 0 requires that c0 = 0 Also for a practical example(which admits simple closed-form solutions) let us pick n = 3 Hence we in fact use

uh(x) =3

suma=1

caxa = c1x + c2x2 + c3x3 (529)

The bulk and surface residuals in this problem are written as respectively

rΩ(x) = Euhxx(x)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraL[uh]

+ ρω2xsup2minuss

for 0 le x le L

rpartΩ(x) = EAuhx(L)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraB[uh]

minusmω2Lacutesup1sup1sup1sup1cedilsup1sup1sup1sup1sup1paraminusF

(530)

Since there is only one Neumann boundary (viz the free end of the bar at x = L there is onlya single boundary residual and k = 1)

Collocation Method In order to use the collocation method we must choose a total of n = 3collocation points to obtain the same number of equations as we have unknown coefficients inthe approximation uh(x) isin P3 Since we have one boundary residual let us choose two pointsalong the bar (eg equally spaced) and one at the end x = L overall leading to

x1 = L3 x2 = 2L3 x3 = L (531)

32

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

With those collocation points the collocation method yields the three residuals that we set tozero

rΩ(x1) = E(2c2 + 2c3L) + ρω2L3 = 0

rΩ(x2) = E(2c2 + 4c3L) + 2ρω2L3 = 0

rpartΩ(x3) = EA(c1 + 2c2L + 3c3L2) minusmω2L = 0

(532)

In matrix form the above becomes the linear system of equations

⎡⎢⎢⎢⎢⎢⎣

0 2E 2EL0 2E 4ELEA 2EAL 3EAL2

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

minusρω2L3minus2ρω2L3mω2L

⎞⎟⎠ (533)

whose solution yields

c1 = mω2L

EA+ ρω

2L2

2E c2 = 0 c3 = minusρω

2

6E (534)

Insertion into (529) shows that

uh(x) = c1x + c2x2 + c3x3 = (mω2L

EA+ ρω

2L2

2E)x minus ρω

2

6Ex3 = u(x) (535)

is in fact the exact solution cf Eq (527) The chosen collocation points were chosen optimally(a different choice of the collocation points could have resulted in a different set of coefficientsand hence in a different solution)

Subdomain Method Let us repeat the above example using the subdomain method Tothis end we define two equally-sized subdomains in the bulk of the bar (simply by dividing thebar into two equal halfs)

D1 = x ∶ 0 le x le L2 D2 = x ∶ L2 le x le L (536)

and we have x = L as our third ldquodomainrdquo to satisfy the Neumann boundary condition Weinvite you to try this case as an exercise at home (you will again obtain the correct solutionuh(x) = u(x))

Least Squares Method Finally let us use the method of least squares for which we hadshown that the problem reduces to solving the linear system (520) with matrix components

Kab = intΩL[φa(x)]L[φb(x)]dV + ξ2

k

sumj=1intpartΩjBj[φa(x)]Bj[φb(x)]dS (537)

and vector components

F a = intΩsL[φa(x)]dV + ξ2

k

sumj=1intpartΩj

tjBj[φa(x)]dS (538)

For this particular problem we have defined L[sdot] and B[sdot] in (530) which results in

Kab = intL

0L[xa]L[xb]Adx + ξ2[B[xa]B[xb]]

x=Lfor a b = 123 (539)

33

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = intL

0(minusρω2x)L[xa]Adx + ξ2mω2LB[xa]x=L (540)

We still need to choose an appropriate scaling parameter ξ such that the above forms make sensewith respect to their dimensions By comparison of the two terms we realize that ξ2 = (LA)minus1

(or any inverse volume in general) is a suitable choice

Carrying out the above integrals with L[sdot] and B[sdot] from (530) yields the linear system

⎡⎢⎢⎢⎢⎢⎣

AE2

L 2AE2 3AE2L2AE2 8AE2L 12AE2L2

3AE2L 12AE2L2 21AE2L3

⎤⎥⎥⎥⎥⎥⎦

⎛⎜⎝

c1

c2

c3

⎞⎟⎠=⎛⎜⎝

Emω2

ELω2(2m minusALρ)EL2ω2(3m minus 2ALρ)

⎞⎟⎠ (541)

whose solution again recovers the exact solution (527) (the individual steps are left out herebut you are invited to solve the problem on your own at home)

mdashmdashmdashmdash

55 Galerkinrsquos Method

As introduced in basic mechanics and continuum mechanics courses (and therefore not discussedhere in detail) the equilibrium conditions of a mechanical boundary value problem can also bestated in terms of the principle of virtual work

intΩσijvij dV = int

ΩρbividV + int

ΩNtividS (542)

for any kinematically admissible virtual displacement field v(x) defined on the body Ω Inother words the virtual work done by the internal stresses equals the virtual work done bythe externally applied body forces and surface tractions Note that admissibility in particularrequires that v = 0 everywhere on partΩD since no virtual displacement can be applied to pointson the surface that are restrained from moving

Applying the divergence theorem to the first term in the principle of virtual work yields

intΩσijvij dV = int

partΩσijnjvidS minus int

ΩσijjvidV (543)

so that rewriting (542) leads to

intΩ(σijj + ρbi)vidV + int

partΩN(ti minus σijnj)vidS = 0 (544)

Since this equation must hold for all admissible virtual displacements v it is concluded that wemust have

σijj + ρbi = 0 in Ω and σijnj = ti on partΩN (545)

These are equivalent to the (static) balance of linear momentum and the associated tractionboundary condition so that (542) ndash when valid for all admissible virtual displacements v ndashindeed holds true and is an alternative expression of the balance of linear momentum and theassociated traction BCs as stated in (545)

Notice that the form of (544) is identical to the total residual (55) in the methods of weightedresiduals with the trial or weighting functions now being v(x) Hence the principle of virtual

34

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

work lends itself for a very natural way to formulate a total weighted residual (without the needto introduce a scaling parameter ξ and without having to pay separate attention to variousboundary terms) Note that v(x) is a continuous function so we here have in principle aninfinite-dimensional problem (and infinitely many admissible weighting functions v) Howeverwe can (and will) turn this problem into a finite-dimensional one by introducing approximateforms for both uh(x) asymp u(x) and vh(x) asymp v(x) which will form the basis of the finite elementformulation later

Example 52 Hanging bar under its own weight revisited

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

Euxx(x) + ρg = 0 with u(0) = 0 and F (L) = EAux(L) = F (546)

With σ = Eε = Eux the principle of virtual work here reads

intL

0σvxAdx = int

L

0ρgvAdx+F v(L) rArr int

L

0EuxvxAdx = int

L

0ρgvAdx+F v(L) (547)

Integration by parts on the first integral yields

[EuxvA]L0 minus intL

0EuxxvAdx = int

L

0ρgvAdx + F v(L) (548)

We exploit that v(0) = 0 (since u(0) = 0 is fixed virtual displacements at x = 0 must vanish)and re-arrange the integrals into

intL

0(Euxx + ρg) vAdx + [F minusEAux(L)] v(L) = 0 (549)

Since we want this equation to hold for any admissible function v(x) we thus conclude that thetwo terms in parentheses and brackets must vanish which in turn confirms that a function u(x)that satisfies (547) for any admissible virtual displacement v(x) is also a solution of (546)

Finally note that (547) can be rewritten as

R = intL

0EuxvxAdx minus int

L

0ρgvAdx minus F v(L) = 0 (550)

which is of the form (55) of the total residual discussed for the methods of weighted residualsand we can as before introduce a finite-dimensional representation for uh(x) asymp u(x) eg inthe form of a polynomial or a Fourier series and solve for the n unknown coefficients ca byintroducing n independent weight functions va(x) Since the residual R in (550) is linear inu(x) we would have to solve a linear system for the coefficients

mdashmdashmdashmdash

At the end of this section let us recap the basic principle of weighted residual methods discussedhere This indirect method set out to not solve the governing PDEs directly but instead tominimize the error made by an approximate solution as follows

(i) we first define an approximate solution space and an approximate solution uh(x) definedup to n unknown coefficients

35

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

(iii) we define a global residual R to be minimized and choose appropriate weighting functionsWi wi such as to produce n equations to be solved for the n unknown coefficients byminimizing the global residuals

(iv) we numerically solve the obtained linear system of equations

Although the methods of weighted residuals are handy simple and can be applied to in principleany physical problem of interest the solution depends significantly on the choice of the weightsand 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 thosechoices

It turns out that for most physical problems including the classical mechanical thermal and alsoelectromagnetic problems there is a more intuitive way to arrive at equations of the type (542)viz by considering the energetic (or so-called variational) basis of the underlying boundary valueproblems In simple terms we know that any physical system aims to minimize its energy ina stable equilibrium We will see that (542) is in fact nothing but the associated stationarityequation of such a minimization problem but to get there we first need to introduce some ofthe fundamentals of variational calculus

36

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

6 Variational Calculus

As a motivational example let us revisit a simple physics problem We knowfrom elementary physics that the energy stored in an elastic spring (stiffnessk) stretched by an amount ∆x is 1

2k(∆x)2 If a spring is hanging from the

ceiling and a weight mg is attached at its free end then the total energy is

I = 1

2kx2 minusmgx (61)

where x denotes the elongation of the spring and the second term enters asthe work done by the external force mg (or alternatively interpreted thepotential energy of the attached mass m)

m

k

x

In order to calculate the stretched equilibrium length of the spring we may minimize the totalenergy leading to

partI

partx= 0 = kx minusmg rArr x = mg

k (62)

Note that the stationarity equation kx =mg is nothing but (static) linear momentum balance(or Newtonrsquos second axiom) Hence we may minimize the total energy I in order to find theequilibrium solution and that solution is ensured to satisfy linear momentum balance

For the general continuum thermo-mechanical problems considered here we would like to havea similar concept at hand to turn equilibrium equations (such as the governing PDEs discussedabove) into energy minimization problems Unfortunately the situation is a bit more complexsince we here no longer seek to find equilibria described by variables (like x above) but by func-tions (such as the displacement field u(x)) We can intuitively imagine extending the conceptndash defining an energy I that depends on u(x) and being minimized by the exact solution How-ever we first need to verify some mathematical preliminaries related to the so-called functionalI and how to minimize a functional with respect to a function (we can no longer take simplederivatives to arrive at the stationarity conditions since we are minimizing not with respect toa set of variables but with respect to a function) The underlying mathematical concepts areknown as variational calculus

61 Functionals

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

I ∶ u isin U rarr I[u] isin R (63)

In simple terms a functional2 I is a ldquofunction of functionsrdquo ie a function whose argumentis another function you hand it a function u(x) and it returns a scalar I isin R (eg the energyassociated with u(x)) Functionals are to be distinguished from functions such as f(x) =x2 with f ∶ R rarr R+

0 Unlike a function which is a mapping from Rd rarr R a functional rsquosdomain is generally a function space U (eg all polynomial functions up to a certain degreen abbreviated as Pn or all continuously differentiable functions or all piecewise polynomialfunctions etc) For more information on vector and function spaces see Appendices A and B

When seeking solutions u(x) we typically seek solutions within a particular function space U For example a functional may impose constraints on the differentiability or integrability of

2To differentiate functionals from functions we will write I[u] with brackets instead of parantheses as in u(x)

37

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

function u(x) As an example consider the functional

I[u] = int1

0u2x(x) dx (64)

which is a functional requiring that u(x) is differentiable (ie possesses a first derivative ux)and that the first derivative squared can be integrated to yield a finite value as a counter-example a piecewise constant function u(x) would not be square-integrable (the first derivativeconsists of delta-functions which if squared yield infinity when integrated) Hence functionalI[u] in (64) restricts the function u(x) to belong to the function space

U = u ∶ (01)rarr R such that int1

0u2x(x) dx ltinfin (65)

In the following it will be important to define such spaces U of admissible functions

For convenience of notation let us introduce the Sobolev space3

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥Hk(Ω) ltinfin (66)

with the Sobolev norm (in 1D)

∥u∥Hk(Ω) =radicint

Ωu(x)2 dx + int

Ω[uprime(x)]2 dx + + int

Ω[u(k)(x)]2

dx (67)

In simple terms (and this is all we will need to remember in the following) Hk(Ω) denotes thespace of all functions whose derivatives up to kth order are square-integrable The aboveexample in (64) eg requires u isin U subH1(01) ie the first derivative of functions u(x) mustbe square-integrable on the interval (01) (Of course in this example u(x) need not be square-integrable itself (the functional only contains ux) yet there is no function u(x) which is notsquare-integrable while its first derivative is square-integrable)

Example 61 Energy of a strained bar

Consider bar of length L and with constant Youngrsquos modulus E and cross-sectional area A andstrain energy density W The total energy I of the bar as a function of the 1D displacementfield u(x) is

I[u] = intL

0W (ε)Adx = int

L

0

E

2[ux(x)]2 Adx (68)

where we used that W = E2 ε

2 and ε = ux Here we generally may want to impose the restrictionu isin H1(0 L) (unless when dealing with discontinuities such as cracks) to ensure that the firstderivative ux is square-integrable To replicate Example 52 of the hanging bar with an appliedend force F we have to append to the above energy by the work done by the external forcethus arriving at the total potential energy functional

I[u] = intL

0

E

2[ux(x)]2 Adx minus F u(L) (69)

Minimizing this functional with respect to the unknown function u(x) is expected to yield thesought solution Unfortunately we still do not know how to minimize a functional with respectto a function which will be discussed next

mdashmdashmdashmdash

3Though not needed for our purposes here more information on Sobolev norms and spaces is available inAppendix D

38

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

62 Variations

Consider a functional I ∶ U rarr R such as the potential energy Analogous to the stationaritycondition of classical optimization problems a necessary condition for an extremum of I is thatthe first variation of I vanishes ie δI[u] = 0 (this is the stationarity condition) Like infunctional analysis we are going to compute the analog of a derivative to identify maxima andminima of the functional To this end we perturb the functional around a point by a smallvariation and verify if the functional increases or decreases Complicating is the fact that aldquopointrdquo is now in fact a function and a perturbation must be a variation of that function Tothis end we define the following

A variation δu(x) is an arbitrary function that represents admissi-ble changes of u(x) If Ω sub Rd is the domain of u isin U with boundarypartΩ and we seek solutions

u isin U = u isinHk(Ω) ∶ u = u on partΩD (610) x

u

0+L

uu+du

+

du

then the variation must satisfy

δu isin U0 = δu isinHk(Ω) ∶ δu = 0 on partΩD (611)

k can be determined from the specific form of I[u] (and δu and u must lie in the same functionspace since we want to be able to compute I[u + δu]) The fact that variations δu must vanishon the Dirichlet boundary partΩD stems from the need for perturbations that allow the perturbedfunction 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 partΩD

With this we define the first variation of I (ie the analog of a first derivative) as

δI[u] = limεrarr0

I[u + ε δu] minus I[u]ε

= d

dεI[u + ε δu]∣

εrarr0

(612)

Analogously higher-order variations are defined recursively via

δkI[u] = δ (δkminus1I) for k ge 2 (613)

Note that a Taylor expansion of a functional I can now be written as

I[u + δu] = I[u] + δI[u] + 1

2δ2I[u] + 1

3δ3I[u] + (614)

The following are helpful relations (which follow directly from the definition of variations) Forany functions u v isin U functionals Ii ∶ U rarr R and constants αi isin R we have the following rules

δ (α1I1 + α2I2) = α1 δI1 + α2 δI2

δ(I1I2) = (δI1)I2 + I1(δI2)

δdu

dx=

d

dxδu (assuming differentiability of u)

δ intΩ u dx = intΩ δu dx (assuming Ω is independent of u)

δI[u v ] =d

dεI[u+ε δu v+ε δv ]εrarr0 (for functionals depending on several functions)

39

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 62 Calculation of variations

Let us consider

I[u] = int1

0u2 dx so that we seek u isin U =H0(01) (615)

The first second and k-th variations respectively follow as

δI = limεrarr0

d

dεint

1

0(u + ε δu)2 dx = lim

εrarr0int

1

02(u + ε δu)δu dx = 2int

1

0uδu dx

δ2I = limεrarr0

δI[u + ε δu] = limεrarr0

d

dεint

1

02(u + ε δu) δu dx = 2int

1

0(δu)2 dx

δkI = 0 for all k gt 2

(616)

Notice that we automatically recover the Taylor series

I[u + δu] = int1

0(u + δu)2 dx = int

1

0u2 dx + int

1

02uδu dx + int

1

0(δu)2 dx

= I[u] + δI[u] + 1

2δ2I[u]

(617)

mdashmdashmdashmdash

The above gives the formal definition of variations which can always be applied to derivevariations of arbitrary order As a practical shortcut note that for a functional

I[u] = intΩf(unablaunabla2u ) dx (618)

we may write

I[u] = d

dεint

Ωf(u + ε δunablau + ε δnablaunabla2u + ε δnabla2u ) dx∣

εrarr0

= intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx

(619)

so that we may use from now on that

δI[u] = intΩ(partfpartuδu + partf

partnablauδnablau + partf

partnabla2uδnabla2u + ) dx (620)

The analogous of course also applies in higher dimensions ndash which will become important inour later boundary value problems For example if we seek a displacement field u(x) ∶ Ωrarr Rdthe functional becomes

I[u] = intΩf(ui uij uijk ) dV (621)

so we can write

I[u] = intΩf(unablau ) dx rArr δI[u] = int

Ω( partfpartui

δui +partf

partuijδuij ) dV (622)

using classical index notation

Now that we have established the basics of variational calculus let us exploit the variationalstructure of our boundary value problems ie their solutions u isin U can be interpreted asextremal points over U of a functional I[u]

40

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 63 Hanging bar under its own weight revisited (again I know)

Once more let us consider a bar of length L (Youngrsquos modulus E cross-sectional area Adensity ρ) that is hanging from the ceiling and deforming under its own weight (gravitationalacceleration g) with a constant force F applied to its free end at x = L u(x) denotes the 1Ddisplacement field where x runs from top to bottom of the bar The total potential energy isthus the total strain energy of the elastic bar minus the work done by the graviational bodyforces and the constant end force

I[u] = intL

0

E

2u2x(x)Adx minus int

L

0ρg u(x)Adx minus F u(L) (623)

and

u(x) isin U = u isinH1(0 L) ∶ u(0) = 0 (624)

The first variation yields

δI[u] = 0 = intL

0Eux(x) δux(x)Adx minus int

L

0ρg δu(x)Adx minus F δu(L)

= minusintL

0[Euxx(x) + ρg] δu(x)Adx +EAux(L) δu(L) minusEAux(0) δu(0) minus F δu(L)

(625)

where we used integration by parts of the first integral to arrive at the final form Noting thatδux(0) = 0 because of essential boundary condition the above reduces to

intL

0[Euxx(x) + ρg] δu(x)Adx minus [F minusEAux(L)] δu(L) = 0 forall δu isin U0 (626)

As we noted above recall that (626) must vanish for all variations δu isin U0 This implies thatwe must in fact have

Euxx(x) + ρg = 0 and EAux(L) = F (627)

These are exactly the governing equation and traction boundary condition that the bar needsto satisfy cf Eq (546) Hence we have shown that rendering (623) stationary with respectto u(x) isin U is equivalent to solving (627) with u(0) = 0 That is we have a strategy to replacethe solution of a differential equation by an optimization problem and we would in both casesobtain the exact or classical solution

To see if the solution is a maximizer or minimizer of I let us compute the second variation

δ2I[u] = intL

0Eδux δuxA dx = int

L

0E(δux)2 dV ge 0 forall δux (628)

Hence δ2I[u] gt 0 in general (unless δu equiv 0) and as in classical functional analysis we concludethat the extremum is a minimizer We thereby tactily assume that E gt 0 E lt 0 would lead tosolutions being unstable energy maxima which implies that E gt 0 is a (necessary and sufficient)stability condition

Finally notice that the first line here is exactly the principle of virtual work discussed beforecf Eq (547) if we replace δu by v Thus our variations here are the same as virtual displace-ments in the principle of virtual work and we obtain the latter automatically from the energyfunctional as the first variation

mdashmdashmdashmdash

41

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us revisit the hanging bar problem once more to observe a particular structure of theproblem that will come handy shortly For the hanging bar (assuming that E = const) noticethat we can rewrite the energy functional for short as

I[u] = 1

2B[uu] minusL[u] (629)

where we introduced a bilinear form B and a linear form L defined as

B[a b] = intΩE(grada)(grad b) dV and L[a] = int

Ωρga dV minus int

partΩD

ta dS (630)

where we included tractions t applied to the surface ΩD

The above is in fact a recipe for a more general class of variational problems (the same structureapplies to heat conduction electrostatics or mechanical equilibrium as discussed later) Let usconsider an energy functional of the general form (629) Taking variations shows that

I[u] = 1

2B[uu] minusL[u] rArr δI[u] = B[u δu] minusL[δu] (631)

For example in the hanging bar problem compare the energy functional (623) and the firstvariation (625) to confirm the above relation

For convenience let us adopt the following notation found in various textbooks on finite ele-ments the first variation is usually abbreviated as an operator acting on both the unknownfield u and its variation δu ie we write G ∶ U times U0 rarr V sub R with

G[u δu] = limεrarr0

d

dεI[u + δu] (632)

Without proof we just note that one of the beauties of the above variational problem (631)(based on a bilinear and a linear form) is that a unique minimizer exists by the Lax-Milgramtheorem (for more information see Appendix F) Recall that for the linear heat problem abovewe already showed that the solution is a unique (global) minimizer if E gt 0

63 Rayleigh-Ritz Method

One way to exploit the above variational structure right away is the so-called Rayleigh-Ritzapproach which introduces an approximation uh(x) asymp u(x) eg a polynomial series

uh(x) =n

suma=0

caxa (633)

with unknown coefficients ca isin R Any choice of (linearly independent) ansatz functions ispermissible including eg Fourier series of cosine or sine terms as long as they satisfy anyexisting essential boundary conditions and the differentiabilityintegrability requirements ofthe problem (eg a piecewise linear guess for uh(x) would not be permissible if its derivativesmust be square-integrable etc) For example for the hanging bar problem we need to enforcec0 = 0 because of the boundary condition u(0) = 0

Next we insert uh(x) into the total energy functional I which then depends only on the coef-ficients ca as the only unknowns We know that the exact equilibrium solution u(x) minimzies

42

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

the total potential energy I[u] Therefore we conclude that we may want to minmize I[uh]with respect to ca giving a system of equations

0 = partI[uh]

partcaforall a = 0 n (634)

Recall that we had expressed the energy functional in operator form so that

I[uh] = 1

2B[uh uh] minusL[uh] = 1

2B[

n

suma=0

caxan

sumb=0

cbxb] minusL[n

suma=0

caxa]

= 1

2

n

suma=0

n

sumb=0

cacbB[xa xb] minusn

suma=0

caL[xa](635)

where we exploited the (bi)linear nature of the two forms B[sdot sdot] and L[sdot] This leads to

partI[uh]partca

=n

sumb=0

cbB[xa xb] minusL[xa] = 0 forall a = 0 n (636)

This is a linear system of equations to be solved for the unknown coefficients cb (with b = 0 n)which we abbreviate as

n

sumb=0

Kabcb = F a for a = 1 n or Kc = F (637)

with K isin Rntimesn and F c isin Rn having components

Kab = B[xa xb] F a = L[xa] and c = (c0 cn)T (638)

Notice that this is fully analogous to (520) 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 problemwhich is more physical)

Example 64 Hanging bar by Rayleigh-Ritz

For the problem of the freely hanging bar (no end force applied here for brevity) the totalenergy potential with the approximate solution uh(x) from (633) becomes

I[uh] = intL

0

E

2(uhx)2(x)Adx minus int

L

0ρg uh(x)Adx with uh(x) =

n

suma=1

caxa (639)

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

partI[uh]partca

= 0 for a = 1 n (640)

As we know from (636) the resulting system of stationarity equations is Kc = F with

Kab = B[xa xb] = intL

0E(xa)x(xb)xAdx

= intL

0Eaxaminus1bxbminus1Adx = abEAint

L

0xa+bminus2 dx = abEA La+bminus1

a + b minus 1

(641)

43

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and

F a = L[xa] = intL

0ρg xaAdx = ρgAint

L

0xadx = ρgAL

a+1

a + 1 (642)

Solving the linear system Kc = F for any n ge 2 (feel free to try this as an exercise at home)yields

c1 = ρgEL c2 = minus ρg

2E and ca = 0 for all a gt 2 (643)

which is in fact the exact solution see Eq (317)

u(x) = ρg

2E(2L minus x)x (644)

This could have been expected since we chose polynomial ansatz functions in (633) takinguh(x) isin Pn The exact solution is a polynomial of order 2 If we choose uh(x) isin Pn withn ge 2 the exact solution is contained in the solution space within which we are looking for theoptimal solution As a consequence the Rayleigh-Ritz approach recovers the exact solution asthe energy minimizer Choosing any Pn with n gt 2 does not affect the solution since P2 sub Pnfor n gt 2 so the solution is still contained in the solution space and therefore found

mdashmdashmdashmdash

44

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

7 The weak form

In the previous sections we have seen how indirect methods aim to find approximate solutionsto boundary value problems by introducing an approximate (finite-dimensional) solution spaceand solving for the unknowns describing the sought approximate solution by enforcing thestrong form in some average sense (rather than at every grid point as in finite differences)We have also seen how this ldquoaverage senserdquo can be defined in various ways eg by enforcingthe governing PDE only at collocation points on average over subdomains or by minimizingthe total error made across the entire body Finally we have seen how most boundary valueproblems can be linked to a variational structure implying that the strong form is in fact thestationarity condition of an energy minimization problem This in turn allowed us to replacethe strong form by an optimization problem which was exploited eg by the Rayleigh-Ritzapproach It is important to keep in mind that the variational approach gave us something evenmore powerful it gave us the stationarity conditions of the minimization problem which wewill call the weak form Those stationarity conditions combined with an approximate functionspace where shown to guide us to a linear system of equations to be solved for the unknowncoefficients of the approximate solution Here we would like to explore the underlying structurefurther and finally come to the general mechanical boundary value problem to be solved bymethods such as the finite element technique

71 Classical and weak solutions

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

(E ux)x + s = 0 in Ω

u = u on partΩD

Eux = t on partΩN

(71)

This general strong form applies to the mechanical problem (where u is the displacement field EYoungrsquos modulus s = ρb body forces u is a prescribed displacement and t a prescribed surfacetraction) as well as to electrical problems (where u denotes the electric voltage potential E isthe 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 andt 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 tothe above problem let us define that a function u is of class Ck(Ω) (or in the function spaceCk(Ω)) with an integer k ge 0 if it is k times continuously differentiable over Ω (ie u possessesderivatives up to the kth order and these derivatives are continuous functions) Hence thestrong form (71) imposes the requirement

u isin C2(Ω) (72)

That is we require the function to be twice continuously differentiable in order for the strongform to make sense4

4To be exact the strong form in fact requires that u isin C2(Ω) cap C0

(Ω) ie functions u must be twicecontinuously differentiable within Ω and at least continuous up to the boundary partΩ But this detail is of minorimportance here and in the following

45

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 71 Ck-continuity

Any kth-order polynomial u(x) with k ge 0 is generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks or shocks (or discontinuities in the BCsICs)we usually assume that the classical solution fields are Cinfin(Ω) so we may take derivativesotherwise derivatives exist almost everywhere (ae)

mdashmdashmdashmdash

As we showed previously the solution u can alternatively be found by using a variationalapproach viz as the minimizer of I[u] within a function space U which we write as

u = arg minI[u] ∶ u isin U with I[u] = 1

2B[uu] minusL[u] (73)

whose stationarity condition is

δI[u] = G[u δu] = B[u δu] minusL[δu] = 0 for all δu isin U0(Ω) (74)

Therefore we can reformulate the problem (71) (without in principle knowing anything aboutvariational calculus) as

find u isin U st G[u v] = B[u v] minusL[v] = 0 for all v isin U0(Ω) (75)

This is called Galerkinrsquos weak form and the resulting solution u is called weak solutionThis terminology has the following origin Notice that we no longer seek solutions u isin C2(Ω)but instead we seek solutions u within

U = u isinH1(Ω) ∶ u = u on partΩD (76)

which satisfy (75) for all v isin U0(Ω) There is one essential difference between the weak andstrong form solutions u of the weak form are required to be u isin H1(Ω) whereas the strongform required solutions u to be u isin C2(Ω) The latter is a considerably stronger constraintThus we have weakenedrelaxed the conditions on the family of solutions which is why theabove is called the weak form

To see this take eg functions u that are piecewise-linear (like a zig-zag curve) The firstderivative is piecewise-constant and is therefore square-integrable (we can easily integrate apiecewise-constant function) hence u satisfies u isin H1(Ω) By contrast if you take a secondderivative differentiating the piecewise-constant first derivative leads to a sum of delta functions(which are certainly not continuous functions) so u notin C2(Ω) Such a function does not qualifyas a solution to the strong form as the governing PDE makes little sense with sums of deltafunctions Hence piecewise-linear functions qualify as approximate solutions of the weak formbut not necessarily of the strong form Thus we have relaxed the requirements on our function

Recall that if v is interpreted as a virtual displacement field then (75) is equivalent to theprinciple of virtual work and the form agrees with (542) (or (547) for the 1D bar problem)This is important because even if no variational basis exists we could still formulate the weakform by starting from the principle of virtual work Whether or not a variational structure

46

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

exists for a given strong form can be verified by the use of Vainbergrsquos theorem summarizedin Appendix G

Computationally solving the weak form is usually preferable over the strong form for (at least)two reasons First u isin H1(Ω) is simpler to satisfy than u isin C2(Ω) (eg piecewise linearinterpolation is sufficient in the weak form but not in the strong form) Second as we showedalready for the Rayleigh-Ritz approach the weak form boils down to solving a system of algebraicequations (rather than solving PDEs)

72 Equivalence of strong and weak forms

We now have two equivalent principles for finding the solution of the BVP described by (71)

Given a function space

U = u isinHk(Ω) ∶ u = u on partΩD (77)

a functional I ∶ U rarr R and the associated bilinear form B(sdot sdot) and linear form L(sdot) both definedon functions u isin U we seek to

(A) find u isin U st u = arg min I[u] (78)

(B) find u isin U st B[u v] = L[v] for all v isin U0 (79)

We know that the two have a unique connection since δI = B[u δu]minusL[δu] Thus we also knowthat

(A)hArr (B) (710)

with a unique solution for this particular type of problem (if it is stable ie if E gt 0)

73 Approximate solutions

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

Uh sub U (711)

in which we seek a solution uh where h stands for the discretization size

An n-dimensional space Uh is defined by a set of n basis or shape functions N1 Nnalong with the approximate functions

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (712)

When we use the same approximation space for uh and vh we make the so-called the Bubnov-Galerkin approximation Alternatively one can choose different function spaces for theapproximations uh and vh which leads to the so-called Petrov-Galerkin method The lattergains importance when solving overunderconstrained problems since it allows us to control thenumber of equations by the choice of the dimension of the space of vh

47

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Assume that the approximation space is chosen wisely so the the exact solution can be attainedwith infinite refinement ie we assume that

for all u isin U there exists uh(v) isin Uh such that limhrarr0

∥uh(v) minus u∥ = 0 (713)

Then we can formulate the discrete problem

(C) find uh isin Uh st B[uh vh] = L[vh] for all vh isin Uh0 (714)

It is a relatively simple exercise to verify that the above form reduces again to a linear systemof equations to be solved To this end insert the approximations (712) into (714) to obtain

B [n

suma=1

uaNan

sumb=1

vbN b] = L [n

sumb=1

vbN b] for all vb (715)

Exploiting that B is bilinear and L is linear lets us transform the above into

n

sumb=1

vb (n

suma=1

uaB [NaN b] minusL [N b]) = 0 for all vb (716)

Since this must hold for all (admissible) vb we conclude that

n

suma=1

uaB [NaN b] = L [N b] for b = 1 n (717)

This is a linear system to be solved for ua (a = 1 n) Comparison to Eq (636) shows thatthe linear equations are identical to those derived for the Rayleigh-Ritz method This is in factnot surprising for the Rayleigh-Ritz method we inserted the approximate solution uh directlyinto I and minimized I[uh] with respect to the unknown coefficients ca Here we first obtainedthe stationarity equation G[u v] = 0 from I[u] exactly and then inserted uh and vh Yet if wechoose the very same function space for uh and vh then both methods lead to the very samesystem of equations Thus we may also re-interpret the Bubnov-Galerkin scheme as computingthe coefficients ua as the minimizers of I[uh]

As before let us define a vector of all unknown coefficients

Uh = u1 unT (718)

Further we define a (symmetric) matrix K isin Rntimesn and vector F isin Rn with components

Kab = B [NaN b] F b = L [N b] (719)

Then the linear system reads

KUh = F hArr Kabub = F a (720)

Note that this system of equations is identical to (638) which was derived by the Rayleigh-Ritzmethod

48

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

8 The mechanical variational problem at small strains

81 General case

After all those precursors let us analyze the mechanical variational problem and start with thesimplest problem quasistatics in linearized kinematics Here the strong form is

σijj + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(81)

and in the special case of linear elasticity (using σij = Cijklεkl = Cijklukl) the above strongform reduces to

(Cijklukl)j + ρ bi = 0 in Ω

ui = ui on partΩD

σijnj = t on partΩN

(82)

From this we see that classical solutions must satisfy u isin C2(Ω)

In the following let us first treat the general case ndash based on (81) ndash and then study linearelasticity ndash given by (82) ndash as a special case The total potential energy functional associatedwith (81) is

I[u] = intΩW (ε) dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parainternal stored energy

minus [intΩρb sdotu dV + int

partΩNt sdotu dS]

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1parawork by external forces

(83)

and we seek displacement field solutions

u = arg minI[u] ∶ u = u on partΩD (84)

For the special case of linear elasticity we know that the strain energy density takes the form

W (ε) = 1

2εijCijklεkl =

1

2uijCijklukl (85)

from which we may conclude that the variational problem seeks solutions u isin U subH1(Ω)

We compute the first variation defining sym(sdot) = 12(sdot + sdot

T)

δI[u] = intΩ

partW

partεijsym(δuij) dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS

= intΩσijδuij dV minus int

ΩρbiδuidV minus int

partΩNtiδuidS = 0 forall δu isin U0

(86)

where we used σij = partW partεij and σij = σji (by angular momentum balance) This form isindeed equivalent to the principle of virtual work if we replace δui by vi see Eq (542)

Application of the divergence theorem to the first term above proves the equivalence of the twoforms since

δI[u] = 0 = intpartΩN

(σijnj minus ti)δuidS minus intΩ(σijj + ρbi)δuidV forall δu isin U0 (87)

49

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since this must hold for all arbitrary variations δu isin U0 the two terms in brackets must vanishwhich yields indeed the strong form (81)

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

G(uv) = A(uv) minusL(v) = 0 forall v isin U0 (88)

with

A[uv] = intΩσijvij dV and L[v] = int

ΩρbividV + int

partΩNtividS (89)

Note that the dependence of A on u is not directly obvious but the stresses depend throughthe strains on the displacement field ie σij = σij(ε) and εij = ( sym(uij)) A(sdot sdot) is thereforein general not a bilinear operator while L(sdot) is a linear operator

In the special case of linear elasticity

σij = Cijklεkl = Cijklukl rArr σijvij = Cijkluklvij = Cijkluijvkl (810)

exploiting the symmetries Cijkl = Cijlk = Cklij This leads to

A[uv] = intΩσijvij dV = int

ΩCijkluijvkl = B[uv] (811)

Thus we see that for linear elasticity A is indeed a bilinear operator

Next we introduce the discrete weak form A(uhvh) minus L(vh) = 0 with the Bubnov-Galerkinapproximation

uh(x) =n

suma=1

uaNa(x) and vh(x) =n

suma=1

vaNa(x) (812)

so that we arrive at (in component form)

n

suma=1

vai [intΩσij(nablauh)Na

j dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para[F int]

ai

minusintΩρbiN

adV minus intpartΩN

tiNadS

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraminus[F ext]

ai

] = 0 for all adm va (813)

which is equivalent to

Fint(Uh) minusFext = 0 with Uh = u1 unT (814)

where we introduced FintFext isin Rdsdotn with components

F ainti = intΩσij(nablauh)Na

j dV and F aexti = intΩρbiN

adV + intpartΩN

tiNadS (815)

As mentioned above for the special case of linear elasticity we have a bilinear form describingthe weak form Inserting the approximate fields (815) then becomes

F ainti = intΩCijkluhklN

aj dV =

n

sumb=1int

ΩCijklubkN

blN

aj dV =

n

sumb=1

ubk intΩCijklNa

jNbl dV

=n

sumb=1

Kabik u

bk with Kab

ik = intΩCijklNa

jNbl dV

(816)

50

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so we arrive at a linear problem to be solved for the unknown coefficients Uh = u1 un

Fint =KUh rArr KUh minusFext = 0 rArr Uh =Kminus1Fext if detK ne 0 (817)

As before matrix K isin Rdsdotntimesdsdotn is by definition symmetric and positive definite as long as theelastic modulus tensor C is strongly elliptic (ie for stable elastic moduli)

For computational purposes notice that vectors Uh isin Rdsdotn and FintFext isin Rdsdotn eg in 3D arerespectively (dropping the superscripts on F for universality)

[Uh] =⎛⎜⎝

u1

un

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

u11

u12

u13

un1un2un3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

[F ] =⎛⎜⎝

F 1

F n

⎞⎟⎠=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

F 11

F 12

F 13

Fn1Fn2Fn3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(818)

Here we used 1-index notation like in Matlab (ie we sum over a = 1 n and not a =0 n minus 1 as eg in CC++) so that

uai is the (d sdot (a minus 1) + i)th component of vector Uh in d dimensions (819)

Similarly we apply the same rule to the rows and columns of matrix K so that

Kabik is the component at (d sdot (aminus 1)+ i d sdot (bminus 1)+ k) of matrix K in d dimensions (820)

Note that we now use super- and subscripts on K and F since our unknown coefficients arevector-valued here Any superscript a refers to the a-th coefficient while a subscript i refers tothe i-th component of the coefficient

82 Linear elasticity

In the simplified framework of linear elasticity (already introduced above) the governing equa-tions are oftentimes written in a more condensed version that allows for a simple extraction ofmatrix K We here start with

uh(x) =n

suma=1

uaNa(x) rArr εhij =1

2(uhij + uhji) =

1

2

n

suma=1

[uaiNaj(x) + uajNa

i(x)] (821)

which allows us to write (eg in 3D)

[ε] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

ε11

ε22

ε33

2ε23

2ε13

2ε12

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

N11 0 0 N2

1 0 0 Nn1 0 0

0 N12 0 0 N2

2 0 0 Nn2 0

0 0 N13 0 0 N2

3 0 0 Nn3

0 N13 N1

2 0 N23 N2

2 0 Nn3 Nn

2

N13 0 N1

1 N23 0 N2

1 Nn3 0 Nn

1

N12 N1

1 0 N22 N2

1 0 Nn2 Nn

1 0

⎤⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎦acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

B

Uh (822)

where we introduced the matrix B isin R3ntimes6 in 3D (and analogously B isin R2nsdot3 in 2D) in order towrite for short

ε(x) =B(x)Uh (823)

51

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We here use Voigt notation to condense the strain tensor into a strain vector with only uniquecomponents Since ε is symmetric one usually stores only the six independent components ina vector which leads to the above Voigt notation The factor 2 in the shear strain componentsin Voigt notation (which is not found in the stresses) is required so the energy density isconveniently given by W = 1

2σijεij =12 ε sdot σ

Hence we may define the stress vector σ in Voigt notation and the associated linear elasticconstitutive law as (again in in 3D)

σ = (σ11 σ22 σ33 σ23 σ13 σ12)T rArr σ = E ε rArr σ = EBUh (824)

where E denotes an elastic stiffness matrix whose components are deduced from C and followfrom the definitions of stresses and strains For example for an isotropic linear elastic materialcharacterized by Youngrsquos modulus E and Poissonrsquos ratio ν the E-matrix in 3D reads

[E3D] = E

(1 + ν)(1 minus 2ν)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 minus ν ν ν 0 0 0ν 1 minus ν ν 0 0 0ν ν 1 minus ν 0 0 0

0 0 0 1minus2ν2 0 0

0 0 0 0 1minus2ν2 0

0 0 0 0 0 1minus2ν2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(825)

while the 2D version depends on the plane stress vs plane strain scenario

[Eplane stress] =E

1 minus ν2

⎛⎜⎝

1 ν 0ν 1 0

0 0 1minusν2

⎞⎟⎠ [Eplane strain] =

E

(1 + ν)(1 minus 2ν)

⎛⎜⎝

1 minus ν ν 0ν 1 minus ν 0

0 0 1minus2ν2

⎞⎟⎠

(826)

Analogous matrices can be derived for other elasticities eg for general linear elastic anisotropicmedia

Altogether we thus arrive at the stored internal energy

I int = intΩW dV = int

Ω

1

2σ sdot ε dV = int

Ω

1

2ε sdotE ε dV = 1

2Uh sdot int

ΩBTEB dV

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraK

Uh (827)

so that we observe that

I int = 1

2Uh sdotKUh rArr F int = partI

int

partUh=KUh (828)

and the matrix K can be computed quickly as

K = intΩBTEB dV (829)

with B from (822) and E depending on the material model (note that B contains only ba-sistrial function derivatives so that ndash once a basis Na for a = 1 n has been chosen ndash B isknown and can be compted)

52

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

9 Interpolation spaces

So far we have assumed that the approximate solution uh (or uh in higher dimensions) is basedon a choice of basisshape functions Na(x) with a = 1 n Before discussing particular suchbasis functions it is important to consider what conditions those shape functions Na(x) mustsatisfy We have seen already that polynomial or Fourier series may lead to simpler integralswhen computing matrixK and right-hand-side vector F Yet this is only an observation and norigorous constraint on the basis functions Let us here discuss the requirements of appropriateinterpolation spaces

91 Shape functions

We consider approximations uh isin Uh of the type

uh(x) =n

suma=1

uaNa(x) (91)

which are defined through the shape functions Na(x)

In general there are two possible choices for the nature of Na(x)

global shape functions are defined everywhere in Ω ie ∣suppNa∣ sim ∣Ω∣eg polynomials Na(x) = xa or trigonometric polynomials Na(x) = cos (π(a minus 1)x)

local shape functions are defined only locally ∣suppNa∣ ≪ ∣Ω∣eg picewise linear shape functions

Here we introduced the support of a continuous function f ∶ Ω rarr R as the set of all points5

where f(x) ne 0 ie

supp f = x isin Ω ∶ f(x) ne 0 (92)

This means that f(x) = 0 for all points outside the support ie for x isin Ω supp f

x

x

Na Na

suppNa suppNa

local shape functions global shape functions

Irrespective of global or local shape function choices for any set of shape functions the followingshape function properties must be satisfied

(I) For any x isin Ω there must be at least one a with 1 le a le n such that Na(x) ne 0 (iethe whole domain must be covered) Otherwise no approximation would exist in certainregions or at certain points in the body

5To be more specific the support is the closure in Ω of the set of all points with non-zero f(x) Yet this isof minor importance here so we will not make that differentiation

53

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(II) The chosen shape functions Na should allow us in some ldquosimplerdquo manner to satisfy anyDirichlet boundary conditions where required (recall that uh should satisfy the essentialBCs)

(III) All shape functions must be linearly independent ie

n

suma=1

uaNa = 0 hArr ua = 0 for all a = 1 n (93)

In other words given any function uh isin Uh there exists a unique set of parametersu1 un such that

uh =n

suma=1

uaNa (94)

Linear independence is important since it avoids ill-posed problems For example takeUh = P2 and N1N2N3 = 1 x x2 so that uh = u1N1 + u2N2 + u3N3 Hence if eguh = a+bx then we immediately conclude that u1 = a u2 = b u3 = 0 uniquely By contrastif we chose the not linearly independent functions N1N2N3 = 1 x1+x there wouldbe no unique choice of the coefficients since uh = a + bx in this case would have solutionsu1 = a minus s u2 = b minus s u3 = s for arbitrary s isin R

More generally if there existed a set α1 αn ne 0 such that sumna=1 αaNa = 0 then this

set of parameters could be added on top of any solution u1 un such that

uh =n

suma=1

uaNa =n

suma=1

(ua + αa)Na = uhα (95)

which means both uh and uhα are solutions (hence the problem is not well-posed)

For these reasons we must define shape functions that are linearly independent If func-tions N1 Nn are indeed linearly independent then we call them a basis of Uh

(IV) The shape functions Na must satisfy the differentiabilityintegrability requirements of theweak form (this depends on the problem to be solved as discussed before in the contextof the weak form in Section 7)

(V) The shape functions must possess ldquosufficient approximation powerrdquo In other wordsconsider uh isin Uh sub U we should ensure that uh = sumna=1 u

aNa rarr u as n rarr infin Thisrequirement is important and will be discussed below in Section 93

92 Approximation power and completeness

Condition (V) above tells us that for an approximation uh to converge to u we must pick anapproximate function space Uh which gives the solution uh ldquoa chance to convergerdquo to u Forexample assume you aim to approximate a high-order polynomial u isin Pn (with n ≫ 1) by anapproximation uh using shape functions 1 x x2 x3 xn This is expected to converge asnrarrinfin because the coefficients of u will approach the coefficients of uh However choosing thebasis functions poorly as 1 x x3 xn (notice the x2-term is omitted) will never converge asnrarrinfin If all terms are present and none is omitted then polynomials are expected to convergeby the following theorem

Weierstrass approximation theorem Given a continuous function f ∶ [a b] sub R rarr R andany scalar ε gt 0 then there exists a polynomial

pn(x) isin Pinfin such that ∣f(x) minus pn(x)∣ lt ε for all x isin [a b] (96)

54

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This means every continuous function u can be approximated by a polynomial approximiationuh isin Pn to within any level of accuracy Therefore N i = 1 x x2 x3 ie the polynomialsin R is a suitable choice for the shape functions that satisfy the so-called completenessproperty (and we have shown their linear independence)

Note that as discussed above one cannot omit any intermediate-order terms from the set

1 x x2 x3 (97)

As an extension the Weierstrass approximation theorem also applies to trigonometric poly-nomials (cf Fourier series)

93 Completeness in higher dimensions

When going to higher dimensions we need to specify what complete polynomials are A poly-nomial approximation in Rd is complete up to order q if it contains independently allmonomials xα with ∣α∣ = α1 + + αd le q ie using multi-indices we write

uh =q

sumβ=0

sum∣α∣=β

cαxα (98)

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

1D For d = 1 the above reduces to

uh =q

sumβ=0

sumα=β

cαxα =

q

sumβ=0

cβxβ (99)

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 93

2D for d = 2 with coordinates x1 and x2 we use the above definition of complete polynomialsFrom the above definition we conclude

uh =q

sumβ=0

sumα1+α2=β

c(α1α2)xα11 xα2

2 (910)

This results in the following bases for increasing q-values

q = 0 ∶ 1q = 1 ∶ 1 x1 x2q = 2 ∶ 1 x1 x2 x

21 x1x2 x

22

q = 3 ∶ 1 x1 x2 x21 x1x2 x

22 x

31 x

21x2 x1x

22 x

32

(911)

The number of independent monomials in 2D is (q + 1)(q + 2)2

The same definition can be extended to higher dimensions

55

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

10 The Finite Element Method

All of the shape functions discussed in previous sections were global ie they were defined overthe entire body Ω This is quite disadvantageous for (at least) two reasons First using globalshape functions such as polynomials xa (for a = 0 n) results in a dense matrix K whenforming the linear system to be solved for the unknown coefficients by the various methodsintroduced before That is because integrals of the type B[NaN b] ne 0 in general The denseK-matrix creates high computational costs (by contrast a sparse matrix admits more efficientsolving of the system of equations) Second global shape functions are problematic when itcomes to Dirichlet BCs imagine eg prescribing the displacements at both ends of a 1D barEnforcing uh(0) = 0 is simple whereas setting uh(0) = 0 and uh(L) = ∆u is more involved asthe latter leads to a condition involving all unknown coefficients

uh(x) =n

suma=0

uaNa(x) rArr uh(0) = u0 = 0 uh(L) =n

suma=1

uaNa(L) = ∆u (101)

Such global coefficient constraints as given by the latter form are especially cumbersome whendealing with multiple essential BCs in higher dimensions The motivation for the finite elementmethod was hence to construct local shape functions that admit the relatively easy implemen-tation of essential BCs (while also resulting in sparse matrices)

The main idea is to introduce a discretization Th which splits Ωinto a finite number of subdomains Ωe the so-called elementssuch that

Ωe sube Ω Ω =⋃e

Ωe partΩ sube⋃epartΩe (102)

The discretization Th is defined by the collection of nodes andelements it is called a mesh

nodeelement

mesh

Mathematically (and computationally) a finite element (FE) is an object that has

(i) a (sub)domain Ωe sube Ω

(ii) a space of shape functions Nae (defined within Ωe and suppNa

e = Ωe)

(iii) a set of degrees of freedom (dofs) viz the uae-coefficients associated with those Nae

The Finite Element Method (FEM) defines continuous piecewise-polynomial shape func-tions such that

Na(xb) = δab for all a b isin 1 n (103)

In other words each shape function Na is 1 when evaluated at exactly one node a and itvanishes at all other nodes This is the defining relation that determines the shape functionsNotice that if we evaluate the approximation uh(x) at one of the nodes xb then

uh(xb) =n

suma=1

uaNa(xb) =n

suma=1

uaδab = ub (104)

That is the coefficient ub can now be identified as the value of approximate function uh atnode b This makes for a very beneficial interpretation of the (yet to be determined) shapefunction coefficients

56

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us check if FE shape functions satisfying (103) also satisfy the requirements for shapefunctions discussed in Section 91

(I) is automatically satisfied if x isin Ω then we must have x isin Ωe for some element e Conse-quently there must be element shape functions Na(x) ne 0

(II) can be satisfied (approximately) by fixing those degrees of freedom associated with theboundary nodes (while leaving the entire nodes unaffected and vice-versa) For example ifour 1D bar is discretized into n nodes and nminus1 elements such that uh(x) = sumna=1 u

aNa(x)then imposing uh(0) = 0 and uh(L) = ∆u is simply enforced by fixing the coefficientsu1 = 0 and un = ∆u

(III) Linear independence can be shown by contradiction assume that uh(x) = 0 for all x isin Ωwhile there is indeed some ua ne 0 for 1 le a le n Now evaluate uh at any node b

0 = uh(xb) =n

suma=1

uaNa(xb) = ub rArr ub = 0 forall b = 1 n (105)

which contradicts the assumption that some ua ne 0 Thus (103) ensures that we havelinearly independent shape functions

(IV) Integrabilitydifferentiability requirements depend on the variational problem to be solvedand must be ensured For example for the mechanical BVP we have seen that Uh sub H1ie 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 onthe type of piecewise-polynomial interpolation functions to be used

(V) Completeness requires uh rarr u (and thus Uh rarr U) to within desirable accuracy In the FEmethod one commonly enriches Uh by one of the following methods (shown below)

h-refinement refining the discretization Th while keeping the polynomial interpo-lation order within elements fixed (ie decreasing the element size while using thesame type of shape functions)

p-refinement increasing the polynomial interpolation order within a fixed dis-cretization Th (ie keeping the elements but using higher-order polynomial shapefunctions)

hp-refinement a combination of the two above (ie increasing the number ofelements while also increasing the polynomial order of shape functions)

r-refinement repositioning of nodes while keeping the discretization and interpo-lation order fixed (eg moving nodes into regions requiring higher accuracy)

element element element

element

original mesh h-refinement p-refinement r-refinement

linear interpol

linear interpol

quadratic interpolation

linear interpol

When using either of these refinement techniques appropriately within the FE context wemay expect that Uh rarr U and hence that the approximate solution uh converges to the exactsolution u

57

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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 isin Ω so that within a small h-neighborhood of x(and h being interpretable as the element size) we may expand

u(x + h) = u(x) + huprime(x) + 1

2h2uprimeprime(x) + + 1

qhqu(q)(x) +O(hq+1) (106)

Assume that Uh contains all polynomials complete up to degree q (ie Uh = Pq) then thereexists

uh isin Uh such that u(x) = uh(x) +O(hq+1) (107)

Let p denote the highest derivative in the weak form then

dpu

dxp= dpuh

dxp+O(hq+1minusp) (108)

For the solution to converge as h rarr 0 we need the errors to be at least of order O(h) whichimplies that we must have q + 1 minus p ge 1 Thus we must ensure that

q ge p (109)

For example for the mechanicalthermalelectromagnetic variational problem discussed previ-ously we had the requirement uuh isinH1(Ω) since the energy and resulting weak form containedfirst derivatives of u only Hence we have p = 1 and interpolations must satisfy q ge p = 1 There-fore shape functions to be used for solving mechanical BVPs require at least piecewise-linearshape functions

58

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

11 Finite element spaces polynomial shape functions in 1D

Let us start with the simplest of all choices continuous piecewise-polynomial interpolation func-tions As explained above we need q ge 1 since p = 1 for the mechanicalthermalelectromagneticvariational problem ie we need at least linear interpolation within elements

111 2-node bar element

The simplest example for our discussion of shape functions is the2-node bar element in 1D Since the element has only two nodes(which we call nodes 1 and 2) we employ shape functions for theinterpolation of the element dofs Ue = u1

e u2e so that

uhe(x) = N1e (x)u1

e +N2e (x)u2

e (111)

and we must have uhe(0) = u1e and uhe(∆x) = u2

e for an elementdefined on x isin [0∆x] as shown on the right

1 2

Dx

1u 2u

x

2N 1Ne e

e e

We know that the shape functions must be linear polynomials (q = 1) so that uhe(x) = c1e + c2

ex(we have only two nodes and therefore must have an interpolation with two coefficients)

Imposing those two constraints implies

uhe(0) = c1e = u1

e uhe(∆x) = c1e + c2

e∆x = u2e hArr c2

e =u2e minus c1

∆x= u

2e minus u1

e

∆x(112)

and hence

uhe(x) = c1e + c2

ex = (1 minus x

∆x)u1

e +x

∆xu2e (113)

Comparison with (111) yields the element shape functions (plotted above) as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (114)

Notice that these functions automatically satisfy (103) ie each shape function a is 1 at nodea and 0 at the respective other node

Differentiating the above linear shape functions yields

N1ex(x) =

d

dx(1 minus x

∆x) = minus 1

∆x N2

ex(x) =d

dx

x

∆x= 1

∆x (115)

so that the (only non-zero) axial strain inside the bar element is constant since

εhxx = uhex(x) =n

sumi=1

uieNiex(x) = u1

eN1ex(x) + u2

eN2ex(x) =

u2e minus u1

e

∆x= const (116)

If we assume a linear elastic bar so σ = E ε we obtain from (815)

F ainte = intΩσxx(εhxx)Na

xdV = int∆x

0Eu2e minus u1

e

∆xNaxA dx = EA

∆x(u2

e minus u1e)int

∆x

0Naxdx (117)

and inserting the constant shape function derivatives finally yields

F 1inte =

EA

∆x(u2

e minus u1e) (minus

1

∆x)∆x = minusEA

∆x(u2

e minus u1e) and F 2

int = minusF 1int (118)

59

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The components of the element stiffness matrix Ke follow as

[Ke] = [partF iint

partuje] = EA

∆x( 1 minus1minus1 1

) (119)

which has the typical form known from 1D assemblies of linear springs of effective stiffnessk = EA∆x We could alternatively have used our definition obtained from the linear elasticmechanical weak form

Kab = intΩeB[NaN b] dV = int

∆x

0ENa

exNbexAdx = EA∆xNa

exNbex =

EA

∆x

⎧⎪⎪⎨⎪⎪⎩

1 if a = bminus1 else

(1110)

where inserting the constant shape function derivatives again led to (119)

Note that the two nodal forces F 1inte and F 2

inte depend linearly on the nodal displacements (ascan be expected from a linear elastic bar) so that

[Finte] = (F1int

F 2int

) = EA∆x

( 1 minus1minus1 1

)(u1e

u2e) hArr Finte =KeUe (1111)

Further we realize that indeed

Ie(Ue) = int∆x

0

E

2(εhxx)

2Adx = 1

2Ue sdotKeUe so Finte =

partIepartUe

(1112)

So far we have only considered axial (ie 1D) deformation of the bar element In general thebar may be part of a 2D or 3D structure so it is important to generalize the above frameworkto higher dimensions This can be achieved by projecting the 2D or 3D displacements of theelement nodes onto the orientation of the bar element as follows

In d dimensions the nodal displacements of the bar element are

Ue = (u1eu

2e)

Twith uae = (uae1 uaed)

T (1113)

That is in 2D we deal with four nodal dofs (viz the u1- and u2-displacement components ofeach of the two nodes in the x1- and x2-directions respectively) while in 3D we have six nodaldofs (the u1- u2- and u3-displacement components of each of the two nodes)

We obtain the orientation of the bar element in space from its

nodal coordinates in the reference configuration Xe = (x1ex

2e)

T

such that ∆xe = ∥x2e minusx1

e∥ In 2D the angle with the x1-axis isobtained from geometry as

ϕe = arctan⎛⎝x2e2 minus x1

e2

x2e1 minus x1

e1

⎞⎠ (1114)

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

1(xe1

1 x )e2

2(xe1

2 x )e2

Dxe

The projection of the nodal displacements Ue onto the bar axis identifies the axial displacementsUe of the two nodes (written with a tilde to avoid ambiguity) as

(u1e

u2e) = (cosϕe sinϕe 0 0

0 0 cosϕe sinϕe)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[R(ϕe)]

⎛⎜⎜⎜⎜⎝

u1e1

u1e2

u2e1

u2e2

⎞⎟⎟⎟⎟⎠

hArr Ue =R(ϕe)Ue (1115)

60

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice further that the resulting axial forces acting at the two nodes Finte = (F 1inte F

2inte)

T

can be decomposed into the nodal forces in 2D Finte = (F 1inte1 F

1inte2 F

2inte1 F

2inte2)

T via

⎛⎜⎜⎜⎜⎝

F 1inte1

F 1inte2

F 2inte1

F 2inte2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

cosϕe 0sinϕe 0

0 cosϕe0 sinϕe

⎞⎟⎟⎟⎠(F 1

inte

F 2inte

) hArr Finte =RT(ϕe)Finte (1116)

Recall that we showed

Finte =KeUe rArr RT(ϕe)Finte =KeRT(ϕe)Ue hArr Finte =R(ϕe)KeR

T(ϕe)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

=Ke

Ue

with the axial stiffness matrix determined above as

[Ke] =EA

∆xe( 1 minus1minus1 1

) (1117)

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

R(ϕe)KeRT(ϕe) = Ke hArr Ke =RT(ϕe)KeR(ϕe) (1118)

Without derivation we mention that the same relations apply in 3D with the rotation matrix

R = ( l m n 0 0 00 0 0 l m n

) (1119)

where l m and n are respectively the direction cosines with the x1- x2- and x3-axes iel = cosang(xe1) where x is the unit vector pointing along the bar axis m = cosang(xe2) etc

Example 111 Truss consisting of three bars in 2D

Consider a truss consisting of three linear elastic bars connected byhinges and supported by a rigid impenetrable ground as shownon the right Loading the truss by a vertical force F we seek thedisplacements of the three nodal hinges

We first compute the stiffness matrix of each bar element individ-ually accounting for two displacement dofs per node By reusingthe stiffness matrix derived in (1117) and (1118) the horizontalbar (bar 1 connecting nodes 1 and 2) with ϕe = 0 has

L L

L1 2

3

F

sbquoƒ

EA

[K1] =RT(0)KeR(0) = EAL

⎛⎜⎜⎜⎝

1 0 minus1 00 0 0 0minus1 0 1 00 0 0 0

⎞⎟⎟⎟⎠ (1120)

Similarly bar 2 on the right (connecting nodes 2 and 3) with ϕe = 2π3 has

[K2] =RT(2π3 )KeR(2π

3 ) = EA4L

⎛⎜⎜⎜⎜⎝

1 minusradic

3 minus1radic

3

minusradic

3 3radic

3 minus3

minus1radic

3 1 minusradic

3radic3 minus3 minus

radic3 3

⎞⎟⎟⎟⎟⎠

(1121)

61

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly bar 3 on the left (connecting nodes 1 and 3) with ϕe = π3 has

[K3] =RT(π3 )KeR(π3 ) =EA

4L

⎛⎜⎜⎜⎜⎝

1radic

3 minus1 minusradic

3radic3 3 minus

radic3 minus3

minus1 minusradic

3 1radic

3

minusradic

3 minus3radic

3 3

⎞⎟⎟⎟⎟⎠

(1122)

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 barrsquosreference axis with the x1-axis with the first node being the center of rotation)

mdashmdashmdashmdash

112 Problem assembly

In order to solve the above truss problem we need to formulate the system of equations tobe solved This requires an important step known as the assembly of the global stiffnessmatrix Each of the above stiffness matrices represents a local stiffness matrix ie each ofthe matrices K1 K2 and K3 are each valid only for one particular element and the matricesare therefore associated with the displacements of the nodes of the respective elements In orderto solve the truss problem we need to formulate the global system of equations for the unknowndisplacements U = (u1

1 u12 u

21 u

22 u

31 u

32)T of the three nodes

Notice that to this end we need to differentiate between local and global dofs eg beamelement 2 (on the right) locally links its two nodes with dofs (u1

e1 u1e2) and (u1

e1 u1e2) However

taking the global view it is linking the global nodes 2 and 3 Hence local node 1 correspondsto the global node 2 and local node 2 corresponds to the global node 3 This local-to-globalmap is an essential book-keeping task within the FEM To avoid confusion we introduced thesubscripts e for local element-internal quantities For example for element 2 we have u1

e = u2

and u2e = u3 For element 3 we have analogously u1

e = u1 and u2e = u3 etc

Example 112 Three-bar truss in 2D (continued)

Let us continue Problem 111 using the above local-to-global map Now that we have understoodhow local nodes (1 and 2 for each beam element) are linked to global nodes (1 2 and 3) wecan assemble the global system All we must do is add the components of the local stiffnessmatrices to the right spots in the global stiffness matrix For example K1 (linking nodes 1 and2) in the global system with U = (u1

1 u12 u

21 u

22 u

31 u

32)T becomes

[K1]global =EA

L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 minus1 0 0 00 0 0 0 0 0minus1 0 1 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1123)

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

[K2]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 0 0 0 0 0

0 0 1 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

0 0 minus1radic

3 1 minusradic

3

0 0radic

3 minus3 minusradic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1124)

62

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

1radic

3 0 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

0 0 0 0 0 00 0 0 0 0 0

minus1 minusradic

3 0 0 1radic

3

minusradic

3 minus3 0 0radic

3 3

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1125)

Now we obtain the global stiffness matrix simply from the assembly of the local matrices ie

[K] = [K1]global+[K2]global+[K3]global =EA

4L

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

5radic

3 minus4 0 minus1 minusradic

3radic3 3 0 0 minus

radic3 minus3

minus4 0 5 minusradic

3 minus1radic

3

0 0 minusradic

3 3radic

3 minus3

minus1 minusradic

3 minus1radic

3 2 0

minusradic

3 minus3radic

3 minus3 0 6

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1126)

In order to solve for the deformation of the truss in Problem 111 we may now use the assembledstiffness matrix (1126) but we must impose proper boundary conditions First we have anexternal force F applied vertically downwards at node 3 The global external force vector(collecting all external forces applied to the truss) reads

[Fext] =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

000minusF

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1127)

where we left question marks for the two unknown support reactions in the vertical directionof the two sliders on the ground The natural boundary conditions (here the force F ) are thusimposed through the external force vector Fext

When it comes to essential BCs we must constrain nodes 1 and 2 from moving off the groundso we have u1

2 = 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 wefurther impose arbitrarily u3

1 = 0 (which will result in symmetric deformation)

Let us impose the essential BCs by eliminating the respective rows and columns from the systemConsequently we only retain rows and colums 1 3 and 6 of K and analogously we only retainrows 1 3 and 6 of Fext (which automatically removes the question marks in the external forcevector) Overall we arrive at the linear system

EA

4L

⎛⎜⎝

5 minus4 minusradic

3

minus4 5radic

3

minusradic

3radic

3 6

⎞⎟⎠

⎛⎜⎝

u11

u21

u32

⎞⎟⎠=⎛⎜⎝

00minusF

⎞⎟⎠

rArr⎛⎜⎝

u11

u21

u32

⎞⎟⎠= FL

4radic

3EA

⎛⎜⎝

minus11

minus3radic

3

⎞⎟⎠

(1128)

Hence we see that the truss deforms indeed symmetrically as u11 = minusu2

1 and the top node movesdownwards under the applied load while the bottom nodes move outwards Note that we canalso compute the unknown nodal reactions from Fext = Fint =KU

mdashmdashmdashmdash

63

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

113 Polynomial interpolation of higher order

So far we have only considered linear shape functions When going to higher-order polynomialinterpolation (as required eg for p-refinement but also for BVPs with higher-order derivativesin the weak form) various choices are possible for the definition of the element shape functionsWe here discuss two such approaches

1131 Lagrangian interpolation

The above scenario is a special case (ie the simplest case possible) of Lagrangian interpo-lation in 1D which can be extended to higher orders as follows Assume an interpolation upto degree q ie 1 x x2 xq such that

uhe(x) =q+1

suma=1

Nae (x)uae = a0 + a1x + a2x

2 + + aqxq (1129)

In general shape functions Nae (x) for a = 1 q + 1 can be determined by solving the q + 1

equations

uhe(xi) = ui for all i = 1 q + 1 (1130)

for the q + 1 coefficients ai (i = 0 q) Then rearranging the resulting polynomial allows toextract the shape functions Na

e (x) by comparison of the coefficients of uae cf (113) for the 1Dbar element

Alternatively we can solve

Nae (xb) = δab for all nodes b = 1 q + 1 (1131)

The solution to this problem is quite intuitive

Nae (x) =

(x minus x1) sdot sdot (x minus xaminus1) sdot (x minus xa+1) sdot sdot (x minus xq+1)(xa minus x1) sdot sdot (xa minus xaminus1) sdot (xa minus xa+1) sdot sdot (xa minus xq+1)

(1132)

so that Nae (x) is by definition 1 if x = xa and it vanishes at all

other nodes Hence one can readily verify that Nae (xb) = δab

These shape functions are called Lagrange polynomials Thedenominator is known and depends only on the nodal locationswhile the numerator is indeed a polynomial of order q

Shown on the right is an example of quadratic shape functionsinterpolating the displacement field in a bar element with threenodes

1 2

Dx

1u 2u

x

2N 1Ne e

e e33ue

3Ne

1132 Hierarchical interpolation

An alternative to the above Lagrangian interpolation is so-called hierarchical interpolationHere we construct higher-order interpolations based on lower-order shape functions For ex-ample we start with a 2-node bar element

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (1133)

64

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Let us enrich the interpolation to reach q = 2 by defining

uhe(x) = N1e (x)u1

e +N2e (x)u2

e + N3e (x)αe (1134)

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

N3e (x) = a0 + a1x + a2x

2 (1135)

which is associated with the newly introduced dof α To identify the coefficients ai recall thatwe must have

N3e (0) = N3

e (∆x) = 0 rArr N3e (x) = c

x

∆x(1 minus x

∆x) (1136)

with some arbitrary non-zero constant c ne 0 (which is to be chosen)

Note that αe does not have to be continuous across elements and can hence be determinedlocally (ie given u1

e and u2e αe can be determined internally for each element which allows

for condensation of the αe-dof with efficiency advantages)

114 2-node beam element

A practical example of elements with higher-order interpolation are beam element Unlikethe 2-node bar element (which only captures stretching of the bar see Section 111) beamelements account for bending (and can be superposed with the bar element to result in generalelements ready for stretching and bending) The linear elastic Euler-Bernoulli beam isthe most common structural element for this purpose whose deformation is defined by thedeflection w(x) Let us first review the underlying governing equations

Consider a continuous linear elastic beam of length L (constant Young modulus E and areamoment Iy) loaded by a distributed transverse load q(x) as well as bending moments My (aboutthe y-axis) and transverse forces Fz (in the positive z-direction) applied at its two ends Thestrong form of this problem (assuming EIy = const) reads

EIywxxxx(x) = q(x) with x isin (0 L) (1137)

with the boundary conditions (flipped signs at the negative cut)

minusF 1z = minusE Iy wxxx(0) minusM1

y = minusEIywxx(0)F 2z = minusEIywxxx(L) M2

y = minusEIywxx(L)(1138)

wxz 1F

z

2F

y

2My

1ML

z

q

The potential energy functional for the variational problem with deflection w(x) is

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1139)

where the plus-signs in the terms involving bending moments result from May being against

the rotation direction of wx The first variation yields the weak form (which must hold for alladmissible v(x))

G[w v] = intL

0[EIywxxvxx minus qv] dxminusF 1

z v(0)minusF 2z v(L)+M1

y vx(0)+M2y vx(L) = 0 (1140)

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

w isin U = w isinH2(0 L) ∶ w = w on partΩD (1141)

65

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Following our definitions from Section 7 we identify from (1140) the bilinear form

B[w v] = intL

0EIywxxvxxdx (1142)

and the linear boundary operator

L[v] = intL

0q vdx + F 1

z v(0) + F 2z v(L) minusM1

y vx(0) minusM2y vx(L) (1143)

such that

G[w v] = B[w v] minusL[v] = 0 forall v isin Uh0 = v isinH2(0 L) ∶ v = 0 on partΩD (1144)

As shown in Section 73 introducing an approximate solution

wh(x) =n

suma=1

waNa(x) (1145)

transforms the continuous problem into a linear problem for the n unknown coefficients wa andthe stiffness matrix associated with the linear problem has components

Kab = B[NaN b] = intL

0EIyN

axxN

bxxdx (1146)

To identify suitable shape functions Na(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 beamelement We know from the weak form that q ge 2 so the simplest admissible interpolation forthe unknown deflection w(x) would be based on 1 x x2 However this would introduce onlythree unknown coefficients (for two nodes) which is why we deliberately go one order higherand choose the basis 1 x x2 x3 This leads to the approximate deflection

whe (x) = c0 + c1x + c2x2 + c3x

3 for x isin [0 Le] (1147)

Since the four coefficients ci are hard to interpret physically in general we instead assign toeach node a deflection w and a deflection angle θ = wx and we use those as the four unknownsdefining the element interpolation The four coefficients ci are thus uniquely defined by thenodal conditions (shown below schematically)

whe (0) = w1e whe (Le) = w2

e whex(0) = θ1e whex(Le) = θ2

e (1148)

In order to clearly associate the shape functions with the nodal dofs let us alternatively writethe element interpolation as

whe (x) =2

suma=1

[Nae (x)wae +Ma

e (x)θae ] (1149)

with the four shape functions N1e and N2

e (associated with the nodal deflections) as well as M1e

and M2e (associated with the nodal rotations)

1 2

Le

1w2w

x

ee

2qe1qe

66

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Inserting the interpolation (1149) into the four conditions (1148) we obtain four equations tosolve for the unknown shape functions The resulting shape functions are known as Hermitianpolynomials which for a beam with x isin [0 Le] evaluate to

N1e (x) = 1 minus 3( x

Le)

2

+ 2( xLe

)3

N2e (x) = 3( x

Le)

2

minus 2( xLe

)3

M1e (x) = x(1 minus x

Le)

2

M2e (x) =

x2

Le( xLe

minus 1) (1150)

We can easily verify that eg N1e (0) = 1 while N2

e (0) = 0 and analogously N1e (Le) = 0 while

N2e (Le) = 1 Further we need to have N1

ex(0) = N1ex(Le) = N2

ex(0) = N2ex(Le) = 0 as well

as M1e (0) = M1

e (Le) = M2e (0) = M2

e (Le) = 0 Note the difference in units between N ie and

M ie because they multiply deflections and deflection angles respectively in the interpolation

(1149) Shown below are the four shape functions

02 04 06 08 10

02

04

06

08

10

02 04 06 08 10

-015

-010

-005

005

010

015

xLe

xLe

2N 1Ne

e

1M Lee

2M Dxee

1 1

Note that this approximation is only one possible choice we could also define alternative nodesand nodal values However the above choice ensures that both deflection and angle are contin-uous across elements (since nodal values are shared by neighboring elements)

Having established the shape functions we proceed to deriving the resulting element stiffnessmatrix where we follow the analogous procedure as for the bar element in Section 111 we firstcompute Ke the stiffness matrix for a beam element that is horizontal and then generalize theformulation to beam elements of arbitrary orientation in 2D and 3D with stiffness matrix Ke

Let us sort the nodal dofs as Ue = (w1e θ

1e w

2e θ

2e)

T Using (1146) with N1

e M1e N2

e and M2e

(in that order to comply with the nodal dof sorting) we obtain

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠ (1151)

and the nodal reactions (including transverse forces F az and bending moments May conjugate to

the deflections wae and deflection angles θae respectively) are

Finte = KeUe with Finte = (F 1inteM

1inte F

2inteM

2inte)

T (1152)

Here forces and moments have the same directions as the conjugate deflections and rotationangles In conclusion the nodal dofs and the nodal reactions are related linearly via

⎛⎜⎜⎜⎜⎝

F 1inte

M1inte

F 2inte

M2inte

⎞⎟⎟⎟⎟⎠

=2EIy

L3e

⎛⎜⎜⎜⎝

6 3Le minus6 3Le3Le 2L2

e minus3Le L2e

minus6 minus3Le 6 minus3Le3Le L2

e minus3Le 2L2e

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

w1e

θ1e

w2e

θ2e

⎞⎟⎟⎟⎠ (1153)

67

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Next let us generalize the beam element discussed above by considering a beam in 2D whose

nodal dofs are Ue = (u1e1 u

1e2 θ

1 u2e1 u

2e2 θ

2)T ie each node is now displacing in 2D and

rotating Since the above beam formulation only considers bending let us superimpose the barelement from Section 111 so that the resulting element can stretch and bend (otherwise thenodal dofs would not be independent as the length of the bar would have to remain unchangedwithout the ability of the element to stretch axially)

Consider a horizontal 2-node beam with nodal dofs Ue = (u1e w

1e θ

1 u2e w

2e θ

2)T so that wie

and θi describe the beam deflection while u2e minus u1

e defines the change in length of the beamelement 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 beamelements yielding

[Ke] =2EIy

L3e

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

0 0 0 0 0 00 6 3Le 0 minus6 3Le0 3Le 2L2

e 0 minus3Le L2e

0 0 0 0 0 00 minus6 minus3Le 0 6 minus3Le0 3Le L2

e 0 minus3Le 2L2e

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

+ EALe

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

1 0 0 minus1 0 00 0 0 0 0 00 0 0 0 0 0minus1 0 0 1 0 00 0 0 0 0 00 0 0 0 0 0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

(1154)

Note that we must carefully associate the stiffness matrix components with the correct nodaldofs as done above for the bending and stretching contributions

Now we can apply a coordinate transformation to generalize the above to beams with arbitraryorientation in 2D with ϕe denoting the angle of the beam elementrsquos reference orientation againstthe horizontal axis (see the schematic below where we flipped the directions of both deflectionsand rotation angles for consistency) as defined in (1114)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e

w1e

θ1

u2e

w2e

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1cosϕe sinϕe 0minus sinϕe cosϕe 0

0 0 1

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraR(ϕe)

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

u1e1

u1e2

θ1

u2e1

u2e2

θ2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Ue =R(ϕe)Ue (1155)

By using the same argument as for the 2-node bar element thestiffness matrix of the generally oriented 2-node beam element isthus obtained as

Ke =RT(ϕe)KeR(ϕe) (1156)

with R(ϕe) and Ke from (1155) and (1154) respectively Ofcourse the same can also be extended to beams in 3D where anappropriate transformation matrix R based on direction cosines isintroduced

j

1ue

2ue

1ue1

1ue2

2ue2

2ue1

~

~

L

2we~

1we~

1qe

2qe

The key difference between bar and beam elements lies in the deformation modes capturedby each Bars only undergo axial stretching and bar networks are hinged (ie bars carryno transverse forces nor bending moments) The above beam element supports both axial andbending deformation and beam networks are rigidly connected at nodes (angles between beamsat nodal junctions remain constant)

68

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

115 A note on beam elements and boundary conditions

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

The potential energy functional for the variational problem of an Euler-Bernoulli beam withthe deflection field w(x) was given by

I[w] = intL

0[1

2EIyw

2xx(x) minus q(x)w(x)] dxminusF 1

zw(0)minusF 2zw(L)+M1

ywx(0)+M2ywx(L) (1157)

so that the first variation reads (dropping the dependence on x in the integral for brevity)

δI = intL

0[EIywxxδwxx minus q δw] dxminusF 1

z δw(0)minusF 2z δw(L)+M1

y δwx(0)+M2y δwx(L) (1158)

In order to recover the strong form (whose PDE is EIywxxxx minus q = 0) we integrate the firstterm by parts to obtain

δI = minusintL

0EIywxxxδwxdx + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1159)

and integrating the first term by parts again finally gives

δI = intL

0EIywxxxxδwdx minus [EIywxxxδw]L0 + [EIywxxδwx]L0 minus int

L

0q δwdx

minus F 1z δw(0) minus F 2

z δw(L) +M1y δwx(0) +M2

y δwx(L)(1160)

Re-arranging the above leads to the stationarity condition

δI = 0 = intL

0(EIywxxxx minus q) δw dx

minus [F 1z minusEIywxxx(0)] δw(0) minus [F 2

z +EIywxxx(L)] δw(L)minus [minusM1

y +EIywxx(0)] δwx(0) + [M2y +EIywxx(L)] δwx(L) forall δw isin U0

(1161)

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

EIywxxxx minus q = 0 for 0 lt x lt L (1162)

Furthermore the remaining four terms in (1161) must also vanish individually (since we can inprinciple choose the variations at the ends individually and δI = 0 must hold for all admissiblevariations) For example we must have

[F 1z minusEIywxxx(0)] δw(0) = 0 (1163)

which means that either F 1z minus EIywxxx(0) = 0 (ie a transverse force F 1

z is imposed at theend x = 0) or δw(0) = 0 (which implies that w(0) = w1 must be an essential BC) Likewise[minusM1

y +EIywxx(0)] δwx(0) means that either M1y = EIywxx(0) (ie a bending moment is

imposed at x = 0) or δwx = 0 (which implies that wx(0) = θ1 must be an essential BC)Therefore the above form of the first variation (in which the integral term matches the PDEof the strong form) reveals all possible boundary conditions both natural and essential (ieNeumann and Dirichlet respectively)

69

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We thus also need to revise our definition of a Dirichlet boundary condition not neces-sarily every derivative of the primary field u imposed implies a Neumann boundary conditionInstead we extract the notion of Dirichlet vs Neumann boundary conditions from the firstvariation of a variational problem As a rule of thumb essentialDirichlet BCs imposethe function itself as well as derivatives up to order (pminus 1) where p is half the order ofthe PDE in the strong form or the matching order of u and v in weak form (eg for a beamthe PDE is of fourth-order the matching-order weak form contains second derivatives essentialBCs impose the deflection itself or its first derivative)

70

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

12 Shape Functions in higher dimensions

So far we have used polynomial shape functions for element interpolations in 1D and we sawthat the shape functions depend on the element size ∆xe or Le In higher dimensions it wouldbe quite cumbersome to define polynomial shape functions on the actual shape of the elementthus depending on the nodal locations and the geometry of the element in space unless oneuses regular structured meshes (eg grids where all elements have the same shape) In generalall elements have different shapes and it is beneficial to define shape functions independent ofthe specific element shape

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 shapefunctions in the reference configuration to those in real physical space

To this end we introduce a (bijective) mapping φ from a reference domain (with referencecoordinates ξ = ξ η ζ) onto the physical domain (with coordinates x = x1 x2 x3) of anelement e

x = φ(ξ) ie in 3D for i = 123 xi = xi(ξ η ζ) (121)

A schematic of the parametric mapping concept is shown below in 2D for a quadrilateral (bi-linear) element which will be introduced soon The mapping links the element in its referenceconfiguration or space described by coordinates (ξ η) to the elementrsquos representation in realphysical space described by Cartesian coordinates (x1 x2) in 2D

For simplicity we reuse the interpolation concepts from before

so far we used uhe =n

sumi=1

N ie(x)uie

now we use uhe =n

sumi=1

N ie(ξ)uie and x =

m

sumi=1

N ie(ξ)xie

(122)

where we have three options for the mapping

(i) isoparametric mapping n =m and N ie = N i

e (same interpolation of positionsdofs)

(ii) subparametric mapping n gtm (lower-order interpolation of positions)

(iii) superparametric mapping n ltm (higher-order interpolation of positions)

The strategy is now to define N ie(ξ) in the reference configuration We will first discuss this

concept for simplicial elements in the next section before proceeding to more general classes ofpolynomial element interpolations

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

4 4 3

1 2

mapping

element in physical space element in its reference space

71

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

13 Simplicial elements

The probably simplest type of finite element are so-called simplicial elements (and we havealready seen one) These are characterized by having the minimum number of nodes possible ina given dimension Mathematically speaking a simplex of order k is a k-dimensional polytopewhich is the convex hull of its k + 1 vertices

In plain English a simplex in d dimensions is a convex body made up of d + 1 nodes

in 1D a 2-node bar whose interpolation basis is 1 x

in 2D a 3-node triangle (T3) whose interpolation basis is 1 x1 x2

in 3D a 4-node tetrahedron (T4) whose interpolation basis is 1 x1 x2 x3

Overall this shows that the element interpolation in each case is of degree q = 1 (linear) andthe space of shape functions is complete up to linear order for a simplicial element in everydimension

Although one could in principle derive the shape functions for any arbitrary element geometrythis turns out to be cumbersome in general Consider eg a simplicial element in 2D (a triangle)whose three nodes are equipped with some nodal dofs u1 u2 and u3 One could now write

uh(x) =n

suma=1

uaNa(x) (131)

and enforce the conditions uh(xa) = ua to solve the resulting system of equations for the shapefunctions Na(x) as done at the beginning of Section 111 However such an approach isinconvenient as the resulting shape functions will inevitably depend on the nodal locationsxa in a complex manner and therefore vary from element to element based on the elementlocation and geometry As a remedy one resorts to the concept of isoparametric mappings(see Section 12) to introduce general shape functions whose definition does not depend on theelement geometry For simplices one commonly introduces so-called barycentric coordinates

131 Linear Triangle (T3)

In order to derive the shape functions and resulting element inter-polation for a 3-node triangular element (T3) in 2D one definesthe barycentric coordinates

lae(x) =Aae(x)Ae

for a = 123 (132)

where Ae = ∣Ωe∣ is the total area of the triangular element and Aae isthe sub-area opposite from node a when splitting the triangle intothree parts by connecting the nodes to point x (see the schematicon the right) Consequently we have A1

e +A2e +A3

e = Ae 1

23

x

A1

A3A2

Note that by finite element convention we always number the local nodes of an element in 2Dcounter-clockwise

We now have two ways to describe a point inside the triangular element we either use itscoordinate x or the three barycentric coordinates lae to describe the point and there is a uniquerelation (a mapping) between (x1 x2) harr (l1a l2a l3a) In general we need only two coordinates

72

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

to describe a point in 2D space and here we notice that indeed we need only two of thebarycentric coordinates to uniquely describe a point in space (if two of the lae are known thenthe third is known as well since l1e + l2e + l3e = 1) For example we may define

ξ = l1e and η = l2e (133)

as the two coordinates (ξ η) to uniquely describe points within the triangle

Furthermore notice that the barycentric coordinates also satisfy the relation

lae(xb) = δab (134)

(eg if x is one of the nodal locations then two of the three areas Aae are zero and one areaequals Ae) This indicates that the three barycentric coordinates also qualify as shape functionsie we may choose Na(x) = lae(x) Note that also 0 le lie le 1 and sum3

i=1 lie(x) = 1 for all x isin Ωe

The shape functions associated with the three nodes now become

N1e (ξ η) = ξ N2

e (ξ η) = η N3e (ξ η) = 1 minus ξ minus η (135)

The beauty of these shape functions lies in the fact that in the above form they are independentof the element geometry In addition computing shape function derivatives with respect to (ξ η)is obviously trivial N1

eξ = 1 N1eη = 0 etc

We still need to find the link between the Cartesian coordinates (x1 x2) and the barycentriccoordinates (ξ η) To this end let us exploit that we know Na(xb) = δab and further the factthat the shape functions introduced above define a linear interpolation across the element in 2DThe latter is easy to realize when eg moving from one node a to another ndoe b and realizingthat the barycentric coordinates linearly vary between 0 and 1 between these two nodes (Na

e

will decrease from 1 to 0 while N be 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 Asa consequence we may introduce the isoparametric mapping

x(ξ η) =3

suma=1

Nae (ξ η)xae (136)

which applies the interpolation rules (classically used for the dofs) to the nodal locations of theelement Given the nodal locations x1

e x2e and x3

e the above mapping uniquely assigns a pointx in real space to any barycentric coordinates (ξ η) (136) thus presents the link the mappingbetween (x1 x2) and (ξ η)

Of course we may exploit the same interpolation for any nodal degrees of freedom (thus usingan isoparametric mapping) so

uh(ξ η) =3

suma=1

Nae (ξ η)uae (137)

A difficulty arises though when using this interpolation in the finite element context because weneed to compute shape function derivatives Na

xi in real space (needed eg for the calculationof Ke or Fint) It is easy to compute Na

ξ and Naη but that is not what we need (136) defines

(x1 x2) in terms of (ξ η) but not the other way around

Instead of inverting (136) let us use a mathematical shortcut known as the inverse functiontheorem To exploit this relation let us formally write x1 = x1(ξ η) and x2 = x2(ξ η) so thechain rule gives

( uhξuhη

) = ( uhx1x1ξ + uhx2

x2ξ

uhx1x1η + uhx2

x2η) = (x1ξ x2ξ

x1η x2η)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[J]

( uhx1

uhx2

) = [J] ( uhx1

uhx2

) (138)

73

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

with the Jacobian6 matrix

[J] = (x1ξ x2ξ

x1η x2η) (139)

and its determinant

J = detJ = partx1

partξ

partx2

partηminus partx1

partη

partx2

partξ (1310)

Note that like for the deformation mapping F = Gradϕ in continuum mechanics for theisoparametric mapping to be invertible we need to have J gt 0 This implies that elementscannot be distorted (inverted for simplicial elements or non-convex for general elements later)

By substituting our isoparametric mapping (136) for x1 and x2 in (139) we obtain

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξx

a1e

3

sumi=1

Naeξx

a2e

3

suma=1

Naeηx

a1e

3

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

(1311)

This solves the problem as we may now use (138) to switch between derivatives in the referenceconfiguration and in real space As discussed we need to have J gt 0 Thus we can invert J toarrive at (by the inverse function theorem)

( uhx1

uhx2

) = [J]minus1 ( uhξuhη

) = [J]minus1

⎛⎜⎜⎜⎜⎝

3

suma=1

Naeξu

ae

3

suma=1

Naeηu

ae

⎞⎟⎟⎟⎟⎠

but also ( uhx1

uhx2

) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naex1

uae

3

suma=1

Naex2

uae

⎞⎟⎟⎟⎟⎠

(1312)

By equating these two and comparing the coefficients of uae we thus obtain

(Naex1

Naex2

) = [J]minus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (1313)

where for brevity we summarized the barycentric coordinates into ξ = (ξ η)T Relation (1313)is generally applicable for any isoparametric mapping and will be valuable in the future

Applying the inverse function theorem to the specific shape functions (135) yields the Jacobianmatrix

[J] = (xξ x2ξ

xη x2η) =

⎛⎜⎜⎜⎜⎝

3

suma=1

Naerx

a1e

3

suma=1

Naeξx

a2e

3

suma=1

Naesx

a1e

3

suma=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= (x11e minus x3

1e x12e minus x3

2e

x21e minus x3

1e x22e minus x3

2e) = const (1314)

and

J = detJ = (x11e minus x3

1e)(x22e minus x3

2e) minus (x21e minus x3

1e)(x12e minus x3

2e) = 2Ae = const (1315)

6The Jacobian in mathematics is usually defined as the transpose of J defined in (139) In the FE contextour definition is chosen for convenience so that we do not need a transpose in (1313) while J = detF remainsthe same

74

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Notice that J and hence J are constant and do not depend on (ξ η)

Further we have

(Naex1

Naex2

) = [J]minus1 (Naeη

Naeξ

) (1316)

As we had seen from (135) that all shape function derivatives Naξ and Na

η are constant (minus1+1 or 0) and since J = const as well we may also conclude that

Naex1

= const Naex2

= const and also dA = dx1 dx2 = J dξ dη = 2Aedξ dη (1317)

The constant shape function derivatives have an important consequence they indicate that allderivatives partuhpartxj within the triangular element are constant

For example for a mechanical boundary value problem we have two nodal dof components in2D uae = (uae1 uae2) and the interpolation of the displacement field reads

uh =3

suma=1

uaeNae (ξ) or uhi =

3

suma=1

uaeiNae (ξ) for i = 12 (1318)

The resulting strains are

εhij =1

2(uhij + uhji) =

1

2

3

suma=1

(uaeiNaxj + u

aejN

axi) = const (1319)

Consequently all strain components are constant within the element This is why the 3-nodetriangular element is also called the Constant Strain Triangle or CST element It also hasthe important consequence that integration of force vectors or stiffness matrices can easily beperformed exactly since the integrands (for the element energy nodal forces and stiffness) areconstant across the element

In case of higher-order triangular elements the following relation is helpful for evaluating inte-grals over the triangular element (shown without proof)

intΩeξαηβ dA = αβ

(α + β + 2)2Ae (1320)

132 Extension to three dimensions

The extension to three dimensions is straight-forward and results in the 4-node tetrahedron(constant strain tetrahedron) with reference coordinates (ξ η ζ) and shape functions

N1e (ξ η ζ) = ξ N2

e (ξ η ζ) = η N3e (ξ η ζ) = ζ N4

e (ξ η ζ) = 1minusξminusηminusζ (1321)

Here the barycentric coordinates are defined via the ratios of the partial tetrahedron volumes(obtained by splitting the tetrahedral element into four tetrahedra based on the location ofpoint x analogous to the above procedure in 2D) Like in 2D the resulting interpolated strainsare constant in the linear tetrahedron and dV = 6Vedξ dη dζ

The following relation is analogous to (1320)

intΩeξαηβζγ dA = αβγ

(α + β + γ + 2)2Ae (1322)

75

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

133 Finite element implementation

When using the above simplicial elements (like any finite element based on an isoparametricformulation) the finite element implementation can make use of the isoparametric mappingSpecifically for the simplicial elements we showed that

nablaxNae = Jminus1nablaξNa

e = const and Je = detJ = 2Ae (1323)

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

εhij = const rArr σij = σij(εh) = const (1324)

The key integrals to be evaluated (eg in 2D with an element thickness t) following Section 8now become

F aintei = intΩeσijN

aexj dV = int

ΩeσijN

aexj tdA = sum

r=ξη

σijJminus1jr N

aer

Jet

2 (1325)

where the classical summation convention (here over j is implied and not written out for concise-ness) Note that if we pre-compute and store the following constant quantities for each elemente (which only depend on the reference element geometry and not on its degrees of freedom)viz

we =Jet

2= const and Na

exj = sumr=ξη

Jminus1jr N

aer = const (1326)

then the calculation of the nodal force vectors reduces to

F aintei = σij(εh)Naexjwe (1327)

where only the stresses must be recomputed each time for given strains (which do depend onthe nodal dofs) Similarly we compute the element energy as

Ie = intΩeW (εh)dV = int

ΩeW (εh) tdA =W (εh)we (1328)

The analogous definition of a B-matrix as introduced in Section 82 can be applied here asfollows 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 straincomponents in Voigt notation using (1314) are computed as

[εh] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

uh11uh22

uh12 + uh21

⎞⎟⎠=⎛⎜⎝

sumea=1 uae1N

aex1

sumea=1 uae2N

aex2

sumea=1 [uae1Naex2

+ uae2Naex1

]

⎞⎟⎠

= 1

2Ae

⎛⎜⎝

y23e 0 y31

e 0 y12e 0

0 x32e 0 x13

e 0 x21e

x32e y23

e x13e y31

e x21e y12

e

⎞⎟⎠

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para=[B]

Ue with

xije = xie1 minus xje1

yije = xie2 minus xje2

2Ae = x21e y

31e minus x31

e y21e

(1329)

Note that we exploited J = const and we defined Ue = (u1e1 u

1e2 u

2e1 u

2e2 u

3e1 u

3e2)

T Fur-

thermore (xae1 xae2) denotes the 2D-location of the elementrsquos node a

76

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1331 Special case linear elasticity

For the special case of linear elasticity we may write

εh =BUe rArr σ = Eεh = EBUe (1330)

and the same relations apply as in Section 82 (see the definition of the elastic E-matrix there)Consequently we have the element stiffness matrix nodal internal force vector and internalenergy of element e as respectively

Ke = intΩeBTEBdV =BTEBtAe Finte =KeUe Ie =

1

2Ue sdotKeUe (1331)

where we exploited that BTEB = const and the volume of element e is ∣Ωe∣ = tAe for a 2DCST element Even though not wise for reasons of memory consumption the element stiffnessmatrices Ke can be computed and stored a-priori for each element for faster calculation of forcesand stiffness matrices during simulations

1332 General case of non-linear elastic materials

For the more general case of a material that is not linear elastic we may still write

W =W (ε) rArr σ = partWpartε

= σ(ε) C = partσpartε

= C(ε) (1332)

so that

Ie = intΩeW (εh)dV (1333)

and the internal force vector follows as

Finte =partI int

e

partUe= int

ΩeBTσ dV =BTσ(εh)tAe (1334)

while the incremental stiffness matrix (the analog of the stiffness matrix for nonlinearmaterial behavior) becomes

Te =partF int

e

partUe= int

ΩeBTCB dV =BTC(εh)B tAe (1335)

Note that if σ = Eε the above equations recover the linear elastic definitions with C = E = const

134 Higher-order triangles and tetrahedra

Following the above recipe for the simplicial elements one can also define higher-order triangularand tetrahedral elements based on the barycentric coordinates introduced here For examplethe quadratic triangle (T6) element has six nodes so that the interpolation function space is1 x1 x2 x

21 x1x2 x

22 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

With the same barycentric reference coordinates (ξ η) as for the T3 element the shape functionscan be found as

N1e (ξ η) = ξ(2ξ minus 1) N2

e (ξ η) = η(2η minus 1) N3e (ξ η) = θ(2θ minus 1)

N4e (ξ η) = 4ξη N5

e (ξ η) = 4ηθ N6e (ξ η) = 4ξθ with θ = 1 minus ξ minus η

(1336)

77

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Since derivatives of the above shape functions are linear strains (and thus stresses) also varylinearly 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 curvedwhereas those of the CST element remained straight during deformation due to the linearinterpolation A schematic T6LST element is shown below

1

23

4

5

6

1

2

3

4

1

2

3

4

56

79

108

LST (T6) CST (T4) LST (T10)

Analogously the quadratic tetrahedron (T10 also shown above) has four corner nodes andsix nodes at edge midpoints resulting in linear strains within the element By our definitionboth T6 and T10 elements make use of a subparametric mapping since displacements areinterpolated based on higher-order polynomials while the mapping of positions between referenceand real space relies on the same linear interpolation based on barycentric coordinates

The same concepts can be extended to higher dimensions and to higher-order interpolation

78

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

14 The bilinear quadrilateral element

The above simplicial elements are simple to implement and their constant strains within el-ements admit an exact integration of the element energy nodal forces and stiffness matrixHowever the constant fields within the simplicial elements may not be ideal eg fine FEmeshes may be required to achieve the sought accuracy especially in regions with spatiallystrongly 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 elementsas well as elements in 3D

For the same reason as for the simplicial elements (where we aimed for shape function definitionsindependent 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 quadrilateralelement by definition the reference configuration is Ωe = [minus11]2 and node numbering starts inthe bottom left corner and is counterclockwise

Shape functions must satisfy the FE relation Nae (ξb) = δab in the reference configuration with

nodal positions ξb (b = 1 4) In fact these shape functions can be obtained from the 2-nodebar (whose shape functions we derived in Section 111) by scaling the linear scaling of the shapefunctions up to 2D Consider a 2-node bar whose nodes are positioned7 at ξ = plusmn1 whose shapefunctions are

N1e (ξ) =

1

2(1 minus ξ) N2

e (ξ) =1

2(1 + ξ) (141)

It can easily be verified that N1e (minus1) = 1 N1

e (1) = 0 and N2e (minus1) = 0 N2

e (1) = 1

The 2D quadrilateral element in its reference configuration is Ωe = [minus11]2 ie a square whosecorners are located at ξ = (plusmn1plusmn1) The shape functions can thus be obtained by combining theabove 1D bar shape functions independently in the ξ- and η-directions

N1e (ξ η) = N1

e (ξ)N1e (η) =

1

4(1 minus ξ)(1 minus η)

N2e (ξ η) = N2

e (ξ)N1e (η) =

1

4(1 + ξ)(1 minus η)

N3e (ξ η) = N2

e (ξ)N2e (η) =

1

4(1 + ξ)(1 + η)

N4e (ξ η) = N1

e (ξ)N2e (η) =

1

4(1 minus ξ)(1 + η)

(142)

One can easily verify that Nae (ξb ηb) = δab and sum4

a=1Nae (ξ η) = 1 for all ξ = (ξ η)

1 2x

x1

x2

x

h

1(xe1

1 x )e2 2(xe1

2 x )e2

3(xe1

3 x )e2

4(xe1

4 x )e2

We

(-1-1) (1-1)

(-11) (11)

1

2

3

44 3

1 2

mapping

Q4 element in physical spaceQ4 element in its reference space

-1 1

2-node bar in itsreference space

7We note that this choice of ξ isin [minus11] for the bar in the reference configuration is arbitrary one could alsohave chosen eg ξ isin [01]

79

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The isoparametric mapping here implies that the (x1 x2)-coordinates are interpolated across theelement using the same shape functions (viz the above ones) as those used for the interpolationof the fields of interest Therefore we have

x1 =4

suma=1

Nae (ξ η)xae1 x2 =

4

suma=1

Nae (ξ η)xae2 (143)

Notice that this implies straight edges (in the reference configuration) remain straight (in theactual mesh) For example take the bottom edge (characterized by η = minus1) the interpolationalong this edge is

x =4

suma=1

Nae (ξminus1)xae =

1 minus ξ2x1e +

1 + ξ2x2e =

x1e +x2

e

2+ x

2e minusx1

e

2ξ (144)

which is a linear interpolation in ξ Therefore the bottom edge in the real mesh in physicalspace is a linear interpolation between the two adjacent nodes Similar arguments hold for alledges so that this element has only straight edges in physical space

Looking at the shape functions we notice that completeness of the polynomial interpolationis up to q = 1 (even though the interpolation basis 1 ξ η ξη contains the bilinear term it isnot complete up to quadratic order see Section 93) This means we must be able to representlinear solutions of the type

uh(x1 x2) = c0 + c1x1 + c2x2 (145)

exactly As simple check reveals that this is indeed the case since our interpolation based onthe four nodal values uae = uh(xae) recovers the exact solution

uh(x1 x2) =4

suma=1

Nae u

ae =

4

suma=1

Nae u

h(xae1 xae2) =4

suma=1

Nae (c0 + c1x

ae1 + c2x

ae2)

= (4

suma=1

Nae ) c0 + c1

4

suma=1

Nae x

ae1 + c2

4

suma=1

Nae x

ae2 = c0 + c1x1 + c2x2

(146)

Hence we know that the chosen isoparametric element interpolation is capable of representinglinear solutions exactly

Furthermore notice that this interpolation scheme ensures that uh is continuous across ele-ments To see this recall from (144) that on any element edge only those two shape functionsare non-zero whose nodes are adjacent to that edge while the other shape functions are zeroThis implies that the interpolated field uh on any edge is simply a linear interpolation betweenthe 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 adjacentelements As a further consequence the above interpolation also ensures integrability in theweak form as a continuous piecewise polynomial field uh guarantees that uh isinH1(Ω)

As for the simplicial element computing shape function derivatives requires the use of theinverse function theorem first introduced in Section 131 In analogy to the simplicial elementwe use x = x(ξ η) and y = y(ξ η) so the inverse function theorem states

(Naex

Naey

) = Jminus1 (Naeξ

Naeη

) and more generally nablaxNae = Jminus1nablaξNa

e (147)

By contrast to the simplicial elements we no longer have that J nor nablaξNa are constant becauseof the bilinear term ξη in the shape functions Therefore strains and stresses will no longer beconstant within an element

80

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 141 2-node bar revisited

As a simple example recall the 2-node bar element whose shape functions we computed as

N1e (x) = 1 minus x

∆x N2

e (x) =x

∆x (148)

For a reference bar element with nodes at ξ = plusmn1 the analogous shape functions in 1D read

N1e (ξ) =

1 minus ξ2

N2e (ξ) =

1 + ξ2

(149)

It is simple to verify that these indeed evaluate to 0 and 1 at ξ = plusmn1 Applying the inversefunction theorem to this 1D problem gives the scalar Jacobian

J = partxpartξ

= partN1e

partξx1e +

partN2e

partξx2e =

x2e minus x1

e

2= ∆x

2(1410)

and further the relation between the shape function derivatives in physical and reference spaceas

Naex = Jminus1Na

eξ =2

∆xeNaeξ with N1

eξ = minus1

2 N2

eξ =1

2 (1411)

so that we obtain correctly

N1ex = minus

1

2

2

∆xe= minus 1

∆xe N1

ex =1

2

2

∆xe= 1

∆xe (1412)

mdashmdashmdashmdash

When applying the inverse function theorem and the above relations to the bilinear quadrilateral(Q4) element we obtain the Jacobian

[J] = (x1ξ x2ξ

x1η x2η) =

⎛⎜⎜⎜⎜⎝

4

suma=1

Naeξx

a1e

4

sumi=1

Naeξx

a2e

4

suma=1

Naeηx

a1e

4

sumi=1

Naeηx

a2e

⎞⎟⎟⎟⎟⎠

= 1

4(minus(1 minus η) (1 minus η) (1 + η) minus(1 minus η)minus(1 minus ξ) minus(1 + ξ) (1 + ξ) (1 minus ξ) )

⎛⎜⎜⎜⎜⎝

x1e1 x1

e2

x2e1 x2

e2

x3e1 x3

e2

x4e1 x4

e2

⎞⎟⎟⎟⎟⎠

(1413)

and J = detJ We notice that J indeed is not constant across the element but varies with ξand η For convenience let us define

[Γ] = [Jminus1] = (Γ11 Γ12

Γ21 Γ22) (1414)

Towards the FE implementation let us also introduce the B-matrix notation To this end wewrite

[ε] =⎛⎜⎝

εh11

εh22

2εh12

⎞⎟⎠=⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

(1415)

81

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We further exploit the inverse function theorem viz

⎛⎜⎜⎜⎜⎝

uh1x1

uh1x2

uh2x1

uh2x2

⎞⎟⎟⎟⎟⎠

=⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

(1416)

Finally we also have

⎛⎜⎜⎜⎜⎝

uh1ξuh1ηuh2ξuh2η

⎞⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

Ue (1417)

with the element dofs Ue = (u1e1 u

1e2 u

4e1 u

4e2)

T Altogether this shows that ε =BUe with

B =⎛⎜⎝

1 0 0 00 0 0 10 1 1 0

⎞⎟⎠

⎛⎜⎜⎜⎝

Γ11 Γ12 0 0Γ21 Γ22 0 00 0 Γ11 Γ12

0 0 Γ21 Γ22

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎝

N1eξ 0 N2

eξ 0 N3eξ 0 N4

eξ 0

N1eη 0 N2

eη 0 N3eη 0 N4

eη 0

0 N1eξ 0 N2

eξ 0 N3eξ 0 N4

0 N1eη 0 N2

eη 0 N3eη 0 N4

⎞⎟⎟⎟⎟⎠

(1418)

which defines theB-matrix for the Q4 element Again note thatB =B(ξ) ie theB-matrix isnot constant within an element but depends on ξ and η (through the shape function derivativesas well as through Γ = Jminus1 which are both not constant)

Analogous to the simplicial element a useful relation to evaluate area integrals over theelement in the following is (e1e2 being reference unit vectors)

dA = dx times dy = (partxpartξ

dξ e1 +partx

partηdη e2) times (party

partξdξ e1 +

party

partηdη e2) = J dξ dη e1 times e2 (1419)

so that

dA = ∣dA∣ = J dξ dη (1420)

Like for the simplicial elements the above can be used to compute the element energy

Ie = intΩeW (εh)dV (1421)

the internal force vector

Finte =partI int

e

partUe= int

ΩeBTσ dV (1422)

and the incremental stiffness matrix

Te =partF int

e

partUe= int

ΩeBTCB dV (1423)

For the special case of linear elasticity the above reduces to

Ke = intΩeBTEBdV Finte =KeUe Ie =

1

2Ue sdotKeUe (1424)

82

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

15 Higher-order elements Q8 Q9 8-node brick

The bilinear quadrilateral (Q4) element discussed in the previous section was the simplestexample of a (non-simplicial) element in 2D Of course the same concepts can be extended tomore complex elements using higher-order interpolation as well as to 3D elements Here wewould 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 whichinstead uses quadratic interpolation It derives its shape functions from applying the 1D shapefunctions of the 3-node bar (using Lagrangian interpolation) to the 2D case For example thefirst few shape functions are defined as

N1e (ξ η) =

ξ(1 minus ξ)η(1 minus η)4

N2e (ξ η) = minus

ξ(1 + ξ)η(1 minus η)4

N3e (ξ η) =

ξ(1 + ξ)η(1 + η)4

(151)

and all other shape functions follow analogously Overall the resulting interpolation uses thebasis (ie the above shape functions include these monomials)

1 ξ η ξη ξ2 η2 ξ2η ξη2 ξ2η2 (152)

which is complete up to order q = 2 (quadratic)

We notice that the above interpolation apparently includes far more monomials terms thanrequired for a quadratic interpolation (specifically ξ2η ξη2 and ξ2η2 are not required for acomplete quadratic interpolation) Therefore one can also construct elements with less nodesthat still provide a complete quadratic interpolation

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 consequenceshape functions are constructed in a different way than defined by (151) One starts by definingthose shape functions associated with the mid-edge nodes 5 6 7 and 8

N5e (ξ η) =

(1 minus η)(1 minus ξ2)2

N6e (ξ η) =

(1 minus η2)(1 + ξ)2

N7e (ξ η) =

(1 + η)(1 minus ξ2)2

N8e (ξ η) =

(1 minus η2)(1 minus ξ)2

(153)

and concludes the remaining four shape functions (serendipitously) as combinations of the aboveeg

N1e (ξ η) =

(1 minus η)(1 minus ξ)4

minus 1

2(N5+N8) N2

e (ξ η) =(1 minus η)(1 + ξ)

4minus 1

2(N5+N6) etc (154)

Both the Q8 and Q9 element are schematically shown below in their reference configurations

x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q9 in its reference space

5

6

7

8 9x

h

(-1-1) (1-1)

(-11) (11)4 3

1 2

Q8 in its reference space

5

6

7

8

83

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

We may also extend the above construction of elements to three dimensions The simplestexample in 3D was the Constant-Strain Tetrahedron already discussed in Section Here wemay introduce further 3D elements by extending eg the definition of the bilinear quadrilateral(Q4) element into 3D

This results in the so-called 8-node brick element Here the 3D reference configuration isdescribed by coordinates (ξ η ζ) and the shape functions are a direction extension of (142)now to 3D which gives

N1e (ξ η ζ) =

1

8(1 minus ξ)(1 minus η)(1 minus ζ) N2

e (ξ η ζ) =1

8(1 + ξ)(1 minus η)(1 minus ζ)

N3e (ξ η ζ) =

1

8(1 + ξ)(1 + η)(1 minus ζ) etc

(155)

The link between the reference and actual configuration is again given by an isoparametricmapping so that shape function derivatives again follow from the inverse function theorem as

nablaxNae = Jminus1nablaξNa

e (156)

and volume integrals make use of

dV = J dξ dη dζ (157)

x

h

(-1-1-1) (1-1-1)

(111)

41 2

brick element in its reference space

z

3

85 6

7

(11-1)

84

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

16 Numerical quadrature

The Q4 Q8 Q9 and brick element are perfect examples to motivate the concepts discussed inthis section viz the use of numerical quadrature Recall that in order to perform finite elementsimulations we may need to compute the element energy nodal forces andor tangent matrix

Ie = intΩeW (εh)dV Finte = int

ΩeBTσ dV Te = int

ΩeBTCB dV (161)

each of which requires computing an integral over the element Ωe In general (unlike for thespecial case of simplicial elements) the integrands are not constant but may be complex func-tions of position (even in the linear elastic case) As a consequence the above integrals cannoteasily be calculated analytically which is why we make use of numerical integration schemes

As a clean mathematical example we start by considering an integral in 1D eg

I[u] = intb

au(x) dx (162)

which can later be extended to higher dimensions For convenience let us introduce the coor-dinate transformation

ξ = 2x minus ab minus a

minus 1 rArr ξ(x = a) = minus1 ξ(x = b) = 1 dξ = 2 dx

b minus a (163)

so that

I[u] = int1

minus1f(ξ) dξ where f(ξ) = b minus a

2u(x(ξ)) (164)

with

x = ξ + 1

2(b minus a) + a (165)

Instead of considering general integrals of the type (162) we concentrate on integrals of thetype (164) (and we have seen that we can transform one into the other) The goal is now toapproximate the integral (164) numerically

161 Example Riemann sums

As an example for numerical integration consider a partition of the range from minus1 to 1 into nsegments separated by n + 1 nodes

P = [ξ0 ξ1] [ξ1 ξ2] [ξnminus1 ξn] such that minus1 = ξ0 lt ξ1 lt ξ2 lt lt ξn = 1 (166)

The Riemann sum is probably the simplest approach to computing the above integral numer-ically by simply summing the contributions from all segments thus defining the approximateintegral S as

I asymp S =n

sumi=1

f(ξlowasti )(ξi minus ξiminus1) with ξiminus1 le ξlowasti le ξi (167)

Here the choice of ξlowasti within each interval is in principle arbitrary It should be somehowrepresentative of the function f within the interval [ξiminus1 ξi]

85

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Different choices of ξlowasti lead to different definitions of S eg including

(i) the left Riemann sum ξlowasti = ξiminus1

(ii) the right Riemann sum ξlowasti = ξi(iii) the middle Riemann sum ξlowasti =

12(ξiminus1 + ξi)

(iv) the trapezoidal sum average of left and right

(v) the upper Riemann sum ξlowasti st g(ξlowasti ) = supξisin[ξiminus1ξi] g(ξ)(vi) the lower Riemann sum ξlowasti st g(ξlowasti ) = infξisin[ξiminus1ξi] g(ξ)

More refined formulations can be found in the so-called Newton-Cotes formulas (the trape-zoidal rule is the Newton-Cotes formula of degree 1) While these Riemann and Newton-Cotesformulas are indeed viable schemes to carry out integration numerically they are rather ineffi-cient as they require the breaking down of the integrand into many segments in general Thefollowing concept of Gaussian quadrature aims to circumvent those computational expenses

x-1 +1

f(x)

xx0

f(x )i

xnxi-1xi

xx0

f(x )i

xi-1 +1

exact integral (middle) Riemann sum quadrature rule

162 Gauss quadrature

An efficient alternative to the above Riemann sums are quadrature rules (also called cuba-ture rules in 3D) which are best suited for integrating polynomial functions The idea is toapproximate the integral by a weighted sum over integration points (as shown in the schematicabove on the right) ie we define

I[u] = int1

minus1f(ξ) dξ asymp

nQPminus1

sumi=0

Wi f(ξi) (168)

The challenge now is to choose the number of integration points nQP as well as the weightsW0 WnQPminus1 and locations ξ0 ξnQPminus1 of all each integration point That choiceshould depend on the function to be integrated (more specifically on its smoothness one caneasily imagine that smooth polynomials require few integration points while strongly fluctuat-ing functions require larger numbers of integration points) For the FE context most functionsof interest will be of polynomial type since our shape functions are commonly defined as poly-nomials

We say a quadrature rule is exact of order q if it integrates exactly all polynomial functionsg isin Pq([minus11]) Gauss quadrature generally chooses nQP quadrature points and associatedweights such that the quadrature rule is exact of order q = 2nQP minus 1 Let us find the optimalweights and integration points for Gaussian quadrature

86

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1621 Gauss-Legendre quadrature

Gauss-Legendre quadrature selects the nodes and weights such that the first 2nQP mo-ments micro are computed exactly In other words we find the weights and locations by requiringthat

microk = int1

minus1ξkdξ

=nQPminus1

sumi=0

Wi ξki k = 01 2nQP minus 1 (169)

These are 2nQP equations for the 2nQP free parameters (Wi ξi) for i = 0 nQP minus 1 Theequations are generally nonlinear and thus hard to solve analytically Yet we can find solutionsfor the lowest few orders in 1D as follows

a single quadrature point ie nQP = 1 approximates the integral by evaluating the func-tion only at a single location ξ0 isin [minus11]The two equations for the two unknowns (the weight W0 and location ξ0) are obtainedfrom requiring the any constant function f(ξ) = ξ0 and any linear function f(ξ) = ξ1must be integrated exactly This implies that

int1

minus1ξ0 dξ = 2

=W0 ξ00 =W0 and int

1

minus1ξ1 dξ = 0

=W0 ξ10 =W0ξ0 (1610)

From these two equations the first-order quadrature rule follows with

W0 = 2 ξ0 = 0 (1611)

That is only a single quadrature point at location ξ0 = 0 is required to integrate any linearfunction exactly Hence since linear functions are integrated exactly this quadrature ruleis exact to order q = 1

two quadrature points ie nQP = 2 require the calculation of the two weights and asso-ciated quadrature point locations

In close analogy to the above case we now have four unknowns (two weights W0 andW1 and two integration point locations ξ0 and ξ1) and construct the four equations tosolve for those by requiring that any constant linear quadratic or cubic function mustbe integrated exactly

int1

minus1ξ0 dξ = 2

=W0 +W1 int1

minus1ξ1 dξ = 0

=W0 ξ0 +W1 ξ1

int1

minus1ξ2 dξ = 2

3

=W0 ξ20 +W1 ξ

21 int

1

minus1ξ3 dξ = 0

=W0 ξ30 +W1 ξ

31

(1612)

While this is a nonlinear system of equations a simple solution can be found by assumingsymmetric quadrature points with respect to the origin ie ξ0 = minusξ1 In this case wemay conclude that

W0 =W1 = 1 ξ0 = minus1radic3 ξ1 =

1radic3 (1613)

Since this quadrature rule integrates cubic polynomials exactly it is exact to order q = 3

higher-order quadrature rules

Quadrature weights and points for arbitrary orders can be obtained in analogous fashionand most importantly can be found in numerous look-up tables (cf the classical FEMtextbooks) A more systematic way to compute Gauss-Legendre quadrature weights andpoints is given in Appendix I

87

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1622 Other Gauss quadrature rules

Note that for general functions f (which are not necessarily of polynomial type) one cansometimes find a decomposition f(ξ) = w(ξ)g(ξ) where w(sdot) is a known weighting function andg(ξ) is (approxiately) polynomial so that a more suitable quadrature rule may be found via

I[u] = int1

minus1f(ξ)dξ = int

1

minus1w(ξ) g(ξ)dξ asymp

nQPminus1

sumi=0

w(ξi) g(ξi) (1614)

Examples of such Gaussian quadrature rules include those of Gauss-Chebyshew type whichare obtained form a weighting function w(ξ) = (1 minus ξ2)minus12 and the quadrature points are theroots of Chebyshew polynomials Gauss-Hermite quadrature uses a weighting function w(ξ) =exp(minusξ2) (and the integral is taken over the entire real axis) Gauss-Legendre quadrature isincluded 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 degree2nQP minus 3 viz

I[u] = int1

minus1f(ξ) dξ asymp 2

nQP (nQP minus 1)[f(minus1) + f(1)] +

nQPminus1

sumi=2

Wi f(ξi) (1615)

163 Higher dimensions

Like the polynomial shape functions the above quadrature rules can easily be extended to 2Dand 3D eg

int1

minus1int

1

minus1f(ξ η)dξ dη = int

1

minus1[Nminus1

sumi=0

Wi f(ξi η)] dη =Nminus1

sumj=0

Wj [Nminus1

sumi=0

Wi f(ξi ηj)]

=nQPminus1

sumk=0

W lowastk f(ξk)

(1616)

with the combined weights W lowastk = WiWj and points ξk = (ξi ηj) obtained from the individual

quadrature rules in each direction By symmetry we choose N = radicnQP so that N2 = nQP

For example consider the Q4 element By using the 1D Gauss-Legendre weights and pointswe now have

first-order quadrature (q = 1) as in 1D has only a single quadrature point (nQP = 1)

W0 = 22 = 4 and (ξ0 η0) = (00) (1617)

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

third-order quadrature (q = 3) now has four quadrature points in 2D (nQP = 22 = 4)

W0 =W1 =W2 =W3 = 1 and (ξi ηi) = (plusmn 1radic3 plusmn 1radic

3) (1618)

Bicubic polynomial functions (at most cubic in ξ and η) are integrated exactly

88

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly in 3D the brick element may use Gauss-Legendre quadrature resulting in thefollowing schemes

first-order quadrature (q = 1) still has a single quadrature point (nQP = 1)

W0 = 23 = 8 and (ξ0 η0 ζ0) = (000) (1619)

third-order quadrature (q = 3) now has eight quadrature points (nQP = 23 = 8)

Wi = 1 and (ξi ηi ζi) = (plusmn 1radic3 plusmn 1radic

3 plusmn 1radic

3) (1620)

higher-order schemes follow analogously

Shown below are schematics of the quadrature point locations for Gauss-Legendre quadratureof orders q = 1 and q = 3 in both 1D and 2D

xx0

f(x )0

-1 +1

q = 1 in 1D

xx0

f(x )0

-1 +1x

x0

f(x )0

-1 +1x1

f(x )1

x

h

-1

-1

+1

+1

x0x1

x2x3

q = 3 in 1D

x

h

-1

-1

+1

+1

x0

q = 1 in 2D q = 3 in 2D

Ultimately the choice of a specific quadrature rule in any dimension depends on the functionf(ξ) to be integrated If the latter is of polynomial type then we may choose a Gaussianquadrature rule that leads to exact integration Else we may choose a quadrature rule basedon the smoothness of the function (Appendix J shows that the error introduced by a numericalquadrature rule strongly depends on the smoothness of function f) In general the choice of aquadrature rule is often a compromise between accuracy and efficiency

89

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

17 FEM which quadrature rule to use

171 Integrals in the FE context

The key integrals to be evaluated numerically within the FE context are (eg for a 2D quadri-lateral element with out-of-plane element thickness t) the element energy

Ie = intΩeW (εh)dV = int

1

minus1int

1

minus1W (εh(ξ))J(ξ)tedξdη asymp

nQPminus1

sumk=0

WkW (εh(ξk))J(ξk)te

as well as the nodal force vectors

F aintei = intΩeσij(εh)Na

j dV = int1

minus1int

1

minus1σij(εh(ξ))Na

j(ξ)J(ξ)tedξdη

asympnQPminus1

sumk=0

Wk σij(εh(ξk))Naj(ξk)J(ξk)te

(171)

Fruther we compute the element tangent matrix as

(Te)abik = intΩe

Cijkl(εh(ξk))NajN

bldV = int

1

minus1int

1

minus1Cijkl(εh(ξk))Na

j(ξ)N bl(ξ)J(ξ)tedξ dη

asympnQPminus1

sumk=0

WkCijkl(εh(ξk))Naj(ξk)N b

l(ξk)J(ξk)te(172)

Recall that in those relations the shape function derivatives and the strains are computed asrespectively

nablaxNa = Jminus1nablaξNa and εhij(ξ) =1

2suma

(uaeiNaej(ξ) + uaejNa

ei(ξ)) (173)

Of course the above can also be reformulate in terms of the B-matrix For example for a linearelastic element in 2D we have seen that

Te =Ke = intΩeB(ξ)TEB(ξ)dV asymp

nQPminus1

sumk=0

WkBT(ξk)EB(ξk)J(ξk)te (174)

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

172 Which quadrature rule to use

In all of the above integrals the required quadrature rule depends on the smoothness (orpolynomial order) of the integrands Since stresses shape function derivatives Jacobians andB-matrices are not necessarily smooth polynomials one often cannot (or due to computationalexpenses is not willing to) achieve exact integration for each element For example for the Q4element we have seen that J is linear in ξ hence Γ = Jminus1 is a fractional polynomial and Binvolves both Γ and nablaξNa

e As a consequence BTEB is some fractional polynomial that ishard to integrate exactly in general Therefore we introduce a minimum requirement forthe 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 anglesare preserved or in other words if J = const

90

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 171 Full integration for various element types

Let us determine full integration for the element types discussed before

The 4-node bilinear quadrilateral (Q4) is undistorted if the physical element has theshape of a rectangle (side lengths a and b) so that

J = ab4= const (175)

Then for a linear elastic Q4 element we have

F aintei = int1

minus1int

1

minus1Cijkl εhkl(ξ)N

aj(ξ)

ab

4tedξ dη = abte

4Cijkl int

1

minus1int

1

minus1εhkl(ξ)N

aj(ξ)dξ dη

(176)

where εh = sym(nablaxuh) is at most linear (since the interpolation of uh is bilinear) nablaxNa

is also at most linear for the same reason Overall the integrand is at most a quadraticpolynomial so that we need integration order q ge 2 Recall that in 1D we showed thatq = 2nQP minus 1 so that full integration of the Q4 element in 2D requires nQP = 2 times 2 = 4quadrature points

Full integration of the quadratic 2D elements Q8Q9 requires nQP = 32 = 9 quadraturepoints (the derivation is analogous to the above and is therefore omitted here)

Full integration of the 8-node brick element requires nQP = 8 quadrature points

For simplicial elements we showed that strains and stresses are constant across anelement so that a single quadrature point (nQP = 1) at an arbitrary location inside theelement is sufficient to integrate exactly Usually one chooses the element center whichgives

W0 = 1 ξ0 = η0 =1

3(in 2D) and ξ0 = η0 = ζ0 =

1

4(in 3D) (177)

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 simplicialquadrature rules (instead of Gaussian quadrature rules) whose weights and quadraturepoint locations can be found in look-up tables

mdashmdashmdashmdash

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 elementtangent matrix we make the same observation (ie those are integrated exactly as well) Forexample the energy reads

Ie = intΩeW dV = abte

4

1

2Cijkl int

1

minus1int

1

minus1εhij(ξ)εhkl(ξ)dξ dη

(Te)abij =abte

4Cijkl int

1

minus1int

1

minus1Naj(ξ)N b

l(ξ)dξ dη

(178)

where both Naj(ξ) and N b

l(ξ) are linear in ξ so that the resulting integrand is a quadraticpolynomial for the Q4 element in analogy to the above discussion of the nodal forces

Using an integration rule less than full integration is called under-integration or reducedintegration the opposite is called over-integration Which integration order to use dependsvery much on the element type the material model etc Sometimes under-integration can evenbe beneficial (eg to avoid locking) we will discuss one such example in Section 18

91

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

18 Element defects shear locking and hourglassing

The bilinear Q4 element is a classical example for an element type which displays a so-called element defect ie a spurious numerical artifact when using full integration in certainscenarios ndash specifically when used to simulate beam bending To demonstrate this we considera rectangular element having side lengths a and b in the x1- and x2-directions If bendingmoments M are applied to the two vertical edges then the element is expected to undergo purebending

In an actual (slender) Euler-Bernoulli beam we know from elastic beam theory that the stressesin the beam vary linearly across the thickness and that the only non-zero stress component isthe axial stress Therefore we may write (for an element of size a times b as shown below)

σ11 = minusx2

b2σmax σ22 = σ12 = 0 (181)

where σmax is the maximum tensile stress reached on the surface of the beam (at x2 = plusmnb2)From Hookersquos law in 1D we obtain

ε11 = minusσ11

E= minusx2σmax

Eb2 ε22 = minusν

σ11

E= ν x2σmax

Eb2 ε12 = 0 (182)

Let us try to find this solution using a single Q4 element To this end we apply horizontalforces to all four nodes of the element obtained from lumping the distributed beam stresses tothe nodes according to relation (815) found for the externally applied forces

Fext1 = intpartΩe

σ11N1e dS = minusint

1

minus1(minus x2

b2σmax)N1

e (ξ = minus1 η) t b2

= int1

minus1η σmax

(1 minus (minus1))(1 minus η)4

tb

2dη = minusσmaxtb

6= minusF with F = σmaxtb

6

(183)

(Note the minus stems from the negative cut so the traction at the left edge of the elementresponsible for the forces is in fact minusσ11) Analogously one obtains

Fext2 = F Fext3 = minusF Fext4 = F (184)

That is the bottom edge is stretched while the top edge is compressed (as in beam bending)

a

x1

x2

b MyMy

a

x1

x2

smax

smaxsmax

smax

x

hF

F

F

F

x

hU

U

U

U

beam loaded in bending stress distribution due tothe applied moments

Q4 element with equivalent nodal forces

elastic Q4 element deformedby the nodal forces

1 2

3 4

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 outhere for brevity but assume the exact stiffness matrix)

KeUhe = Fext =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusF0F0minusF0F0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

rArr Uhe =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

minusU0U0minusU0U0

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

with U = aσmax

E

(1 + ν)(1 minus 2ν)2(1 minus ν) + (ab)2(1 minus 2ν)

92

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(185)

where we evaluated the element forces and stiffness matrix exactly (since the element is undis-torted we can easily reach full integration with 2 times 2 quadrature points)

The resulting strains within the element are evaluated as

εh11 = minusU

aη εh22 = 0 εh12 = minus

U

bξ (186)

While the axial strain component εh11 is physically reasonable (and the lack of a transverse shearεh22 ndash worst case ndash makes the element too soft against bending) the presence of a non-zero shearstress εh12 is problematic This so-called parasitic shear is not physical but a numerical artifact(elastic Euler beams produce no shear stresses cf (182)) This parasitic shear contributes tothe energy of the element so that ndash when minimizing the potential energy in a boundaryvalue problem ndash this shear component introduces artificial stiffness This becomes apparentwhen calculating eg the angle of bending θ of the beam in the above problem Comparingthe exact one (obtained form beam theory) to the approximate one (obtained from the aboveconstruction) one finds

θapprox

θexact=

1 minus ν2

1 +1 minus ν

2(a

b)

2 (187)

Notice that as the Q4 element becomes more and more slender (ab rarr infin) the numericallyobtained angle approaches 0 That is the element shows what is known as locking or morespecifically shear locking in case of long and slender elements (ab≫ 1) the high shear strainand associated elastic energy prevents the element from deformting it ldquolocksrdquo

MyMy

FF

F F

qapprox qexact

Next let us use numerical quadrature to evaluate the element quantities of interest For exam-ple for the energy we have

Ie = intΩe

1

2εh sdotCεhdV asymp t

2

nQPminus1

sumk=0

Wk εh(ξk) sdotCεh(ξk)J(ξk) (188)

We showed before that full integration requires nQP = 2 times 2 quadrature points (and we havedemonstrated above that exact integration leads to element locking under bending)

If instead we use reduced integration with only a single quadrature point (nQP = 1) locatedat ξ0 = 0 then notice that the strain fields in (186) vanish at the quadrature point locationξ = η = 0 Therefore the strains in this case produce no energy In other words any strain fieldof the form (186) can appear without causing any energy and therefore also without causingany resistance from the element in terms of nodal forces This is a zero-energy mode ofthe under-integrated Q4 element and a serious defect The resulting deformation of elements

93

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

undergoing alternating strains (186) is a numerical artifact and often referred to as hourglassmode or chicken-wire mode because of its appearance

Note that note only the underintegrated Q4 element has such a zero-energy mode For examplethe Q8Q9 elements have a similar zero-energy mode with curved element edges

+ + + +

+ + + +

+ + + +

++

++

underintegrated Q4 mesh showing hourglassing zero-energy mode of anunderintegrated Q8 element

simulation example with hourglassing

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 a2times 2 quadrature rule for the nominal strains εh11 and εh22 while using reduced integration with asingle quadrature point at ξk = 0 for the shear strain εh12 removes the spurious shear contributionwhile 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 deformationmodes) and should hence be used with caution

Overall take-home messages are (i) to not use Q4 elements to simulate beam bending (andinstead chose another type of element) and (ii) to be careful with reduced integration as zero-energy modes can appear as spurious deformation modes in the obtained solution

94

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

19 Assembly

Irrespective of the particular finite element type that is being used to solve a boundary valueproblem its solution requires the assembly of global vectors and matrices Specifically recallthat shape functions associated with a node a are non-zero only in elements adjacent to nodea in the FE context When computing eg the total energy E of a body (not accounting forexternal work) discretized into ne non-overlapping elements we may exploit that

E = intΩW (εh)dV =

ne

sume=1int

ΩeW (εh)dV =

ne

sume=1

Ie (191)

ie the total energy is the sum over all element energies When computing the global forcevectors and incremental stiffness matrices the situation is more complex which is why onecommonly introduces an assembly operator A such that

Fint =neAe=1Finte T =

neAe=1Te (192)

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 andglobal node numbering (and it is the reason elements must have ldquoknowledgerdquo of their node IDs)

Similarly the inverse operator extracts local element quantities from the global vector

Ue = Ae

minus1(U) (193)

For practical purposes it is helpful to recall that entry Uai (where a = 1 n is the node numberand i = 1 d refers to the coordinate) is located at position (a minus 1) sdot d + i in the assembledglobal vector Uh (using MATLAB notation with 1-indexed lists) For example consider a 2Dproblem using 2-node bar elements If an element connecting nodes 1 and 3 computes the nodalforce vectors F 1

inte and F 3inte then those are to be added onto the global force vector as

Fint =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+ F 1inte1

+ F 1inte2

sdotsdot

+ F 3inte1

+ F 3inte2

sdotsdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(194)

Analogously if the element connecting nodes 1 and 3 computes a stiffness matrix K13e then its

components must be added onto the global tangent stiffness matrix as

T =

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎜⎜⎝

+K1311 +K13

12 sdot sdot +K1313 +K13

14 sdot sdotK13

21 +K1322 sdot sdot +K13

23 +K1324 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdotsdot sdot sdot sdot sdot sdot sdot sdot

K1331 +K13

32 sdot sdot +K1333 +K13

34 sdot sdotK13

41 +K1342 sdot sdot +K13

43 +K1344 sdot sdot

sdot sdot sdot sdot sdot sdot sdot sdot

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎟⎟⎠

(195)

Note that because nodes have non-zero FE shape functions only in adjacent elements the abovematrix is generally sparse (which comes with significant computational advantages)

95

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

20 Iterative solvers

The solution of linear elastic problems is easily found by solving a linear system of equations vizKU = Fext so that U = Kminus1Fext (assuming that rigid-body modes have been suppressed) Incase of nonlinear problems ndash such as those arising from more complex material models and fromthe geometric nonlinearity stemming from large deformations ndash an iterative solution method isrequired to solve the generally nonlinear system Fint(U) = Fext(U) (the external forces may ormay not depend on the deformation) Here we discuss a few common examples of such iterativesolvers the most important one being Newton-Raphson iteration

The problem to be solved can be written in the general form

f(U) = Fint(U) minusFext(U) = 0 (201)

where in many cases we assume that Fext is independent of U This however is not generallytrue ndash consider eg nodes attached to elastic springs so the nodal force depends on the positionof the node or a so-called follower force whose direction depends on the bodyrsquos deformation

All iterative solvers start with an initial guess U0 (eg U0 = 0) which is then corrected to find

Un+1 = Un +∆Un (202)

repeatedly until convergence is achieved An iterative scheme converges8 if ∆Un rarr 0 as nrarrinfinor equivalently f(Un) rarr 0 as n rarrinfin The various solution methods discussed in the followingdiffer primarily in the way ∆Un is computed based on a given vector Un

201 Netwon-Raphson (NR) method

The Newton-Raphson method (introduced by Newton in 1669 and generalized by Raphsonin 1690) is the most common technique for solving nonlinear systems of the above type Itstarts with a Taylor expansion assuming a small correction ∆Un

0 = f(Un+1) = f(Un +∆Un)

= f(Un) +partf

partU(Un)∆Un +O (∣∆Un∣2)

(203)

If we neglect higher-order terms then the above can be solved for the increment

∆Un = minus [T (Un)]minus1 f(Un) where T (Un) =partf

partU(Un) (204)

is the tangent matrix Note that we have thus broken the nonlinear problem (which is hardto solve) into many incremental linear problems (that are easy to solve)

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

T abik (Uhn ) =

partF aipartubk

(Un) =part

partubk(int

ΩσijN

aj dV minus F aexti)

= intΩ

partσij

partεhklN blN

aj dV minus

partF aexti

partubk

= intΩCijklNa

jNbldV minus

partF aexti

partubk

(205)

8The fact that an iterative solver converges does not necessarily imply that it converges to the correct equi-librium solution For the special case of linear elasticity indeed unique solution exists

96

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

We note that in general C = C(ε) ie for nonlinear problems the incremental tangent dependson the current state of deformation and hence on the nodal displacements U Only for thespecial case of linear elasticity is C a constant tensor containing the elastic moduli and beingindependent of deformation As shown before we can also write for each element e

Te(U) = intΩeBTCBdV (206)

where C is again the incremental stiffness matrix of the material model In the special caseof linear elasticity we saw that C = E = const and Te = intΩe

BTEB dV = Ke is the constantelement stiffness matrix

The Newton-Raphson solver requires that detT ne 0 in order to find a soltion which is guaranteedin linear elasticity if no rigid body mode exists as discussed in Section 214 (ie the linearizedsystem has no zero-energy mode so that U sdot T U ne 0 for all admissible U ne 0)

For linear elastic problems with constant external forces the Newton-Raphson solver convergesin only a single step since Fint =KU and therefore T =K = const so that

Un+1 = Un +∆Un = Un minus T minus1 [Fint minusFext]= Un minusKminus1 [KUn minusFext]= Un minusUn +Kminus1Fext

=Kminus1Fext

(207)

Let us close by mentioning the (dis)advantages of the Newton-Raphson scheme On thedownside the Newton-Raphson method requires the tangent matrix which may be expensiveto compute it may not always be available analytically and it may require significant com-puter memory (based on the matrix size for a mesh having n nodes in d dimensions we haveT isin Rndtimesnd) In addition the tangent matrix in nonlinear problems is not guaranteed to beinvertible this is particularly problematic in case of problems involving mechanical instabilityOn the plus side the Newton-Raphson method generally displays quadratic convergencewhile iterating which is why it is favorable for the solution of nonlinear problems (and it alsosolves linear problems in one step as shown above) If Newton-Raphson is not a viable optionthen the following techniques offer alternatives

202 Damped Newton-Raphson (dNR) method

A slight modification of the Newton-Raphson method the damped Newton-Raphson methodis beneficial eg when the NR method tends to overshoot (eg in case of oscillatory energylandscapes or multiple minima such as in large-strain elasticity)

The iterative scheme is identical to the classical NR method described above except that

Un+1 = Un + α∆Un with α isin (01) (208)

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

203 Quasi-Newton (QN) method

The Quasi-Newton method is the same as the classical NR method with the exception thatone does not use the actual tangent matrix T for computational simplicity or efficiency Its goal

97

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

is hence to avoid the expensive computation of T (U) and its inversion at each iteration stepTo this end one introduces a matrix Bn and updates its inverse directly

The general algorithm is as follows

(1) start with an initial guess U0 and matrix B0 = T (U0)(2) compute ∆Un = minusBminus1

n f(Un) and Un+1 = Un +∆Un and

Bminus1n+1 =Bminus1

n minus(Bminus1

n zn minus∆Un)otimes∆UnBminus1n

∆Un sdotBminus1n zn

with zn = f(Un+1)minus f(Un) (209)

We omit the full derivation of the update for Bminus1n+1 here for brevity The idea is that Bminus1

n+1 andBminus1n are approximately rank-one-connected using the Sherman-Morrison formula The added

benefit is that not only does T not have to be recomputed exactly but also can the inversion orlinear solver be skipped since the updated inverse is computed explicitly

204 Line search method

The line search method can be used as an improvement for other nonlinear iterative solversSimilar to the damped Newton-Raphson scheme updates are made according to

Un+1 = Un + β∆Un (2010)

where unlike in Section 202 β is not a constant but chosen such that f(Un+1) = 0 Forexample we may find β from solving

∆Un sdot f(Un + β∆Un) = 0 (2011)

This is generally a nonlinear but scalar problem to be solved for β isin R which can be solved bybisection regula falsi secant and other methods

Notice that (2011) is in fact the stationarity condition of the minimization problem

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

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

205 Nonlinear Least Squares

The family of methods based on nonlinear least squares aim to minimize

r(U) = ∥f(U)∥2 = f(U) sdot f(U) (2013)

which results in the stationarity condition

partr

partU(U) = 0 (2014)

This approach is helpful eg in case of over-constrained systems since the formulation ofthe residual r does not require as many equations as U has unknowns Application of theNewton-Raphson technique to this nonlinear system of stationarity equations leads to

∆U = minus [ part

partU

partr

partU]minus1

Un

partr

partU(Un)

= minus [TT(Un)partf

partU(Un)f(Un) +

partTT

partU(Un)f(Un)]

minus1

TT(Un)f(Un)(2015)

98

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

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

∆U = minus [TT(Un)T (Un)]minus1TT(Un)f(Un) (2016)

This latetr form is known as the Gauss-Newton method Note that this reduces to Newton-Raphson for standard problems (ie those with as many equations as unknowns) HoweverGauss-Newton can also be applied to overdetermined systems (ie more equations than un-knowns)

206 Gradient flow method

Although not necessarily with a proper physical meaning the gradient flow method (alsoknown as gradient descent) has become popular as an iterative solver for quasistatic problems

The idea is to replace the equation

0 = f(Un+1) (2017)

by a dynamic evolution equation

CUn+12 = minusf(Un) and Un+1 = Un +∆t Un+12 (2018)

with eg C = cI with c gt 0 It is obvious that as f rarr 0 we have Un+12 rarr 0 and thus themethod converges Although there is no guarantee to reach an extremum the method is popularbecause it does not require a tangent matrix and is quite robust

For example using a simple backward-Euler discretization for the time derivative and C = cIwe obtain

Un+1 = Un minus1

cf(Un) (2019)

207 Conjugate Gradient (CG) method

The conjugate gradient method follows the idea of iterating into the direction of steepestdescent in order to minimize the total potential energy (as a variation it can also be applied tothe nonlinear least squares problem)

Here the update is

Un+1 = Un + αnSn (2020)

where both the direction Sn and increment αn are determined in an optimal way as follows

The conjugate direction is updated according to

Sn = minusf(Un) + βnSnminus1 (2021)

with β computed from the current solution Un and the previous solution Un according to one ofseveral options (Polak-Ribiere Fletcher-Reeves etc) Then the scalar increment αn is obtainedfrom a line search to find

αn = arg min r (Un + αSn) (2022)

A benefit of the conjugate gradient technique is that as for gradient flow no tangent matrixis required A variation of this scheme originally developed for atomistics but also applicableto the FE method (and oftentimes converging faster than CG) is the so-called Fast InertialRelaxation Engine (FIRE)

99

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

21 Boundary conditions

We recall that the solving a mechanical boundary value problem by the finite element methodreduces to solving the global system of equations given by

Fint(U) = Fext(U) (211)

for the vector of all nodal dofs U If the material is linear elastic then Fint(U) = KU andsystem (211) is linear In general (ie for anything but linear elastic behavior) the system ofequations in (211) is nonlinear In Section 20 we discussed solution strategies for the abovesystem of equations but we still need to turn our attention to boundary conditions which hehave not discussed in detail so far This includes both Neumann boundary conditions (leadingto the specific form of Fext(U)) and Dirichlet boundary conditions (imposing restraints on thedegrees of freedom) These will be discussed in the following

211 Neumann boundary conditions

The right-hand side vector Fext in (211) includes the combined effects of externally appliedbody forces ρb and surface tractions t in general Of course if forces are applied only to FEnodes 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 nodalforces first

In Section 8 we derived the components of the external force vector as

F aexti = intΩρbiN

adV + intpartΩtiN

adS =sume

(intΩeρbiN

adV + intpartΩe

tiNadS) (212)

These integrals can be computed in the same fashion as all FE quantities (such as eg nodalforces and stiffness matrices) and it is convenient to use numerical quadrature to approximatethe above integrals in general For example for a 2D quadrilateral element (such as the Q4 Q8or Q9) we may write the contribution from element e to nodal force component F aexti due tobody forces as

F aextei = intΩeρbiN

adV = int1

minus1int

1

minus1ρbi(ξ)Na

e (ξ)J(ξ)tdξ dη asympnQPminus1

sumk=0

Wk ρbi(ξk)Nae (ξk) tJ(ξk)

(213)

Analogously surface tractions result in an external force on node a in direction i again for a2D isoparametric element e given by

F aextei = intpartΩe

tiNadS = int

1

minus1ti(ζ)Na

e (ζ)Jζ(ζ)tdζ asympnQPminus1

sumk=0

Wk ti(ζk)Nae (ζk) tJ(ζk) (214)

Note that the surface traction term integrates over the boundary of the element (ζ stands foreither ξ or η depending on the orientation of the surface on which the tractions are acting) soin d dimensions we can use a quadrature rule for d minus 1 dimensions (eg for a 2D element weuse 1D quadrature rule on an element edge)

Like for internal forces the global external force vector Fext results from assembling all elementcontributions ie from adding the contributions of all external element force vectors onto theglobal external force vector (see Section 19)

100

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

When using a variational formulation we may interpret external forces also in a variationalsense Specifically we can formulate the work done by the external force on element e as

Wexte = intΩeρb sdotu dV + int

partΩet sdotu dS (215)

The resulting force vector F aexte = partWextepartua acting on node a is given by the sum of (213)

and (214) We note that if t and ρb are independent of the nodal displacements ie Fext isindependent of U then the right-hand side of the system of equations to be solved is constantOtherwise Fint(U) minus Fext(U) = 0 is to be solved where the external forces also depend ondisplacements

Several examples of typical external forces in the FEM context are given below

P

PMy

k

n

au

Dx au

ll0

constant forceconstant moment

linear spring(linearized deform)

linear spring(nonlinear deform)

pressure loading(Q4 elements)

p

p

n2

n1

L1

L2

pL 22

pL 22

pL 21

pL 21

Before we dive into specific examples we point out one important aspect with regards to theimplementation and assembly of the overall problem So far we have primarily consideredproblems with context external forces so that we had to solve Fint(U) = Fext When theexternal forces also depend on the nodal unknowns (as eg in Examples 213 and 213 below)then the problem to be solved is in fact

f(U) = Fint(U) minusFext(U) = 0 (216)

Here we can still establish a variational structure exploiting that

I(U) = E(U)minusW (U)rarrminU

with E(U) = Anee=1Ie(Ue) W (U) = Anee=1Wexte(Ue)

(217)

so that

f(U) = partI

partU(U) = partE

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFint

minus partWpartU

(U)acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraFext

= Fint(U) minusFext(U) (218)

Here iterative solvers (discussed in Secion 20) need the complete tangent matrix (includingboth those contributions from internal and external forces) so that

T (U) = partf

partU(U) = partFint

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraTint from before

minus partFext

partU(U)

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraText∶ new contribution

= Tint(U) minus Text(U) (219)

Therefore when discussing the specific examples in the following we will define the work done bythe external force Wext along with the resulting external nodal forces F a

ext and the associatedexternal stiffness matrix contribution Text as introduced above When assembling the globalsystem both contributions ndash from internal and external forces ndash must be considered

101

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 211 Constant force

Consider a constant force P applied to a particular node b whose position is displacing with ubThe work done by this external force vector is

Wext = P sdotub (2110)

Therefore the resulting external force vector on any node a is

F aext =

partWext

partua= P δab (2111)

ie the constnat external force P is applied only to node b We note that the associated stiffnessmatrix (which would be needed for iterative solution schemes) vanishes since

T abext =partF a

ext

partub= 0 (2112)

Finally we note that the analogous formulation holds for applying a constant external bendingmoment My in case of beam elements with rotational dofs eg to node b in 2D

Wext =Myθb rArr Ma

ext =partWext

partθa=Myδab (2113)

mdashmdashmdashmdash

Example 212 Linear spring undergoing small deformations

Consider a linear elastic spring (stiffness k) attached to a node a along the n-direction (withunit vector ∣n∣ = 1 pointing in the direction of stretching the spring) which undergoes onlysmall deformations so that linearized kinematics can be used (the change of length ∆x of thespring is given by the projection of the displacement ua onto n) In this case the spring energyas a function of the displacement ua is

Espring =k

2∆x2 = k

2(ua sdotn)2 (2114)

To compute the nodal force vectors we need to be careful since Espring is the spring energyand not the work Wext performed by the spring Therefore one would add Espring to thepotential energy functional instead of substracting it as external work Recalling concepts fromundergraduate dynamics we know that the work done by the spring on the body must equalthe potential difference so Wext = Espring0 minus Espring where Espring0 = 0 in our case since thespring is initially unstretched Hence we have Wext = minusEspring The resulting force vector onnode a (all other nodal forces being zero) thus follows as

F aext =

partWext

partua= minus

partEspring

partua= minusk(ua sdotn)n (2115)

where the minus sign enters due to the use of E instead of Wext (and it makes sense physicallyif node a is displaced along the positive n direction the spring is stretched and hence the forceon node a must be acting in the opposite direction since the spring is pulling node a back)

The spring is an example where the external force vector does indeed depend on the nodaldisplacement ua The associated tangent stiffness matrix has the only non-zero component(sub)matrix T aaext and in general

T abext =partF a

ext

partub= minusknotimesn δab = const (2116)

mdashmdashmdashmdash

102

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Example 213 Linear spring undergoing large deformations

For comparison if the linear elastic spring from the previous example undergoes large defor-mations then the elastic energy in the spring ndash accounting for the nonlinear exact change inlength of the spring ndash is

E = k2( ∣xa +ua minusx0∣ minus ∣xa minusx0∣ )

2

(2117)

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 ie its anchor point and xa + ua with displacement ua is thedeformed position of node a (so that xa minus x0 is the undeformed spring length) External forcevector and stiffness matrix follow as before by differentiation

mdashmdashmdashmdash

Example 214 Pressure in linearized kinematics

A uniform pressure p is a common boundary condition in engineering applications (from pressurevessels to structures under snow loads etc) In this case the pressure p acting on a surface partΩwithin linearized kinematics results in tractions t = minuspn where n is the outward surface normal(with ∣n∣ = 1) Such a boundary condition is realized rather easily via (214) Specifically for asingle element surface partΩe with outward normal n the work done by a uniform pressure p is

Wexte = intpartΩe

t sdotuhdS = intpartΩe

(minusp)n sdotn

suma=1

uaeNae dS = minusp

n

suma=1

uae sdot intpartΩe

nNae dS (2118)

and the external force contribution from element e (associated with node a) follows as

F aexte =

partWexte

partuae= minuspint

partΩenNa

e dS (2119)

For example for a (bi-)linear element in 2D (such as the CST and Q4 elements) element edgesare straight so that the normal n is constant along each element edge Further assume thatpressure p acts only on one edge partΩprime

e of length Le (and an out-of-plane thickness t) In thisspecial case the above simplifies to

F aext = minuspint

partΩprimee

nNae dS = minuspn

2intpartΩprime

e

Nae dS = minuspLet

2n (2120)

where we exploited that the shape function Na (varying linearly between 0 and 1 on the edgeif a is a node on the edge) integrates to 12 The total external force on node a due to pressureagain follows from summing over all element contributions so

F aext = sum

eisinNa

pLet

2(minusne) (2121)

where we need to sum over all elements adjacent to node a (here denoted by the set Na)pLet2 is nothing but the magnitude of the resultant force due to the uniform pressure p overthe element edge of length Le which is evenly distributed to the two nodes on that edge Notethat each edge has its own surface normal ne so that the above implies the net effect summedover all adjacent elements to node a One such example is shown in the rightmost graphicabove

We close by noting that the external forces are constant only because of the assumption ofsmall deformations If we considered large deformations then the force on the element edge

103

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

would change with deformation (as the surface area increases due to deformation so doesthe resultant force due to a uniform pressure) Therefore the finite-deformation scenario isconsiderably more complex and the work done by a constant external pressure acting on abody of deformed volume v = v(U) is Wext = pv

mdashmdashmdashmdash

Example 215 Linearly and quadratically varying surface tractions

In case of a linearly varying surface traction t(x) acting on the edge of an element e thecorresponding nodal forces can be obtained form the above equations Assume eg a (bi-)linear element in 2D (such as the CST or Q4) with straight edges for which a linearly varyingpressure p(x) (which varies between pa and pb see below) applied to an edge of length Le (andout-of-plane thickness t) translates into the two nodal forces

(Faexte

F bexte) = Let

6(2 1

1 2)(p

a

pb) (2122)

Similarly having a quadratically varying pressure p(x) applied to the edge of a (bi-)quadraticelement (such as the LST Q8 Q9) leads to the equivalent nodal forces

⎛⎜⎝

F aexte

F bexte

F cexte

⎞⎟⎠= Let

30

⎛⎜⎝

4 2 minus12 16 2minus1 2 4

⎞⎟⎠

⎛⎜⎝

pa

pb

pc

⎞⎟⎠ (2123)

We note that of course one can also apply higher-order tractions to lower-order elements (ega quadratically varying load to a linearly interpolated edge) In this case however the workdone Wext is approximated by the FE discretization In the above two examples (which areshown schematically below) the equivalence is exact

pa

Le Le

a F

pb

a

bb F

pa

LeLe

a F

pc

a

bb F

c

pb

c F

linearly varying pressureon a linear element edge

quadratically varying pressureon a quadratic element edge

For more complex element types or more complex loading integration over the element edgeor surface can again be carried out using numerical quadrature on the element boundary (eachelement boundary normal ne is computed from the nodal locations) Again forces and stiffnessmatrix follow by differentiation (forces are constant and the stiffness matrix vanishes)

104

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

212 Dirichlet boundary conditions

Essential boundary conditions of the type uai = uai must be imposed onto the system of equationsFint(U) = Fext This is usually accomplished computationally in one of the two ways discussedin the following9 We here limit our discussion to linear elastic examples we will later reconsiderthe procedure for nonlinear systems when discussing iterative solvers in Section 213

2121 Substitution

Brute-force substitution is a simple method (which we already used in in Exercise 4) wereplace the respective equation for uai in the system KU = Fext by uai = uai eg if we wantu3 = u3 (using an example with only a single dof per node) then we replace the correspondingequation (ie the entries in the stiffness matrix and external force vector) resulting in

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 sdot sdotsdot sdot sdot sdot sdot0 0 1 0 0sdot sdot sdot sdot sdotsdot sdot sdot sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

u3

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

(2125)

2122 Condensation

The substitution method discussed above is simple to implement However it can be quiteexpensive computationally since the number of equations remains the same when imposingessential boundary conditions (this becomes a concern when a significant fraction of the dofsis constraint by essential boundary conditions) The condensation method removes from thelinear system to be solved those equations imposing essential boundary conditions

To understand this let us rewrite the above system of equations (2125) by moving the thirdcolumn to the right-hand side and inserting u3 = u3

⎛⎜⎜⎜⎜⎜⎜⎝

K11 K12 0 K14 sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot sdotsdot sdot 0 sdot K55

⎞⎟⎟⎟⎟⎟⎟⎠

⎛⎜⎜⎜⎜⎜⎜⎝

u1

u2

u3

u4

u5

⎞⎟⎟⎟⎟⎟⎟⎠

=

⎛⎜⎜⎜⎜⎜⎜⎝

F 1ext

F 2ext

F 3ext

F 4ext

F 5ext

⎞⎟⎟⎟⎟⎟⎟⎠

minus

⎛⎜⎜⎜⎜⎜⎜⎝

K13

K23

K33

K43

K53

⎞⎟⎟⎟⎟⎟⎟⎠

u3 (2126)

so that we can eliminate the third row and column from the system

⎛⎜⎜⎜⎝

K11 K12 K14 sdotsdot sdot sdot sdotsdot sdot sdot sdotsdot sdot sdot K55

⎞⎟⎟⎟⎠

⎛⎜⎜⎜⎝

u1

u2

u4

u5

⎞⎟⎟⎟⎠=⎛⎜⎜⎜⎝

F 1ext

F 2ext

F 4ext

F 5ext

⎞⎟⎟⎟⎠minus⎛⎜⎜⎜⎝

K13

K23

K43

K53

⎞⎟⎟⎟⎠u3 (2127)

9We mention that similar techniques can also be employed to impose more complex conditions such as con-straints of the general type

f(uaub ) = 0 (2124)

which become important eg when enforcing rigid links between nodes (∣xa+uaminus(xb+ub)∣ = const) or systemsof bodies including rigid bodies (ie rigid links plus rigid angles) or imposing deformationmotion of a nodealong an inclined surfaces (ua = uan with fixed known unit vector n) Such constraints can be implemented ina similar fashion but are not discussed here further (we refer to the rich FEM literature)

105

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which we must solve for the unknowns (u1 u2 u4 u5) so that U = (u1 u2 u3 u4 u5)T

The clear advantage of this method is the reduction in size of the system to be solved Thedisadvantage is that it is computationally more involved (indeed it can be even more expensivethan the substitution technique when a small number of essential boundary conditions must beapplied to a large system)

x1

x2

x3

e1

e2

e3

+

x

paraW

u( p

P

g

paraWe

au p

P

g

x)

paraWe

au

1F

2F

3F

1P

2P

continuous BVP FE-discretized body FE-discretized BVP

213 A note on Dirichlet boundary conditions in iterative solvers

We would like to briefly re-assess the enforcement of Dirichlet boundary conditions in the contextof iterative solvers where we do not solve a simple linear system but we use iterative techniquesto solve a nonlinear system in incremental linear steps In order to impose uai = uai we discusstwo implementation strategies

Strategy I To impose uai = uai we can include this Dirichlet boundary condition directly in theinitial guess (ie make sure that uai = uai within vector U) and subsequently iterate accordingto

Un+1 = Un +∆Un (2128)

where the system of equations is modified such that ∆uain = 0 for all iterative steps n Thelatter can be accomplished in the same fashion as we imposed essential boundary conditionsearlier For example when using a Newton-Raphson solver we must solve

T (Un)∆Un = minusf(Un) (2129)

where we now modify the row of the tangent stiffness matrix T (Un) and right-hand-side vectorf(Un) such that ∆uain = 0 is enforced (see Section 212)

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 212) itcomes with one disadvantages when we enforce the boundary condition uai = uai directly in theinitial guess U0 (while using eg the solution from a previous load step as the initial guessfor all remaining dofs in U0) the resulting initial guess U0 may include a rather strong localdeformation 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 nonlinearproblems

Strategy II As a remedy to the above problems we may alternatively choose to not set uai = uaiin the initial guess and simply chose U0 as eg the solution from the previous load step (or

106

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

any other more or less sophisticated guess) In subsequent iterations we then solve

T (Un)∆Un = minusf(Un) (2130)

where we modify both T (Un) and f(Un) to enforce

∆uain = uai minus uain (2131)

so that the incremental update at iteration step n

Un+1 = Un +∆Un rArr uain+1 = uain +∆uain = uain + (uai minus uain) = uai (2132)

imposes uai = uai in a more natural incremental fashion without modifying the initial guess

214 Rigid body motion

For the linear elastic case the stiffness matrix K (and in the general nonlinear case the tan-gent matrix T ) has as many zero eigenvalues as it has rigid-body modes or zero-energymodes Ulowast This can easily be understood by recalling that the total potential energy of theFE-discretized body with global stiffness matrix K and in the absence of any external forcesreads

I = 1

2U sdotKU (2133)

If a particular global vector of the nodal displacements Ulowast ne 0 corresponds to rigid-bodymotion (ie 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 energyConsequently we must have

Ulowast sdotKUlowast = 0 (2134)

This in turn implies that Ulowast is an eigenvector of K with a corresponding zero eigenvalue(KUlowast = 0 which we also understand physically since rigid-body modes cause no nodal forcesso Fint = KUlowast = 0) Hence K has (at least) one zero eigenvalue and is thus not invertibleSince this holds true for each rigid-body mode Ulowast K has as many zero eigenvalues as rigidbody modes If such rigid-body modes exist then no unique solution can be found since bothU and U + Ulowast could be a solution (since K(U + Ulowast) = KU +KUlowast = KU = Fext) Thismanifests in K not being invertible so trying to find U =Kminus1Fext fails We saw this problemarise in Example 112

Therefore we must suppress each rigid body mode via appropriate essential boundary conditionsbefore solving a boundary value problem In 2D we need three essential boundary conditionsto suppress rigid-body translations and rotations in 3D we need a total of six (assuming thatnodes carry only displacement dofs) as shown below

107

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

rigid-body modes in 2D

rigid-body modes in 3D

We close by mentioning that when considering large nonlinear deformation mechanisms instructures may also constitute zero-energy modes (eg a pinned-pinned buckled beam has twostable equilibria and the displacement from one to the other is a so-called mechanism ie azero-energy body which is not rigid-body motion)

Finally if nodes carry further dofs beyond displacements (eg in case of beam elements orcoupled problems) the situation must be reassessed to make sure all possible rigid modes aresuppressed

108

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

22 Dynamics

Our discussion of mechanical boundary value problems so far has been limited to quasistaticsThe term quasistatics refers to the assumption of negligible inertial effects This does notnecessary 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 ofthe type σ = σ(ε ε) which clearly depend on the loading rate and hence on time irrespectiveof 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 eg vibrationsThis is intimately tied the boundary conditions of a problem and creates an initial boundaryvalue problem Static loading is generally time-independent Dynamic loads are time-dependentones for which inertial effects are not negligible Quasistatic loading is time-dependent but issufficiently slow such that inertial effects can be safely ignored

Here we will consider the extension of the mechanical boundary value problem discussed pre-viously to dynamic problems where inertial effects matter In an extension of the (quasi-)staticversion of Section 8 the strong form of the dynamic problem in linearized kinematics reads

⎡⎢⎢⎢⎢⎢⎢⎣

σijj + ρ bi = ρ ui in Ω

ui(x t) = ui(x t) on partΩD

σijnj(x t) = t(x t) on partΩN

(221)

with suitable initial conditions Now we have u ∶ ΩtimesRrarr Rd (ie the displacement field u(x t)varies with position x isin Ω and time t isin R) and it requires sufficient differentiability in bothspace and time Notice that the quasistatic case is easily recovered by neglecting the inertialterm ρu ie if the mass density ρ or the acceleration a(x t) = u(x t) vanish

Analogous to the quasistatic case we can cast the above strong form into a variational structureby making use of the so-called action principle To this end we define the action

A[u] = intt2

t1L[u]dt (222)

with the Lagrangian

L[u] = T [u] minus I[u] (223)

where I is the potential energy functional introduced in Section 6 and T denotes the kineticenergy functional

T [u] = intΩ

ρ

2∣u∣2 dV (224)

For a variational material model with energy density W and assuming that body forces ρb andsurface tractions t are imposed we thus arrive at the action

A[u] = intt2

t1[int

Ω(ρ

2∣u∣2 minusW (ε)) dV + int

Ωρb sdotu dV + int

partΩNt sdotu dS] dt (225)

The action principle (also known as the principle of stationary action10) states that thesolution u(x t) renders A stationary under suitable initial conditions ie

u = arg statA[u] ∶ st ICs (226)

10Various references call this dynamic variational principle the ldquoprinciple of least actionrdquo which is in generalnot correct since the solution must not necessarily be a minimizer of A it is merely guaranteed to be a stationarypoint

109

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This condition is analogous to the minimization of the total potential energy we used so far inthe quasistatic context Here we no longer minimize the total potential energy but we renderthe total action stationary with respect to the displacement field

Taking the first variation of the action A with respect to u (again using the divergence on thestress-term as done in quasistatic) we obtain the stationarity condition

δA[u] = intt2

t1[int

Ω(ρ ui δui minus σijδuij) dV + int

Ωρbiδui dV + int

partΩNtiδuidS] dt = 0 (227)

The dynamic weak form is thus given by

G[uv] = intt2

t1[int

Ω(ρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (228)

Let us for simplicity of the derivation assume that instead of giving two initial conditionsper point (eg imposing initial displacements and velocities) we seek a stationary solutionu(x t) which satisfies the conditions u(x t1) = u1(x) and u(x t2) = u2(x) (ie we assume thedisplacements are known at the initial and final times t1 and t2 respectively) Of course thisis hardly ever the case in reality ndash and the derived concepts apply equally to the case of knowninitial displacements and velocities yet this assumption simplifies our derivation significantly

The above weak form indicates the space of solutions and it particularly lets us conclude that

v isin U0 = v isinH1(Ω) timesH1(R) ∶ v = 0 on partΩD and at t = t1 or t = t2 (229)

where the last two conditions stem from our assumption of u(x t1) = u1(x) and u(x t2) =u2(x) being known

To remove the time derivative v we integrate by parts in time (the ldquoboundary termrdquo vanishessince v = 0 at t = t1 and t = t2)

G[uv] = minusintt2

t1[int

Ω(ρ uivi + σijvij) dV minus int

Ωρbivi dV minus int

partΩNtividS] dt = 0 (2210)

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

Since in the dynamic problem the displacement field depends on time we here introduce a semi-discretization ie we discretize the solution in space but not (yet) in time This implies thatwe introduce shape functions for the interpolation in space where ndash now ndash the nodal unknownsua become functions of time

uh(x t) =n

suma=1

ua(t)Na(x) and vh(x t) =n

suma=1

va(t)Na(x) (2211)

This also allows us to calculate time derivatives eg the approximate velocity and accelerationfields

uh(x t) =n

suma=1

ua(t)Na(x) and uh(x t) =n

suma=1

ua(t)Na(x) (2212)

Insertion into (2210) results in the semi-discrete weak form

G[uhvh] = minusintt2

t1

n

sumb=1

vbi [n

suma=1

uai intΩρNaN bdV + int

ΩσijN

bj dV

minusintΩρbiN

b dV minus intpartΩN

tiNbdS] dt = 0

(2213)

110

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

which must hold for all vb(t) histories that vanish at t1 and t2 Because it must hold for allvb(t) histories we may conclude that the term in brackets must vanish vor all b = 1 n andi = 1 d (n being the number of nodes d the number of dimensions) These n times d equationsare discretized equations of motion

Analogous to before we collect all (now time-dependent) nodal dofs in the vector

U(t) = u1(t) un(t) (2214)

so that solving (2213) for all vb(t) is equivalent to solving the equation of motion

MU +Fint(U) minusFext(t) = 0 (2215)

with

Mabij = δij int

ΩρNaN bdV F binti = int

ΩσijN

bj dV F bexti = int

ΩρbiN

b dV +intpartΩN

tiNbdS

(2216)

Matrix M is called the consistent mass matrix and we write Fext = Fext(t) to indicate thatexternal forces are likely to depend on time (and they may also depend on displacements asdiscussed before)

Example 221 Consistent mass matrix of the 2-node bar element

The consistent mass matrix for a 2-node bar element (using theisoparametric formulation) is computed from its shape functions

N1(ξ) = 1 minus ξ2

N2(ξ) = 1 + ξ2

with ξ isin [minus11] (2217)

1 21

u 2ux

Specifically we have (with the total bar element mass me = ρALe)

Mab = intΩρNaN bdV = int

1

minus1ρNaN bA

Le2

dξ rArr Mbar1D = me

6(2 1

1 2) (2218)

Note that this is the consistent mass matrix for 1D motion ieU = (u1 u2)T If each node moves in 2D and hence has two dofsper node in the plane ie U = (u1

1 u12 u

21 u

22)T then each pair of

dofs (horizontal and vertical) is linked by the above mass matrixso that the total consistent mass matrix in 2D becomes

1 22u

x

1u1

1u

1u2u

1

2

2u

Mbar2D = me

6

⎛⎜⎜⎜⎝

2 0 1 00 0 0 01 0 2 00 0 0 0

⎞⎟⎟⎟⎠+ me

6

⎛⎜⎜⎜⎝

0 0 0 00 2 0 10 0 0 00 1 0 2

⎞⎟⎟⎟⎠= me

6

⎛⎜⎜⎜⎝

2 0 1 00 2 0 11 0 2 00 1 0 2

⎞⎟⎟⎟⎠ (2219)

mdashmdashmdashmdash

Example 222 Consistent mass matrix of the CST element

The consistent mass matrix of the constant-strain triangular element is computed analogouslyby integration of the shape functions Again starting with a single dof per node ie U =(u1 u2 u3)T the consistent mass matrix is obtained as (with element area Ae thickness te)

MCST1D = me

12

⎛⎜⎝

2 1 11 2 11 1 2

⎞⎟⎠

with me = ρAete (2220)

111

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The extension to 2D motion with dofs U = (u11 u

12 u

21 u

22 u

31 u

32)T follows from apply in the 1D

mass matrix to the horizontal and vertical dofs independently leading to

MCST2D = me

12

⎛⎜⎜⎜⎜⎜⎜⎜⎜⎝

2 0 1 0 1 00 2 0 1 0 11 0 2 0 1 00 1 0 2 0 11 0 1 0 2 00 1 0 1 0 2

⎞⎟⎟⎟⎟⎟⎟⎟⎟⎠

with me = ρAete (2221)

mdashmdashmdashmdash

For all other elements the consistent mass matrix can be evaluated analogously or computedby numerical quadrature

Mab1D = int

ΩeρNaN bdV asymp

nQPminus1

sumk=0

WkρNa(ξk)N b(ξk)J(ξk) (2222)

We note that irrespective of the element type the (approximate) kinetic energy of an elementis computed as follows

T = intΩ

ρ

2∥uh∥2

dV = intΩ

ρ

2

n

suma=1

uaNa sdotn

sumb=1

ubN bdV = 1

2

n

suma=1

n

sumb=1

ua sdot ubintΩρNaN bdV (2223)

which can be conveniently recast into

T = 1

2U sdotM U (2224)

From the above examples we observe that the consistent mass matrix leads to a dynamiccoupling between the dofs ie the consistent mass matrix is not diagonal but includes significantoff-diagonal terms From a numerical perspective this is rather inconvenient as it may requireinverting M (as will be discussed soon) Therefore one often resorts to the so-called lumpedmass matrix which is an approximation that is diagonal

One such approach is the so-called particle-mass lumping which aims toevenly distribute the element mass me among its nodes and therefore simplyassumes that for an arbitrary element having ne nodes with d dofs per nodeMlumped isin Rnedtimesned is given by

Mlumpede =me

neI (2225)

m 2e m 2e

m 3e m 3e

m 3e

Example 223 Lumped mass matrix of the 2-node bar element

For example by using particle-mass lumping for a 2-node bar element one distributes the massme evenly to the two nodes resulting in

Mlumped1De =me

2(1 0

0 1) Mlumped2De =

me

2

⎛⎜⎜⎜⎝

1 0 0 00 1 0 00 0 1 00 0 0 1

⎞⎟⎟⎟⎠ (2226)

112

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that a comparison of the kinetic energies (eg in 1D) reveals

Tlumped =1

2Ue sdotMlumpedeUe =

me

4[(u1

e)2 + (u2e)2] (2227)

and

Tconsistent =1

2Ue sdotMconsistenteUe =

me

6[(u1

e)2 + (u2e)2 + u1

eu2e] (2228)

Hence using the lumped mass matrix implies an approximation of the kinetic energy (which isgenerally not exact)

mdashmdashmdashmdash

If defined properly then the solutions obtained from using either the consistent or lumpedmass matrix in the finite element context converge under h-refinement (As the element sizedecreases the differences between the two formulations also decrease so that in the limit ofinfinitely 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 matrixboth at the element and at the global level As a consequence all assembly operationsintroduced 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 androtational inertia must be considered (which is not discussed here in detail and no uniquesolution exists for the lumped mass matrix but various proposed approximations can be used ndashwhich either approximate the kinetic energy or the mass moments of inertia of the beam)

113

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

23 Vibrations

As shown in the previous section treating the dynamic mechanical problem in linearized kine-matics by the finite element method leads to the semi-discretized equations of motion

M U +Fint(U) = Fext(t) (231)

which are to be solved for the time-dependent vector of nodal dofs U = U(t) This solution isusually obtained in one of two ways we either solve for a time-continuous solution U(t) or wediscretize not only in space but also in time and introduce finite differences in time to solve forUα = U(tα) at discrete intervals tα = α∆t Time-continuous solutions in analytical form canusually be found only for special cases ndash vibrations are one such case discussed in the following

For our purposes vibrations are small-amplitude oscillations about a stable equilibrium con-figuration If a body is freely vibrating without any external excitation we speak of free vibra-tions otherwise (eg if harmonic forces or displacement boundary conditions are applied) weconsider forced vibrations In both cases we assume small amplitudes which leads to linearwaves and we consider oscillations about a stable equilibrium defined by nodal displacementsU0 (eg the undeformed configuration U0 = 0 is one such stable equilibrium)

231 Free undamped vibrations

Starting with the general nonlinear equations of motion (231) we linearize about a stableequilibrium configuration U0 with constant external forces Fext(t) = Fext = const such that thestatic equilibrium satisfies

Fint(U0) = Fext (232)

Next consider a small time-varying perturbation V (t) such that insertion of

U(t) = U0 +V (t) rArr U(t) = V (t) (233)

into the equations of motion leads to

MV +Fint(U0 +V ) = Fext (234)

Expanding the above for small ∣V ∣ ≪ ∣U0∣ to leading order gives

MV +Fint(U0) +partFint

partU(U0)V + hot = Fext (235)

or invoking equilibrium (232) and dropping all higher-order terms

MV + T (U0)V = 0 (236)

When considering free vibrations about the undeformed configuration of an elastic body theabove reduces to

MU +KU = 0 (237)

In general the form of the linearized equations of motion for free vibrations without externalforcing and without damping is

MU + TU = 0 (238)

114

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The general type of solution of the above ODE is of the harmonic form11

U = Ulowast exp(iωt) with ω isin R Ulowast isin Cdn (239)

Insertion into (238) leads to (exploiting that the equation must hold for all times t)

(T minus ω2M) U = 0 (2310)

which is an eigenvalue problem to be solved for the unknown ω isin R known as the eigen-frequency and the corresponding eigenvector U isin R known as the associated eigenmodeWe point out that M is positive-definite by definition (both for the consistent and lumpedmass matrix) and T = part2IpartU2(U0) is also positive-semi-definite because it is the tangent stiff-ness matrix associated with a stable equilibrium U0 As a consequence Mminus1T has only realeigenvalues ω determined from

det (T minus ω2M) = 0 (2311)

Further Ulowast = U isin Rnd is also real-valued (which is why we omitted the asterisk in (2310))Finally if ω is a solution of (2310) then so is minusω Since the sign if of minor importance herewe only consider the positive frequencies

For a FE discretization with ntimes d degrees of freedom (n nodes in d dimensions) the eigenvalueproblem (2310) has n times d eigenfrequencies ωj and associated eigenmodes Uj It is commonconvention to label the eigenfrequencies (and associated modes) in ascending order

0 le ω0 le ω1 le le ωntimesdminus1 (2312)

Recall that each rigid-body mode of the FE problem corresponds to a zero eigenfrequencyTherefore a 2D (3D) free vibration problem without essential BCs to suppress rigid-bodymotion has three (six) zero eigenfrequencies When all zero-energy modes have been removedthe lowest non-zero eigenfrequency is known as the natural frequency

Due to the linear nature of the ODE system the complete solution to the free-vibrationproblem is a superposition of the type

U(t) =ntimesd

sumj=1

clowastj Uj exp(iωjt) clowastj isin C for j = 1 n times d (2313)

for whose coefficients clowastj we must solve for a given set of initial conditions Recall that for amechanical initial boundary value problem we have two initial conditions per node and perdegree of freedom (eg imposing an initial displacement and velocity vector for each node)This provides the 2timesntimesd equations from which the coefficients clowastj isin C can be found (since thoseare complex we have in fact 2 times n times d unknowns viz the real and imaginary parts of each ofthe ntimesd coefficients) Roughly speaking free vibrations are characterized by the superpositionof vibrations at all eigenfrequencies with their respective eigenmodes

Example 231 Free vibration of a bar

Let us study the example of a freely vibrating linear elastic 2-node bar which we use to assessthe influence of the different types of mass matrices Consider a 2-node bar element with only

11The solution can alternatively be written in terms of trigonometric functions We here use the exponentialformulation U = Ulowast exp(iωt) for notational simplicity which by Eulerrsquos identity exp(iωt) = cos(ωt) + i sin(ωt)can be transformed into trigonometric solutions to obtain U = U1 cos(ωt) + U2 sin(ωt) To avoid confusion weuse the asterix lowast here and in the following to denote complex-valued variables

115

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

axial displacements in 1D so that each node has only a single dof ua The mass matrices andthe stiffness matrix for this case were derived previously as

Mconsistent =m

6(2 1

1 2) Mlumped =

m

2(1 0

0 1) K = EA

L( 1 minus1minus1 1

) (2314)

For each of the two mass matrices we compute the two eigenfrequencies and eigenmodes bysolving the eigenvalue problem

(K minus ω2M)U = 0 rArr det (K minus ω2M) = 0 (2315)

Insertion of the stiffness and consistent mass matrix results in the two solutions

ωconsistent0 = 0 ωconsistent

1 =radic

12EA

mL= 2

radic3

radicEA

mLasymp 3464

radicEA

mL (2316)

The corresponding eigenvectors follow from insertion of the eigen-frequencies into the eigenvalue problem giving

U consistent0 = (1

1) U consistent

1 = ( 1minus1

) (2317)

1 2

1 2

U0

U1

As expected we have one zero eigenfrequency associated with rigid body translation and onenon-zero eigenfrequency

When repeating the above procedure with the lumped mass matrix we instead obtain

ωlumped0 = 0 ωlumped

1 = 2

radicEA

mL (2318)

and

U lumped0 = (1

1) U lumped

1 = ( 1minus1

) (2319)

Hence the two cases yield the same eigenmodes U0 and U1 but they differ significantly in thefundamental frequency ωconsistent

1 vs ωlumped1

For comparison let us compute the exact solution by studying the free vibration of a continuoushomogeneous linear elastic bar Linear momentum balance ie

Euxx = ρu (2320)

admits the separable solution

u(x t) = u(x) exp(iωt) rArr Euxx(x) = minusω2ρ u(x) (2321)

Free-end boundary conditions imply zero tractions at the two ends at x = 0 and x = L so that

ux(0) = ux(L) rArr u(x) = A cos(nπxL

) (2322)

with an integer n isin Z and a constant A isin R Insertion into (2320) leads to

minusE (nπL

)2

= minusω2ρ rArr ωn = nπradic

EA

mL (2323)

116

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Consequently the lowest two eigenfrequencies are obtained as

ω0 = 0 ω1 = πradic

EA

mL (2324)

Comparison with the above two approximate formulations reveals that

ωlumped1 le ω1 le ωconsistent

1 (2325)

mdashmdashmdashmdash

We can generalize the above observation to vibrational problems (here without proof) Theeigenfrequencies obtained from the consistent mass matrix generally over-estimate theeigenfrequencies while the lumped mass matrix usually provides under-estimates of theeigenfrequencies (the latter is not rigorous though since it depends on the choice of the lumpedmass matrix)

232 Forced vibrations

As defined above forced vibrations result from small-amplitude harmonic excitation of astructure We again start with the linearized governing equations

MU + TU = Fext(t) (2326)

and now assume a time-harmonic excitation (on top of any static pre-load) of the type

Fext(t) = Fext cos(Ωt) (2327)

with an excitation frequency Ω isin R and an amplitude vector Fext isin Rdn (2326) showsthat the solution vector generally consists of a homogeneous solution and a particular solutionaccording to

U(t) = Uhom(t) +Upart(t) = Uhom(t) + U cos(Ωt) where U isin Rdn (2328)

The homogeneous solution corresponds to a free vibration (see Section 231) and is usuallyof little interest (any realistic system has a minimum amount of damping which makes thehomogeneous solution of a free vibration decay over time while the particular solution of theforced vibration assumes a steady state) Insertion of the particular solution into (2326) gives

(minusΩ2M + T ) U = Fext (2329)

which is a linear system of equations to be solved for the displacement amplitude vector U Specifically if

det (minusΩ2M + T ) ne 0 hArr Ω is not an eigenfrequency of the system (2330)

then

U = (minusΩ2M + T )minus1Fext rArr Upart(t) = (minusΩ2M + T )minus1

Fext cos(Ωt) (2331)

Hence the system responds to a harmonic excitation ndash at steady state ndash with a harmonicvibration at the excitation frequency As the excitation frequency approaches an eigenfrequency(Ω rarr ωj) the above matrix becomes singular and the displacement amplitude vector U tendsto infinity (this is characteristic of resonant effects)

117

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

233 Modal decomposition

If the dynamics of a body or structure cannot be classified as small-amplitude vibrations thentime-continuous solutions are usually hard to find and one may resort to finite-difference schemes(as discussed next in Section 24) Alternatively one may find time-continuous solutions by themethod of modal decomposition which is based on the above eigenfrequency analysis

The starting point of the concept of modal decomposition is to express the unknown time historyof the vector of nodal dofs through a carefully chosen basis viz

U(t) =ntimesd

sumi=1

zi(t) Ui (2332)

where we use the (somehow normalized) eigenvectors Ui 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 ndash for which to understand we need toinclude a somewhat longer derivation By considering the eigenvalue problem for two distincteigenmodeseigenfrequencies i and j we may write

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0

(T minus ω2jM) Uj = 0 rArr Ui sdot (T minus ω2

jM) Uj = 0(2333)

where we pre-multiplied each of the two equations by the respective other eigenvector Sub-traction of the two equations (using that T is by definition symmetric) results in

(ω2i minus ω2

j ) Ui sdotM Uj = 0 hArr ωi = ωj or Ui sdotM Uj = 0 (2334)

This implies that either ωi = ωj (considering only positive eigenfrequencies) or Ui sdotM Uj If weassume that we have only distinct eigenfrequencies12 then we may conclude that

Ui sdotM Uj = 0 if i ne j (2335)

We can normalize the eigenvectors in the following fashion

Ui larrUiradic

Ui sdotM UirArr Ui sdotM Ui = 1 (2336)

so that overall

Ui sdotM Uj = δij (2337)

Next if we start with

(T minus ω2iM) Ui = 0 rArr Uj sdot (T minus ω2

iM) Ui = 0 (2338)

then we may also conclude that by invoking (2337)

Uj sdot T Ui = 0 if i ne j (2339)

12Theoretically we may surely have repeated eigenvalues and hence duplicated eigenfrequencies However anumerical implementation always generates numerical errors so that truly identical eigenvalues occur rarely (andrigid-body modes are usually removed unless the simulated response requires rigid-body motion) In case of anyduplicated eigenfrequencies one could still introduce eg Gram-Schmid orthonormalization to produce a set ofeigenmodes that do satisfy the below condition

118

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Similarly by pre-multiplying by the respective same eigenvector ie

Ui sdot (T minus ω2iM) Ui = 0 (2340)

we solve for ω2i and obtain Rayleighrsquos quotient which here simplifies due to the normalization

(no summation over i implied)

ω2i =

U(i) sdot T U(i)

U(i) sdotMU(i)

= U(i) sdot T U(i) rArr Ui sdot T Uj =⎧⎪⎪⎨⎪⎪⎩

ω2i if i = j

0 else(2341)

Let us now return to the modal decomposition of a linearized elastic system using the Fourierrepresentation

U(t) =ntimesd

sumi=1

zi(t) Ui (2342)

where U1 Un 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 scalarcoefficients that are continuous functions of time (maintaining the semi -discretization)

We substitute (2342) into the linearized equations of motion with external forces Eq (2326)or MU + TU = Fext so we arrive at

ntimesd

sumi=1

[zi(t)MUi + zi(t)T Ui] = Fext(t) (2343)

Pre-multiplying by Uj gives

ntimesd

sumi=1

[zi(t) Uj sdotMUi + zi(t)Uj sdot T Ui] = Uj sdotFext(t) (2344)

and exploiting the above orthogonality relations leads to

zj(t) + ω2j zj(t) = Uj sdotFext(t) for j = 1 n times d (2345)

This equation is quite remarkable as it is a scalar linear ODE for each unknown function zj(t)Moreover the system of equations for the n times d unknown functions zi(t) (with i = 1 n times d)has decoupled into n times d uncoupled scalar ODEs to be solved independently for the zi(t) Thestrategy is thus to first pre-compute all eigenfrequencies ωj and all eigenmodes Uj so that thecoefficients and right-hand sides in (2345) are known The resulting system of decoupled linearODEs can relatively inexpensively be solved for the functions zj(t)

For many practical problems only a limited number of modes are important so we may restrictthe representation (2342) to include only the lowest m lt n times d modes (corresponding to the mlowest eigenfrequencies) Therefore significant numerical efficiency can be gained by truncatingthe Fourier sum and only using the m lowest modes which is referred to as order reduction

U(t) =m

sumi=1

zi(t) Ui m lt n times d (2346)

119

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

234 Structural damping

In structural dynamics (ie in the analysis of structures involving bars beams plates etc)one often includes velocity-proportional damping in an approximate average sense by the intro-duction of a damping matrix C such that the equations of motion (2215) become

MU +CU +Fint(U) minusFext(t) = 0 (2347)

This is the higher-dimensional analog to the classical 1D system consisting of masses springsand dashpots as discussed in undergraduate Dynamics The C-matrix serves as the analog ofthe dashpot which provides velocity-proportional damping The most common form of C usedin structural FEA is mass- and stiffness-proportional damping which assumes

C = αM + βK α β isin R+ (2348)

That is C is a combination of the mass and stiffness matrices M and K respectively Thechoice of parameter α ge 0 controls low-frequency vibration attenuation while parameter β ge 0suppresses high-frequency vibrations We skip the detailed derivation here and refer to FEAliterature on structural damping

If damping is included in a problem of free or forced vibrations then the above strategies andrelations ndash in principle ndash still apply As a major difference solutionsU = U(t) will include a timedelay implying that the energy dissipation due to damping results in forces and displacementsnot being ldquoin syncrdquo anymore but the bodyrsquos deformation lagging behind any applied forces thatcause the deformation This is best captured by starting with an ansatz

U(t) = Ulowast exp(iωlowastt) with ωlowast isin C and Ulowast isin Cdn (2349)

solving for the complex valued solutions and finally extracting the displacement solution as thereal part ie U(t) = Re [Ulowast exp(iωlowastt)]

For example for a forced vibration with structural damping we now have

Upart(t) = Re [(minusΩ2M + iΩC + T )minus1Fext] cos(Ωt) (2350)

120

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

24 Time-dependent transient solutions

If the time-dependent solution for the nodal variables U(t) cannot be obtained in a continuousmanner (eg as discussed above for free vibrations or via modal decomposition) then one usu-ally seeks solutions in a time-discretized fashion (eg by using finite-difference approximationsin time) This turns the previously introduced semi -discretization of our fields of interest intoa proper discretization in both space and time

As discussed in Section 3 at the beginning of this course finitedifferences are a convenient technique when the discretization isapplied to a regular grid with uncomplicated boundary conditions(such as when choosing constant time increments ∆t with knowninitial conditions) We here re-use those techniques introduced backin Section 3 for the discretization in time Specifically we define aconstant time increment ∆t gt 0 and seek solutions at discrete timeintervals writing

∆t = tα+1 minus tα ua(tα) = uaα Uα = U(tα) forall α ge 0

and arbitrarily choosing t0 = 0

au

au

au

au

Dt

t

In order to solve the equations of motion we must choose between explicit and implicit inte-gration schemes ndash which come with all the advantages and disadvantages discussed in generalin Section 3 Let us first turn to the simpler case of explicit time integration13

241 Explicit time integration

The most frequent choice ensuring quadratic convergence while maintaining small finite-differencestencils is the use of central-difference approximations in time which turn the nodal velocityand acceleration vectors into respectively

U(tα) = Uα+1 minusUαminus1

2∆t+O(∆t2) U(tα) = U

α+1 minus 2Uα +Uαminus1

(∆t)2+O(∆t2) (241)

Insertion into the equations of motion (2347) (here including damping for completeness anddropping higher-order terms) leads to the time-discretized equations of motion

MUα+1 minus 2Uα +Uαminus1

(∆t)2+CU

α+1 minusUαminus1

2∆t+Fint(Uα) minusFext(tα) = 0 (242)

which can be reorganized into

[ M

(∆t)2+ C

2∆t]Uα+1 = 2M

(∆t)2Uα + [ C

2∆tminus M

(∆t)2]Uαminus1 minusFint (Uα) +Fext(tα) (243)

This is an update rule for Uα+1 resulting in a scheme of explicit time integration (ie vectorUα+1 can be computed directly from the known previous solutions Uα and Uαminus1 We note theabove relation indicates that solving for Uα+1 still requires the solution of a linear system (dueto the matrix in brackets in front of Uα+1) Yet all nonlinearity that is possibly inherent inFint (U) is irrelevant to the solution procedure as the internal forces in (243) depend only onthe previous known solution Uα

13We note that similar concepts can also be applied when the time increment ∆t is not constant or is adaptivelymodified during the course of a simulation However we here restrict our discussion to constant time steps ∆t

121

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Stability generally limits the choice of the time step ∆t in explicit schemes as discussed inSection 3 This also applies to the dynamic FE formulation described above Without proof wemention that stability requires

∆t le ∆tmax =2

ωmax (244)

with ωmax being the highest eigenfrequency of the FE problem (see Section 231) It is importantto realize that the highest eigenfrequency generally scales inversely with the size of the smallestelement in the mesh ie

ωmax prop1

hmin (245)

For example we showed in Example 231 that the fundamental frequency of a two-node barwas of the form ω1 prop 1

L

radicEρ with L being the element size

Despite the explicit scheme being straight-forward to implement and inexpensive to solve atthe time-step level the above stability constraint has unfortunate consequences The maximumallowed time step ∆tmax decreases with decreasing mesh size ie dynamic FE problems thatare already expensive because of high mesh resolution are even more expensive when usingexplicit time integration due to the required small time step size Moreover what matters isthe absolute smallest element size hmin and not the average element size Therefore the smallestelement in a FE mesh generally dictates the critical step size ∆tmax (even if the average elementsize is considerably larger)

242 A reinterpretation of finite differences

Instead of introducing finite-difference schemes in time as discussed above we could alterna-tively introduce interpolations in time analogous to the interpolation in space introduced withinthe FE context based on shape functions and nodal values We here aim to show that such aninterpolation in time is indeed feasible and that in fact the above explicit central-differencediscretization can be re-interpreted as such an interpolation

To start consider a discretization in time which evaluates U at discrete time intervals ∆t andthen uses a quadratic interpolation in time to define U(t) at all times t ge 0 ie we define

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t) for t isin [tα minus ∆t2 t

α + ∆t2 ] (246)

Shape functions Nα(t) interpolate in time and analogous to thespatial discretization of the FE method we define Nα(tβ) = δαβThe resulting quadratic shape functions are

Nα+1(t) = (t minus tα)(t minus tαminus1)2(∆t)2

Nα(t) = (tα+1 minus t)(t minus tαminus1)(∆t)2

and

Nαminus1(t) = (tα+1 minus t)(tα minus t)2(∆t)2

(247) Dt

t

aN

a+1N

a-1N

at +Dt2

at -Dt2

at

a+1t

a-1t

This piecewise-quadratic interpolation with the above range of validity ensures that U(t) istwice differentiable (as needed for the acceleration) It further guarantess that not only is U(t)continuous over time but also

part

parttNα+1(tα minus ∆t

2 ) = 0 andpart

parttNαminus1(tα + ∆t

2 ) = 0 (248)

122

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that U(t) is continuous as well Consequently the acceleration

U(t) = Uα+1Nα+1(t) +UαNα(t) +Uαminus1Nαminus1(t)

= Uα+1

(∆t)2minus 2

(∆t)2+ U

αminus1

(∆t)2= U

α+1 minus 2Uα +Uαminus1

(∆t)2for t isin [tα minus ∆t

2 tα + ∆t

2 ](249)

is piecewise-constant and recovers the second-order central-difference scheme in time cf (241)

The approximate displacement field now discretized in both space and time has become

uh(x t) =n

suma=1

α+1

sumγ=αminus1

uaγNγ(t)Na(x) for t isin [tα minus ∆t2 t

α + ∆t2 ] x isin Ωh (2410)

where uaγ = uh(xa tγ) is the displacement of node a at time tγ The acceleration field followsas the piecewise-constant (in time) approximation

uh(x t) =n

suma=1

uaα+1 minus 2uaα +uaαminus1

(∆t)2Na(x) for t isin [tα minus ∆t

2 tα + ∆t

2 ] x isin Ωh (2411)

Next we must insert the discretization into the weak form (2210) which also requires a choicefor the trial function vh(x t) We can either choose a Bubnov-Galerkin scheme where vh(x t)is discretized in the same fashion as uh(x t) the consequence is that we arrive at an implicitsystem in time to solve for all nodal unknowns (ie one cannot simply march forward in timebut has to solve for the nodal solution at all times at once) Alternatively we may choose aPetrov-Galerkin scheme in time and ndash having in mind that we wish to evaluate informationonly at the discrete time steps ndash define the trial function (assuming nt time steps) as

vh(x t) =n

sumb=1

vb(t)N b(x) =n

sumb=1

nt

sumα=1

vbαN b(x)δ(t minus tα) (2412)

This approximation of collocation type leads to the weak form being reduced to only the discretetime steps When this choice of vh along with uh is inserted into the weak form (2210) ie

G[u v] = intt2

t1[int

Ω(minusρ uivi minus σijvij) dV + int

Ωρbivi dV + int

partΩNtividS] dt = 0 (2413)

the integration over time reduces the delta functions to the simple form

nt

sumb=1

vbi

⎡⎢⎢⎢⎢⎣int

Ω

⎛⎝minusρuaα+1i minus 2uaαi + uaαminus1

i

(∆t)2NaN b minus σij(εhα)N b

j

⎞⎠

dV

+intΩρbi(tα)N b dV + int

partΩNti(tα)N bdS] = 0

(2414)

for each time step α (0 le tα le nt∆t) and for all admissible choices of vbi The latter implies thatthe above terms in brackets must vanish or that we must have

intΩρNaN b dV

uaα+1i minus 2uaαi + uaαminus1

i

(∆t)2+ int

Ωσij(εhα)N b

j dV

minus intΩρbi(tα)N b dV minus int

partΩNti(tα)N bdS = 0

(2415)

When inserting our definitions of the consistent mass matrix and the internalexternal forcevectors (cf (2216)) the above is equivalent to

MUα+1 minus 2Uα +Uαminus1

(∆t)2+Fint(Uα) minusFext(tα) = 0 (2416)

which was derived above for a second-order finite-difference time discretization see (242) Ofcourse the same procedure can also be applied to other choices of vh which leads to differenttime discretization schemes

123

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

243 Implicit time integration

Following the above explicit schemes we proceed to discuss implicit time integration whichuses the same discretization in time but requires solving a generally nonlinear system of equa-tions for Uα+1 Various techniques exist the most prominent ones of which we summarize inthe following

2431 Newmark-β method

The most popular scheme for mechanical problems is the so-called Newmark-β method (itwas originally developed for problems in structural mechanics in 1959 by Nathan M Newmarkof the University of Illinois at UrbanandashChampaign after whom it was later named)

We start with the mean value theorem which tells as that

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2417)

and analogously

U(t) = Uα + intt

tαU(τ) dτ for t isin (tα tα+1) (2418)

Particular schemes now differ by how U(t) is defined during an interval (tα tα+1) so that theabove two equations can be integrated to find U(t) and U(t)

The so-called average acceleration method eg assumes that the acceleration is piecewiseconstant between two time steps and specifically that

U(t) = Uα+1 + Uα

2= const for t isin (tα tα+1) (2419)

Insertion into (2418) along with U(tα) = Uα leads to

U(t) = Uα + (Uα+1 + Uα) t minus tα

2 (2420)

and inserting this into (2417) with U(tα) = Uα gives

U(t) = Uα + Uα(t minus tα) + (Uα+1 + Uα) (t minus tα)2

4 (2421)

Finally evaluating (2420) and (2421) at the new time step α + 1 yields respectively

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + Uα) (∆t)2

4

(2422)

This is apparently an implicit definition of the new velocity and displacement vectors sincethey involve the unknown acceleration Uα+1 at the new time

As an alternative the linear acceleration method assumes a linear interpolation instead of apiecewise-constant one thus starting with

U(t) = Uα + (Uα+1 minus Uα) t minus tα

∆tfor t isin (tα tα+1) (2423)

124

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Carrying out the same substitutions and integrations as above for the average accelerationscheme we here arrive at

Uα+1 = Uα + (Uα+1 + Uα) ∆t

2

Uα+1 = Uα + Uα∆t + (Uα+1 + 2Uα) (∆t)2

6

(2424)

which is yet another implicit definition of the new velocity and displacement vectors

We note that we can also cast our explicit central-difference scheme from before into theabove framework if we assume a piecewise-constant acceleration

U(t) =⎧⎪⎪⎨⎪⎪⎩

Uα for t isin (tα tα+tα+1

2 )Uα+1 for t isin ( tα+tα+1

2 tα+1) (2425)

The Newmark-β method generalizes the above cases into a single framework which definesthe new displacements and velocities as

Uα+1 = Uα +∆t Uα + (∆t)2

2[2β Uα+1 + (1 minus 2β)Uα] (2426a)

Uα+1 = Uα +∆t [γUα+1 + (1 minus γ)Uα] (2426b)

where 0 le β le 1 and 0 le γ le 1 are parameters to be chosen The above schemes are included asspecial cases

β = 14 γ = 1

2 leads to the most popular average acceleration scheme (which turns outto be unconditionally stable and to have no numerical damping)

β = 16 γ = 1

2 is the linear acceleration scheme (which is conditionally stable and showsnumerical damping)

β = 0 γ = 12 recovers the explicit central-difference scheme (241)

As a major benefit of the Newmark schemes for linear structural problems the method canprovide unconditional stability Specifically

γ ge 12 and β ge γ2 guarantees that the method is unconditionally stable

γ ge 12 and β lt γ2 leads to methods being conditionally stable where as discussed before∆tcr prop ωminus1

max

For γ = 12 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-differencemethods introduce artificial numerical damping (see the discussion in Section 42 on phaseerror analysis) Whenever γ gt 12 the Newmark family of methods produces numerical damp-ing The average acceleration scheme (β = 1

4 γ = 12) 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 definitionsof velocities and displacements (2426a) into a form that allows us to perform algorithmic timestepping To this end let us first solve (2426a) for the acceleration at the new time tα+1

Uα+1 = 1

β(∆t)2(Uα+1 minusUα minus∆t Uα) minus 1 minus 2β

2βUα (2427)

125

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Insertion into (2426b) yields

Uα+1 = Uα +∆t(1 minus γ)Uα + γ

β∆t(Uα+1 minusUα +∆t Uα) minus γ∆t

1 minus 2β

2βUα

= (1 minus γβ) Uα + γ

β∆t(Uα+1 minusUα) minus∆t( γ

2βminus 1) Uα

(2428)

Next inserting both velocity (2427) and acceleration (2428) into the equation of motion atthe new time tα+1

MUα+1 +CUα+1 +Fint(Uα+1) minusFext(tα+1) = 0 (2429)

leads ndash after some rearrangement ndash to

( 1

β(∆t)2M + γ

β∆tC)Uα+1 +Fint(Uα+1) minusFext(tα+1)

=M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2430)

The right-hand side of (2430) is fully known as it only involves Uα Uα and Uα from theprevious time step The left-hand side is generally nonlinear and requires an iterative solverunless the problem is linear elastic in which case Fint(Uα+1) =KUα+1 and the above left-handside is linear in Uα+1

Note that the implementation is quite similar to that of the quasistatic problem using eg theNewton-Raphson solver discussed in Section 201 Specifically we now have

f(Uα+1) =MlowastUα+1 +Fint(Uα+1) minusF lowastext(tα+1Uα Uα Uα) = 0 (2431)

where

Mlowast = 1

β(∆t)2M + γ

β∆tC = const (2432)

and

F lowastext(tα+1Uα Uα Uα) = Fext(tα+1) +M [ 1

β(∆t)2Uα + 1

β∆tUα + ( 1

2βminus 1) Uα]

+C [ γ

β∆tUα + (γ

βminus 1) Uα +∆t( γ

2βminus 1) Uα]

(2433)

Note that Mlowast is constant while F lowastext is fully known from the previous time step and the applied

external forces Therefore the problem is quite similar to the quasistatic problem The tangentmatrix used for iterations is

T lowast =Mlowast + T = 1

β(∆t)2M + γ

β∆tC + T (2434)

Boundary conditions can be implemented in the same fashion as for the quasistatic solversdiscussed in Section 213

In the special case of a linear elastic problem the nonlinear system of equations turns into alinear one viz

f(Uα+1) =MlowastUα+1 +KUα+1 minusF lowastext(tα+1Uα Uα Uα) = 0 (2435)

126

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

so that

Uα+1 = (Mlowast +K)minus1F lowast

ext(tα+1Uα Uα Uα) (2436)

The algorithmic structure is as follows At each time step we solve (2430) for Uα+1 (usingan iterative solver such as Newton-Raphson for nonlinear problems) based on the informationfrom the previous time step Uα Uα and Uα along with information about the applied externalforces Fext(tα+1) This implies we must store vectors Uα Uα and Uα after each converged timestep Once the new solution Uα+1 has been found we compute Uα+1 from (2427) and Uα+1

from (2428) store all of those vectors and move on to the next time step

244 HHT-α method

The HHT method (also known as the HHT-α method) is a modification of the above implicitNewmark scheme It is named after its inventors Hilber Hughes and Taylor and has gainedpopularity in commercial codes The idea is to use the same Newmark relations (2426a) and(2426b) but to modify the equations of motion into which they are inserted viz assuming

MUα+1 +C [(1 minus α)Uα+1 + α Uα] + (1 minus α)Fint(Uα+1) + αFint(Uα)= (1 minus α)Fext(tα+1) + αFext(tα)

(2437)

with a newly introduced parameter α (using the overline to avoid confusion with our timestep α) α = 0 recovers the Newmark-β scheme If one chooses

0 le α le 1

3 β = (1 + α)2

4 γ = 1

2+ α (2438)

then the HHT method is unconditionally stable and at least second-order accurate Increas-ing α decreases the simulated displacements at high frequencies (thus removing high-frequencynoise from simulated dynamics problems) which can be beneficial in structural dynamics

245 Use of mass matrices

Let us close this section by discussing the use of consistent vs lumped mass matrices in thecontext of explicitimplicit time stepping Recall that for free vibrations we had observedthat the consistent mass matrix generally overpredicts eigenfrequencies while the lumped massmatrix tends to underpredict those Unfortunately we do not have the time here but we coulddo a careful phase error analysis for the explicit and implicit time-stepping schemes derivedabove (recall that we discussed phase error analysis in the context of finite differences see Sec-tion 42) The outcome is that implicit schemes generally introduce numerical error in the formof so-called period elongation ie using implicit schemes like the average-acceleration one(although having no numerical damping) leads to vibrational frequencies being underestimatedHence combining implicit schemes with consistent mass matrices compensates for the errorsintroduced by the two Likewise explicit schemes like the central-difference one tend to exhibitperiod contraction hence compensating for the error introduced by lumped mass matricesThis shows that it is therefore recommended to use

explicit schemes with lumped mass matrices

implicit schemes with consistent mass matrices

This choice is also computationally beneficial lumped mass matrices may allow for solving theexplicit update rule (243) without the need for iterations whereas consistent mass matricescan be conveniently used in the implicit update rule (2430) where a system of equations mustbe solved anyways

127

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

25 Extensions

Many of the finite element tools we have discussed so far (from discretization principles andfunction spaces to elements types and quadrature rules and beyond) apply not only to theframework of small-strain mechanics problems but they extend to a much broader contextwhere they may be conveniently used In this section let us briefly summarize two extensionsof the theory developed so far towards common engineering applications

251 Finite kinematics

When going beyond small strains we need to work with a theory of large (finite) strains whichis commonly referred to as finite kinematics Classical examples are the simulation of rubberymaterials or of biological tissues which generally undergo large strains Here we do not onlyneed to introduce more complex constitutive laws (going well beyond linear elasticity) but wemust 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 strainsHere one typically introduces a deformation mapping of the type

ϕ(X t) ∶ Ω timesRrarr Rd such that x = ϕ(X t) (251)

which assignes to each undeformed point X isin Ω in the undeformed body Ω a point x isin ϕ(Ω)within the deformed body ϕ(Ω) For simplicity we assume that the two points are linked inthe same fashion as in small strains meaning we define a displacement field u ∶ Ω timesR rarr Rdsuch that

x(X t) =X +u(X t) (252)

To describe finite strains inside the deformed body one usually does not resort to ε but insteadintroduces the deformation gradient which is a second-order tensor

F = partx

partXhArr Fij =

partxipartXj

(253)

When inserting the relation (252) we notice that

Fij =partxipartXj

= δij + uij hArr F = I +nablau (254)

This strain measure is frequently used in finite-strain continuum mechanics (besides variousother strain measures that we do not want to introduce here for brevity)

Starting with quasistatics the variational problem in this finite-deformation setting is analogousto the small-strain version The functional of the total potential energy is

I[u] = intΩW (F ) dV minus int

Ωρ0b sdotu dV minus int

partΩNt sdotu dS (255)

where W is still the strain energy density (now depending on F ) ρ0 denotes the mass densityin the undeformed reference configuration (and we integrate over the reference configuration)We seek solutions

u isin U = u isinH1(Ω) ∶ u = u on partΩD such that u = arg min I[u] (256)

128

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The first variation follows as

δI[u] = intΩ

partW

partFijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS

= intΩPijδuij dV minus int

Ωρ0biδuidV minus int

partΩNtiδuidS = 0

(257)

where we introduced the first Piola-Kirchhoff stress tensor with components

Pij =partW

partFij (258)

which generally differs from the Cauchy stress tensor σ and is furthermore not symmetric Atfinite strains there exists a variety of stress measures we here simply make this choice becauseit emerges naturally from the variation Be alerted that commercial FEA software uses all sortsof strain and stress measures (absolute and incremental ones as well as rates) Only in the limitof small (infinitesimal) strains all stress measures tend to coincide and Pij rarr σij

The above form of the first variation looks quite similar to the small-strain version cf (86)Consequently applying a finite element discretizatio of Bubnov-Galerkin type leads to an FEgoverning equation analogous to (815) That is we again arrive at

Fint(Uh) minusFext = 0 (259)

this time with

F ainti = intΩPij(F h)Na

j dV and F aexti = intΩρ0biN

adV + intpartΩN

tiNadS (2510)

In a nutshell the linearized and finite variational problems result in the same system of equa-tions (259) For the special case of linearized kinematics we have Pij rarr σij so that we recoverthe small-strain version (815) Otherwise the above problem is generally nonlinear (even whenconsidering 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 significantnonlinearity and dependence on U In the above variational formulation we assumed that t =const ie that the externally applied forces are constant and do not depend on deformation Asdiscussed in Section 211 that may not always be the case and especially in finite deformationsit is oftentimes not the case eg consider pressure loading t = pn where n is the deformedsurface normal depending on the deformation and hence on U In such cases one needs torevise the external force term appropriately (For pressure loading eg we know the work doneby pressure is Wext = pv which must replace the traction term in the above total potentialenergy)

Despite all the above differences between large and small strains the key take-home messageis that the general finite element setup is fully analogous between both formulations In bothcases we seek displacement field solutions within the same function space and the governingequations are analogous In fact the above description of quasistatics can be extended todynamics again arriving at

MU +Fint(Uh) minusFext = 0 (2511)

with the consisten mass matrix M now having components

Mabij = δij int

Ωρ0N

aN bdV (2512)

Since the overall setup is equivalent this also implies that all finite element concepts discussedso far can be applied to finite-deformation problems That is all element types quadraturerules solvers etc are fully applicable here as well

129

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

252 Thermal problems

The second extension we would like to discuss aims at solving a thermal problem To this endlet us neglect mechanical boundary value problems and instead discuss how temperature evolvesin a body with heat sources and sinks heat conduction and heat fluxes across its boundaryTo give the punchline right away we will again observe that we can repurpose all our finiteelement tools to this new setting which admits the numerical solution of thermal problems Thereason is that as mentioned before mechanical thermal and also electromagnetic variationalproblems have a common structure of their governing equations (see Section 71)

For a thermal problem in d dimensions we aim to find the generally time-dependent temper-ature field

T = T (x t) (2513)

by solving the strong form

⎡⎢⎢⎢⎢⎢⎢⎢⎢⎢⎣

κnabla2T + ρs = ρcvT in Ω

T = T on partΩD

q = minusκnablaT sdotn = q on partΩN

T = T0 at t = 0

(2514)

with the following variables

κ equiv thermal conductivity (assuming Fourierrsquos law of heat conduction)

ρ equiv mass density

s equiv heat source (or sink) per mass

cv equiv specific heat

T equiv Dirichlet boundary conditions (imposing a temperature field on the boundary)

q equiv Neumann boundary conditions (imposing a heat flux across the boundary)

q equiv heat flux

n equiv outward unit normal vector on a surface

(2515)

Let us first consider the time-independent problem for simplicity (ie we take ρcvT rarr 0) Inthis case the resulting steady-state problem has a variational structure with the total potentialenergy defined by the functional I ∶ U rarr R with

I[T ] = intΩ(κ

2∥nablaT ∥2 minus ρsT) dV + int

partΩNq T dS (2516)

This functional indicates that we need to weak seek solutions T = T (x) from within the space

U = T isinH1(Ω) ∶ T = T on partΩD and U0 = δT isinH1(Ω) ∶ δT = 0 on partΩD (2517)

which is analogous to the mechanical problem ie we seek solutions from within the samefunction space (except that we now look for a scalar-value field T instead of the vector-valueddisplacement field u which simplifies relations even)

We know that the solution must render I[T ] stationary so we compute the first variation as

δI[T ] = intΩ(κTiδTi minus ρs δT ) dV + int

partΩNq δT dS = 0 for all δT isin U0 (2518)

130

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

and we read out the weak form

G[T v] = intΩ(κTivi minus ρs v) dV + int

partΩNq v dS = 0 for all v isin U0 (2519)

Notice that the last term (due to the work by external fluxes) has a plus instead of the usualminus sign in the mechanical problem This arises because of the minus sign in the definitionof fluxes q = minusκnablaT To see this let us apply the divergence theorem to the first term andrearrange terms (with δT = 0 on partΩD) to reformulate the first variation as

δI[T ] = minusintΩ(κTii + ρs) δT dV + int

partΩN(κTini + q) δT dS = 0 for all δT isin U0 (2520)

This must hold for all admissible variations δT isin U0 Therefore (2520) is equivalent to stating

κnabla2T + ρs = 0 in Ω minusκnablaT sdotn = q on partΩN and T = T on partΩD (2521)

Ergo the signs are correct as we recover the (time-independent) strong form (2514) We henceconclude that extremal points T isin U of (2516) are indeed guaranteed to satisfy the governingequations (2514) and are thus classical solutions Differently put functional (2516) is thecorrect energy functional corresponding to the (static) strong form given by (2514) We canfurther show that the solution is a minimizer of I since the second variation is

δ2I[T ] = intΩκδTi δTidV = int

Ωκ ∥δnablaT ∥2 dV ge 0 for all δT isin U0 (2522)

The energy functional (2516) and the resulting weak form (2519) are quite similar to thoseof the mechanical boundary value problem To visualize this we rewrite functional I for thethermal problem for short as

I[T ] = 1

2B(TT ) minusL(T ) (2523)

with the bilinear form B and the linear form L defined by respectively

B(a b) = intΩκnablaa sdot nablab dV and L(a) = int

ΩρsadV minus int

partΩNq a dS (2524)

This form is analogous to eg that of the mechanical problem of a bar whose energy functionalwas derived as (631)

The weak form can be expressed using the above forms as

G[T v] = B[T v] minusL[v] = 0 for all δT isin U0 (2525)

Let us define a spatial finite element discretization of Bubnov-Galerkin-type viz

T h(x) =n

sumb=1

T bN b(x) vh(x) =n

suma=1

vaNa(x) (2526)

Insertion into the weak form (2525) which must hold for all choices of va allows us to deducethe governing equations as

(intΩκNa

iNbj dV )T b

acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1paraQaint(T )

minus [intΩρsNadV minus int

partΩN

qNadS]acutesup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1cedilsup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1sup1para

Qaext

= 0 for all a = 1 n (2527)

131

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

This implies a system of equations that is quite similar and fully analogous to that of linearelastic mechanical boundary value problems Specifically (2527) balances the internal heat fluxQaint(T ) due to heat conduction with the external heat flux Qaext due to heat sources and due toheat flux across the surface ndash for each node a This is of course the analog of the mechanicalsystem Fint(U) = Fext

When introducing the global vector of the unknown nodal temperatures as T = T 1 Tnthe above system conveniently shows that

Qint(T ) =KT with Kab = intΩκNa

iNbj dV (2528)

denoting the components of a conductivity matrix Note that like in linear elasticity weobserve a linear relation between Qint(T ) and vector T (which is a consequence of the assump-tion of Fourierrsquos law of heat conduction which is linear itself) This results in a linear systemof equations KT =Qext to be solved for the nodal temperatures

When considering time-dependent thermal problems we must extend the above to includetime dependence in the temperature field T = T (x t) Without showing all details (one canderive this form eg from the principle of virtual work) we arrive at the governing equation

CT +Qint(T ) minusQext(t) = 0 (2529)

with a matrix C that is similar to the mass matrix and has components

Cab = intΩρcvN

aN bdV (2530)

The time derivative can be approximated eg by using finite differences which leads to atime-incremental problem as in the dynamic FEA formulation of Section 22

We close by pointing out that (2529) bears great similarity to the dynamic mechanical FEgoverning equations of Section 22 and we seek solutions from within the same function space(except replacing vector-valued displacements by scalar-valued temperatures) As a conse-quence all element types quadrature rules solvers etc that we derived for mechanical (initial)boundary value problems are fully applicable here as well We may thus conveniently re-purposeour FE tools for the analysis of thermal problems

Shown below is an example of solution of the steady-state heat equation illustrating the tem-perature field in a pump casing model (more information can be found online)

132

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

26 Error analysis and adaptivity common mistakes

Having discussed the finite element method the equations to be solved the ways in which acontinuous problem is turned into a discrete one and the various choices of element typesquadrature rules solvers etc to be made it is important to understand the potential errorsources and ways to reduce errors In this section we first discuss the numerical error sourcesinherent in the finite element method then introduce mesh adaptivity and error estimates andfinally review common pitfalls in FE analysis

261 Finite element error analysis

Solving (initial) boundary value problems by the finite element method introduces numeroussources of errors that one should be aware of

(i) The discretization error (also known as the first fundamental error) arises fromdiscretizing the domain into elements of finite size h As a result the body Ω is notrepresented correctly and the model (eg the outer boundary) may not match the trueboundary partΩ (eg think of approximating a circular domain Ω by CST or Q4 elementswith straight edges) This error can be reduced by mesh refinement (and we discussedr-refinement h-refinement p-refinement and hp-refinement in Section 10)

(ii) The numerical integration error results from the application of numerical quadraturefor the evaluation of element force vectors and stiffness matrices in general as discussedin Section 17 (unless in exceptional cases like the simplicial elements integration can becarried out exactly)

intΩef(ξ)dξ cong

nQP

sumq=1

Wqf(ξq) (261)

For an integrand f isin Ck+1(Ω) the error in 1D is bounded by

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQP

sumq=1

Wq f(ξq)RRRRRRRRRRRle C ∥Ω∥hk+1 max

ξisin[minus11]∣α∣=k+1

∥Dαf(ξ)∥ (262)

with an element-dependent constant C gt 0 In other words the error due to numericalquadrature grows with element size h as hk+1 The error is smaller the smoother thefunction f to be integrated (The extension to higher dimensions is analogous) Hencethe numerical integration error depends on the smoothness of the integrand and calls fora proper choice of the integration order

(iii) The solution error stems from numerically solving linear systems TUh = F In generalthe accuracy of the solution depends on the condition number of the matrix

κ = ∥T ∥ sdot ∥T minus1∥ = ∣λmax

λmin∣ (263)

with λmax (λmin) being the largest (smallest) eigenvalue of T The higher the conditionnumber the larger the numerical errorA 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 alinear elastic simulation it is advisable to normalize elastic constants by 1 GPa insteadof assigning eg E = 210 sdot 109 (instead use E = 21 and know that your results will be in100 GParsquos)

133

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

(iv) An approximation error is introduced by approximating the functional space U (inwhich to find the solution u(x)) by a finite-dimensional subspace Uh sub U As an example consider an exact solution u(x) in 1D which is approximated by a piece-wise linear polynomial function uh(x) The bar hanging from the ceiling under its ownweight was one such example for which the solution was found to be exact at the nodeswith an error e(x) = u(x)minus uh(x) arising within elements Therefore we can find a pointz within each element such that

parte

partx(z) = 0 for xi le z le xi+1 (264)

Consequently we can expand the error to find the solution at a node as

e(xi) = 0 = e(z) + (xi minus z)parte

partx(z) + (xi minus z)2

2

part2e

partx2(z) +O((xi minus z)3) (265)

Using (264) we find that

e(z) = minus(xi minus z)2

2

part2e

partx2(z) +O(h3) (266)

Note that

(xi minus z)2 le (xi+1 minus xi2

)2

= h2

4 (267)

where h denotes the nodal spacing Altogether we have thus shown that the maximumerror in an element is bounded by

∣e(x)∣max leh2

8max

xilexlexi+1

∣part2u

partx2∣ (268)

As shown in Appendix C the above error bound can be significantly generalized Forpolynomial shape functions of order k and u isinHk+1(Ω) we have

∣uh minus u∣H1(Ω) lehk

πk∣u∣Hk+1(Ω) and ∥uh minus u∥H1(Ω) le ch

k ∣u∣Hk+1(Ω) (269)

using Sobolev norms In simple terms the error is again determined by the smoothnessof the function to be interpolated and it is expected to decrease with decreasing elementsize (as hrarr 0) ndash the faster the higher the interpolation orderNote that special caution is required if stress concentrations of any kind are to be rep-resented (eg imagine a linear elastic fracture problem and the issues arising from usingpolynomial-type elements to capture the stress singularity near the crack tip)

(v) A truncation error is made by every computer when storing and operating numericvalues with only a finite number of digits (eg floats doubles etc) This is unavoidableand one should be aware of what this error is (especially when choosing eg solvertolerances) Choosing a solver tolerance ε in itself produces truncation error becausewe contend with a solution U that satisfies ∣Fint(U) minusFext∣ le ε (instead of being zero)

(vi) Finally no simulation is free of modeling errors which refers to the large collectionof errors made by the selection of the analytical model to be solved (before starting anynumerical approximation) For example we make choices about an appropriate materialmodel choose material parameters boundary conditions and geometric simplificationsincluding reductions to lower dimensions (eg plane strain or plane stress instead of a 3Dsimulation) Any such decision is prone to introducing errors

The sum of all of the above error sources makes up the numerical error inherent in everysimulation

134

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

262 Smoothing and adaptivity

Both for postprocessing of approximate solutions and for mesh refinement (to be discussed be-low) it is helpful to introduce a smoothing scheme that takes piecewise-defined solutions (egthe stress and strain fields in case of simplicial elements) and computes a smooth approximationdefined by smoothed nodal values of the discontinuous quantities

In case of simplicial elements the stresses and strains are constantwithin elements Here one can define nodal quantities eg as

(εa)lowast =sumnnbj=1 εejVejsumnnbj=1 1Vej

(2610)

where the element quantities εe of all nnb neighboring elementsmeeting at a node a are weighted by the respective element volumeVe This weighting results in smaller elements (whose quadraturepoints are closer to the node) having a larger weight than largeelements (where quadrature points are far from the node)

a (e )

ee5+

+

++

+ee1

ee2ee3

ee4

In case of higher-order elements such as eg the Q4 element one can extrapolate elementquantities that are defined at the quadrature points ξk to the nodes For example for the Q4element there are four nodes and four quadrature points so that one can uniquely solve forthe four nodal values Once the smoothed nodal values are known one again uses a smooth-ing relation like (2610) with the element quantities εej replaced by the nodal value εae fromthe respective element and element volume Ve replaced by the nodal weight (obtained fromextrapolating the quadrature point weights WqJqt to the nodes)

When performing adaptive mesh refinement we need an error norm where as an example wediscuss the ZZ error estimator named after its inventors Zienkiewicz and Zhu If we usea smoothing scheme like the above we can define smoothed continuous strains εlowast which iscontrasted with the approximate solution εh so that one may define the error per element e byusing the energy norm viz

∥ε minus εlowast∥2e = int

ΩeW (εlowast minus ε)dV (2611)

Note that this definition is not unique and one could also use the L2-norm

∥ε minus εlowast∥2e = int

Ωe∥εlowast minus ε∥2

dV (2612)

or any other sensible norm These norms indicate the quality of a solution εh (if the solutionto be found is smooth or if the mesh is very fine then the piecewise constant solution εh canbe expected to be close to the interpolated smoothed solution εlowast)

In order to define an element-wise error estimate it makes senseto introduce the normalization

ηe =∥ε minus εlowast∥e

∥ε minus 0∥e + ∥ε minus εlowast∥e (2613)

ie the error is divided by the energy in the element so as to notover- or underestimate element errors based on element sizes as wellas in case of vast differences in element strain energies (the abovedenominator may be interpreted as an expansion for small errorsand avoids division by zero)

he

e

e

he

135

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

The mesh refinement criterion states that an element e is refined if

ηe gt ηtol (2614)

with some tolerance ηtol determined as a compromise between accuracy and efficiency Basedon the above refinement criterion a set of elements flagged for refinement is identified after asolution uh has be found The elements of highest error ηe are refined and the error estimatesare re-evaluated until sufficiently low element errors are achieved

Needed next is a mesh refinement algorithm For example a frequent choice for triangularelements is longest edge bisection which identifies the longest edge in an element to berefined and inserts a new node at this edgersquos midpoint followed by an update of the elementconnectivity (thus replacing two existing elements by four new elements as schematically shownbelow) Note that this involves some book-keeping since adjacent elements flagged for refinementinterfere so that one needs an algorithmic decision about which elements to refine first and howto handle adjacent elements identified for refinement etc

element to be refined new node inserted atlongest-edge midpoint

new elements createdby connecting nodes

263 Common errors

As Cook Malkus Plesha and Wit put it in their FEA textbook man-made errors in FEAanalysis usually result from unfamiliarity of the user with (i) the physics of the problem (ii) theelement type and its behavior (iii) the limitations of the chosen analysis method and (iv) thesoftware being used Although it is difficult to list all possible error sources in FE analysis letus mention a few common pitfalls to be avoided

poor mesh quality is a very frequent error source The mesh size must be appropriatelyfine (eg one cannot hope to accurately represent stress concentrations near notches orcorners by a few large elements as was done in the Sleipner A oil platform examplediscussed at the very beginning see the mesh shown below) Gradients in mesh sizeshould be smooth rather than abrupt for improved accuracy of solutions Caution isrequired when mixing element types While this is generally possible there must not beany ldquohangingrdquo or unconnected nodes or element edges with different numbers of nodeswhen seen from both adjacent elements One should also avoid large element distortionssince this can lead (through the Jacobian J) to a considerable loss in accuracy Distortionsinclude large aspect ratios poorly shaped elements strongly curved or warped elementsetc For the same reason one should avoid warping of elements in 3D Several examplesare shown below

poor mesh (strong constrast)

better mesh (smooth gradient)poor mesh used in the

Sleipner A study

136

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

poor aspect ratio

ab

near-triangle Q4 off-centered mid-nodes

highly skewed element near-triangle Q4 strongly curved edge

warped Q8 element

Q8

CST

bad element combination

Many codes define the so-called Jacobian ratio j in order to quantify the distortion ofan element When using numerical quadrature all fields of interest are only evaluatedat the quadrature points (q = 0 nQP minus 1) which is where one needs to calculate theJacobian J(ξq) = detF (ξq) The Jacobian ratio of an element e is thus defined as

je =maxq J(ξq)minq J(ξq)

(2615)

ie we compare the minimum to the maximum value of the Jacobian within an elemente Ideally for an undistorted element we have J(ξq) = conts and hence maxq J(ξq) =minq J(ξq) or je = 1 If je ne 1 then the element is distorted ndash the more the further je isaway from 1

wrong element types are a common reason for trouble (eg us-ing structural vs solid elements or using 2D vs 3D elements) 2Delements can effectively be used only if the problem is plane-strainor plane-stress (and the element thickness must be set correctly)Structural elements are significantly more efficient than solid el-ements but they come with strong limitations and eg cannotaccurately represent stress concentrations encountered near sharpcorners (as shown on the right)

solid model beam model

stress concentration

linear vs nonlinear analysis are deformations expected to be large or small (so thatfinite or infinitesimal strains can be used respectively) Is the material model linearelastic or should a finite-deformation model be used

boundary conditions must be chosen appropriately (at the right locations of the righttype and magnitude) If symmetries can be exploited only a reduced system can bemodeled efficiently but boundary conditions must be chosen correctly and it must beensured that the solution is indeed symmetric (eg when studying buckling problemsthe assumption of symmetry automatically rules out asymmetric buckling modes thesame applies to vibrational eigenmodes)

step sizes (ie the load step size in quasistatic studies and the time step size ∆t indynamic studies) must be chosen to ensure convergence and stability of the solver

units must be chosen properly and entered consistently (eg always stick to SI units ndashbut bare in mind the problems associated with large numbers cf Section 261)

the interpretation of results requires caution Are color plots of fields of interest theraw data or smoothed fields Are the units correct are global or local coordinates being

137

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

used for eg the definition of tensor components Can a simple test case be comparedto an analytical or simplified solution

All commercial FEA codes have internal sanity checks which eg for an implicit analysisverify that the tangent or stiffness matrix has no zero diagonal entries The occurrence of suchwould imply eg nodes that are not connected to any element duplicated nodes or materialmoduli 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(eg a Riks path-following or line-search solver rather than a Newton-Raphson-type solver)The same applies to structures with mechanisms (ie zero-energy modes that are not rigid-body modes) For example discretizing a long bar into several 2-node bar elements leads tomechanisms since the 2-node bar element has only axial stiffness To identify the cause of zeroeigenvalues of the stiffness matrix it may be insightful to visualize the corresponding eigenmode

138

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

27 FEM ndash Extensions amp Applications

Through this Introduction to FEA we have discussed the foundations of the finite elementmethod and its applications particularly for solid and structural analysis within the frameworkof linearized kinematics (small strains) and primarily within linear elasticity with extensionsto (small-strain) inelastic behavior In this final section we would like to briefly point outextensions of the basics introduced so far along with practical hints

commercial codes most commercially available FE codes follow a similar structure tothe one discussed here in class as well as during exercises The FEM software providestools for assembling and solving boundary value problems further implementations ofthe most common element types and material models If the user cannot use existingimplementations then there is the common option to implement onersquos own element (so-called user element or UEL) or onersquos own material model (so-called user material modelor UMAT) The UMAT is usually the simpler and most often used option It is of utmostimportance to adhere to the exact strain and stress measures used in the code sinceconfusion thereof leads to nonsensical results In addition most commercial codes do nothave a variational basis and instead define the constitutive law as a relation between strainand stress rates (σ vs ε) or increments ( dσ vs dε) Especially at large strains it isagain essential to adhere to the correct rates or increments (there is a myriad of alternatedefinitions that can be used) improper use of non-conjugate rates is a common pitfall ofcommercial codes14

static vs dynamic FEA if at all possible a quasistatic implicit solution of mechanicalboundary value problems is generally preferable as it ensures that an equilibrium solutionhas been found However this may not always be possible eg because no consistenttangent T is available (because the material model lacks an analytical form of Cijkl orbecause the element implementation does not permit the analytical calculation of thetangent matrix T ) or because the tangent matrix is so large that its calculation and storageis disadvantageous if not impossible computationally We note that an approximatetangent matrix can always be compute numerically by employing finite differences

T abij (U) =partF ainti

partubj(U) asymp

F ainti(U + δebj) minus F ainti(U)δ

(271)

with vector ebi = (0 010 0)T of the length of U with a 1 placed at the locationof component ubj and 0 lt δ ≪ 1 This procedure has the disadvantage that it is compu-tationally expensive (the numerical calculation of T requires perturbing each and everyentry 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 replacethe static simulation to solve for U by a dynamic one to solve for U(t) including sufficientdamping leads to solutions that converge over time to a steady-state Uinfin = limtrarrinfinU(t)and it is expected that this steady state coincides with the static solution ie Uinfin = U Such solvers must be used with caution First it is important to check if the solution hasindeed converged over time (if vibrations or waves are still present in the solution thosemay over- or under-predict local strains and stresses by considerable amounts) Secondunless in a static linear elastic study (which surely should not be solved dynamically butstatically since an analytical tangent is available) the dynamic solver may converge toone of many equilibrium solutions and depending on the initial conditions may take onequite far from the sought solution

14Studies of errors resulting from improper use of rates can be found here and here

139

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

large deformations in this course we focused on linearized kinematics (commonly re-ferred to as ldquosmall strainsrdquo and valid up to at the very most a few percent strain)When larger deformations are to be considered one must employ a finite-strain formu-lation (eg working with deformation and velocity gradients as well as finite-kinematicsstress measures) As a consequence nodal element forces depend not only on the stressesinside the element but also the current deformed state of the element This in turn leadsto the tangent matrix T containing both material stiffness and as a new contributiongeometric stiffness Therefore even when assuming linear elastic material behaviorthe resulting problem is not linear and T is not constant in general As a further conse-quence one may experience mechanical instability and bifurcation which is problematicfor numerical solvers (as also discussed further below for damage and failure)

total-Lagrangian vs updated-Lagrangian so far we only discussed finite elementswhose initial geometry remains unchanged during a simulation For example even thoughloads vary with time we always use the same reference configuration of an element This iscalled a total-Lagrangian formulation By contrast we could also update the referenceconfiguration after each solution step ie once U(tα) has been found we update all nodalpositions xa(tα)larr xa(tα)+ua(tα) recompute the shape functions and ndash at the next timestep tα+1 solve for U(tα+1) based on the new reference configuration This approach isemployed to avoid large mesh distortions and is referred to as updated-LagrangianWhile both have their advantages and disadvantages one computational challange of theupdated-Lagrangian implementation is the accummulation of numerical errors over timeA further alternative generally used in fluid mechanics is the Eulerian formulation inwhich all governing equations are formulated in the currentdeformed configuration

incompressibility especially in large deformations the assumption of incompressibility(ie of zero volume change) is common when modeling eg problems of rubber elastic-ity or generally of soft matter such as tissues and polymers but also in metal plasticityModeling incompressibility is not straight-forward since it imposes a constraint on thedeformation within elements (the nodal dofs of an element are no longer independentsince the element must maintain a constant volume under incompressible deformation)This case calls for a special type of element that can handle incompressibility such asthe so-called family of augmented finite elements or mixed finite elements whichhave mixed dofs including both displacements and the pressure inside the element Theseelements are often referred to as PkQl elements where k denotes the order of interpo-lation of the displacement field while l stands for the polynomial interpolation order ofpressure (and one generally seeks l le k) Common choices of lowest order are eg P1Q0and P1Q1

singularities the FE method is based on polynomial shape functions to interpolateall fields of interest When boundary value problems involve singularities (such as themechanical fields around a crack tip or a sharp notch or the thermal fields around apoint heat source) then the polynomial interpolation inherently cannot lead to a goodapproximate solution As a consequence results are usually mesh-dependent the smallerthe elements (eg at the crack tip) the higher the calculated stress values within thoseelements adjacent to the crack tip It is for this reason that classical FEM is problematicwhen dealing with fracture problems (or generally any problem involving singularities)and results must be interpreted with utmost care An h-convergence study usually revealsthe diverging solution quickly

As a remedy techniques like the extended FE method (XFEM) have been introducedwhich enrich the interpolation space Uh by singularities of the expected type For examplefor fracture problems within linearized kinematics the stress is expected to diverge as

140

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

1radicr at the crack tip with r gt 0 being the distance from the tip Hence including shape

functions of this type allows the interpolation to capture the diverging mechanical fieldsthus removing the singularity and yielding reasonable solutions

damage and failure when a material model includes damage or failure it generallysoftens under increasing loads (as the material suffers from damage its stiffness ultimatelytends to zero under increased loading) Such behavior also causes numerical difficultiesbecause the softening branch of the stress-strain response leads to instability (eg mostiterative solvers fail when the tangent matrix T is no longer positive-definite which isgenerally the case during mechanical softening) This manifests not only in solver failurebut also in mesh-dependence (again a study of h-convergence should reveal such issues)

141

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

A Vector Spaces

We define a set Ω as a collection of points X isin Ω

We further say Ω is a (proper) subset of all space if Ω sube Rd in d dimensions (proper if Ω sub Rd)

We usually take Ω to be an open set ie Ω cap partΩ = empty with boundary partΩ

Deformation and motion are described by a mapping

ϕ ∶ X isin Ωrarr ϕ(X) isin Rd or ϕ ∶ Ωrarr Rd (A1)

where Ω is the domain and Rd the range of ϕ The mapped (current) configuration of Ω isϕ(Ω)

Every function f(x) ∶ Rrarr R is a mapping from R to R

We call a mapping injective (or one-to-one) if for each x isin ϕ(Ω) there is one unique X isin Ωsuch that x = ϕ(X) In other words no two points X isin Ω are mapped onto the same positionx A mapping is surjective (or onto) if the entire set Ω is mapped onto the entire set ϕ(Ω)ie for every X isin Ω there exists at least one x isin ϕ(Ω) such that x = ϕ(X) If a mapping is bothinjective and surjective (or one-to-one and onto) we say it is bijective A bijective mapping isalso called an isomorphism

For example ϕ ∶ Ωrarr Rd is injective whereas ϕ ∶ Ωrarr ϕ(Ω) would be bijective

For time-dependent problems we have ϕ ∶ ΩtimesRrarr Rd and x = ϕ(X t) This describes a familyof configurations ϕ(Ω t) from which we arbitrarily define a reference configuration Ω for whichϕ = id (the identity mapping)

A linearvector space Ω+R sdot is defined by the following identities For any uvw isin Ωand αβ isin R it holds that

(i) closure α sdotu + β sdot v isin Ω

(ii) associativity wrt + (u + v) +w = u + (v +w)(iii) null element exist 0 isin Ω such that u + 0 = u(iv) negative element for all u isin Ω exist minusu isin Ω such that u + (minusu) = 0

(v) commutativity u + v = v +u(vi) associativity wrt sdot (αβ) sdotu = α(β sdotu)

(vii) distributivity wrt R (α + β) sdotu = α sdotu + β sdotu(viii) distributivity wrt Ω α sdot (u + v) = α sdotu + α sdot v

(ix) identity 1 sdotu = u

examples

Rd is a vector space By contrast Ω sub Rd is not a vector space since ndash in general ndash itviolates eg (i) closure and (iv) null element

P2 = ax2+bx+c ∶ a b c isin R is the space of all second-order polynomial functionsor an ordered triad (a b c) isin R3 More generally Pk(Ω) is the space of all kth-orderpolynomial functions defined on Ω Pk(Ω) is a linear space

We call P2 a linear subspace of Pk with k ge 2 and we write P2 sube Pk

142

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

B Function Spaces

Consider a function u(x) ∶ Ωrarr R and Ω sub R

u is continuous at a point x if given any scalar ε gt 0 there is a r(ε) isin R such that

∣u(y) minus u(x)∣ lt ε provided that ∣y minus x∣ lt r (B1)

A function u is continuous over Ω if it is continuous at all points x isin Ω

u is of class Ck(Ω) with an integer k ge 0 if it is k times continuously differentiable over Ω (ieu possesses derivatives up to the kth order and these derivatives are continuous functions)

Examples

Functions u(x) isin Pk with k ge 0 are generally Cinfin(R)

Consider a continuous piecewise-linear function u ∶ Ω = (02) rarr R Function u is C0(Ω)but not C1(Ω)

The Heavyside function H(x) is said to be Cminus1(R) since its ldquozeroth derivativerdquo (iethe function itself) is not continuous

If there are no discontinuities such as cracks shocks etc (or discontinuities in the BCsICs) weusually assume the solution fields are Cinfin(Ω) so we may take derivatives otherwise derivativesexist almost everywhere (ae)

To evaluate the global errors of functions we need norms

Consider a linear space U +R sdot A mapping ⟨sdot sdot⟩ ∶ U times U rarr R is called inner product onU times U if for all u vw isin U and α isin R

(i) ⟨u + vw⟩ = ⟨uw⟩ + ⟨vw⟩(ii) ⟨u v⟩ = ⟨v u⟩

(iii) ⟨α sdot u v⟩ = α ⟨u v⟩(iv) ⟨uu⟩ ge 0 and ⟨uu⟩ = 0hArr u = 0

A linear space U endowed with an inner product is called an inner product space

Examples

⟨uv⟩ = uivi = u sdot v defines an inner product for uv isin Rd

The L2-inner product for functions u v isin U with domain Ω

⟨u v⟩L2(Ω) = intΩu(x) v(x)dx and often just ⟨u v⟩ = ⟨u v⟩L2(Ω) (B2)

Note that if ⟨u v⟩ = 0 we say u and v are orthogonal

Examples

Legendre polynomials

pn(x) =1

2nn

dn

dxn(x2 minus1)n so that p0 = 1 p1 = x p2 =

1

2(3x2 minus1) (B3)

orthogonality on Ω = (minus11)

int1

minus1pn(x)pm(x)dx = 2

2n + 1δmn (B4)

143

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

trigonometric functions

pn(x) = cos(πnxL

) (B5)

orthogonality on Ω = (minusLL)

intL

minusLpn(x)pm(x)dx =

⎧⎪⎪⎪⎪⎨⎪⎪⎪⎪⎩

2L if m = n = 0

L if m = n ne 0

0 else

(B6)

Now we are in place to define the distance between x1 and x2

d(x1 x2) =radic

⟨x1 minus x2 x1 minus x2⟩ (B7)

We need this concept not only for points in space but also to define the closeness or proximityof functions

Consider a linear space U +R sdot A mapping ∥sdot∥ ∶ U rarr R+ is called a norm on U if for allu v isin U and α isin R

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (triangle inequality)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥(iii) ∥u∥ ge 0 and ∥u∥ = 0 hArr u = 0

A linear space Ω endowed with a norm is called a normed linear space (NLS)

Examples of norms

Consider the d-dimensional Euclidean space so x = x1 xdT Then we define

ndash the 1-norm ∥x∥1 = sumdi=1 ∣xi∣

ndash the 2-norm ∥x∥2 = (sumdi=1 ∣xi∣2)12

(Euclidean norm)

ndash the n-norm ∥x∥n = (sumdi=1 ∣xi∣n)1n

ndash the infin-norm ∥x∥infin = max1leilen ∣xi∣

Now turning to functions the Lp-norm of a function u ∶ Ωrarr R

∥u∥Lp(Ω) = (intΩup dx)

1p

(B8)

The most common norm is the L2-norm

∥u∥L2(Ω) = ⟨uu⟩12L2(Ω)

= (intΩu2(x)dx)

12

(B9)

Furthermore notice that

∥u∥Linfin(Ω) = ess supxisinΩ

∣u(x)∣ (B10)

where we introduced the essential supremum

ess supxisinΩ

∣u(x)∣ =M with the smallest M that satisfies ∣u(x)∣ leM for ae x isin Ω (B11)

144

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Now that we have norms we can generalize our definition of the distance If un u isin U equippedwith a norm ∥sdot∥ ∶ U rarr R then we define the distance as

d(un u) = ∥un minus u∥ (B12)

Now we are in place to define the convergence of a sequence of functions un to u in U wesay un rarr u isin U if for all ε gt 0 there exists N(ε) such that d(un u) lt ε for all n gt N

Examples

Consider un isin U = P2(Ω) with L2-norm and Ω sub R

un(x) = (1 + 1

n)x2 rarr u(x) = x2 since d(un minus u) =

1

nint x2 dx (B13)

with u isin U = P2(Ω) For example for d(un minus u) lt ε we need n gt N = intΩ x2 dxε

Fourier series

u(x) =infin

sumi=0

ci xi rArr un(x) =

n

sumi=0

ci xi such that un rarr u as nrarrinfin (B14)

Given a point u in a normed linear space U a neighborhood Nr(u) of radius r gt 0 is definedas the set of points v isin U for which d(u v) lt r Now we can define sets properly

A subset V sub U is called open if for each point u isin V there exists a neighborhood Nr(u) whichis fully contained in V The complement V of an open set V is by definition a closed set Theclosure V of an open set V is the smallest closed set that contains V In simple terms a closedset is defined as a set which contains all its limit points Therefore note that

supxisinΩ

∣u(x)∣ = maxxisinΩ

∣u(x)∣ (B15)

For example (01) is an open set in R [01] is a closed set and [01] is the closure of (01)

A linear space U is a complete space if every sequence un in U converges to u isin U In simpleterms the space must contain all limit points

A complete normed linear space is called a Banach space ie U +R sdot with a norm ∥sdot∥ andun rarr u isin U A complete inner product space is called a Hilbert space

Note that ∥sdot∥ = ⟨sdot sdot⟩12 defines a norm Hence every Hilbert space is also a Banach space (butnot the other way around)

As an example consider U = Pn (the space of all polynomial functions of order n isin N) This is alinear space which we equip with a norm eg the L2-norm It is complete since (an bn cn )rarr(a b c ) for a b c isin R And an inner product is defined via ⟨u v⟩ = intΩ uv dx With allthese definitions U is a Hilbert space

We can use these norms to define function spaces eg the L2-space of functions

L2(Ω) = u ∶ Ωrarr R ∶ intΩu2 dx ltinfin (B16)

We say L2(Ω) contains all functions that are square-integrable on Ω

145

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Examples

u ∶ Ωrarr R with u isin Pk(Ω) and ess supxisinΩ ∣u(x)∣ ltinfin Then u isin L2(Ω)

f ∶ Rrarr R with f(x) = xminus2 is not in L2(Ω) if 0 isin Ω

Piecewise constant functions u (with ess supxisinΩ ∣u(x)∣ ltinfin) are square-integrable and thusin L2

Note that we can write alternatively

L2(Ω) = u ∶ Ωrarr R ∶ ∥u∥L2(Ω) ltinfin (B17)

146

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

C Approximation Theory

Motivation in computational mechanics we seek approximate solutions uh(x) = sumNa=1 uaNa(x)eg a linear combination of basis functions Na(x) with amplitudes ua isin R

Questions How does uh(x) converge to u(x) if at all Can we find an error estimate ∥uh minus u∥What is the rate of convergence (how fast does it converge cf the truncation error argumentsfor grid-based direct methods)

Fundamental tools for estimating errors are the Poincare inequalities

(i) Dirichlet-Poincare inequality

inth

0∣v(x)∣2 dx le chint

h

0[vprime(x)]2

dx if v(0) = v(h) = 0 (C1)

with a constant ch gt 0 that depends on the interval size h

(ii) Neumann-Poincare (or Poincare-Wirtinger) inequality

inth

0∣v(x) minus v∣2 dx le chint

h

0[vprime(x)]2

dx with v = 1

hint

h

0u(x) dx (C2)

In 1D an optimal constant can be found ch = h2π2

(iii) extension

inth

0∣v(x)∣2 dx le h

2

π2[int

h

0[vprime(x)]2

dx + ∣v(x0)∣2] with x0 isin [0 h] (C3)

Now let us use those inequalities to find error bounds Suppose a general function u(x) isapproximated by a piecewise linear approximation uh(x) Letrsquos first find a local error estimate

Consider v(x) = uprimeh(x) minus uprime(x) and note that by Rollersquos theorem

uprimeh(x0) minus uprime(x0) = 0 for some x0 isin (0 h) (C4)

Next use inequality (iii)

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprimeh(x) minus u

primeprime(x)∣2 dx (C5)

but since uh(x) is piecewise linear we have uprimeprimeh(x) = 0 so that we arrive at the local errorestimate

inth

0∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 inth

0∣uprimeprime(x)∣2 dx (C6)

Now letrsquos seek a global error estimate by using

intb

a(sdot) dx =

n

sumi=0int

xi+1

xi(sdot) dx with x0 = a xn+1 = b xi+1 = xi + h (C7)

so that

intb

a∣uprimeh(x) minus u

prime(x)∣2 dx le h2

π2 intb

a∣uprimeprime(x)∣2 dx (C8)

147

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Taking square roots we see that for Ω = (a b)

∥uprimeh minus uprime∥L2(Ω)

le hπ

∥uprimeprime∥L2(Ω)

(C9)

and hence that ∥uprimeh minus uprime∥L2(Ω)

rarr 0 as hrarr 0 linearly in h

We want to write this a bit more concise Let us define the Sobolev semi-norm

∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

or for short ∣u∣k = ∣u∣Hk(Ω) (C10)

where in 1D Dku = u(k) A semi-norm in general must satisfy the following conditions

(i) ∥u + v∥ le ∥u∥ + ∥v∥ (like for a norm)

(ii) ∥α sdot u∥ = ∣α∣ ∥u∥ (like for a norm)

(iii) ∥u∥ ge 0 (a norm also requires ∥u∥ = 0 iff u = 0 not so for a semi-norm)

Examples in 1D

from before

∣u∣H1(ab) = [intb

a∣uprime(x)∣2 dx]

12

(C11)

analogously

∣u∣H2(ab) = [intb

a∣uprimeprime(x)∣2 dx]

12

(C12)

so that we can write (C8) as

∣uh minus u∣2H1(ab) leh2

π2∣u∣2H2(ab) rArr ∣uh minus u∣H1(ab) le

h

π∣u∣H2(ab) (C13)

Hence the topology of convergence is bounded by the regularity of u Convergence withh-refinement is linear

note the special case

∣u∣2H0 = intΩu(x)2 dx = ∥u∥2

L2 (L2-norm) (C14)

We can extend this to higher-order interpolation For example use a piecewise quadraticinterpolation uh From Poincare

inth

0∣uprimeh minus u

prime∣2 dx le h2

π2 inth

0∣uprimeprimeh minus u

primeprime∣2 dx le h4

π4 inth

0∣uprimeprimeprimeh minus uprimeprimeprime∣2 dx = h

4

π4 inth

0∣uprimeprimeprime∣2 dx (C15)

Extension into a global error estimate with quadratic h-convergence

∣uh minus u∣H1(ab) leh2

π2∣u∣H3(ab) (C16)

For a general interpolation of order k

∣uh minus u∣H1(ab) lehk

πk∣u∣Hk+1(ab) (C17)

148

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Why is the Sobolev semi-norm not a norm Simply consider the example u(x) = c gt 0 Allhigher derivatives vanish on R so that ∣u∣Hk(Ω) = 0 for Ω sub R and k ge 1 However that does notimply that u = 0 (in fact it is not)

Let us introduce the Sobolev norm (notice the double norm bars)

∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

or for short ∥u∥k = ∥u∥Hk(Ω) (C18)

For example in one dimension

∥u∥2H1(Ω) = ∣u∣20 + ∣u∣21 = int

Ωu(x)2 dx + int

Ω[uprime(x)]2

dx = ∥u∥2L2(Ω) + ∣u∣2H1(Ω) (C19)

Note that this also shows that more generally

∥u∥2Hk(Ω) ge ∣u∣2Hk(Ω) (C20)

Let us derive a final global error estimate one that involves proper norms ndash here for the exampleof a piecewise linear uh Start with Poincare inequality (i)

∥uh minus u∥2L2(ab)

= intb

a∣uh minus u∣2 dx le chint

b

a∣uprimeh minus u

prime∣2 dx = ch ∣uh minus u∣2H1(ab) (C21)

and from (C19)

∥uh minus u∥2H1(Ω) = ∥uh minus u∥2

L2(Ω) + ∣uh minus u∣2H1(Ω)

le (1 + ch) ∣uh minus u∣2H1(ab) le clowasth ∣u∣2H2(ab)

(C22)

which along with (C13) gives

∥uh minus u∥H1(ab) le ch ∣u∣H2(ab) le ch ∥u∥H2(ab) (C23)

Summary and Extension of Norms

Lp-norm ∥u∥Lp(Ω) = (intΩup dx)

1p

Sobolev semi-norm ∶ ∣u∣Hk(Ω) = [intΩ∣Dku∣2 dx]

12

= ∣u∣k

Sobolev norm ∶ ∥u∥Hk(Ω) = (k

summ=0

∣u∣2Hm(Ω))12

= ∥u∥k

generalization ∶ ∣u∣Wkp(Ω) = [intΩ∣Dku∣p dx]

1p

= ∣u∣kp

∥u∥Wkp(Ω) = (k

summ=0

∣u∣pWmp(Ω)

)1p

= ∥u∥kp

149

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

D Sobolev spaces

The Sobolev norm is used to define a Sobolev space

Hk(Ω) = u ∶ Ωrarr R such that ∥u∥k ltinfin (D1)

which includes all functions whose kth-order derivatives are square-integrable

Examples

Consider a piecewise linear function u isin C0 defined on Ω = (02) Then u isin H1(Ω) sincethe first derivative is piecewise constant and therefore square-integrable

Consider the Heavyside step function H(x) isin Cminus1 defined on R Then eg h isin H0(Ω)with Ω = (minus11) since the first derivative (the Dirac delta function) is not square-integrableover (minus11)

Overall note that the above examples imply that

Hm(Ω) sub Ck(Ω) with m gt k (D2)

For example if a function has a kth continuous derivative then the (k + 1)th derivative isdefined piecewise and therefore square-integrable

Higher dimensions

To extend the above concepts to higher dimensions we need multi-indices A multi-index isan array of non-negative integers

α = (α1 αn) isin (Z+0)n (D3)

The degree of a multi-index is defined as

∣α∣ = α1 + + αn (D4)

This can be used to define a monomial for x isin Rn

xα = xα11 sdot sdot xαnn (D5)

For example we can now extend our definition of polynomials to higher dimensions

p(x) isin Pk(R2) rArr p(x) =k

sumβ=0

sum∣α∣=β

aαxα (D6)

Specifically the monomials above for x isin R2 are

for ∣α∣ = 0 ∶ x0y0 = 1for ∣α∣ = 1 ∶ x1y0 x1y0 = x yfor ∣α∣ = 2 ∶ x2y0 x1 y1 x0y2 = x2 xy y2

(D7)

so that

p(x) = a(00) + a(10)x1 + a(01)x2 + a(20)x21 + a(11)x1x2 + a(02)x2

2 + (D8)

150

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that this defines a complete polynomial of degree k

Now we can use multi-indices to define partial derivatives via

Dαu = part ∣α∣u

partxα11 sdot sdot partxαnn

and D0u = u (D9)

A common notation is

sum∣α∣=β

Dαu = sumα1αnst ∣α∣=β

part ∣α∣u

partxα11 sdot sdot partxαnn

(D10)

With the above derivatives we may redefine the inner product

⟨u v⟩Hm(Ω) = intΩ

m

sumβ=0

sum∣α∣=β

DβuDβu dx (D11)

and the Sobolev norm

∥u∥Hm(Ω) = ⟨uu⟩12Hm(Ω)

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

intΩ(Dαu)2 dx

⎤⎥⎥⎥⎥⎦

12

=⎡⎢⎢⎢⎢⎣

m

sumβ=0

sum∣α∣=β

∥Dαu∥2L2(Ω)

⎤⎥⎥⎥⎥⎦

12

(D12)

Letrsquos look at some examples eg consider Ω = R2 and m = 1 Then we have

D0u = u and D1u = partupartx1

partu

partx2 (D13)

so that

⟨u v⟩H1(R2) = intR2(uv + partu

partx1

partv

partx1+ partu

partx2

partv

partx2) dx1 dx2 (D14)

and

∥u∥2H1(R2) = intR2

[u2 + ( partupartx1

)2

+ ( partupartx2

)2

] dx1 dx2 (D15)

Altogether we can now properly define a Sobolev space in arbitrary dimensions

Hm(Ω) = u ∶ Ωrarr R ∶ Dαu isin L2(Ω) forall α lem (D16)

This is the set of all functions whose derivatives up to mth order all exist and are square-integrable

As an example u isin H1(Ω) implies that u and all its first partial derivatives must be square-integrable over Ω because (D15) must be finite

Let us look at the example u(x) = ∣x∣ and take Ω = (minus11) Then we have uprime(x) = H(x) (theHeaviside jump function) and uprimeprime(x) = δ(x) (the Dirac delta function) Therefore

intb

au2(x) dx ltinfin rArr u isin L2(Ω) =H0(Ω)

intb

a(partupartx

)2

dx = intb

aH2(x)dx ltinfin rArr partu

partxisin L2(Ω) and u isinH1(Ω)

intb

a(part

2u

partx2)

2

dx = intb

aδ2(x)dx =infin rArr part2u

partx2notin L2(Ω) and u notinH2(Ω)

(D17)

151

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Note that one usually indicates the highest order k that applies (since this is what matters forpractical purposes) so here we thus conclude that u isinH1(Ω)

From the above we also see that

Hinfin sub subH2 subH1 subH0 = L2 (D18)

Notice that even though polynomials u isin Pk(Ω) are generally in Hinfin(Ω) for any bounded Ω sub Rdthey are not square-integrable over Ω = Rd Luckily in practical problems we usually consideronly finite bodies Ω To more properly address this issue let us introduce the support of acontinuous function u defined on the open set Ω isin Rd as the closure in Ω of the set of all pointswhere u(x) ne 0 ie

suppu = x isin Ω ∶ u(x) ne 0 (D19)

This means that u(x) = 0 for x isin Ω ∖ suppu We may state eg that functions u ∶ Ω rarr R witha finite support Ω sub Rd and ess supΩ ltinfin are square-integrable over Ω

Finally let us define by Ck0 (Ω) the set of all functions contained in Ck(Ω) whose support is abounded subset of Ω Also notice that

Ck0 (Ω) subHk0 (Ω) (D20)

and

Cinfin0 (Ω) = ⋂

kge0

Ck0 (Ω) (D21)

152

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

E Operators

Energies are often defined via operators Generally we call A an operator if

A ∶ u isin U rarr A(u) isin V (E1)

where both U and V are function spaces

A simple example is

A(u) = cdu

dx (E2)

which is a (linear differential) operator requiring u isin C1

An operator A ∶ U rarr V is linear if for all u1 u2 isin U and αβ isin R

A(α sdot u1 + β sdot u2) = α sdotA(u1) + β sdotA(u2) (E3)

For example L is a linear operator in

auxx + bux = c hArr L(u) = c with L(sdot) = a(sdot)xx + b(sdot)x (E4)

Operators (such as the inner product operator) can also act on more than one function Con-sider eg an operator B ∶ U times V rarr R where U V are Hilbert spaces B is called a bilinearoperator if for all uu1 u2 isin U and v v1 v2 isin V and αβ isin R

(i) B(α sdot u1 + β sdot u2 v) = α sdot B(u1 v) + β sdot B(u2 v)(ii) B(uα sdot v1 + β sdot v2) = α sdot B(u v1) + β sdot B(u v2)

An example of a bilinear operator is the inner product ⟨sdot sdot⟩ ∶ U times U rarr R for some Hilbert spaceU

An operator A ∶ U rarr V is called symmetric if

⟨A(u) v⟩ = ⟨uA(v)⟩ for all u v isin U (E5)

Furthermore the operator is positive if

⟨A(u) u⟩ ge 0 for all u isin U (E6)

An example of a symmetric operator is A(u) = Mu with u isin Rd and M isin Rdtimesd which ispositive if M is positive-semidefinite

153

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

F Uniqueness of solutions

One of the beauties of the above variational problem () is that a unique minimizer exists bythe Lax-Milgram theorem This is grounded in (assuming ∣Ω∣ lt infin and u v isin U with someHilbert space U)

boundedness of the bilinear form

∣B(u v)∣ le C ∥u∥ ∥v∥ for some C gt 0 (F1)

For a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by the Cauchy-Schwarzinequality (using L2-norms)

∣B(u v)∣ le C ∥Gradu∥L2(Ω) ∥Grad v∥L2(Ω) le C ∥Gradu∥H1(Ω) ∥Grad v∥H1(Ω) (F2)

coercivity of the bilinear form (ellipticity)

B(uu) ge c ∥u∥2 for some c gt 0 (F3)

Again for a bilinear form B(u v) = ⟨GraduGrad v⟩ this is satisfied by Poincarersquos inequal-ity

B(uu) = ∥Gradu∥2L2(Ω) ge c ∥u∥

2L2(Ω) (F4)

These two requirements imply the well-posedness of the variational problem and thus imply theexistence of a unique solution (or that the potential has a unique global minimizer) In simpleterms the two conditions that the functional has sufficient growth properties (ie the bilinearform has upper and lower bounds)

154

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

G Vainbergrsquos theorem

The question arises whether or not a general form like (631) always exists for any set ofPDEsODEs as governing equations Vainbergrsquos theorem helps us answer this question Con-sider a weak form

G[u v] = 0 forall v isin U0(Ω) (G1)

Let us see if G derives from a potential I via its first variation That would imply that

G(u δu) =DδuI[u] = limεrarr0

d

dεI[u + δu] (G2)

Now recall from calculus that for any continuously differentiable function f(x y) we must haveby Schwartzrsquo theorem

part

party

partf

partx= part

partx

partf

party (G3)

We can use the same strategy to formulate whether or not a weak form derives from a potentialSpecifically we can take one more variation and state that

Dδu2G(u δu1) =Dδu1G(u δu2) if and only if I[u] exists (G4)

This is known as Vainbergrsquos theorem

We can easily verify this for the general form given in (631)

G(u δu1) =Dδu1I[u] = intΩ[λGradu Grad δu1 minus S δu1] dx minus int

partΩNQ δu1 dx

rArr Dδu1G(u δ2) = intΩλGrad δu2 Grad δu1 dx =Dδu2G(u δu1)

(G5)

In simple terms (and not most generally) Vainbergrsquos theorem holds if the potential obeyssymmetry This in turn implies that the governing PDE contains derivatives of even order (suchas linear momentum balance which is second-order in both spatial and temporal derivatives orthe equilibrium equations of beams which are fourth-order in space and second-order in time)If the PDEs are of odd order (such as eg the time-dependent diffusion or heat equation) thenno direct potential I exists ndash there are work-arounds using so-called effective potentials thatwill be discussed later in the context of internal variables

Of course knowing that a variational structure exists is beneficial but it does not reveal anythingabout the actual solution u which will be obtained by solving the above system of equations

155

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

H Energy norm

For many purposes it is convenient to introduce the so-called energy norm

∣sdot∣E =radicB(sdot sdot) (H1)

For example if we find an approximate solution uh for the displacement or temperature fieldthen the error can be quantified by

∣u minus uh∣E=radicB(u minus uh uuh) (H2)

Notice that unlike for eg the Euclidean norm ∥u minus uh∥E

does not necessarily imply uminusuh = 0so that strictly speaking the above energy norm is only a semi-norm To turn it into a propernorm we need to exclude solutions corresponding to rigid-body motion (ie solutions thatimply uniform translations or rotations of the u-field but without producing gradients in u) Ifwe assume that essential boundary conditions are chosen appropriately to suppress rigid bodymotion by seeking solutions

u isin U = u isinH1 ∶ u = u on partΩD (H3)

then for this space ∥sdot∥E is indeed a proper norm

156

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

I Gauss quadrature

A systematic way to deriving Gaussian quadrature rules involves the use of Legendre polyno-mials We here give a brief overview

We start by noticing that monomials 1 ξ ξ2 ξ3 although complete are not orthogonalbasis functions We can turn them into orthogonal polynomials Pn(ξ) by eg the Gram-Schmidt orthogonalization procedure To this end let us start with

P0(ξ) = 1 (I1)

and obtain the next basis function by starting with the linear momonial ξ and computing

P1(ξ) = ξ minus⟨1 ξ⟩⟨11⟩

1 = ξ (I2)

where we used the inner product

⟨u v⟩ = int1

minus1u(ξ)v(ξ)dξ (I3)

Similarly the next higher basis function is obtained by starting from ξ2 so that

P2(ξ) = ξ2 minus ⟨ξ ξ2⟩⟨ξ ξ⟩

ξ minus ⟨1 ξ2⟩⟨11⟩

1 = ξ2 minus 1

3 (I4)

Analogously one finds

P3(ξ) = ξ3 minus 3

5ξ (I5)

By continuing analogously we create a countably infinite set of orthogonal basis functions Pn(ξ)such that

int1

minus1Pn(ξ)Pm(ξ)dξ = 0 if n nem (I6)

These polynomials are known as Legendre polynomials Note that they are defined only upto a constant so one can renormalize them which is commonly done by enforcing that Pn(1) = 1for all n The result is the well known Legendre polynomials which can alternatively be definedvia

Pn(ξ) =1

2nn

dn

dξn[(ξ2 minus 1)n] (I7)

These polynomials have another interesting feature viz by orthogonality with P0(ξ) = 1 weknow that

int1

minus1Pn(ξ)dξ = ⟨1 Pn⟩ =

⎧⎪⎪⎨⎪⎪⎩

2 if n = 0

0 else(I8)

Pn(ξ) has exactly n roots in the interval [minus11] Also for n ne 0 we know that

Pn(ξ) = minusPn(minusξ) for odd n

Pn(ξ) = Pn(minusξ) for even n(I9)

157

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

Moreover Pn(0) = 0 for odd n

With this new set of basis functions we can define the Gauss-Legendre quadrature rule toenforce

int1

minus1Pk(ξ)dξ

=nQPminus1

sumi=0

Wi Pk(ξi) k = 01 2nQP minus 1 (I10)

If nQP = 1 then the solution is simple because the above equations simplify to

W0 = 2 and 0 =W0P1(ξ0) (I11)

Therefore the weight is as before W0 = 2 and the quadrature point is the root of P1(ξ) vizξ0 = 0

If nQP = 2 then the four equations to be solved are

W0 +W1 = 2 and 0 =W0P1(ξ0) +W1P1(ξ1)0 =W0P2(ξ0) +W1P2(ξ1) and 0 =W0P3(ξ0) +W1P3(ξ1)

(I12)

By analogy we choose the quadrature points to be the roots of P2(ξ) so that

P2(ξ0) = P2(ξ1) = 0 rArr ξ0 =1radic3 ξ1 = minus

1radic3 (I13)

Using Pn(ξ) = minusPn(minusξ) the above equations reduce to

W0 =W1 = 1 (I14)

Further note that Pn(0) = 0 for odd n Therefore the same procedure can be continued asfollows For an arbitrary number of quadrature points nQP the Gauss-Legendre quadraturepoints and associated weights are defined by

PnQP (ξi) = 0 wi =2

(1 minus ξ2i )[P prime

nQP(ξi)]2

i = 0 nQP minus 1 (I15)

As a check take eg nQP = 1 so that P1(ξ) = ξ with root ξ0 = 0 The weight is computed as

w0 =2

(1 minus ξ20)[P prime

nQP(ξ)]2

= 2 (I16)

as determined above Similarly for nQP = 2 we have P2(ξ) = 12(3ξ

2 minus 1) with the above roots of

plusmn1radic

3 The associated weights are computed as

w0 =2

(1 minus ξ20)[P prime

2(ξ0)]2= 2

(1 minus ξ20)[3ξ0]2

= 223

32

3

= 1 = w1 (I17)

which agrees with our prior solution in Section 1621

158

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

J Quadrature error estimates

Using numerical quadrature to approximate an exact integral introduces a quadrature errorwhich is bounded as follows For a function f(ξ) isin C2nQP (Ω) we have that (without proof here)

RRRRRRRRRRRint

1

minus1f(ξ)dξ minus

nQPminus1

sumk=0

Wk f(ξk)RRRRRRRRRRRle Ch2nQP max

ξisin[minus11]∣f (2nQP )(ξ)∣ (J1)

with a constant C gt 0 This shows that as can be expected the quadrature error decreases withdecreasing mesh size h and with increasing smoothness of function f The rate of convergenceunder h-refinement also depends on the smoothness of the function

The exact error depends on the chosen quadrature rule For example for Gauss-Legendrequadrature an error estimate is given by

e =22nQP+1(nQP )4

(2nQP + 1)[(2nQP )]3maxξisin[minus11]

∥f (2nQP )(ξ)∥ (J2)

159

Index

L2-norm 144h-refinement 57hp-refinement 57n-dimensional space 47p-refinement 57r-refinement 57(proper) subset 1422-node bar element 592-node beam element 664-node bilinear quadrilateral 794-node tetrahedron 758-node brick element 848-node quadratic quadrilateral 839-node quadratic quadrilateral 83

ae 143acceleration field 7action 109action principle 109amplitude 117approximation error 134assembly 62assembly operator 95augmented finite elements 140average acceleration 124 125

backward-Euler 19balance of energy 10balance of linear momentum 9Banach space 145barycentric coordinates 72basis 54basis functions 28bijective 142bilinear form 42bilinear operator 153boundary 142boundary conditions 13Bubnov-Galerkin approximation 47

CFL condition 23chicken-wire mode 94class Ck(Ω) 45 143classical solution 41closure 145collocation method 29collocation points 29commercial codes 139

complete polynomial 151complete space 145complete up to order q 55completeness property 55condensation 105condition number 133conditionally stable 25conductivity matrix 132conjugate gradient 99consistent mass matrix 111Constant Strain Triangle 75constitutive relations 8continuous at a point x 143continuous over Ω 143convergence 145Courant-Friedrichs-Levy 23Courant-Friedrichs-Levy (CFL) condition 24CST 75cubature rules 86

damage and failure 141damped Newton-Raphson method 97damping matrix 120deformation gradient 128deformation mapping 128degree 150degrees of freedom 56Direct methods 18Dirichlet boundary 13Dirichlet boundary condition 70Dirichlet boundary conditions 69Dirichlet-Poincare inequality 147discrete problem 48discretization error 133discretization errors 12displacement field 7 128distance 144 145divergence of a vector 11domain 142dummy index 7dynamic 109

eigenfrequency 115eigenmode 115elasticity tensor 8element defect 92elements 56energy norm 156

160

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

equation of motion 111error estimate 135essential supremum 144Euclidean norm 144Euler-Bernoulli beam 65Eulerian 140excitation frequency 117explicit 19explicit time integration 121extensive 11external forces 101

Fast Inertial Relaxation Engine 99FE 56FEM 56finite differences 18finite element 56Finite Element Method 56finite-difference stability 23first fundamental error 133first Piola-Kirchhoff stress tensor 129first variation 39first-derivative central difference 18forced vibrations 114 117forward-Euler 19free vibrations 114full integration 90function 142function space 37functional 37

Gauss quadrature 86Gauss-Chebyshew 88Gauss-Hermite 88Gauss-Legendre 88Gauss-Legendre quadrature 87 158Gauss-Lobatto quadrature 88Gauss-Newton method 99geometric stiffness 140ghost node 21global 53 95global error estimate 147 148global stiffness matrix 62gradient flow method 99Gram-Schmidt orthogonalization 157

heat equation 11Hermitian polynomials 67HHT method 127HHT-α 127hierarchical interpolation 64higher-order interpolation 148

Hilbert space 145hourglass mode 94

identity mapping 142implicit 19 21implicit time integration 124incompressibility 140incremental stiffness matrix 77indirect methods 27initial boundary value problem 13initial conditions 13injective 142inner product 143inner product space 143instability 141integration point 86intensive 11internal energy 10inverse function theorem 73 74isomorphism 142isoparametric mapping 71isotropy 8

Jacobian 74Jacobian ratio 137

kinetic energy 109

L2-inner product 143L2-space of functions 145Lp-norm 144Lagrange polynomials 64Lagrangian 109Lagrangian interpolation 64Laplace equation 11large deformations 140Lax-Milgram theorem 42 154Lax-Richtmyer theorem 25least squares method 30Legendre polynomials 157line search method 98linear 153linear acceleration 124 125linear elasticity 8 49 50linear form 42linear operator 13linear strain triangle 78linear subspace 142linearvector space 142local 53local energy balance 11local error estimate 147

161

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

local stiffness matrix 62local-to-global map 62locking 93longest edge bisection 136LST 78lumped mass matrix 112

mapping 71 142material points 7mathematical domain of dependence 24maximizer 41mechanical instability 138mechanisms 108 138mesh 56mesh refinement algorithm 136mesh refinement criterion 136methods of weighted residuals 29minimizer 41mixed finite elements 140modal decomposition 118modeling errors 12 134monomial 150monomials 55multi-index 150multi-indices 55

natural frequency 115Navier equation 10neighborhood 145Neumann boundary 13Neumann-Poincare 147Newmark-β 124 125Newton-Cotes 86Newton-Raphson method 96nodes 56nominal strains 8nominal stresses 8nonlinear least squares 98norm 144normed linear space 144numerical damping 125numerical domain of dependence 23numerical integration 85numerical integration error 133

one-to-one 142onto 142open 145open set 142operator 153order of a PDE 13order reduction 119

ordered triad 142orthogonal 143over-integration 91

PkQl elements 140parasitic shear 93particle-mass lumping 112period contraction 127period elongation 127Petrov-Galerkin 47phase error analysis 23Poincare inequalities 147Poisson equation 12polynomial function space 32positive 153principle of stationary action 109principle of virtual work 34 46

Q4 79Q8 83Q9 83quadratic tetrahedron 78quadratic triangle 77quadrature error 159quadrature rules 86Quasi-Newton method 97quasistatics 109

range 142Rayleighrsquos quotient 119Rayleigh-Ritz 42reduced integration 91reference configuration 7residuals 28Riemann sum 85rigid-body mode 115rigid-body modes 107rigid-body motion 107

second-derivative central difference 18selective integration 94semi-discretization 110semi-norm 148serendipity element 83set 142shape function properties 53shape functions 47 53shear locking 93shear strains 8shear stresses 8simplex 72simplicial quadrature 91

162

Computational Mechanics I ndash Introduction to FEA Prof Dr DM KochmannSpring 2021 (version March 12 2021) ETH Zurich

singularities 140smoothing 135Sobolev norm 38 149Sobolev semi-norm 148Sobolev space 38 150 151solution error 133solution errors 12solver tolerance 134space of all second-order polynomial functions

142square-integrable 38 145 150static vs dynamic FEA 139statics 10stationarity condition 39stencil 20strain tensor 7stress tensor 8strong form 45 49subdomain method 29subparametric mapping 71substitution 105superparametric mapping 71support 53 152surjective 142symmetric 153

tangent matrix 96Taylor expansions 18temperature field 130thermal problem 130time delay 120total-Lagrangian 140trial functions 28triangle inequality 144truncation error 134

UEL 139UMAT 139unconditionally stable 26undeformed 7under-integration 91units 133update rule 19updated-Lagrangian 140

Vainbergrsquos theorem 47 155validation 12variation 39variational calculus 37variational structure 40velocity field 7verification 12

vibrations 114Voigt notation 52von Neumann analysis 23 25

wave equation 10weak form 46 110weak solution 46Weierstrass approximation theorem 54

XFEM 140

zero-energy mode 93zero-energy modes 107zeroth derivative 46 143ZZ error estimator 135

163

  • Preface
  • Introduction Continuum Mechanics and Notation
    • Kinematics
    • Kinetics
    • Computational Mechanics
    • (Initial) Boundary Value Problems
      • Dimensionless Forms
      • Direct Numerical Methods Finite Differences
      • Stability of Finite Difference Schemes
        • CFL Condition
        • von Neumann Analysis and Phase Error Analysis
        • Direct vs Indirect Methods
          • Methods of Weighted Residuals
            • Collocation Method
            • Subdomain Method
            • Method of Least Squares
            • Higher Dimensions
            • Galerkins Method
              • Variational Calculus
                • Functionals
                • Variations
                • Rayleigh-Ritz Method
                  • The weak form
                    • Classical and weak solutions
                    • Equivalence of strong and weak forms
                    • Approximate solutions
                      • The mechanical variational problem at small strains
                        • General case
                        • Linear elasticity
                          • Interpolation spaces
                            • Shape functions
                            • Approximation power and completeness
                            • Completeness in higher dimensions
                              • The Finite Element Method
                              • Finite element spaces polynomial shape functions in 1D
                                • 2-node bar element
                                • Problem assembly
                                • Polynomial interpolation of higher order
                                  • Lagrangian interpolation
                                  • Hierarchical interpolation
                                    • 2-node beam element
                                    • A note on beam elements and boundary conditions
                                      • Shape Functions in higher dimensions
                                      • Simplicial elements
                                        • Linear Triangle (T3)
                                        • Extension to three dimensions
                                        • Finite element implementation
                                          • Special case linear elasticity
                                          • General case of non-linear elastic materials
                                            • Higher-order triangles and tetrahedra
                                              • The bilinear quadrilateral element
                                              • Higher-order elements Q8 Q9 8-node brick
                                              • Numerical quadrature
                                                • Example Riemann sums
                                                • Gauss quadrature
                                                  • Gauss-Legendre quadrature
                                                  • Other Gauss quadrature rules
                                                    • Higher dimensions
                                                      • FEM which quadrature rule to use
                                                        • Integrals in the FE context
                                                        • Which quadrature rule to use
                                                          • Element defects shear locking and hourglassing
                                                          • Assembly
                                                          • Iterative solvers
                                                            • Netwon-Raphson (NR) method
                                                            • Damped Newton-Raphson (dNR) method
                                                            • Quasi-Newton (QN) method
                                                            • Line search method
                                                            • Nonlinear Least Squares
                                                            • Gradient flow method
                                                            • Conjugate Gradient (CG) method
                                                              • Boundary conditions
                                                                • Neumann boundary conditions
                                                                • Dirichlet boundary conditions
                                                                  • Substitution
                                                                  • Condensation
                                                                    • A note on Dirichlet boundary conditions in iterative solvers
                                                                    • Rigid body motion
                                                                      • Dynamics
                                                                      • Vibrations
                                                                        • Free undamped vibrations
                                                                        • Forced vibrations
                                                                        • Modal decomposition
                                                                        • Structural damping
                                                                          • Time-dependent transient solutions
                                                                            • Explicit time integration
                                                                            • A reinterpretation of finite differences
                                                                            • Implicit time integration
                                                                              • Newmark- method
                                                                                • HHT- method
                                                                                • Use of mass matrices
                                                                                  • Extensions
                                                                                    • Finite kinematics
                                                                                    • Thermal problems
                                                                                      • Error analysis and adaptivity common mistakes
                                                                                        • Finite element error analysis
                                                                                        • Smoothing and adaptivity
                                                                                        • Common errors
                                                                                          • FEM ndash Extensions amp Applications
                                                                                          • Appendices
                                                                                          • Vector Spaces
                                                                                          • Function Spaces
                                                                                          • Approximation Theory
                                                                                          • Sobolev spaces
                                                                                          • Operators
                                                                                          • Uniqueness of solutions
                                                                                          • Vainbergs theorem
                                                                                          • Energy norm
                                                                                          • Gauss quadrature
                                                                                          • Quadrature error estimates
                                                                                          • Index
Page 6: Computational Mechanics I { Introduction to FEA
Page 7: Computational Mechanics I { Introduction to FEA
Page 8: Computational Mechanics I { Introduction to FEA
Page 9: Computational Mechanics I { Introduction to FEA
Page 10: Computational Mechanics I { Introduction to FEA
Page 11: Computational Mechanics I { Introduction to FEA
Page 12: Computational Mechanics I { Introduction to FEA
Page 13: Computational Mechanics I { Introduction to FEA
Page 14: Computational Mechanics I { Introduction to FEA
Page 15: Computational Mechanics I { Introduction to FEA
Page 16: Computational Mechanics I { Introduction to FEA
Page 17: Computational Mechanics I { Introduction to FEA
Page 18: Computational Mechanics I { Introduction to FEA
Page 19: Computational Mechanics I { Introduction to FEA
Page 20: Computational Mechanics I { Introduction to FEA
Page 21: Computational Mechanics I { Introduction to FEA
Page 22: Computational Mechanics I { Introduction to FEA
Page 23: Computational Mechanics I { Introduction to FEA
Page 24: Computational Mechanics I { Introduction to FEA
Page 25: Computational Mechanics I { Introduction to FEA
Page 26: Computational Mechanics I { Introduction to FEA
Page 27: Computational Mechanics I { Introduction to FEA
Page 28: Computational Mechanics I { Introduction to FEA
Page 29: Computational Mechanics I { Introduction to FEA
Page 30: Computational Mechanics I { Introduction to FEA
Page 31: Computational Mechanics I { Introduction to FEA
Page 32: Computational Mechanics I { Introduction to FEA
Page 33: Computational Mechanics I { Introduction to FEA
Page 34: Computational Mechanics I { Introduction to FEA
Page 35: Computational Mechanics I { Introduction to FEA
Page 36: Computational Mechanics I { Introduction to FEA
Page 37: Computational Mechanics I { Introduction to FEA
Page 38: Computational Mechanics I { Introduction to FEA
Page 39: Computational Mechanics I { Introduction to FEA
Page 40: Computational Mechanics I { Introduction to FEA
Page 41: Computational Mechanics I { Introduction to FEA
Page 42: Computational Mechanics I { Introduction to FEA
Page 43: Computational Mechanics I { Introduction to FEA
Page 44: Computational Mechanics I { Introduction to FEA
Page 45: Computational Mechanics I { Introduction to FEA
Page 46: Computational Mechanics I { Introduction to FEA
Page 47: Computational Mechanics I { Introduction to FEA
Page 48: Computational Mechanics I { Introduction to FEA
Page 49: Computational Mechanics I { Introduction to FEA
Page 50: Computational Mechanics I { Introduction to FEA
Page 51: Computational Mechanics I { Introduction to FEA
Page 52: Computational Mechanics I { Introduction to FEA
Page 53: Computational Mechanics I { Introduction to FEA
Page 54: Computational Mechanics I { Introduction to FEA
Page 55: Computational Mechanics I { Introduction to FEA
Page 56: Computational Mechanics I { Introduction to FEA
Page 57: Computational Mechanics I { Introduction to FEA
Page 58: Computational Mechanics I { Introduction to FEA
Page 59: Computational Mechanics I { Introduction to FEA
Page 60: Computational Mechanics I { Introduction to FEA
Page 61: Computational Mechanics I { Introduction to FEA
Page 62: Computational Mechanics I { Introduction to FEA
Page 63: Computational Mechanics I { Introduction to FEA
Page 64: Computational Mechanics I { Introduction to FEA
Page 65: Computational Mechanics I { Introduction to FEA
Page 66: Computational Mechanics I { Introduction to FEA
Page 67: Computational Mechanics I { Introduction to FEA
Page 68: Computational Mechanics I { Introduction to FEA
Page 69: Computational Mechanics I { Introduction to FEA
Page 70: Computational Mechanics I { Introduction to FEA
Page 71: Computational Mechanics I { Introduction to FEA
Page 72: Computational Mechanics I { Introduction to FEA
Page 73: Computational Mechanics I { Introduction to FEA
Page 74: Computational Mechanics I { Introduction to FEA
Page 75: Computational Mechanics I { Introduction to FEA
Page 76: Computational Mechanics I { Introduction to FEA
Page 77: Computational Mechanics I { Introduction to FEA
Page 78: Computational Mechanics I { Introduction to FEA
Page 79: Computational Mechanics I { Introduction to FEA
Page 80: Computational Mechanics I { Introduction to FEA
Page 81: Computational Mechanics I { Introduction to FEA
Page 82: Computational Mechanics I { Introduction to FEA
Page 83: Computational Mechanics I { Introduction to FEA
Page 84: Computational Mechanics I { Introduction to FEA
Page 85: Computational Mechanics I { Introduction to FEA
Page 86: Computational Mechanics I { Introduction to FEA
Page 87: Computational Mechanics I { Introduction to FEA
Page 88: Computational Mechanics I { Introduction to FEA
Page 89: Computational Mechanics I { Introduction to FEA
Page 90: Computational Mechanics I { Introduction to FEA
Page 91: Computational Mechanics I { Introduction to FEA
Page 92: Computational Mechanics I { Introduction to FEA
Page 93: Computational Mechanics I { Introduction to FEA
Page 94: Computational Mechanics I { Introduction to FEA
Page 95: Computational Mechanics I { Introduction to FEA
Page 96: Computational Mechanics I { Introduction to FEA
Page 97: Computational Mechanics I { Introduction to FEA
Page 98: Computational Mechanics I { Introduction to FEA
Page 99: Computational Mechanics I { Introduction to FEA
Page 100: Computational Mechanics I { Introduction to FEA
Page 101: Computational Mechanics I { Introduction to FEA
Page 102: Computational Mechanics I { Introduction to FEA
Page 103: Computational Mechanics I { Introduction to FEA
Page 104: Computational Mechanics I { Introduction to FEA
Page 105: Computational Mechanics I { Introduction to FEA
Page 106: Computational Mechanics I { Introduction to FEA
Page 107: Computational Mechanics I { Introduction to FEA
Page 108: Computational Mechanics I { Introduction to FEA
Page 109: Computational Mechanics I { Introduction to FEA
Page 110: Computational Mechanics I { Introduction to FEA
Page 111: Computational Mechanics I { Introduction to FEA
Page 112: Computational Mechanics I { Introduction to FEA
Page 113: Computational Mechanics I { Introduction to FEA
Page 114: Computational Mechanics I { Introduction to FEA
Page 115: Computational Mechanics I { Introduction to FEA
Page 116: Computational Mechanics I { Introduction to FEA
Page 117: Computational Mechanics I { Introduction to FEA
Page 118: Computational Mechanics I { Introduction to FEA
Page 119: Computational Mechanics I { Introduction to FEA
Page 120: Computational Mechanics I { Introduction to FEA
Page 121: Computational Mechanics I { Introduction to FEA
Page 122: Computational Mechanics I { Introduction to FEA
Page 123: Computational Mechanics I { Introduction to FEA
Page 124: Computational Mechanics I { Introduction to FEA
Page 125: Computational Mechanics I { Introduction to FEA
Page 126: Computational Mechanics I { Introduction to FEA
Page 127: Computational Mechanics I { Introduction to FEA
Page 128: Computational Mechanics I { Introduction to FEA
Page 129: Computational Mechanics I { Introduction to FEA
Page 130: Computational Mechanics I { Introduction to FEA
Page 131: Computational Mechanics I { Introduction to FEA
Page 132: Computational Mechanics I { Introduction to FEA
Page 133: Computational Mechanics I { Introduction to FEA
Page 134: Computational Mechanics I { Introduction to FEA
Page 135: Computational Mechanics I { Introduction to FEA
Page 136: Computational Mechanics I { Introduction to FEA
Page 137: Computational Mechanics I { Introduction to FEA
Page 138: Computational Mechanics I { Introduction to FEA
Page 139: Computational Mechanics I { Introduction to FEA
Page 140: Computational Mechanics I { Introduction to FEA
Page 141: Computational Mechanics I { Introduction to FEA
Page 142: Computational Mechanics I { Introduction to FEA
Page 143: Computational Mechanics I { Introduction to FEA
Page 144: Computational Mechanics I { Introduction to FEA
Page 145: Computational Mechanics I { Introduction to FEA
Page 146: Computational Mechanics I { Introduction to FEA
Page 147: Computational Mechanics I { Introduction to FEA
Page 148: Computational Mechanics I { Introduction to FEA
Page 149: Computational Mechanics I { Introduction to FEA
Page 150: Computational Mechanics I { Introduction to FEA
Page 151: Computational Mechanics I { Introduction to FEA
Page 152: Computational Mechanics I { Introduction to FEA
Page 153: Computational Mechanics I { Introduction to FEA
Page 154: Computational Mechanics I { Introduction to FEA
Page 155: Computational Mechanics I { Introduction to FEA
Page 156: Computational Mechanics I { Introduction to FEA
Page 157: Computational Mechanics I { Introduction to FEA
Page 158: Computational Mechanics I { Introduction to FEA
Page 159: Computational Mechanics I { Introduction to FEA
Page 160: Computational Mechanics I { Introduction to FEA
Page 161: Computational Mechanics I { Introduction to FEA
Page 162: Computational Mechanics I { Introduction to FEA
Page 163: Computational Mechanics I { Introduction to FEA