Info

  • exam
    • NumPDE midterm (@2026-04-17)
      • chapter 1+2 (mainly)
    • NumPDE endterm (@2026-05-29)
      • chapter 9 (time-derivative)+12 (??)
  • practice classes:

Info

Link to original

remove pauses in videos:

pip install auto-editor
auto-editor <video> --margin 0.2sec
# if output is black, stream and audio channels are swapped. fix it (before runnign audio-editor):
ffmpeg -i <video> -map 0:v -map 0:a -c copy <output>

Hilfsmittel NumericalMethodsForPartialDifferentialEquations

  • midterm: none
  • endterm: probably none

Exercises

-> FS2026_tasks

Week 1 (16.02.-20.02.): 4 h 45 min

  • Problem 0-1: Setting up implementation environment for NumPDE course (60 min)
  • Problem 0-2: Using the GDB Debugger (80 min)
  • Problem 1-1: Quadratic Functionals (100 min) (c) not sure about sums, (b) solved differently)
  • Problem 1-3: L-infinity Norms are Bounded by H1-seminorms in 1D (45 min) b) solved with Chat

Week 2 (23.02.-27.02.): 6 h 45 min

  • Problem 1-10: From Boundary Value Problems to Variational Problems (60 min) c) a bit cryptic
    • preparation: done 2nd time
  • Problem 1-6: heat conduction with non-local boundary conditions (75 min) c) important, applies most of the learned norms/inequalities
    • preparation: done 2nd time
  • Problem 1-8: A coupled reaction-diffusion problem (60 min)
  • Problem 1-5: A second-order elliptic transmission problem in 1D (110 min) do again tomorrow?
  • Problem 1-2: Linear functionals on Sobolev spaces (100 min)

additional:

  • Problem 1.11: (50min) done as preparation, c) confusing

Week 3 (02.03.-06.03.): 7 h 5 min

  • Problem 2-3: Pointwise “Exact” Galerkin Solution (65 min)
  • Problem 2-1: Properties of Galerkin solutions (45 min) much longer than 45min, c), d) enjoyable
  • Problem 2-2: Transformation of Galerkin Matrices (120 min) skipped d), copied e)
  • Problem 2-4: Linear finite elements for two-point boundary value problems (195 min) demanding exercise, took ≅3.5h; didn't understood last part (offset function)

Week 4 (09.03.-13.03.): 5 h 45 min

  • Problem 2-23: Galerkin Matrices (35 min)
    • preparation: done 2nd time
  • Problem 2-20: DofHandler and Assembly (30 min)
    • preparation: done 2nd time
  • Problem 2-9: Handling degrees of freedom (DOFs) in LEHRFEM++ (140 min) last few subtasks done with LM
    • preparation: done 2nd time
    • preparation: done 3rd time
  • Problem 2-8: Introduction to local assembly in LEHRFEM++ (140 min) couldn't implement j) myself

Week 5 (16.03.-20.03.): 7 h 5 min

  • Problem 2-24: Paramatric FEM: Local Computations (20 min) maybe do again
    • preparation: done 2nd time
  • Problem 2-17: Local Computations for Convection Bilinear Form (90 min) solved in <90min, but didn't understand e) completely
  • Problem 2-21: Blended Parametric Representation of Curvi-Linear triangles (145 min) f) a bit tricky, but mostly understood
  • Problem 2-13: Local computations for parametric Lagrangian finite elements (170 min) took ~250min, quite difficult (especially writing the tests); I still don't understand the boundary logic

Week 6 (23.03.-27.03.): 5 h 50 min

  • Problem 2-22: Constrained Neumann Problem (125 min) a)-f) simple, g) uses summation trick that took me quite some time to understand; overall, took ~90min
  • Problem 2-18: Nitsche’s Method for Elliptic BVPs (225 min) d)e)f) (coding) confusing - couldn't find error - should definitely be solved a 2nd time

Week 7 (30.03.-03.04.): 6 h 5 min

  • Problem 3-6: Projection Onto Constants (70 min) fun task, if you like to practice norms && inequalities
  • Problem 3-15: Asymptotic Convergence of Finite-Element Discretization Errors and Interpolation Errors (30 min) applying theory, do again
  • Problem 3-8: Output Functionals for a 2nd-Order Elliptic Boundary Value Problem with Impedance Boundary Conditions (145 min) took much longer, c) useful for practicing LF++, but what is e)-i) about?
    • preparation: done 2nd time; still didn’t understood i)
  • Problem 3-2: Debugging Finite Element Codes (120 min) a) is Galerkin assembly (coding)

Week 8 (13.04.-17.04.): 4 h

  • Problem 9-14: Two-Step Radau Runge-Kutta Single-Step Method for the Heat Equation (50 min) "simple" runge-kutta repetition
  • Problem 9-20: Meithod-of-Lines with SDIRK timestepping (60 min)
    • in solution for b), shouldn’t the A-matrix integrate over dx instead of dS?
  • Problem 9-3: Decaying Method-of-Lines Solution with Implicit-Euler Timestepping (130 min)

Week 9 (20.04.-24.04.): 3 h 30 min

  • Problem 9-17: Scalar Parabolic Evolution Problems: Continuous and Discrete (75 min) similar to 9.14, 9.20 from last week
  • Problem 9-11: Gauss-Lobatto IIIC Timestepping (135 min) finally a fun programming execise I did understand
    • preparation: done 2nd time
    • solution 9.11)g): bottom right matrix block: is there a missing?

Week 10 (27.04.-01.05.): 4 h 10 min

  • Problem 9-21: Magnetic Diffusion in a Wire (210 min)
  • Problem 12-4: FEM for Stokes BvPs (40 min) important basics

Week 11 (04.05.-08.05.): 7 h 15 min

  • Problem 12-1: Viscous Flow Simulation with Taylor-Hood FEM (435 min) only Hiptmair and god knew what this problem is about. Now, only Hiptmair knows
    • this was the most challenging task till now. It takes way longer than 7.5 hours

Week 12 (11.05.-15.05.): 7h 10 min

  • Problem 10-6: Streamline Upwind Method for Pure Advection Problem (200 min) interesting, nearly succeeded in coding alone -> summary of chapter 2, 10
  • Problem 12-2: The MINI Element for Stokes (230 min) didn't totally understand b)
    • in stokesminielement.h, dimension needs to be changed 9x9 -> 11x11 but is not mentioned in solution (error was extremely confusing)
    • in solution of 12-2)i), the norms for 12.2.27 and 12.2.28 are wrong? ask TA?

13. week (18.05.-22.05.): 7 h 10 min

  • Problem 13-1: Incidence Matrices of a 2D Finite Element Mesh (220 min) didn't understand b), j) fully; mostly copied k) from solution but not overly difficult
    • wrong code folder: should be IncidenceMatrices, not IncidenceMatricesFEEC
    • done 2nd time (1.6h)
  • Problem 13-3: Whitney Finite Elements for Magnetostatic BVP in Two Dimensions (210 min) g) understood everything apart from last flipping lines

14. week (25.05.-29.05.): 6 h 50 min

  • Problem 13-2: Mixed FEM for the 2D Hodge-Laplacian (410 min) didn't fully understand f), l), o) not sure, took about 7 hours
    • problem: I don’t understand how to work with / / , … & vector proxy
    • in t) / formula 13.2.43 missing supscript 1 on first
    • what is LEHRFEM++ numbering for local shape functions [Lecture → § 2.7.4.1] w)?
      • first those associated with nodes, then edges

Videos

  • 0.0 Welcome and introduction (17min)
  1. week (16.02.-20.02.):
  • 1.2.1 Elastic Membranes (17 min)
  • 1.2.2 Electrostatic Fields (6 min)
  • 1.2.3 Quadratic Minimization Problems (21 min)
  • 1.3 Sobolev spaces (22 min)
  • 1.4 Linear Variational Problems (21 min) didn't quite understand
  1. week (23.02.-27.02.):
  • 1.5 Equilibrium Models: Boundary Value Problems (22 min)
  • 1.6 Diffusion Models: Stationary Heat Conduction (5 min)
  • 1.7 Boundary Conditions (07.35 min)
  • 1.8 Second-Order Elliptic Variational Problems (13 min) even solved question :)
  • 1.9 Essential and Natural Boundary Conditions (18 min)
  1. week (02.03.-06.03):
  • 2.2 Principles of Galerkin Discretization (25 min) review questions for 2.2.3 solved -> review questions for this chapter are important !!
  • 2.3 Case Study: Linear FEMfor Two-Point Boundary Value Problems (24 min)
  • 2.4 Case Study: Triangular Linear FEMin Two Dimensions I (28 min)
  • 2.4 Case Study: Triangular Linear FEMin Two Dimensions II (32 min) confusing
  1. week (09.03.-13.03):
  • 2.5 Building Blocks of General Finite Element Methods (22 min) easy :)
  • 2.6 Lagrangian Finite Element Methods (23 min)
  • 2.7.2 Mesh Information and Mesh Data Structures (21 min) first LehrFM introduction
  • 2.7.4 Assembly Algorithms (26 min)
  • 2.7.5 Local Computations (26 min)
  • 2.7.6 Treatment of Essential Boundary Conditions (21 min)
  1. week (16.03.-20.03):
  • 2.8 Parametric Finite Element Methods I (22 min)
  • 2.8 Parametric Finite Element Methods II (27 min) ??
  • 3.1 Abstract Galerkin Error Estimates (20 min)
  • 3.2 Empirical (Asymptotic) Convergence of Lagrangian FEM (26 min) understandable
  1. week (23.03.-27.03.):
  • 3.3 A Priori (Asymptotic) Finite Element Error Estimates I (10 min)
  • 3.3 A Priori (Asymptotic) Finite Element Error Estimates II (18 min)
  • 3.3 A Priori (Asymptotic) Finite Element Error Estimates III (16 min)
  • 3.4 Elliptic Regularity Theory (11 min)
  • 3.5 Variational Crimes (15 min)
  • 3.8 Validation and Debugging of Finite Element Codes (13 min)
  1. week (30.03.-03.04.):
  • 9.2.1 Heat Equation (10 min)
  • 9.2.2 Heat Equation: Spatial Variational Formulation (8 min)
  • 9.2.3 Stability of Parabolic Evaolution Problems (10 min)
  • 9.2.4 Spatial Semi-Discretization: Method of Lines (6 min)
  • 9.2.7 Timestepping for Method-of-Lines ODE (30 min) rewatch
  • 9.2.8 Fully Discrete Method of Lines: Convergence (18 min) first 6min summary of chapter 9)
  1. week (13.04.-17.04.):
  • 10.1.1 Modeling Fluid Flow (7 min)
  • 10.1.2 Heat Convection and Diffusion (5 min)
  • 10.1.3 Incompressible Fluids (10 min)
  • 10.1.4 Time-Dependent (Transient) Heat Flow in a Fluid (4 min)
  • 10.2.1 Singular Perturbation (16 min)
  • 10.2.2 Upwinding (13 min)
  • 10.2.2.1 Upwind Quadrature (17 min)
  • 10.2.2.2 Streamline Diffusion (19 min)
  • 10.3.1 Method of Lines (13 min)
  1. week (20.04.-24.04.):
  • 12.1 Modeling the Flow of a Viscous Fluid (30 min) only 12min ??
  • 12.2.1 The Stokes Equations: Constrained variational formulation (20 min) only 10min ??
  • 12.2.2 The Stokes Equations: Saddle Point Problem Formulation (55 min) (30min), difficult video
  • 12.2.3 Stokes System of Partial Differential Equations (15 min) (7 min)
  1. week (27.04.-01.05.):
  • 12.3.1 Pressure Instability (40 min) (20min)
  • 12.3.2 Stable Galerkin Discretization of Stokes Saddle Point Problem (30 min) (16min)
  • 12.3.3 Convergence of Stable FEM for Stokes (30 min) (17min)
  • 12.3.4 The Taylor-Hood Finite Element Method (15 min) (8m)
  • 12.3.5 The Non-Conforming Crouzeix-Raviart FEM (40 min) (22min)
  1. week (04.05.-08.05.):
  • 13.1.2 Fields and Integral Forms/Currents (28 min) (17min)
    • done review questions 2027-07-27
  • 13.1.3 Differential Forms (56 min) (32min) ???
    • done review questions 2027-07-27
  • 13.1.4 Exterior Calculus (70 min) (45min) did not understand a single word
  • 13.1.5 Sobolev Spaces of Differential Forms (18 min) (11min)
  1. week (11.05.-15.05.):
  • 13.2.1 Cochain Calculus (67 min) (40min)
  • 13.2.2 Whitney Forms (70 min) (40min)
  • 13.3.1 Energies and Linear Material Laws (35 min) (21min)
  • 13.3.2.1 Electromagnetic Wave Equations (45 min) (26min)
  • 13.3.2.3 Method of lines for Electromagnetic Wave Equations, Timestepping for Semi-Discrete Electromagnetic Wave Equations (45 min) (30min)
  1. week (18.05.-22.05.):
  • 13.3.3.1 Magnetostatics: Formulations Based on Scalar Potentials (30 min) (18min)
  • 13.3.3.2 Magnetostatics: Vector-Potential-Based Variational Formulations (40 min) (24min)
  • 13.3.3.3-13.3.3.4 Saddle-Point Variational Problems, Discrete LBB-Conditions for a-Based Magnetostatics (60 min) (35min)
  1. week (25.05.-29.05.): no videos

Q&A

timestamp 2026-03-20

Galerking Orthogonality (3.1.3.2)

bilinear form is coercive

  • continuity / boundedness:
  • coercivity:

from this comes the Poincare inequality and uniform positive definite property

In contrast to Cea's Lemma, coercivity does not depend on the energy norm

Tldr: strong to weak

  1. (simplify strong form, then) convert to weak form
  1. choose suitable test function
  • e.g.
  1. IBP (use Green’s formula)
  1. Incorporate b.c. (if needed)
  • for Dirichlet (essential) -> nothing to do
  1. choose suitable fct. space
  • minimal suitable fct. space (often )
  • here, we need at list one derivative for

timestamp 2026-05-15

endterm

  • chapter 9 will be about discretising Method of Lines (butcher tableau)

for forms: see https://www.math.ucla.edu/~tao/preprints/forms.pdf

timestamp 2026-05-24

conclusion from task 13-2 (week 14):

  1. compute gradients efficiently
const Eigen::MatrixXd dpt = (Eigen::MatrixXd(2, 1) << 0.0, 0.0).finished();
const Eigen::Matrix<double, 2, 3> G =
	cell.Geometry()->JacobianInverseGramian(dpt).block(0, 0, 2, 2) *
	(Eigen::Matrix<double, 2, 3>(2,3) << -1, 1, 0,-1, 0, 1).finished();
  1. flip signs for correct orientation
    • flipping column -> acocunts for sign change in trial function
    • flipping row -> sign change in test function
    • math. equivalent to , where R is the diagonal correction matrix
      • we do not change orientation to itself!
auto rel_orientation = cell.RelativeOrientations();
for(int k = 0; k < 3; ++k) {
if(rel_orientation[k] == lf::mesh::Orientation::positive) continue;
// flip signs in 3+k-th row and column
MK_.col(k+3) *= -1;
MK_.row(k+3) *= -1;
}

timestamp 2026-06-23

LehrFEM Dof Numbering

  • local: start in bottom left corner, go counterclockwise
  • global: nodes->edges->faces

LehrFEM codim numbering

  • 0 faces, 1 edges, 2 nodes -> inverted from dof numbering!

  • Global shape functions are the elements of the basis of the finite element trial and test space used in step II of a finite-element Galerkin discretization. They are associated with geometric entities of the mesh and are locally supported. Global shape functions are defined on the whole computational domain . Usually, global shape function will be -piecewise smooth, but not smooth everywhere.
  • Local shape functions for a particular cell of the mesh are the (non-trivial) restrictions of global shape functions to that cell. Thus, local shape functions are defined only on a particular cell of the mesh and not beyond. Usually, local shape functions are smooth.

Plugging local shape functions into localized bilinear forms we obtain element matrices.


Vorlesung

1. Second-Order Scalar Elliptic Boundary Value Problems

Video 1.2.1: Elastic Membranes

Goal: compute shape of string (1D)/membrane (2D) under vertical loading

Notion 1.2.1.1. Configuration space

The configuration space of a mathematical model is a set, each of whose elements completely describe all relevant aspects of a state of the modeled physical system.

  • string must be continuous string not ripped apart
  • b.c.: u(a),u(b) given

-> but need formula for potential energy

Video 1.2.2 Eloectrostatic Fields (6min)

Note:

Equilibrium condition for electrostatics

The physical field will attain minimal electromagnetic field energy (1.2.2.16)

Video 1.2.3 Quadratic Minimization Problems (21 min)

Definition 1.2.3.13. Quadratic minimization problem

A minimization problem

is called a quadratic minimization problem, if is a =quadratic functional on a real vector space .

extension to affine space:

Recall from LA:

Tldr

we are trying to find the most stable/lowest energy state of the system. The idea is to find a general formula for the structurally similar string/membrane/electricity problem, which can be described by a Quadratic functional:

However, we can only solve the problem if the energy formula has a minimum (imagine the energy formula as a paraboloid “bowl”): Thus, for of solution, the problem must fulfill:

  1. -> bilinear form must be at least semi-positive definite
  2. , where energy norm. -> linear form must be bounded/continuous with respect to energy norm. This ensures the “load” isn’t so strong that it rips the system apart.

todo add some integrals to the tldr

Video 1.3 Sobolev spaces (22 min)

have a bad reputation as having a useless mathematical sophistication

choose

=> energy space generated by in contrast to -Space, here the boundary conditions are not dropped; the reason for this are the norms: Sobolev space without boundary conditions: the can be bounded by the size of the domain and the energy norm:

Theorem 1.3.4.17: First Poincaré-Friedrichs inequality

If , , is bounded, then

How to "work with" Sobolev spaces

Most concrete results about Sobolev spaces boil down to relationships between their norms. The spaces themselves remain intangible, but the norms are very concrete and can be computed and manipulated as demonstrated above.

Tip

  • Do not be afraid of Sobolev spaces!
  • It is only the norms that matter for us, the ‘spaces’ are irrelevant!

Corollary 1.3.4.26. -norm of piecewise smooth functions

Under the assumptions of Thm. 1.3.4.23 we have for a continuous, piecewise smooth function

If compute -norm piecewise

Tldr

  • space - space of all functions where . Here, b.c. are meaningless, since changing the function at a single point costs zero energy
  • space - “energy space” for membranes; includes functions where derivatives are square-integrable. Unlike , the b.c. cannot be ignored, since changing a point blows up the derivative
  • -space - with zero b.c.
    • one can think of as the space of peicewise smooth, globally continuous functions

Tldr

Functions of an space are square-integrable on :

Functions of the space are in , too. Additionally, the first (hence ^1) derivative is in , too:

Note that functions do not need to be in or even ! A counterexample is

Video 1.4 Linear Variational Problems (21 min)

Poincare-friedrich?

Video 1.5 Equilibrium Models: Boundary Value Problems (22 min)

=> 2-pt BVP (a Dirichlet problem) in strong form (vs. “weak form” = LVP)

Lemma 1.5.3.4: Fundamental lemma of calculus of variations in higher dimensions

If satisfies

then can be concluded.

Video 1.6 Diffusion Models: Stationary Heat Conduction (5 min)

by combining those two using Gauss theorem, we get: => we reach at the same PDE as for the membrane model

Video 1.7 Boundary Conditions (07.35 min)

example of a mixed BVP:

Boundary conditions for second-order elliptic BVPs

For second order elliptic boundary value problems exactly one boundary condition is needed on every part of .

Video 1.8 Second-Order Elliptic Variational Problems (13 min)

for Dirichlet BVP: for Radiation BVP: for Neumann BVP:

Theorem 1.8.0.20: Second Poincaré-Friedrichs inequality

If , , is bounded, then

Video 1.9 Essential and Natural Boundary Conditions (18 min)

summary of 1.4 - 1.9:

Tldr

For a summary of this week, see the notes from the exercise session: -> ETH_NumericalMethodsForPDE_Übungen > ^75b794

2. Finite Element Methods (FEM)

Video 2.2 Principles of Galerkin Discretization (25 min)

graph LR
	A[Variational boundary<br>value problems] -- discretization --> B["System of a finite number of equations for (real) unknowns"]

garlekin discretization in two steps:

Galerkin discretization (step 1)

Replace the infinite-dimensional function space in the linear variational problem (2.2.0.2) with a finite-dimensional subspace .

-> “h” tag for s.th. finite

  1. Choose basis, then plug basis expansions int DVP, and use (bi-linearity)


Theorem 2.2.2.7: Independence of Galerkin solution of choice of basis

The choice of the basis has no impact on the (set of) Galerkin solutions of (2.2.1.1).

Properties all Garlekin matrices for a DVP (all matrices from a congruence clas) share:

  • regularity (invertibility)
  • symmetry
  • pos.dev.

Video 2.3 Case Study: Linear FEMfor Two-Point Boundary Value Problems (24 min)

NOTE: is given inprocedural form,

Idea underlying the finite element method: approximate by means of continuous, piecewise polynomial functions on a mesh:

Video 2.4 Case Study: Triangular Linear FEMin Two Dimensions I (28 min)

  • In 1D, we partition the domain into an 1D Mesh
  • In 2D, we use triangulation

  • 4. means: no hanging nodes (nodes that are on the edge of another triangle)

  • set of edges

test space in 2 (space of M-p.w. linear continuous function on ):

tent function alternative in 2D:

In 2D, the Galerking matrix does not have a nice structure like in 1D; however, it is still sparse, since nodes unconnected by edges result in a 0 in the Matrix:

Video 2.4 Case Study: Triangular Linear FEMin Two Dimensions II (32 min)

Galerkin discretization based on a nodal basis of tent functions and a triangular mesh: there are two approaches to creating the Galerkin-matrix:

  1. assemble matrix from all vertices Problems:
  • Edges not available in data structure (see first 2.4 video)
  • Triangles adjacent to nodes not available

In my opinion, it is not fair to compare it with the cell-oriented approach, when the data class is also cell-oriented

  1. cell-oriented approach, by “distribute & add”

for finite-element algorithms, always do it cell-oriented

dof: degrees of freedom


now, we assemble everything: for the RHS, we can compute the integral using composite trapezoidal rule (we are working with triangles anyways):

Tldr

We are trying to get variational problems from infinite-dimensional function spaces to something discrete by

  1. choosing a finite-dimensional subspace , where the bilinear and linear form remain well-defined
  2. choosing an ordered basis for the subspace , and using the basis to convert problem into a linear system

In those two steps, the problem can be transformed into a LSE

Tldr - Step 1

In the first step of the discretization, our goal is to replace space with finite . The space should preserve the bilinear form and linear form . The new problem is:

  1. define Mesh . Normally, we use triangulation - pay attention that the mesh does not have “hanging nodes” (2.4.1)
  2. choose a “building block” function to use for each cell. Normally, pecewise linear functions are used, evtl. quadratic or cubic polynomials
  • ensure -> do not use piecewise constants, since then , e.g. if
  1. incoroporate boundary conditions, in case of Dirichlet by discarding any basis functions with nodes on the boundary

Tldr - Step 2

  1. choose a basis , then write every as linear combination of basis functions:
  1. convert to a linear system by exploiting bilinearity of and linearity of :
  • : Galerkin/stiffness matrix, , how basis functions interact through the bilinear form

  • : load vector,

  • : solution vector; the final Galerkin solution (basis, weighted by solution vector)

Basis choice

  • no impact on Galerking solution; however:
  • basis functions with small local support (e.g. tent function) results in a sparse matrix -> desired outcome
  • basis choice determines condition number of matrix -> sensitivity to rounding errors

Video 2.5 Building Blocks of General Finite Element Methods (22 min)

meshes 2D: {cells, edges, nodes}=(mesh/geometric) entities

polynomials 1st option: e.g.

Definition 2.5.2.7: Tensor product polynomials

Space of tensor product polynomials of degree in each coordinate direction

Lemma 2.5.2.8: Dimension of spaces of tensor product polynomials

2nd option: e.g.


basis functions (also called global shape functions (GSF), degrees of freedom)

Locally supported basis functions

Third main ingredient of FEM: locally supported basis functions (see Section 2.2 for role of bases in Galerkin discretization)

Basis functions for a finite element trial/test space built on a mesh must satisfy:

  • () is basis of ,
  • () each is associated with a single geometric entity (cell/edge/face/vertex) of ,
  • () , if associated with cell/edge/face/vertex .

we want local support:

  • if , don’t overlap, entries in Galerkin matrix => sparse matrix

generalization of barycentric coordinate functions:

Video 2.6 Lagrangian Finite Element Methods (23 min)

one triangle, with Kardinal property: gluing triangles (interpolation nodes): -> globally continuous piecewise function

for more dimensions, we “subdivide”; then, we might also have interpolation nodes inside the shape for hybrid mesh: works, becuase functions are all linear when restricted to straigt edge (which we have)

works for any degree!

Video 2.7.2 Mesh Information and Mesh Data Structures (21 min)

problems with FEM:

// factory object creates mesg entities auto of 2D mesh data structure from information contained in mesh_file
auto factory = std::make_unique<lf::mesg::hybrid2d::MeshFactory>(2);
lf::io::GmshReader reader(std::move(factory), mesh_file.string());

we need

  • container (tranversal + ordering/indexing of entities)
  • topology (incidence/adjecency)
  • geometry (node locations, entity shapes)

mesh

  • index access
  • loops:
for(const lf::mesh::Entity &entity : mesh.Entitiy(codimension));

topology layer access:

auto sub_entities_range = entity.SubEntities(sub_codimension);
for(const: lf::mesh::Entity &subentity : sub_entities_range)
    mesh.Index(subentity);

geometry layer

  • geometry object attached for every entity interface
const lf::geometry::Geometry *geo_ptr = entity.Geometry();
Eigen::MatrixXd corners = lf::geometry::Corners(*geo_ptr);

Video 2.7.4 Assembly Algorithms (26 min)

continuation of 2.4

assembly algorithms: building of FE Galerkin amtrix/r.h.s. vector from local contributions

we can split the integrals from the weak form into sums of local contributions (see exercise lession, week3, thu, hongg) LehrFM numbering rules:

  1. dimension of Space
  2. Number of local Dofs (number of local shape functions)
  3. array of locglobmap for all local indices of entity
  4. number of local/global shape functions associatet with entity
  5. global indices of associated local shape functions of indices (not discussed until now)
  6. global index of entity associated with dof

Initalize dynamic Dof Handler: for lagr. FE: uniform no of GSFs associated with entities of same type -> initalization can be simplified:

using dof_map_t = std::map<lf::base::RefEl, base::size_type>;
UniformFEDofHandler(std::shared_ptr<const lf::mesh::Mesh> mesh_p,
                    dof_map_t dofmap);

example: distribute pattern used for assembly

  • loops over entities + DofHandler queries + local operation

not copied: code 2.7.4.23: Assembly function of LehrFEM++

Video 2.7.5 Local Computations (26 min)

either by analytic computation (only if we have polynomials -> locally constant functions on each cell of the mesh) or

analytic computation:

Lemma 2.7.5.5. Integration of powers of barycentric coordinate functions

For any non-degenerate -simplex with barycentric coordinate functions and exponents ,

depends only on area of

e.g. local quadrature

  • in 1D: affine mapping + transformation formula for integrals
  • local quadrature rules used in finite element methods are botained by transformation from (a few) local quadrature rules defined on reference elements.
  • in 2D: (affine mapping maps lines to lines)

general formula: example on : however, if affine => , and we get: in LehrFEM, we can use:

Definition 2.7.5.29: Order of a local quadrature rule

A local quadrature rule according to Def. 2.7.5.9 is said to be order , if

  • for a simplex (triangle, tetrahedron) it is exact for all polynomials ,
  • for a tensor product element (rectangle, brick) it is exact for all tensor product polynomials .

“order no. of nodes ”

transformation on affine maps preserves polynomials

-> integral transformation doesn’t change order of polynomials

quadrature rules in LehrFEM: reference object shape + desired order

not copied: code 2.7.5.41: Entity-based composite numerical quadrature

Video 2.7.6 Treatment of Essential Boundary Conditions (21 min)

todo understand offset function:

maybe missed something relevant…

using LehrFM:

not copied code 2.7.6.17: Transformation function, which generates the block matrix from above

Tldr: LehrFEM++ example for dirichlet b.c. problem

Problem: Weak form:

  • Boundary conditions: Dirichlet (essential)
// 1. Load Mesh and Setup DofHandler for Linear FE (1 DOF per node)
auto factory = std::make_unique<lf::mesh::hybrid2d::MeshFactory>(2);
lf::io::GmshReader reader(std::move(factory), "mesh.msh");
auto mesh_p = reader.mesh();
lf::assemble::UniformFEDofHandler dofh(mesh_p, {{lf::base::RefEl::kPoint(), 1}});
 
// 2. Prepare Global System Containers (N x N)
lf::assemble::COOMatrix<double> A_triplets(dofh.NumDofs(), dofh.NumDofs());
Eigen::VectorXd rhs = Eigen::VectorXd::Zero(dofh.NumDofs());
 
// 3. Assemble Stiffness Matrix (using built-in Laplace Provider)
lf::uscalfe::LinearFELaplaceElementMatrix elmat_builder;
lf::assemble::AssembleMatrixLocally(0, dofh, dofh, elmat_builder, A_triplets);
 
// 4. Handle Dirichlet Boundary Conditions (Offset Function)
auto bd_flags = lf::mesh::utils::flagEntitiesOnBoundary(mesh_p, 2); // Flag nodes
auto selector = [&](unsigned int idx) -> std::pair<bool, double> {
 auto node = dofh.Entity(idx);
 return {bd_flags(*node), 0.0}; // Fix boundary nodes to 0.0
};
lf::assemble::FixFlaggedSolutionCompAlt(selector, A_triplets, rhs);
 
// 5. Solve
Eigen::SparseMatrix<double> A = A_triplets.makeSparse();
Eigen::SparseLU<Eigen::SparseMatrix<double>> solver(A);
if(solver.info() != Eigen::Success) abort();
Eigen::VectorXd solution = solver.solve(rhs);
  • codim: 0->cells, 1->edges, 2->nodes
  • COOMatrex avoids memory shifts during assembly
  • AssembleMatrixLocally is templated -> works independent of test/trial space

Video 2.8 Parametric Finite Element Methods I (22 min)

remaining challenge: what to do with general mesh (curved edges, triangles + quadrilaterals)

Affine equivalence affine pullback preserves polynomials:

Lemma 2.8.1.3: Preservation of polynomials under affine pullback

If is an affine (linear) transformation ( Def. 2.7.5.13), then

general quadrilateral lagrangian FE

  • so far: GSF -> LSF todo: look this up again
  • now: start from LSF on reference element -> inverse pullback:

-> gluing: GSF

bilinear transformation: componentwise (tensor product) polynomial

gluing: -> local shape functions are no longer bilinear, since is no longer polynomial (rational function)

Non-polynomial nature of bilinear shape functions

The local shape functions defined by (2.8.2.4), where is a bilinear transformation and are the bilinear local shape functions on the unit square, are not polynomial in general.

Video2.8 Parametric Finite Element Methods II (27 min)

Note that possibility of gluing needs to be checked!

todo: what are we doing here?

[…]

Information defining a -conforming parametric finite element

In order to define a -conforming parametric finite element in a finite element code we have to implement for all reference elements and

  1. a function realizing ,
  2. and the evaluation .
// interface in LF++:
size_type ScalarReferenceFiniteElement::NumRefShapeFunctions() const;
size_type ScalarReferenceFiniteElement::NumRefShapeFunctions(dim_t codim) const;
size_type ScalarReferenceFiniteElement::NumRefShapeFunctions(dim_t codim, sub_idx_t subidx) const;
 
Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>
ScalarReferenceFiniteElement::EvalReferenceShapeFunctions(
    const Eigen::MatrixXd& refcoords) const;
 
Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>
ScalarReferenceFiniteElement::GradientsReferenceShapeFunctions(
    const Eigen::MatrixXd& refcoords) const;

didn’t copy code 2.8.3.29: Eval() method for parametric element matrix provider

Boundary Approximation by Parametric FEM: “6-node triangle” in LehrFEM++:

Degeneracy of the Transformation

may be “degenerate” singular for some .

Question: why is this better than simply splitting the curve into multiple triangles? The approximation wouldn’t be much worse than by this approach.

Tldr: Pullback

Let be a cell, a reference cell. Then we define the bijection

For Gradients,

todo what is the difference between and ? Is this correct:

NotationNameActs OnDirection
MappingPoints (Coordinates)
Inverse MappingPoints (Coordinates)
PullbackFunctions / Forms
Inverse PullbackFunctions / Forms

3. FEM: Convergence and Accuracy

Video 3.1 Abstract Galerkin Error Estimates (20 min)

convergence (how fast does get closer to ?) and accuracy (how close is to ?)

Discretization error (a function in BVP context!)

Our goal:

Bound relevant norm of discretization error

A relevant norm:

  • LVP (energy function)

Lemma 3.1.2.3. Energy norm and energy deviation

Let solve the linear variational prolem (2.2.0.2),

and let Ass. 3.1.1.2–Ass. 3.1.1.4 be satisfied. Then, with ,

galerkin orthogonality: from this follows Pythagoras theorem: or shorter:

Theorem 3.1.3.7. Cea's lemma

Under Ass. 3.1.1.2–Ass. 3.1.1.4 the energy norm of the Galerkin discretization error for (2.2.0.2) satisfies

-> Galerking solution is optimal (in energy)

  • minimizes over

Optimality of Galerkin solutions:

-> As regards the energy norm, the Galerkin solution is the best possible solution we can obtain in a given trial space.

  • Galerking error estimates in energy form approximation error estimates
  • we can improve the result by enlarging the space (refinement)

  • 2d triangular: regular refinement by splitting triangle into 4 congruent triangles
  • use lf::refinement in LF++

Video 3.2 Empirical (Asymptotic) Convergence of Lagrangian FEM (26 min)

Asymptotic Convergence

Convergence: asymptotic perspective

Crucial: our notion of convergence is asymptotic! sequence of discrete models sequence of approximate solutions study sequence as $i \to \infty$ created by variation of a discretization parameter.

Definition 3.2.1.4. Mesh width

Given a mesh , its mesh width $h_{\mathcal{M}}$ is defined as

  • limit -> 0
  • for p-refinement, discretication DP degree p

cost might depend on dimension (or )

algebraic and exponential convergence

Definition 3.2.2.1. Types of convergence ,

(asymptotically for )

  • log-log plot with straigt line: algebraic convergence
  • lin-log plor with line: exponential convergence

-> (integral) error norms can usually be computed only by numerical quadrature (/sampling) of sufficiently high order

Example:

  • alg. cvg., but slow convergence for non-smooth solutions (h-refinement)
    • cvg. seems to be faster than -cvg (?)
  • exp. cvg.(p-refinement)

-> there might be pre-asymptotic behaviour (no convergence until mesh fine / polynomial degree high)

Tldr: h- vs p- refinement

Featureh-Refinementp-Refinement
StrategySubdivide mesh cells ()Increase local polynomial degree ()
Typical ConvergenceAlgebraic: Exponential: for analytic solutions
Limiting FactorPolynomial degree and smoothness Smoothness of the exact solution
Space PropertyOften results in nested spaces (e.g., via regular refinement)Inherently leads to nested finite element spaces

Video 3.3 A Priori (Asymptotic) Finite Element Error Estimates I (10 min)

Foundation: Cea’s lemma

a suitable “candidate function” obtained by interpolation

Note: For 2nd-order elliptic Dirichlet BVP:

Global estimates for norms

-> algebraic cvg., rate 1

-> algebraic cvg. rate 2

-> algebraic cvg. rate 2

Video 3.3 A Priori (Asymptotic) Finite Element Error Estimates II (18 min)

  • interpolation errors in order to bound the energy norm of the discretization error for lagrangian FEM
  • still looking for piecewise linear FE, but now in 2D

Definition 3.3.2.1. Linear interpolation in 2D

The linear interpolation operator is defined by

uniquely fixes element of piecweise FE space

Definition 3.3.2.20. Shape regularity measure

For a simplex we define its shape regularity measure as the ratio

and the shape regularity measure of a simplicial mesh

  • is similarity-invariant (rotation, scaling, translation)
  • depends only on it’s smallest angle
  • expresses distortion compared to equilateral triangle :

Theorem 3.3.2.21. Error estimate for piecewise linear interpolation

For any and 2D piecewise linear interpolation , a triangular mesh, holds

-> alg. cvg. rate 2

-> alg. cvg. rate 1 where denotes the mesh width ( Def. 3.2.1.4) and the shape regularity measure ( Def. 3.3.2.20) of .

todo learn multi-index notation

Definition 3.3.3.1. Higher order Sobolev spaces/norms

The -th order Sobolev norm, , for (sufficiently smooth) is defined by

Sobolev space .

increasing regularity of functions

  • measures “ruggedness” of functions

Definition 3.3.3.3. Higher order Sobolev semi-norms

The -th order Sobolev semi-norm, , for sufficiently smooth is defined by

rewriting error bounds using Sobolev norms, we get:

Corollary 3.3.3.4. Error estimate for piecewise linear interpolation in 2D

Under the assumptions/with notations of Thm. 3.3.2.21 ()

Theorem 3.3.3.8. Sobolev embedding theorem

Theorem answers:

“How many derivatives must a function have (in a weak, square-integrable sense) before we can guarantee it is actually a continuous, point-wise defined function?”

e.g. : m>1 => functions are guaranteed to be continuous

Video 3.3 A Priori (Asymptotic) Finite Element Error Estimates III (16 min)

Theorem 3.3.5.6. Best approximation error estimates for Lagrangian finite elements

Let , be a bounded polygonal/polyhedral domain equipped with a mesh consisting of simplices or parallelepipeds. Then, for each , there is a constant $C > 0$ depending only on $k$ and the shape regularity measure $\rho_{\mathcal{M}}$ such that

  • best approximation error bounds for FE discretization error for 2nd-order elliptic BVPs (there: exact solution of BVP) in energy norm
  • “generic constant”:
    • actual value unknown
    • dependence known

If we assume uniform shape-regularity and local quasi-uniformity of the mesh, then, from theorem 3.3.5.6 we get:

=> Algebraic convergence of discretization error with respect to N (DOFs), rate

  • rate limited by
    • polynomial degree
    • smoothness
  • rate deteriorates for larger

By what extra cost can we buy a certain improvement of the FEM solution? (3.3.5.23)

Assuming the a priori error estimate is sharp (the actual error follows the theoretical trend), the relationship between error reduction and computational cost is:

  • The Goal (Gain): Reduce the discretization error (energy norm) by a factor of .
  • The Price (Cost): Increase the number of unknowns () by a factor of:

takeaways

  1. The Curse of Dimension (): As the spatial dimension increases, the cost of reducing error grows exponentially. Accuracy is much “cheaper” in 1D than in 3D.
  2. Optimal Efficiency (): For best gain/cost, polynomial degree should match solution’s smoothness ()
  3. Smoothness Matters: For very smooth solutions ( is large), high-order elements () reduce the required increase in significantly compared to linear elements ().
  4. The “Slow” Limit: If the solution is not smooth (small ), increasing the polynomial degree does not help efficiency, because the cost factor will be stuck at regardless of how high you choose .
type of refinementalg. cvg. rate
h-refinement ( fixed & small: )
h-refinement (low regularity of u: )
p-refinement ( fixed, limited regularity )
p-refinement (perfectly smooth (analytic) solution)
(because depends on in unspecified way)
theorem doesn’t work

Here is a compressed summary of Unit 3.3 for your markdown callout, based on the course videos and documents:

Tldr 3.3: A Priori Finite Element Error Estimates

  • Cea’s Lemma: energy norm of discretization best approximation error of FE space
  • accuracy is governed by the mesh width (), the polynomial degree (), and the Sobolev smoothness () of the exact solution.

General -Error Estimate:

where the generic constant depends on the shape regularity () of the mesh but is independent of .

Algebraic Convergence Trends (-refinement): On quasi-uniform meshes, the error decays relative to the number of unknowns () as:

  • Curse of Dimension: Convergence speed deteriorates as the spatial dimension increases.
  • Rate Limits: The rate is limited by either the polynomial degree (for smooth solutions) or the solution’s lack of regularity (for rough solutions).

Asymptotic Efficiency (Cost-Benefit): Reducing the error by a factor requires increasing the problem size by a factor of . Efficiency is theoretically optimal when .

todo Learn more about Sobolev regularity (solution , which ?)

Video 3.4 Elliptic Regularity Theory (11 min)

WHat is the Sobolev regularity of solutions of elliptic BVP?

Theorem 3.4.0.2. Smooth elliptic lifting theorem

If is -smooth, ie. possesses a local parameterization by -functions, and , then, for any ,

.

In addition, for such there is such that

probably irrelevant:

Theorem 3.4.0.6. Corner singular function decomposition

Let be a polygon with corners . Denote the polar coordinates in the corner by and the inner angle at the corner by . Additionally, let with and , where the are given by the singular exponents

Then with == in (Dirichlet prob.) can be decomposed

with regular part , cut-off functions ( in a neighborhood of ), and corner singular functions

=> reentrant corners lead to very poor regularity

Intermediate

has re-entrant corners if solves in , on , then in general.

however, for convex problems, the dirichlet solution is in (BVP is 2-regular)

Theorem 3.4.0.10. Elliptic lifting theorem on convex domains

If convex, .

Video 3.5 Variational Crimes (15 min)

“theory is incredibly difficult”

Variational crime: instead of solving exact discrete variational problem, we solve a perturbed one:

-> inevitable, since some functions are only given in procedural form

Guideline for acceptable variational crimes

Variational crimes must not affect (type and rate) of asymptotic convergence

  1. Impact of Numerical Quadrature

Note: To show that QR is of order 2 -> show that it integrates polybomials of order 1 exactly (n-1) -> integrates exactly

Intermediate

Finite element theory tells us that the above guideline can be met, if the local numerical quadrature rule has sufficiently high order. The quantitative results can be condensed into the following rules of thumb:

Target AccuracyRequired Quadrature Order
Order sufficient for
Order sufficient for

Example of crime: Using midpoint rule (order 2) for quadratic elements () will cause convergence rate in terms of to drop.

  1. Impact of boundary approximation

Rule of thumb deduced from sophisticated finite element theory:

If , use boundary fitting with polynomials of degree .

for quadratic FEM, use quadratic boundary approximation (see chapter 2)

Example of crime: When has curved boundary, approximation with polygon (linear) is a crime (perturbed domain )

When using LehrFEM to refine meshes, the boundary stays the same -> round boundary does not get "rounded" when refining

Video 3.8 Validation and Debugging of Finite Element Codes (13 min)

matching theoretical rates are a strong circumstatial evidence of correctness

-> if code converges mroe slowly than theory predicts, there is almost certainly a bug

3 main methods:

  1. observing convergence between mesh levels

test code by comparing solutions on a sequence of nested meshes created by regular refinement

  • refine mesh -> should shrink
  • norm of the difference, should display the same algebraic convergence rate () as the actual discretization error
  • shortcut: compare the difference of their norms (), should also converge at rate
  1. method of manufactured solutions

most popular way to test a solver

  • Step 1: Pick a simple domain and a smooth analytic function to be your “exact solution”.
  • Step 2: Use the strong form of the PDE to symbolically calculate what the source function and boundary data must be to produce that solution .
  • Step 3: Run your solver with this “manufactured” and and measure the error using overkill quadrature.
  • Debugging: Plot the error on a log-log scale. If the slope (rate) is wrong, simplify the problem—for example, set the reaction coefficient to zero to see if the bug is in the stiffness matrix or the mass matrix.
  1. Direct Testing of Bilinear Forms

test specific parts of your code, e.g. Galerkin matrix for a specific boundary term

  • Pick a smooth function and compute the value of the bilinear form analytically using a tool like Mathematica. -> difference between the analytical value and the discrete value should converge at the polynomial degree rate as the mesh is refined.

Warning

  • Avoid polynomial solution: polynomial as manufactured solution will have 0 error -> no convergence rate
  • Smothness matters: singularities in the solution can “foil” the fast convergence you expect to see

9. Second-Order Linear Evolution Problems

Video 9.2.1 Heat Equation (10 min)

  • linear evolution: time-dependent / transient
  • posed on space-time cylinder

9.2 Parabolic Initial-Boundary Value Problems

balance law: using localization and fourier law, we get:

spatial b.c.:

For second order parabolic evolutions we can/must use the same spatial boundary conditions as for stationary second order elliptic boundary value problems

(although the boundary conditions are now dependent from x and t)

initial conditions (temporal b.c.):

combined:

Video 9.2.2 Heat Equation: Spatial Variational Formulation (8 min)

Spatial variational form of (7.1.1.5)–(7.1.1.7): seek

abstract linear evolution problem:

  • a, m are independent of time and s.p.d
  • solution will depend linearly on f,

Video 9.2.3 Stability of Parabolic Evaolution Problems (10 min)

todo sould I add solution of 1D heat equation? todo TA prioritized a different part of the viedo/chapter

It is always simpler to look at the square of the norms

reminder: Poincare-Friedrichs inequality:

Lemma 6.2.3.3. Decay of solutions of parabolic evolutions

For the solution of (7.1.2.4) satisfies

where is the constant from (7.1.3.1), and , stand for the energy norms induced by and , respectively.

Dissipation of energy in parabolic evolutions

Exponential decay of energy during parabolic evolution without excitation (“Parabolic evolutions dissipate energy”)

Video 9.2.4 Spatial Semi-Discretization: Method of Lines (6 min)

-> spatial Galerkin discretization of 6.2.2.8 yields:

Method-of-lines ordinary differential equation

Combining (7.1.4.1) and (7.1.4.2) we obtain

with

  • s.p.d. stiffness matrix , (independent of time),

  • s.p.d. mass matrix , (independent of time),

  • source (load) vector , (time-dependent),

  • coefficient vector of a projection of onto .

Note

(7.1.4.4) is an ordinary differential equation (ODE) for

  • but only semi-discretization, since is still function of continuous time

=> MOL-ODE is semi-discrete

Video 9.2.7 Timestepping for Method-of-Lines ODE (30 min)

since s.p.d., can be invertedy -> use Cholesky-decomposition ( todo what is that?)

MOL-ODE is stiff!

Explicit Euler timestepping is not stable (exponential blow-up) in case of large timestep combined with fine mesh.

Lemma 6.2.7.32. Behavior of generalized eigenvalues

Let be a simplicial mesh and , denote the Galerkin matrices for the bilinear forms and , respectively, and . Then the smallest and largest generalized eigenvalues of , denoted by and , satisfy

where the “generic constants” ( Rem. 3.3.5.10) depend only on the polynomial degree , the domain , and the shape regularity measure .

-> timestep constraint: (similar to ode45)

diagonalization of RK-SSM ()

Unconditional stability of single step methods

Necessary condition for of a single step method for semi-discrete parabolic evolution problem (7.1.4.4) (“method of lines”):

The discrete evolution of the single step method applied to the scalar ODE satisfies

RK-SSM for

with rational stability function

a rational function in

RK-SSM is unconditionally stable for MOL-ODE if

  • evne desirable for

Definition 6.2.7.48. L( )-stability

A Runge-Kutta single-step method satisfying (7.1.7.45) is called , if its stability function according to (7.1.7.47b) satisfies

  1. for all , and
  2. "" .

necessarily implicit

Video 9.2.8 Fully Discrete Method of Lines: Convergence (18 min)

The Parabolic Discretization Path

  1. Heat Equation (Strong Form): transient heat equation on a space-time cylinder , subject to initial and boundary conditions:
  2. Spatial Variational Formulation: By treating time as a passive parameter and applying integration by parts in the spatial domain, the PDE is converted to a weak form:
  1. Abstract Formulation: The weak form is generalized into an abstract parabolic evolution problem using the mass bilinear form and the stiffness bilinear form :
  1. Method of Lines ODE: Applying Galerkin discretization in space (e.g., using finite elements) transforms the abstract evolution into a system of ordinary differential equations for the coefficient vector :

where is the mass matrix and is the stiffness matrix. 5. Runge-Kutta Method (Full Discretization): Finally, the semi-discrete ODE is integrated in time using a single-step method (SSM). For parabolic problems, L-stable Runge-Kutta methods (such as Radau methods) are preferred to ensure stability:

resulting in a fully discrete scheme where the total error is the combined effect of spatial and temporal discretization.

Refinement for fully discrete parabolic evolution problems

Guideline: spatial and temporal resolution have to be adjusted in tandem

for a conditionally stable explicit method, we often have timestep constraint

-> if we reduce mesh for accuracy, we have to reduce the timestep more severly than accuarcy requires -> inefficiency “overkill constraint”

-> use unconditionally stable implicit methods instead

10. Modeling Fluid Flow

Video 10.1.1 Modeling Fluid Flow (7 min)

flow field velocity field

  • needs to be at least Lipschitz-continuous
  • if -> no in/outflow -> streamlines exists for all times

streamline ODE

flow map

  • where solves IVP for streamline with
  • properties:

Video 10.1.2 Heat Convection and Diffusion (5 min)

=> linear scalar convection-diffusion equation for energy (CDE) (1.6.0.3) + (10.1.2.4):

Intermediate

Suitable boundary conditions fitting a PDE are determined by the highest-order term.

Here: diffusion term

Video 10.1.3 Incompressible Fluids (10 min)

Definition 10.1.3.1. Incompressible flow field

A fluid flow is called incompressible, if the associated flow map is ,

for all sufficiently small , and for all control volumes .

mathematically:

Theorem 10.1.3.7. Differentiation formula for determinants

Let be a smooth matrix-valued function. If is regular for some , then

where is the matrix determinant and stands for the trace of a matrix.

Theorem 10.1.3.8. Divergence-free velocity fields for incompressible flows

A stationary fluid flow in is incompressible ( Def. 10.1.3.1), if and only if its associated velocity field satisfies everywhere in .

scalar convection-diffusion equation for incompressible flow:

  • where

Theorem 10.1.3.13. Maximum principle for scalar 2nd-order convection diffusion equations

Let be a continuously differentiable vector field and . Then there holds the maximum principle

Video 10.1.4 Time-Dependent (Transient) Heat Flow in a Fluid (4 min)

new: time-dependent velocity field

  • now, conservation of energy also contains change in time:

yields transient CDE:

“elliptic” boundary conditions initial condition :

for incompressible fluid :

Video 10.2.1 Singular Perturbation (16 min)

linear variational problem ():

  • not symmetric no energy norm
  • continuous on , since bounded
  • (2nd part of bilinear form vanishes)
    • is positive definite

todo maybe some notes on the derivation of notion?

use method of characteristics (MoC) to compute :

Notion 10.2.1.9. Singularly perturbed problem

A boundary value problem depending on parameter is called singularly perturbed, if the limit problem for is not compatible with the boundary conditions.

For the pure transport problem Dirichlet boundary conditions can be imposed only on the inflow boundary part

but not on its complement in , the outflow boundary part

  • : Dirichlet b.c. can be imposed everywhere on
  • : Dirichlet b.c. can be imposed only on

=> singular perturbation

On a closed streamline we cannot find a point , which renders the solution formula (10.2.1.8) meaningless.

Video 10.2.2 Upwinding (13 min)

bounded computational domain

  • singularly perturbed for
  • : Dirichlet b.c. can only be imposed on inflow boundary

todo look at derivation of 10.2.2.2

for spurious oscillation due to even-odd decoupling

Alrebraic sign conditions

(Linearly interpolated) discrete solution satisfies maximum principle (3.7.2.1). system matrix complies with sign-conditions

  • (3.7.2.8): positive diagonal entries, ,
  • (3.7.2.9): non-positive off-diagonal entries, ,
  • “(3.7.2.10)”: diagonal dominance, .

Tldr: Upwinding: idea

  • Goal: -robust method (satisfaction of maximum principle)
  • Mechanism of Upwinding: use one-sided difference quotients in direction of velocity (“upwind” direction)
    • In 1D: use backwards diff. quotient to satisfy algebraic sign conditions regardless of (forwards diff. quotient only works for )
    • 2D/3D: standard Galerking methods produces “terrible oscillation” -> upwinding needed

“tradeoff between cvg. speed and accuracy ()”

Video 10.2.2.1 Upwind Quadrature (17 min)

different derivation of upwinding for 1D: apply global composite trapezoidal rule to 2nd term of convertcion-diffusion 2-pt BVP:

upwind quadrature rule approximates the convective bilinear form as a weighted sum over all mesh nodes :

  • (Vertex Mass): This is the weight associated with node , representing the area of the node patch surrounding it. It is calculated as one-third of the sum of the areas of all triangles sharing vertex :
  • : The value of the test function at the node (which is if is the basis function and otherwise).

p.w. linear functions: is constant on each triangle but discontinuous across edges and at nodes

=> idea: use values from upstream triangle

The gradient value used in the quadrature is then defined by the limit:


using “tent function” basis , entries of the convective part of the Galerkin matrix are given by:

=> fulfills algebraic sign conditions => -robust

todo not happy with this summary

Always be sure in which direction the velocity is going!

Video 10.2.2.2 Streamline Diffusion (19 min)

Artificial diffusion/viscosity CFD

upwinding = -dependent enhancement of diffusive term

problem: enhancing diffusion smearing of internal layers and ridges

we are no longer solving the right problem!

Heuristics of streamline upwinding (SV)

Since the solution is smooth along streamlines, then adding diffusion in the direction of streamlines cannot do much harm.

solution: anisotropic artificial diffusion in streamline direction

  • on cell replace:
  • local velocity (e.g., obtained by averaging)
  • method parameter controlling the strength of anisotropic diffusion ( - dependent

SU-enhanced variational problem

This tampering affects the solution : (solution of (10.2.2.30) solution of (10.2.0.1))

  • we want the original solution still solves the stabilized VP -> consistent modification

Definition 10.2.2.31. Consistent modifications of variational problems

A variational problem is called a consistent modification of another, if both possess the same (unique) solution(s): If solves

then, it should also solve modified LVP:

to satisfy this, we add a residual (term that vanishes for exact solution)

Choice of : (for p.w. linear FE)


  • pros: sharp jump -> no smoothing (compared to upwind quadrature)
  • pros: faster convergence than upwind quadrature (upwind quadrature sacrifices cvg.)
  • cons: (“small”) overshoots
  • cons: violation of max principle

"Meta theorem" :

No -robust linear method that respects the maximum principle strictly can be more than 1st-order convergent in !

Video 10.3.1 Method of Lines (13 min)

Method of Lines (MOL) for transient convection-diffusion problems: “half-way” discretization strategy that converts a time-dependent partial differential equation (PDE) into a system of ordinary differential equations (ODEs) by first discretizing only the spatial variables:

transient convection-diffusion equation with Dirichlet boundary conditions:

  1. Spatial Discretization: is treated as parameter, spatial domain is discretized (e.g., using finite elements on a fixed mesh) => system of ODEs for the time-dependent basis expansion coefficients
  • : The time-dependent vector of basis expansion coefficients representing .
  • : mass matrix
  • : FE Galerkin matrix for
  • : transport matrix (discretization of the convective term )
  • : load vector (depending on and -> time-independet)
  1. Temporal Discretization: solve ODE system using numerical integrator (timestepping method) to obtain a fully discrete solution.

robustness:

  • spatial discretization: use -robust discretization for convective term (e.g. upwind schema)
  • timestepping stability: use e.g. implicit euler/SDIRK-2

12. Finite Elements for the Stokes Equations

Video 12.1 Modeling the Flow of a Viscous Fluid (30 min)

(substantial modelling component in this chapter)

  • thermodynamic perspective:
    • (incompressible)
  • assumptions:
    • small Reynolds number -> slow flows / small / sticky fluid
    • energy dissipation mainly/only occurs in eddies -> curl
      • dissipation: kinetic energy -> heat
  • boundary conditions:
    • no-slip: on

with these assumptions, we get the space:

balance between 2nd law of T.D. (entropy maximized) and 1st law of T.D. (conservation of energy):

converted to quadratic minimization problem:

todo review questions

Video 12.2.1 The Stokes Equations: Constrained variational formulation (20 min)

Lemma 12.2.1.2.

For , holds ()

where is the Euclidean inner product of matrices

using lemma 12.2.1.2 + divergence constraint (), we get:

on the space

  • s.p.d. (since all gradients of components vanish)
  • not decoupled (since couples components of velocity field, unfortunately)

No simple FE subspace of -> variational form useless

todo review questions

Video 12.2.2 The Stokes Equations: Saddle Point Problem Formulation (55 min)

[AI] We want to solve a constrained minimization problem. We introduce a state space and a multiplier space . For a convex differentiable functional subject to a linear constraint , we define the Lagrangian functional , where is the Lagrange multiplier. The solution is found by solving the min-max problem .

Lemma 12.2.2.4. Necessary conditions for existence of solution of saddle point problems

Any solution of (12.2.2.3) will be the first component of a zero of the derivative (“gradient”) of the Lagrangian functional :

solutions of min-max problems correspond to saddle points: [AI] To find the saddle point, we evaluate the partial derivatives of :

Setting the derivatives to zero yields a system of variational equations. If is quadratic, we replace with a bilinear form and a linear form .

…we get to the variational saddle point problem (SPP)

  • is the Lagrange multiplier / “pressusre”
  • is also called “elliptic”

Seek the velocity field and a Lagrange multiplier such that

[AI] Ensuring uniqueness of pressure: By Gauss’ theorem, since on . We infer that the pressure solution is only unique up to a constant (adding any constant to still retains a valid solution). To restore uniqueness, we impose a vanishing average condition on the pressure. We replace with the constrained space .

Theorem 12.2.2.23. Ladyzhenskaya–Babuška–Brezzi conditions ( LBB-conditions)

If the following two conditions are satisfied, (i) the bilinear form is -elliptic (ellipticity on the kernel)

(ii) the bilinear form satisfies the inf-sup condition

then the variational saddle point problem (12.2.2.50) possesses a unique solution , which satisfies

with independent of and .

  • LBB2 (trivial kernel) has full rank is regular
  • LBB1 is symmetric positive definite (elliptic) on the null space of the saddle point system matrix is invertible, giving a unique solution for and unique solution

Applied to stokes SPP:

where

  • and are Hilbert spaces, with norms and , respectively,
  • and are continuous/bounded bilinear forms,
  • and are continuous/bounded linear forms.

note: complex derivation using Theorem (12.2.2.38): existence of stable velocity potentials can be looked up in the script; however, we get:

Theorem 12.2.2.40. Existence and uniqueness of weak solutions of Stokes problem (" ")

The linear variational saddle point problem (12.2.2.19) (“Stokes problem”) has a unique solution , which satisfies

Video 12.2.3 Stokes System of Partial Differential Equations (15 min)

12.2.3.1. Extra somoothness of velocity and pressure

For the solution of (12.2.2.19) we assume

Stokes equation:

pressure poisson: If sufficiently smooth, we have , and we get:

-> cannot be solved, missing b.c. for

( is defined on but we cannot impose Dirichlet (or any) b.c. (see week 1/2))

todo review questions

12.3 Galerking Discretization of the Stokes Saddle Point Problem

Video 12.3.1 Pressure Instability (40 min)

applying galerking discretization to the problem from chapter 12.1/.2:

  • Step 1 (space discretization)

DVP:

  • Step 2 (choosing basis functions) of , of
    • + expansion:

leads to saddle point LSE:

with matrix entries:

  • Note that saddle point matrix is symmetric, but not s.p.d.

pressure instability has to be chosen carefully to prevent spurious oscillations

  • -> only if -> unique
    • only if has trivial kernel, the solution is unique
  • however, this is only a necessary (not sufficient!) condition -> we might get oscillations anyway (BAD NEWS)

Intermediate

is a necessary condition for the uniqueness of the pressure solution of the discrete saddle point variational problem (12.3.0.4).

Video 12.3.2 Stable Galerkin Discretization of Stokes Saddle Point Problem (30 min)

  • must be “large enough to fix the pressure”

todo why, exactly?

example: by rising velocity field space , checkerboard modes instability (see previous video) is cured

Definition 12.3.2.7. Stable finite element pair

A pair of finite element spaces , is a stable finite element pair, if the solution of the discrete saddle point problem (12.3.0.4) satisfies

where the constant may depend only on , the coefficient , and the shape regularity measure ( Def. 3.3.2.20) of .

  • must be independent of !

  • velocity component: unconditional stability
  • pressure component:

Theorem 12.3.2.15. inf-sup condition

The finite element spaces , provide a stable finite element pair ( Def. 12.3.2.7) for the Stokes problem (12.2.2.19)/(12.3.0.2) if there is a constant depending only on and the shape regularity measure ( Def. 3.3.2.20) of such that

inf-sup cond.: \sup_{\mathbf{w}_h \in U_h} \frac{|\mathrm{b}(\mathbf{w}_h, q_h)|}{\|\mathbf{w}_h\|_{\mathrm{a}}} \ge \beta \|q_h\|_{L^2(\Omega)} \quad \forall q_h \in Q_h. \tag{12.3.2.16}

  • LBB1 is directly satisfied by the fact that is p.d.
  • LBB2 comes from 12.3.2.15 (above)

-> todo conclusion?

Video 12.3.3 Convergence of Stable FEM for Stokes (30 min)

abstract lax equivalence principle

Assumption 12.3.3.5. Stability of the discrete variational problem

using residual equation + assumption + -inequality:

-> is quasi-optimal (optimal (see Cea’s lemma) + some constant)

  • Quasi-optimality: independent of data, discretization parameters

Discrete stability quasi-optimality

If a discrete linear variational problem is stable according to Ass. 12.3.3.5, then Galerkin solutions are quasi-optimal.

which leads to:

Theorem 12.3.3.13. Convergence of stable FE for Stokes problem

If is =a stable finite element pair= ( Def. 12.3.2.7) for the Stokes variational saddle point problem (12.2.2.19), then the corresponding finite element Galerkin solution satisfies

with a constant that depends only on , and the shape regularity of the finite element mesh.

  • Note: norm of velocity error also depends best-approx. error of pressure space
  • slower convergence error matters more!

but we don’t want a poor pressure space to affect the convergence of velocity solution:

Definition 12.3.3.16. Pressure-robust Galerkin discretization of the Stokes problem

A pair of finite element spaces , for the Galerkin discretization of the Stokes variational saddle point problem (12.2.2.19) is called pressure-robust, if the velocity component of the Galerkin solution satisfies

with independent of the driving force field .

Lemma 12.3.3.17. Criterion for pressure robustness

A pair of finite element spaces for the Galerkin discretization of the Stokes variational saddle point problem (12.2.2.19) is pressure-robust in the sense of Def. 12.3.3.16, if

If we assume this, from

we get:

and since this is a version of Galerkin orthogonality, (similar to proof for Cea’s lemma)

-> optimality, if approximating function in discrite space of functions with vanishing div -> however, no practical spaces have been found that satisfy this criterion -> currently useless

todo review questions

Video 12.3.4 The Taylor-Hood Finite Element Method (15 min)

  • stable FE are balanced, if convergence (^12-3-3-13) has same order for smooth
  • requirements for Stokes FEM:

Intermediate

  1. The pair of finite element spaces must be stable ( Def. 12.3.2.7)
  2. The velocity finite element space should provide the same rate of algebraic convergence of the -best approximation error w.r.t. as the pressure space in .
  3. The velocity finite element space should guarantee 1 and 2 with as few degrees of freedom as possible.

-> 2. and 3. concern efficiency. A stable way to satisfy the requirements is the Taylor-Hood (PS-P1) finite element method for Stokes problem:

  • a triangular/tetrahedral or rectangular/hexahedral mesh of , which may even be hybrid, see Section 2.5.1,
  • the velocity space: , and
  • the pressure space: , which means a continuous pressure approximation.

  • and are a stable pair!
  • algebraic convergence, order 2 for
    • velocity, -norm
    • pressure, -norm

Video 12.3.5 The Non-Conforming Crouzeix-Raviart FEM (40 min)

  • non-conforming:

Definition 12.3.5.2. 2D scalar Crouzeix-Raviart finite element space

The Crouzeix-Raviart finite element space on a triangular mesh is

  • global shape functions:
  • local shape functions (LSF) associated with edges of triangle : CR-P0 FEM for Stokes:

DVP: seek such that

  • for all .
  • derivatives restricted to cell , since not known outside

  • spaces are balanced (even optimal)
  • stable, if:

Lemma 12.3.5.19. Inf-sup condition for --pair

With a constant depending only on and the shape-regularity measure of

  • Note: here, we refer to the broken norm and bilinear form:
  • for proof, see script todo see script
    • for proof, we use the edge average interpolation operator:

Lemma 12.3.5.22. Continuity of

With a constant depending only on the shape-regularity measure of

intermediate result:

Lemma 12.3.5.25. Fortin-projector property of

and remember:

Theorem 12.2.2.38. Existence of stable velocity potentials

todo review questions todo tldr not useful

Tldr: Stokes saddle point variational problem

with a, b form:

13. Finite-Element Exterior Calculus (FEEC)

13.1 (Differential) Forms

Video 13.1.2 Fields and Integral Forms/Currents (28 min)

  • Electric Field (): Measured via work along directed paths Fundamental nature is a 1-form.
  • Magnetic Induction (): Measured via flux through oriented surfaces Fundamental nature is a 2-form.

-> and have totally different physical natures and should be discretized differently.

Orientation:

set of all -dimensional oriented “surfaces” (sub-manifolds) in

Notion 13.1.2.7. Integral -forms (IF)/-currents

An (integral) -form/-current , , on is a continuous and additive mapping satisfying

where denotes the -dimensional surface/sub-manifold with flipped orientation.

on domain : Notation: vector space of -forms

Field TypeForm DegreeIntegrated Over…Examples
Scalar Field0-formPointsTemperature, Electric Potential
Circulation1-formCurvesElectric Field (), Magnetic Field ()
Flux2-formSurfacesMagnetic Induction (), Heat Flux, Current Density ()
Density3-formVolumesMass Density, Charge Density

Integral -form / -current,

An integral -form is a mapping that is:

  • Continuous: Small surface deformations lead to small changes in value.
  • Additive: for disjoint .
  • Orientation-reversing: .
  • Dimension-consistent: for surfaces with .

denotes the vector space of these forms.

  • Notation: as a duality pairing: .

Video 13.1.3 Differential Forms (56 min)

we now go from global measurements of fields (integral forms) to local characterization:

  • can be regarded as a linear mapping from displacements into
  • should be read as an anti-symmetric bilinear form

Definition 13.1.3.4. Alternating -linear form

An alternating -linear form , , on a real vector space is a mapping

which

  1. is linear in each of its arguments, and which
  2. changes sign, when any two arguments are swapped (“alternating”). when any two arg. vectors are the same when args. are linearly depependent

it returns the signed volume of the parallelotope spanned by its arguments

Notation: vector space

  • linear forms on
  • dimension formula: (, is -subsets of a basis of )

Vector proxies: differential forms in are identified with classical fields via proxies

  • 0-form : Proxy is a scalar function .
  • 1-form : Proxy is a vector field such that .
  • 2-form : Proxy is a vector field such that .
  • 3-form : Proxy is a scalar function such that .

Integration over manifolds: integral of a diff. form over an oriented -dimensional manifold :

Intermediate

Continuous differential -forms , , give rise to a valid integral -form on by piecewise integration, if and only if


“For piecewise smooth forms to define a valid global integral form, they must agree on the tangent space of the interface ”

  • 0-forms: Must be globally continuous.
  • 1-forms: Must have tangential continuity (jump in ).
  • 2-forms: Must have normal continuity (jump in ).
  • 3-forms: No continuity required.

Video 13.1.4 Exterior Calculus (70 min)

pullbacks:

Definition 13.1.4.4. Pullback/transformation for differential forms

Given a -mapping , domains, the pullback $\Phi^{*} : \Lambda^{\ell}(\Omega) \to \Lambda^{\ell}(\widehat{\Omega})$, , is defined as

Theorem 13.1.4.5. Invariance of integrals under pullback

Using the notations of Def. 13.1.4.4, the pullback satisfies

which ensures compatibility with the pullback of integral forms.

Vector Proxy Formulas (in 3D):

  • 0-forms: (Standard function pullback).
  • 1-forms: (Covariant transformation).
  • 2-forms: (Piola transformation).

orientation of = induced orientation

Definition 13.1.4.27. Exterior derivative of integral forms

Let be an -dimensional manifold/domain, . For the exterior derivative operators (for integral forms)

are defined as

where the boundary is endowed with the induced orientation.

fundamental identity

Definition 13.1.4.38. Exterior derivative for differential forms

The exterior derivative of a continuously differentiable differential form of order on a domain is the continuous differential -form defined as

for all and “tangent vectors” .


In this formula is the (Fréchet) derivative of , which maps into the space of linear mappings .

Theorem 13.1.4.57. Generalized Stokes theorem

For every domain and holds true

3D Vector Proxy Identifications:

  • (0-form 1-form).
  • (1-form 2-form).
  • (2-form 3-form).

Theorem 13.1.4.64.

For every domain and holds true

that is, the image of lies in the kernel of .

Theorem 13.1.4.81. Existence of potentials

Let be a domain and . Topological assumption: If every oriented, compact and closed -dimensional sub-manifold is the boundary of an -dimensional sub-manifold , then


We call closed, if

Definition 13.1.4.102. Exterior product/wedge product of alternating multilinear forms

For a vector space the exterior product (also called wedge product)

( is the vector space of alternating -linear forms on , see Def. 13.1.3.4) is defined as

for all .

Exterior Product is associative, bilinear & (anti-)commutative

Theorem 13.1.4.117. Pullback and exterior product/wedge product

Let be two domains connected by a -mapping . Then the pullback of differential forms commutes with the exterior product of differential forms:

Theorem 13.1.4.119. Product rule for exterior derivatives

For any domain and

example from video: 20260513_NumPDE_video13.1.5_maxwell

Video 13.1.5 Sobolev Spaces of Differential Forms (18 min)

Definition 13.1.5.1. Space of square-integrable differential forms

Let by any “component representation” of a differential -form . Then we define the Hilbert space of square-integrable differential -forms

Definition 13.1.5.2. Sobolev space of differentiable differential forms

For a domain and we define

which becomes a Hilbert space with the basis-dependent norm

3. Vector Proxy Identifications (in 3D)

Form DegreeSobolev SpaceVector Analytic ProxyProperty
0-form
1-form
2-form

Theorem 13.1.5.10. Transmission condition for

Let and , be two continuously differentiable -forms that are continuous up to boundary of and set

Then

, if and only if the restrictions of and to coincide as differential -forms on .

Practical 3D Continuity:

  • 0-forms: Global continuity.
  • 1-forms: Tangential continuity ().
  • 2-forms: Normal continuity ().

For , integration over sub-manifolds is not a bounded linear functional on these Sobolev spaces (similar to how point evaluation is not bounded in )

Tldr: Sobolev Spaces of Differential Forms

-Space

  • coefficient functions
  • intrinsic space (basis-independent), norm basis-dependent

Sobolev Space of “Finite Energy” Fields

  • Norm: .
  • The exterior derivative is a bounded linear operator mapping .

Zero Boundary Conditions ()

  • forms with vanishing tangential trace on
  • example: (PEC boundary conditions for the electric field, 13.1.3.43)

13.2 Discrete Differential Forms

13.2.1 Cochain Calculus (67 min)

Introduce discrete integral -forms as mappings from a finite (and suitable: meaningful ) subset of into .

reminder: Integral form: assigns value -> oriented surface

Cochain (“discrete integral form”) Assigns values to specific -facets of a mesh

  • -Cochain (): A mapping from the set of -facets of a mesh to .

in 3D:

Cochainassignes values to…
0-cochainnodes
1-cochainedges
2-cochainfaces
3-cochaincells
  • Because there are a finite number of facets (), an -cochain can be identified simply as a vector in .

Definition 13.2.1.1. Generalized oriented meshes

A generalized oriented mesh of a domain is a collection of sets of -facets,

such that

  1. : every -facet is an oriented (*), relatively open, bounded, -dimensional, non-degenerate -surface ,
  2. the facets form a partition of :
  1. for every , its boundary is the union of the closures of finitely many -facets:
  1. the intersection of the closures of any two -facets is an -facet,
  1. for every , there is a such that .

An -dimensional sub-manifold is called non-degenerate, if it has non-zero -dimensional volume.

For cochain to define values consistently, the mesh must be oriented. Each facet has an intrinsic orientation (e.g., the direction of an edge). When we look at the boundary of a face, the face’s orientation induces a direction on its edges.

Definition 13.2.1.13. Relative orientation of mesh facets

Given , and , we define their relative orientation as

example:

Definition 13.2.1.16. Exterior derivative for cochains

Given a generalized oriented mesh of and , the exterior derivative is defined by

incidence matrix representation :

  • matrix representation of the discrete exterior derivative,
MatrixCalculus ProxyMaps…
Discrete GradientNodes Edges
Discrete CurlEdges Faces
Discrete DivergenceFaces Cells

Theorem 13.2.1.21.

For any generalized mesh of a domain and holds true

  • the boundary of a boundary is empty

Theorem 13.1.4.81. Existence of potentials

Let be a domain and . If

  • (topological assumption:) every oriented, compact and closed -dimensional sub-manifold of is the boundary of an -dimensional sub-manifold

then

Theorem 13.2.1.22. Existence of cochain potentials

Let the domain satisfy the assumptions of Thm. 13.1.4.81. Then for any generalized oriented mesh of and for any we have

From now on, is not a continuous function but an 0-cochain!

Tldr: Summary for 3D till now

CategoryDegree Degree Degree Degree
Physical NatureScalar ValueCirculationFluxDensity
Mathematical NatureReal NumberLinear Form (Functional)Alternating Bilinear FormAlternating Trilinear Form
Local Action Scalar value Maps 1 vector: Maps 2 vectors: Maps 3 vectors:
Integral Form
()
Value at a pointWork along a curveFlow through a surfaceAmount in a volume
Differential Form
()
Scalar function 1-linear form (Linear functional)Alternating 2-linear formAlternating 3-linear form
Alternating PropertyN/A(Linear by default)Swapping any two vectors flips the sign
3D Vector Proxy
()
Scalar function Vector field Vector field Scalar function
Proxy EvaluationDot product: Cross product: Determinant:
Integration (Eq. 13.1.3.34)Value at point Path integral: Flux integral: Volume integral:
Exterior Deriv. ()GradientCurlDivergenceZero ()
Sobolev Space
Mesh Entity (Facet)Node (Vertex)EdgeFaceCell
Cochain ()Values on nodesValues on edgesValues on facesValues on cells

13.2.2 Whitney Forms (70 min)

Goal:

interpolation condition:

  • Plaintext: goal is to turn cochain values into integral form that can be localized to a differential form

Local Whitney Forms (Basis Functions) On a simplex with barycentric coordinates , the local Whitney -forms are the basis for reconstruction:

  • : (Standard “tent” or P1 functions).
  • : (Edge-associated basis).
  • Key Property: They satisfy the cardinal basis property: .

general formula for d-simplex :

Lemma 13.2.2.2.22. Local interpolation commutes with exterior derivative

The local interpolant of the exterior derivative of an -cochain is the same as the exterior derivative of the interpolant of that cochain,

-> Whitney forms are not just any interpolant; they are structure-preserving

  • taking the derivative of the reconstructed field is the same as reconstructing the field from the discrete derivative of the cochain

vector proxy formulas for the spaces spanned by local Whitney -forms on

Degree ℓCochain coeff.

Definition 13.2.2.43. Generalized interpolation operator for cochains

Given an -cochain , we define the generalized interpolation operators,

as

with . In particular, is a -piecewise smooth differential -form.

  • Continuity: Inherently satisfy the tangential continuity required for membership in
  • Association: Each global basis function is associated with exactly one mesh facet (node, edge, or face) and is locally supported on adjacent cells.
  • Boundary Conditions: W0ℓ​(M) is spanned by basis forms associated only with interior facets.

We call the integral -form

the associated with the -facet .

Lemma

Intermediate

given a simplicial mesh of we have identified the Whitney finite-element space of degree ,

as a finite-element subspace of the Sobolev space of (differential) -forms on .

Convergence

  • reminder:if a finite-element space locally contains all polynomials of degree $p$, then, for “sufficiently smooth” , and on uniformly shape regular meshes with meshwidth ,
  • here , and thus algebraic cvg. of order 1

Theorem 13.2.2.59. -norm best approximation estimates for

If then

with a constant that depends only on and the shape regularity measure (Def. 3.3.2.20) of .

13.3 Whitney FEM for Computational Electromagnetism

13.3.1 Energies and Linear Material Laws (35 min)

Maxwells equations are underdetermined -> need “closure equations”

  • We have two 1-forms () and two 2-forms (), plus the current .
  • Material Laws provide the required link: they map 1-forms to 2-forms.

Field energy functionals

  • Electric Energy: .
  • Magnetic Energy: .

Assumption 13.3.1.4. Linear materials

Both electric and magnetic field energies are homogeneous quadratic functionals, that is, there are bilinear forms and such that

Moreover we expect and to be bounded from above and below

-> we want , to be symmetric bilinear, bounded, uniformly positive definite

3D: For local linear materials, the energy is the integral of a local quadratic form:

  • Permittivity Tensor (): .
  • Permeability Tensor (): .
  • Nature: and are symmetric positive definite matrices.

using the wedge product, we get weak formulation

  • this is a bijection

inserting this, we get: Combining the expressions from image_1e0f33.png and image_1e0f17.png for the electromagnetic energy balance, the relationship is given by:

13.3.2.1 Electromagnetic Wave Equations (45 min)

IBVP for EM fields:

  • we have Maxwell’s equations, Material Laws (weak form) and b.c.

In variational form:

  • derivation: time differentiation, substitution of time derivatives with maxwell’s equations, integration by parts

Intermediate

Seek and such that

when we combine the terms, we get:

  • compared to Poynting’s theorem, power flux through is missing because of the b.c. -> energy change is only caused by work of source current

use material law, differentiate in time, test with exterior derivative, 2nd term vanish (both for 1st and 2nd formula), (integration by parts), extract PDE:

todo missed some derivations that seem interesting

We get to

Seek such that

for all (13.3.2.32)

Note

Which is a form we’ve already seen in chapter 9.2:

with function space

-> electromagnetic wave equations have a lot in common with scalar wave equations

  • finite speed of propagation
  • expands with at most max speed (for ):
  • domain of influence and dependence

13.3.2.3 Method of lines for Electromagnetic Wave Equations, Timestepping for Semi-Discrete Electromagnetic Wave Equations (45 min)

we start from ^13-3-2-6:

Seek and such that

method lines (MOL):

stage 1: spatial galerkin discretization

  1. Trial (& test spaces) -> fin.dim. subspaces independent of time
  • For use
  • For use
  1. choose ordered bases
  • : use Whitney 1-forms
  • : 3 basis 1-forms per cell, v.p.

MOL-ODE: Seek time-dependent basis expansion coefficient vectors and such that

  • preserves constraits
    • continuity equation
  • structure defines discrete Hamiltonian system -> reason why semi-descrete system (and Carank-Nicolson discretization, see later) conserve discrete

some other notes:

  • Recall:
  • Observe:

stage 2: timestepping -> see chapter 9.3.4 (which was not part of the course)

  • temporal grid , final time
  • Crank-Nicolson timestepping (RK-SSM/implicit midpoint SSM)
    • replace time derivatives with diff. quotients, averages
  • fully implicit method (have to calculate LSE for every timestep)
  • discrete energy balance

  • timestepping alternative: Leapfrog
    • use staggered temporal grid
  • only partially implicit (but also only conditionally stable, not discussed in this video)
    • you only need to solve linear systems for separately
  • we cannot use Mass lumping, but not available for general for Whitney FE

boundary conditions:

  • space imposes Perfect Electrical Conductor (PEC) b.c.
13.3.3 Magnetostatic

13.3.3.1 Magnetostatics: Formulations Based on Scalar Potentials (30 min)

static settings: fields do not depend on time,

  • built-in constraints are no longer automatically enforced by reduced Maxwell’s equations, need additional demands:

demand:


Magnetostatic BVP:

weak MLs:

two ways to convert to variational form:

  1. Formulations based on Scalar Potential

Assumption 13.3.3.7. Simple topology of

We assume that the assumptions of Thm. 13.1.4.81 on for are satisfied:

  • Every oriented closed 2-surface is the boundary of a sub-domain .
  • Every closed directed curve in is the boundary of an oriented surface .

and we get (after some transformations, i.b.p.):

Intermediate

Seek such that

For local, linear ML, v.p.,

2nd-order elliptic BVP in weak form

now, we can replace

  • seek in
  1. option 2 for conversion to variational form not explained

13.3.3.2 Magnetostatics: Vector-Potential-Based Variational Formulations (40 min)

LLML & vector proxy formulation:

with b.c. hidden in formulation

todo didn’t understand this part

minute 13: great explanation of Lagrange multiplier

Augmented LSE :

applied to our variational form: Seek ,

  • notice that

or LLML, vector proxy notation: Seek such that

for all .


Galerking discretization

  1. choose f.d. subspaces -> Whitney FE spaces
    • also add vanishing mean constraint

Seek , , and such that

for all , .

  1. ordered bases (whitney 1/O-forms)

with dummy unknowns

13.3.3.3-13.3.3.4 Saddle-Point Variational Problems, Discrete LBB-Conditions for a-Based Magnetostatics (60 min)

start: ^13-3-3-28 Is a saddle point variational problem

we define the kernel of :

In Euclidean setting, we get a saddle point LSE:

  • checking ^LBB conditions:
    • LBB2:
    • LBB2:
    • LBB1:

Galerkin discretization:

  1. step 1
  • LBB2 in discrete setting
  • Discrete LBB conditions

Theorem 13.3.3.40. Galerkin discretization error estimate for discrete variational saddle point problems

Let the assumptions of Thm. 12.2.2.23 be satisfied. Also assume discrete counterparts of (LBB1) and (LBB2), namely the discrete LBB-conditions

then the discrete variational saddle point problem (12.2.2.49) possesses a unique solution , which satisfies the Galerkin discretization error estimate

where solves (12.2.2.49) and with a constant depending only on and }.

Tldr: discrete ^LBB

  1. ellipticity on kernel of
  2. in-sup condiction

-> existence, uniqueness, stability of solution + quasi-optimality

  • quasi-optimality:
  1. step 2 of Galerkin discretization:

ordered bases of

saddle point LSE:


note, that for our problem, while LBB2 always holds, LBB1 only holds if we assume simple topology (^simple-topology), which we can prove using

Theorem 13.3.3.58. Poincaré-Friedrichs-type inequality for

Under Ass. 13.3.3.7 and with a constant depending only on (and on the definition of the -norm) holds true

Theorem 13.3.3.64. Discrete Poincaré-Friedrichs-type inequality for

Taking for granted Ass. 13.3.3.7 (^simple-topology) we have

with a constant depending only on , and the shape regularity measure of (and on the definition of the -norm).

since LBB1 & LBB2 holds, we get quasi-optimality (for uniformly shape regular families of meshes)

Corollary 13.3.3.71. Asymptotic Whitney finite element error estimate

Provided that , , , the asymptotic discretization error estimate

holds true for uniformly shape regular families of simplicial meshes with meshwidths .

algebraic cvg with rate 1!


comparing the two different discretizations: todo

Formatting

We’re converting image into markdown + latex formulas. For normal text, normal markdown. For boxes, use callouts. The format of callouts is the following:

> [!name] <title>
> 
> content

Note that there is no empty line between the callout header and the content!

  • orange boxes: convert to !intermediate
  • lemmas, theorems (yellow): convert to !lemma, !theorem
  • definitions (red): convert to !definition

For inline latex, the format is the following:

For one-line latex, the format is the following:

  • note the newlines in between $$ and the content
  • for latex blocks in callouts, please do not write newlines: if possible, the whole latex block should be on one line

For multiline latex, the format is the following:

Highlighted text can be highlighted in markdown, too: highlight. This is not standard commonmark, but if you see highlighted text in the image, highlight it when converting, too. Same for bold: if a text is emphasised, make it bold.

  • Note that highlighting can only be used for markdown, not for latex
  • If something cannot be converted to pure markdown, warn me instead of attempting to use non-standard syntax.
  • For this task, you may omit any custom formats specified earlier.
  • Your answer should consist solely of the markdown (and the warning if something cannot be converted). No follow-up suggestions, questions, clarifications.
  • for colors in latex, use \textcolor{color}{content} instead of \color{color}{content}
  • whenever possible (i.e. for latex blocks (not inline)), use \tag{...} to write the number