Você está na página 1de 107

Computational Fluid Dynamics

Lecture Notes Summer Term 2005


R. Verf

urth
Fakultat f ur Mathematik, Ruhr-Universitat Bochum, D-44780 Bochum, Germany
Contents
1 Modelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Langrangian and Eulerian representation; 1.2 Velocity; 1.3 Transport the-
orem; 1.4 Conservation of mass; 1.5 Cauchy theorem; 1.6 Conservation of mo-
mentum; 1.7 Conservation of energy; 1.8 Constitutive laws; 1.9 Compressible
Navier-Stokes equations in conservative form; 1.10 Euler equations; 1.11 Com-
pressible Navier-Stokes equations in non-conservative form; 1.12 Instationary
incompressible Navier-Stokes equations; 1.13 Stationary incompressible Navier-
Stokes equations; 1.14 Stokes equations; 1.15 Initial and boundary conditions
2 Notations and basic results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1 Domains and functions; 2.2 Dierentiation of products; 2.3 Integration by
parts formulae; 2.4 Sobolev spaces and norms; 2.5 Friedrichs and Poincare in-
equalities; 2.6 Finite element partitions; 2.7 Finite element spaces; 2.8 Approx-
imation properties; 2.9 Nodal shape functions; 2.10 A quasi-interpolation oper-
ator; 2.11 Bubble functions
3 Discretization of the Stokes equations. A rst attempt . . . . . . . . . . . . . 19
3.1 The Poisson equation revisited; 3.2 A variational formulation of the Stokes
equations; 3.3 A naive discretization of the Stokes equations; 3.4 Possible reme-
dies
4 Mixed nite element discretizations of the Stokes equations . . . . . . . 22
4.1 Saddle-point formulation of the Stokes equations; 4.2 General structure of
mixed nite element discretizations of the Stokes equations; 4.3 A rst attempt;
4.4 A necessary condition for a well-posed mixed discretization; 4.5 A second
attempt; 4.6 The inf-sup condition; 4.7 A stable low-order element with discon-
tinuous pressure approximation; 4.8 Stable higher-order elements with discon-
tinuous pressure approximation; 4.9 Stable low-order elements with continuous
pressure approximation; 4.10 Stable higher-order elements with continuous pres-
sure approximation; 4.11 A priori error estimates
5 Petrov-Galerkin stabilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.1 Motivation; 5.2 The mini element revisited; 5.3 General form of Petrov-
Galerkin stabilizations; 5.4 Choice of stabilization parameters; 5.5 Choice of
spaces; 5.6 Structure of the discrete problem
6 Non-conforming methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.1 Motivation; 6.2 The Crouzeix-Raviart element; 6.3 Construction of a local
solenoidal bases
7 Stream function formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.1 Motivation; 7.2 The curl operators; 7.3 Stream function formulation of the
Stokes equations; 7.4 Variational formulation of the biharmonic equation; 7.5
A non-conforming discretization of the biharmonic equation; 7.6 Mixed nite
element discretizations of the biharmonic equation
8 Solution of the discrete problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
8.1 General structure of the discrete problems; 8.2 The Uzawa algorithm; 8.3
The conjugate gradient algorithm revisited; 8.4 An improved Uzawa algorithm;
8.5 The multigrid algorithm; 8.6 Smoothing; 8.7 Prolongation; 8.8 Restriction;
8.9 Variants of the CG-algorithm for indenite problems
i
9 A posteriori error estimation and adaptive grid renement . . . . . . . . 56
9.1 Motivation; 9.2 General structure of the adaptive algorithm; 9.3 A residual
a posteriori error estimator; 9.4 Error estimators based on the solution of aux-
iliary problems; 9.5 Marking strategies; 9.6 Regular renement; 9.7 Additional
renement; 9.8 Required data structures
10 Discretization of the stationary Navier-Stokes equations . . . . . . . . . . . 67
10.1 Variational formulation; 10.2 Fixed-point formulation; 10.3 Existence and
uniqueness results; 10.4 Finite element discretization; 10.5 Fixed-point formu-
lation of the discrete problem; 10.6 Properties of the discrete problem; 10.7
Symmetrization; 10.8 A priori error estimates; 10.9 A warning example; 10.10
Up-wind methods; 10.11 The streamline-diusion method
11 Solution of the discrete nonlinear problems . . . . . . . . . . . . . . . . . . . . . . . . . 78
11.1 General structure; 11.2 Fixed-point iteration; 11.3 Newton iteration; 11.4
Path tracking; 11.5 A nonlinear CG-algorithm; 11.6 Operator splitting; 11.7
Multigrid algorithms
12 Adaptivity for nonlinear problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
12.1 General structure; 12.2 A residual a posteriori error estimator; 12.3 Error
estimators based on the solution of auxiliary problems
13 Discretization of the instationary Navier-Stokes equations . . . . . . . . . 87
13.1 Variational formulation; 13.2 Existence and uniqueness results; 13.3 Nu-
merical methods for ordinary dierential equations revisited; 13.4 Method of
lines; 13.5 Rothes method; 13.6 Space-time nite elements; 13.7 The transport-
diusion algorithm
14 Space-time adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
14.1 Overview; 14.2 A residual a posteriori error estimator; 14.3 Time adaptivity;
14.4 Space adaptivity
15 Discretization of compressible and inviscid problems . . . . . . . . . . . . . . . 98
15.1 Systems in divergence form; 15.2 Finite volume schemes; 15.3 Construction
of the partitions; 15.4 Relation to nite element methods; 15.5 Construction of
the numerical uxes
ii
1. Modelization
1.1 Lagrangian and Eulerian representation. Consider a volume occupied
by a uid which moves under the inuence of interior and exterior forces. We denote
by the position of an arbitrary particle at time t = 0 and by
x = (, t)
its position at time t > 0. The basic assumptions are:
(., t) : is for all times t 0 a bijective dierentiable
mapping,
its inverse mapping is dierentiable,
the transformation (., t) is orientation-preserving,
(., 0) is the identity.
There are two ways to look at the uid ow:
In the rst option, we x and look at the trajectory t (, t). This is the
Lagrangian representation. Correspondingly is called Lagrangian coordinate.
The Langrangian coordinate system moves with the uid.
In the second option, we x the point x and look at the trajectory t (., t)
1
(x)
which passes through x. This is the Eulerian representation. Correspondingly x
is called Eulerian coordinate. The Eulerian coordinate system is xed.
1.2 Velocity. We denote by
D =
_

j
_
1i,j3
the Jacobian matrix of (., t) and by
J = det D
its Jacobian determinant. The preservation of orientation is equivalent to
J(, t) > 0 for all t > 0 and all .
The velocity of the ow at point x = (, t) is dened by
v(x, t) =

t
(, t) , x = (, t).
1
1.3 Transport theorem. Consider an arbitrary volume V and denote by
V (t) = (., t)(V ) = (, t) : V
its shape at time t > 0. Then the following transport theorem holds for all dier-
entiable mappings f : (0, ) R
d
dt
_
V (t)
f(x, t)dx =
_
V (t)
_
f
t
(x, t) + div(fv)(x, t)
_
dx.
Example 1: We consider a one-dimensional model situation, i.e. = (a, b) is an
interval and x and are real numbers. Then V = (, ) and V (t) = ((t), (t)) are
intervals, too. The transformation rule for integrals gives
_
V (t)
f(x, t)dx =
_
(t)
(t)
f(x, t)dx
=
_

f((, t), t)

(, t)d.
Dierentiating this equality and using the transformation rule we get
d
dt
_
V (t)
f(x, t)dx =
_

d
dt
_
f((, t), t)

(, t)
_
d
=
_

t
f((, t), t)

(, t)d
. .
=
_
V (t)

t
f(x,t)dx
+
_

x
f((, t), t)

t
(, t)
. .
=v((,t),t)

(, t)d
. .
=
_
V (t)

x
f(x,t)v(x,t)dx
+
_

f((, t), t)

t

(, t)
. .
=

v((,t),t)=

x
v((,t),t)

(,t)
d
. .
=
_
V (t)
f(x,t)

x
v(x,t)dx
2
=
_
V (t)

t
f(x, t)dx
+
_
V (t)

x
f(x, t)v(x, t)dx
+
_
V (t)
f(x, t)

x
v(x, t)dx
=
_
V (t)

t
f(x, t) +

x
f(x, t)v(x, t) dx.
This proves the transport theorem in one dimension.
1.4 Conservation of mass. We denote by (x, t) the density of the uid. Then
_
V (t)
(x, t)dx
is the total mass of the volume V (t). The conservation of mass and the transport
theorem therefore imply that
0 =
d
dt
_
V (t)
(x, t)dx
=
_
V (t)
_

t
(x, t) + div(v)(x, t)
_
dx.
This gives the equation for the conservation of mass:

t
+ div(v) = 0 in (0, ).
1.5 Cauchy theorem. Fluid and continuum mechanics are based on three fun-
damental assumptions concerning the interior forces:
interior forces act via the surface of a volume V (t),
interior forces only depend on the normal direction of the sur-
face of the volume,
interior forces are additive and continuous.
Due to the Cauchy theorem these assumptions imply that the interior forces acting
on a volume V (t) must be of the form
_
V (t)
T ndS
3
with a tensor T : R
33
. Here, as usual, V (t) denotes the boundary of the
volume V (t), n is the unit outward normal, and dS denotes the surface element.
The integral theorem of Gauss then yields
_
V (t)
T ndS =
_
V (t)
div Tdx.
1.6 Conservation of momentum. The total momentum of a volume V (t) in the
uid is given by
_
V (t)
(x, t)v(x, t)dx.
Due to the transport theorem its temporal variation equals
d
dt
_
V (t)
(x, t)v(x, t)dx
=
_
d
dt
_
V (t)
(x, t)v
i
(x, t)dx
_
1i3
=
_
_
V (t)
_

t
(v
i
)(x, t) + div(v
i
v)(x, t)
_
dx
_
1i3
=
_
V (t)
_

t
(v)(x, t) + div(v v)(x, t)
_
dx
where
v u = (v
i
u
j
)
1i,j3
.
Due to the conservation of momentum this quantity must be balanced by exterior
and interior forces. Exterior forces must be of the form
_
V (t)
f dx.
The Cauchy theorem tells that the interior forces are of the form
_
V (t)
div Tdx.
Hence the conservation of momentum takes the integral form
_
V (t)
_

t
(v) + div(v v)
_
dx =
_
V (t)
_
f + div T
_
dx.
This gives the equation for the conservation of momentum:

t
(v) + div(v v) = f + div T in (0, ).
4
1.7 Conservation of energy. We denote by e the total energy. The transport
theorem implies that its temporal variation is given by
d
dt
_
V (t)
edx =
_
V (t)
_
e
t
(x, t) + div(ev)(x, t)
_
dx.
Due to the conservation of energy this quantity must be balanced by the energies due
to the exterior and interior forces and by the change of the internal energy.
The contributions of the exterior and interior forces are given by
_
V (t)
f vdx
and _
V (t)
n T vd =
_
V (t)
div(T v)dx.
Due to the Cauchy theorem and the integral theorem of Gauss, the change of internal
energy must be of the form
_
V (t)
ndS =
_
V (t)
div dx
with a vector-eld : R
3
.
Hence the conservation of energy takes the integral form
_
V (t)
_

t
e + div(ev)
_
dx =
_
V (t)
_
f v + div(T v) + div
_
dx.
This gives the equation for the conservation of energy:

t
e + div(ev) = f v + div(T v) + div in (0, ).
1.8 Constitutive laws. The equations for the conservation of mass, momentum
and energy must be complemented by constitutive laws. These are based on the
following fundamental assumptions:
T only depends on the gradient of the velocity.
The dependence on the velocity gradient is linear.
T is symmetric. (Due to the Cauchy theorem this is a conse-
quence of the conservation of angular momentum.)
In the absence of internal friction, T is diagonal and propor-
tional to the pressure, i.e. all interior forces act in normal di-
rection.
e = +
1
2
[v[
2
. ( is called internal energy and is often
identied with the temperature.)
is proportional to the variation of the internal energy, i.e.
= .
5
The conditions on T imply that it must be of the form
T = 2D(v) +(div v) I pI.
Here,
I = (
ij
)
1i,j3
denotes the unit tensor,
D(v) =
1
2
(v +v
t
) =
1
2
_
v
i
x
j
+
v
j
x
i
_
1i,j3
is the deformation tensor,
p = p(, )
denotes the pressure and , R are the dynamic viscosities of the uid.
The equation for the pressure is also called equation of state. For an ideal gas, e.g.,
it takes the form p(, ) = ( 1) with > 1.
Note that div v is the trace of the deformation tensor D(v).
Example 2: The physical dimension of the dynamic viscosities and is kg m
1
s
1
and is called Poise; the one of the density is kg m
3
. In 1.12 we will introduce
the kinematic viscosity =

. Its physical dimension is m


2
s
1
and is called Stokes.
The following table gives some relevant values of these quantities

Water 20

C 1.005 10
3
1000 1.005 10
6
Alcohol 20

C 1.19 10
3
790 1.506 10
6
Ether 20

C 2.43 10
5
716 3.394 10
8
Glycerine 20

C 1.499 1260 1.190 10


3
Air 0

C 1atm 1.71 10
5
1.293 1.322 10
5
Hydrogen 0

C 8.4 10
6
8.99 10
2
9.344 10
5
1.9 Compressible Navier-Stokes equations in conservative form. Collect-
ing all results we obtain the compressible Navier-Stokes equations in conser-
6
vative form:

t
+ div(v) = 0
(v)
t
+ div(v v) = f + 2div D(v) +grad div v grad p
= f +v + ( +) grad div v grad p
e
t
+ div(ev) = f v + 2div[D(v) v]
+div[div v v] div(pv) +
= f + 2div D(v) +grad div v grad p v
+D(v) : D(v) +(div v)
2
p div v +
p = p(, )
e = +
1
2
[v[
2
.
1.10 Euler equations. In the inviscid case, i.e. = = 0, the compressible
Navier-Stokes equations in conservative form reduce to the so-called Euler equa-
tions for an ideal gas:

t
+ div(v) = 0
(v)
t
+ div(v v +pI) = f
e
t
+ div(ev +pv) = f v +
p = p(, ), e = +
1
2
[v[
2
.
1.11 Compressible Navier-Stokes equations in non-conservative form. In-
serting the rst equation of 1.9 in the left-hand side of the second equation yields
(v)
t
+ div(v v)
=(

t
)v +
v
t
+ (div(v))v +(v )v
=[
v
t
+ (v )v].
Inserting the rst two equations of 1.9 in the left-hand side of the third equation
7
implies
D(v) : D(v) +(div v)
2
p div v +
=f + 2div D(v) +grad div v grad p v
+
( +
1
2
[v[
2
)
t
+ div(v +
1
2
[v[
2
v)
=
(v)
t
+ div(v v) v
+

t
+ div(v) +

t
+v grad
+
1
2
[v[
2

t
+
1
2
[v[
2
div(v) +
1
2
[v[
2
t
+v grad(
1
2
[v[
2
)
=v [
v
t
+ (v )v]
+

t
+v grad
+v
v
t
+v [(v )v]
=

t
+v grad .
With these simplications we obtain the compressible Navier-Stokes equations
in non-conservative form

t
+ div(v) = 0
[
v
t
+ (v )v] = f +v + ( +) grad div v grad p
[

t
+v grad ] = D(v) : D(v) +(div v)
2
p div v +
p = p(, ).
1.12 Instationary incompressible Navier-Stokes equations. Next we assume
that the density is constant, replace p by
p

, denote by
=

the kinematic viscosity, and suppress the third equation in 1.11 (conservation of
energy). This yields the instationary incompressible Navier-Stokes equations:
div v = 0
v
t
+ (v )v = f +v grad p.
8
Remark 1: We say that a uid is incompressible if the volume of any sub-domain
V remains constant for all times t > 0, i.e.
_
V (t)
dx =
_
V
dx for all t > 0.
The transport theorem then implies that
0 =
d
dt
_
V (t)
dx =
_
V (t)
div vdx.
Hence, incompressibility is equivalent to the equation
div v = 0.
Remark 2: The incompressible Navier-Stokes equations are often re-scaled to a
non-dimensional form. To this end we introduce a reference length L, a reference
time T, a reference velocity U, a reference pressure P, and a reference force F and
introduce new variables and quantities by x = Ly, t = T, v = Uu, p = Pq, f = Fg.
Physical reasons suggest to x T =
L
U
. When re-writing the momentum equation in
the new quantities we obtain
Fg =f =
U
T
u

+
U
2
L
(u
y
)u
U
L
2

y
u +
P
L

y
q
=
U
L
2
_
L
2
T
u

+
LU

(u
y
)u
y
u +
PL
U

y
q
_
.
The physical dimension of F and
U
L
2
is m s
2
. The quantities
L
2
T
,
PL
U
, and
LU

are
dimensionless. The quantities L, U, and are determined by the physical problem.
The quantities F and P are xed by the conditions F =
U
L
2
and
PL
U
= 1. Thus there
remains only the dimensionless parameter
Re =
LU

.
It is called Reynolds number and is a measure for the complexity of the ow. It
was introduced in 1883 by Osborne Reynolds (1842 1912).
Example 3: Consider an airplane at cruising speed and an oil-vessel. The relevant
quantities for the airplane are
U 900km h
1
250m s
1
L 50m
1.322 10
5
m
2
s
1
Re 9.455 10
8
.
9
The corresponding quantities for the oil-vessel are
U 20knots 36km h
1
10m s
1
L 300m
1.005 10
6
m
2
s
1
Re 2.985 10
9
.
1.13 Stationary incompressible Navier-Stokes equations. As a next step of
simplication, we assume that we are in a stationary regime, i.e. all temporal deriva-
tives vanish. This yields the stationary incompressible Navier-Stokes equa-
tions:
div v = 0
v + (v )v + grad p = f .
1.14 Stokes equations. In a last step we linearize the Navier-Stokes equations
at velocity v = 0 and re-scale the viscosity to 1. This gives the Stokes equations:
div v = 0
v + grad p = f .
Remark 3: All CFD algorithms solve complicated ow problems via a nested
sequence of simplication steps similar to the described procedure. Therefore it is
mandatory to dispose of ecient discretization schemes and solvers for simplied
problems as, e.g., the Stokes equations, which are at the heart in the inmost loop.
1.15 Initial and boundary conditions. The equations of 1.9 1.12 are time-
dependent. They must be completed by initial conditions for the velocity v, the
internal energy and for the problems of 1.9 1.11 the density .
The Euler equations of 1.10 are hyperbolic and require boundary conditions on the
inow-boundary.
The problems of 1.9 and 1.11 1.14 are of second order in space and require bound-
ary conditions on the whole boundary = . For the energy-equations in 1.9 and
1.11 one may choose either Dirichlet (prescribed energy) or Neumann (prescribed
energy ux) boundary conditions. A mixture of both conditions is also possible.
The situation is less evident for the mass and momentum equations in 1.9 and 1.11
1.14. Around 1845, Sir George Gabriel Stokes (1819 1903) suggested that
due to the friction the uid will adhere at the boundary. This leads to the Dirichlet
boundary condition
v = 0 on .
10
More generally one can impose the condition v = v

with a given boundary velocity


v

.
Around 1827, Pierre Louis Marie Henri Navier (1785 1836) had suggested the
more general boundary condition

n
v n + (1
n
)n T n =0

t
[v (v n)n] + (1
t
)[T n (n T n)n] =0
on with parameters
n
,
t
[0, 1] that depend on the actual ow-problem. More
generally one may replace the homogeneous right-hand sides by given known func-
tions.
The rst equation of Navier refers to the normal components of v and n T, the
second equation refers to the tangential components of v and n T. The special case

n
=
t
= 1 obviously yields the no-slip condition of Stokes. The case
n
= 1,
t
=
0 on the other hand gives the slip condition
v n =0
T n (n T n)n =0.
The question, which boundary condition is a better description of the reality, was
decided in the 19th century by experiments with pendulums submerged in a viscous
uid. They were in favour of the no-slip condition of Stokes. The viscosities of the
uids, however, were similar to that of honey and the velocities were only a few meters
per second. When dealing with much higher velocities or much smaller viscosities, the
slip condition of Navier is more appropriate. A particular example for this situation
is the re-entry of a space vehicle. Other examples are coating problems where the
location of the boundary is an unknown and is determined by the interaction of
capillary and viscous forces.
11
2. Notations and basic results
2.1 Domains and functions. The following notations concerning domains and
functions will frequently be used:
open, bounded, connected set in R
n
, n 2, 3;
boundary of supposed to be Lipschitz-continuous;
n exterior unit normal to ;
p, q, r, ... scalar functions with values in R;
u, v, w, ... vector-elds with values in R
n
;
S, T, ... tensor-elds with values in R
nn
;
I unit tensor;
gradient;
div divergence;
div u =
n

i=1
u
i
x
i
;
div T =
_
n

i=1
T
ij
x
i
_
1jn
;
= div Laplace operator;
D(u) =
1
2
_
u
i
x
j
+
u
j
x
i
_
1i,jn
deformation tensor;
u v inner product;
S : T dyadic product (inner product of tensors);
u v = (u
i
v
j
)
1i,jn
tensorial product.
2.2 Dierentiation of products. The product formula for dierentiation yields
the following formulae for the dierentiation of products of scalar functions, vector-
elds and tensor-elds:
div(pu) = p u +p div u,
div(T u) = (div T) u +T : D(u),
div(u v) = (div u)v + (u )v.
2.3 Integration by parts formulae. The above product formulae and the Gauss
12
theorem for integrals give rise to the following integration by parts formulae:
_

pu ndS =
_

p udx +
_

p div udx,
_

n T udS =
_

(div T) udx +
_

T : D(u)dx,
_

n (u v)dS =
_

(div u)vdx +
_

(u )vdx.
2.4 Sobolev spaces and norms. We will frequently use the following notations
for partial derivatives, norms and Sobolev spaces:
D

1
+...+
n

1
1
. . . x

n
n
H
k
() = L
2
() : D

L
2
() for all N
n
with
1
+. . . +
n
k,
[[
k
=
_

N
n

1
+...+
n
=k
|D

|
2
L
2
()
_

_
1/2
,
||
k
=
_
k

l=0
[[
2
l
_
1/2
=
_

N
n

1
+...+
n
k
|D

|
2
L
2
()
_

_
1/2
,
H
1
0
() = H
1
() : = 0 on ,
L
2
0
() := p L
2
() :
_

p = 0,
H
1
2
() = L
2
() : =

for some H
1
(),
||1
2
,
= inf||
1
: H
1
(),

= .
Remark 1: The space H
1
2
() is called trace space of H
1
(), its elements are
called traces of functions in H
1
(). Except in one dimension, n = 1, H
1
functions
are in general not continuous and do not admit point values (cf. Example 1 below).
A function, however, which is piecewise dierentiable is in H
1
() if and only if it is
globally continuous. This is crucial for nite element functions.
13
Example 1: The function [x[ is not dierentiable, but it is in H
1
((1, 1)). Its
L
2
-derivative is the piecewise constant function which equals 1 on (1, 0) and 1
on (0, 1). In two dimension, the function ln(ln(
_
x
2
1
+x
2
2
)) is an example of an H
1
-
function that is not continuous and which does not admit a point value in the origin.
In three dimensions, a similar example is given by ln(
_
x
2
1
+x
2
2
+x
2
3
).
2.5 Friedrichs and Poincare inequalities. The following inequalities are fun-
damental:
Friedrichs inequality ||
0
c

[[
1
for all H
1
0
(),
Poincare inequality ||
0
c

[[
1
for all H
1
() L
2
0
().
The constants c

and c

depend on the domain and are proportional to its diam-


eter.
2.6 Finite element partitions. The nite element discretizations are based on
partitions of the domain into non-overlapping simple sub-domains. The collection
of these sub-domains is called a partition and is labeled T . The members of T , i.e.
the sub-domains, are called elements and are labeled K.
Any partition T has to satisfy the following conditions:
is the union of all elements in T .
(Ane equivalence) Each K T is either a triangle or a
parallelogram, if n = 2, or a tetrahedron or a parallelepiped, if
n = 3.
(Admissibility) Any two elements in T are either disjoint or
share a vertex or a complete edge or if n = 3 a complete
face.
(Shape-regularity) For any element K, the ratio of its diam-
eter h
K
to the diameter
K
of the largest ball inscribed into K
is bounded independently of K.
Remark 2: In two dimensions, n = 2, shape regularity means that the smallest
angles of all elements stay bounded away from zero. In practice one usually not only
considers a single partition T , but complete families of partitions which are often
obtained by successive local or global renements. Then, the ratio h
K
/
K
must be
bounded uniformly with respect to all elements and all partitions.
For any partition T we denote by h
T
or simply h the maximum of the element
diameters:
h = h
T
= maxh
K
: K T .
14
Remark 3: In two dimensions triangles and parallelograms may be mixed (cf. Fig.
2.1). In three dimensions tetrahedrons and parallelepipeds can be mixed provided
prismatic elements are also incorporated. The condition of ane equivalence may be
dropped. It, however, considerably simplies the analysis since it implies constant
Jacobians for all element transformations.
Fig. 2.1: triangles and quadrilaterals may be mixed
2.7 Finite element spaces. For any multi-index N
n
we set for abbreviation
[[
1
=
1
+. . . +
n
,
[[

=max
i
: 1 i n,
x

=x

1
1
. . . x

n
n
.
With any element K in any partition T and any integer number k we associate a
space R
k
(K) of polynomials by
R
k
(K) :=
_
_
_
spanx

: [[
1
k , when K is a triangle or a tetrahedron,
spanx

: [[

k , when K is a parallelogram or
a parallelepiped.
With this notation we dene nite element spaces by
S
k,1
(T ) = : R :

K
R
k
(K) for all K T ,
S
k,0
(T ) = S
k,1
(T ) C(),
S
k,0
0
(T ) = S
k,0
(T ) H
1
0
() = S
k,0
(T ) : = 0 on .
Note, that k may be 0 for the rst space, but must be at least 1 for the second and
third space.
15
2.8 Approximation properties. The nite element spaces dened above satisfy
the following approximation properties:
inf

T
S
k,1
(T )
|
T
|
0
ch
k+1
[[
k+1
for all H
k+1
() ,
k N,
inf

T
S
k,0
(T )
[
T
[
j
ch
k+1j
[[
k+1
for all H
k+1
() ,
j 0, 1 , k N

,
inf

T
S
k,0
0
(T )
[
T
[
j
ch
k+1j
[[
k+1
for all H
k+1
() H
1
0
() ,
j 0, 1 , k N

.
2.9 Nodal shape functions. ^
T
denotes the set of all element vertices.
For any vertex x ^
T
the associated nodal shape function is denoted by
x
. It
is the unique function in S
1,0
(T ) that equals 1 at vertex x and that vanishes at all
other vertices y ^
T
x.
The support of a nodal shape function
x
is denoted by
x
and consists of all elements
that share the vertex x (cf. Fig. 2.2).
Fig. 2.2: some domains
x
The functions
x
, x ^
T
, form a bases of S
1,0
(T ). The bases of higher-order spaces
S
k,0
(T ), k 2, consist of suitable products of functions
x
corresponding to appro-
priate vertices x.
2.10 A quasi-interpolation operator. We will frequently use the quasi-interpo-
lation operator R
T
: L
1
() S
1,0
0
(T ) which is dened by
R
T
=

xN
T

x
1
[
x
[
_

x
dx.
16
Here, [
x
[ denotes the area, if n = 2, respectively volume, if n = 3, of the set
x
.
The operator R
T
satises the following local error estimates for all H
1
0
() and
all elements K T :
| R
T
|
L
2
(K)
c
1
h
K
||
H
1
(
K
)
,
| R
T
|
L
2
(K)
c
2
h
1/2
K
||
H
1
(
K
)
.
Here,
K
denotes the set of all elements that share at least a vertex with K.
Remark 4: The operator R
T
is called a quasi-interpolation operator since it does
not interpolate a given function at the vertices x ^
T
. In fact, point values are
not dened for H
1
-functions. For functions with more regularity which are at least
in H
2
(), the situation is dierent. For those functions point values do exist and the
classical nodal interpolation operator I
T
: H
2
()H
1
0
() S
1,0
0
(T ) can be dened
by the relation (I
T
())(x) = (x) for all vertices x ^
T
.
2.11 Bubble functions. For any element K T we dene an element bubble
function by

K
=
K

xKN
T

x
,

K
=
_

_
27 if K is a triangle,
256 if K is a tetrahedron,
16 if K is a parallelogram,
64 if K is a parallelepiped.
It has the following properties:
0
K
(x) 1 for all x K,

K
(x) = 0 for all x , K,
max
xK

K
(x) = 1.
We denote by c
T
the set of all edges, if n = 2, and of all faces, if n = 3, of all elements
in T . With each edge respectively face E c
T
we dene an edge respectively face
bubble function by

E
=
E

xEN
T

x
,

E
=
_
4 if E is a line segment,
27 if E is a triangle,
16 if E is a parallelogram.
17
It has the following properties:
0
E
(x) 1 for all x
E
,

E
(x) = 0 for all x ,
E
,
max
x
E

E
(x) = 1.
Here
E
is the union of all elements that share E. Note that
E
consists of two
elements, if E is not contained in the boundary , and of exactly one element, if E
is a subset of .
With each edge respectively face E c
T
we nally associate a unit vector n
E
orthog-
onal to E and denote by [.]
E
the jump across E in direction n
E
. If E is contained in
the boundary the orientation of n
E
is xed to be the one of the exterior normal.
Otherwise it is not xed.
Note, that [.]
E
depends on the orientation of n
E
but that quantities of the form
[n
E
.]
E
are independent of this orientation.
18
3. Discretization of the Stokes equations. A rst attempt
3.1 The Poisson equation revisited. We recall the Poisson equation
= f in
= 0 on
and its variational formulation: Find H
1
0
() such that
_

dx =
_

fdx
holds for all H
1
0
().
The Poisson equation and this variational formulation are equivalent in the sense
that any solution of the Poisson equation is a solution of the variational problem and
that conversely any solution of the variational problem which is twice continuously
dierentiable is a solution of the Poisson equation. Moreover, one can prove that the
variational problem admits a unique solution.
Standard nite element discretizations simply choose a partition T of and an integer
k 1 and replace in the variational problem H
1
0
() by the nite dimensional space
S
k,0
0
(T ). This gives rise to a linear system of equations with a symmetric, positive
denite, square matrix, called stiness matrix. If, e.g. k = 1, the size of the resulting
discrete problem is given by the number of vertices in T which do not lie on the
boundary .
3.2 A variational formulation of the Stokes equations. Now we look at the
Stokes equations of 1.14 with no-slip boundary condition
u + grad p = f in
div u = 0 in
u = 0 on .
The space
V = u H
1
0
()
n
: div u = 0
is a sub-space of H
1
0
()
n
which has similar properties. For every p H
1
() and any
u V the integration by parts formulae of 2.3 imply that
_

p udx =
_

p div udx = 0.
We therefore obtain the following variational formulation of the Stokes equations:
Find u V such that
_

u : udx =
_

f vdx
19
holds for all v V .
As for the Poisson problem, any velocity eld which solves the Stokes equations also
solves this variational problem. Moreover, one can prove that the variational problem
admits a unique solution. But, we have lost the pressure! This is an apparent gap
between dierential equation and variational problem which is not present for the
Poisson equation.
3.3 A naive discretization of the Stokes equations. Although the variational
problem of the previous section does not incorporate the pressure, it nevertheless gives
information about the velocity eld. Therefore one may be attempted to use it as
a starting point for a discretization process similar to the Poisson equation. This
would yield a symmetric, positive denite system of linear equations for a discrete
velocity eld. This would have the appealing side-eect that standard solvers such as
preconditioned conjugate gradient algorithms were available. The following example
shows that this approach leads to a dead-end road.
Example 1: We consider the unit square = (0, 1)
2
and divide it into N
2
squares of
equal size. Each square is further divided into two triangles by connecting its top-left
corner with its bottom-right corner. This partition is known as Courant triangu-
lation. The length of the triangles short sides is h =
1
N1
. For the discretization of
the Stokes equations we replace V by V (T ) = S
1,0
0
(T )
2
V , i.e. we use continuous,
piecewise linear, solenoidal nite element functions. Choose an arbitrary function
v
T
V (T ). We rst consider the triangle K
0
which has the origin as a vertex (cf.
Fig. 3.1). Since all its vertices are situated on the boundary, we have v
T
= 0 on K
0
.
Next we consider the triangle K
1
which shares its long side with K
0
. Denote by z
1
the vertex of K
1
which lies in the interior of . Taking into account that v
T
= 0
on and div v
T
= 0 in K
1
, applying the integration by parts formulae of 2.3 and
evaluating line integrals with the help of the trapezoidal rule, we conclude that
0 =
_
K
1
div v
T
dx =
_
K
1
v
T
n
K
1
dS =
h
2
v
T
(z
1
) e
1
+e
2
.
Here n
K
1
is the unit exterior normal to K
1
and e
1
, e
2
denote the canonical bases
vectors in R
2
. Next we consider the triangle K
2
, which is adjacent to the boundary
of and to K
1
. With the same arguments as for K
1
we conclude that
0 =
_
K
2
div v
T
dx =
_
K
2
v
T
n
K
2
dS
=
h
2
v
T
(z
1
) e
1
+e
2

. .
=0

h
2
v
T
(z
1
) e
2
=
h
2
v
T
(z
1
) e
2
.
20
since v
T
(z
1
) e
1
= v
T
(z
1
) e
2
we obtain
v
T
(z
1
) = 0
and consequently v
T
= 0 on K
0
K
1
K
2
. Repeating this argument, we rst conclude
that v
T
vanishes on all squares that are adjacent to the left boundary of and then
that v
T
vanishes on all of . Hence we have V (T ) = 0. Thus this space is not
suited for the approximation of V .
Fig. 3.1: partition of the unit square and enumeration of triangles
Remark 1: One can prove that S
k,0
0
(T )
2
V is suited for the approximation of V
only if k 5. This is no practical choice.
3.4 Possible remedies. The previous sections show that the Poisson and Stokes
equations are fundamentally dierent and that the discretization of the Stokes prob-
lem is a much more delicate task than for the Poisson equation.
There are several possible remedies for the diculties presented above:
Relax the divergence constraint: This leads to mixed nite elements.
Relax the continuity condition: This leads to non-conforming methods.
Look for an equivalent dierential equation without the divergence constraint:
This leads to the streamline formulation.
In the following sections we will investigate all these possibilities and will see that
each has its particular pitfalls.
21
4. Mixed nite element discretizations of the Stokes equations
4.1 Saddle-point formulation of the Stokes equations. We recall the Stokes
equations with no-slip boundary condition
u + grad p = f in
div u = 0 in
u = 0 on .
If p is any pressure solving the Stokes equations and if c is any constant, obviously
p + c is also an admissible pressure for the Stokes equations. Hence, the pressure
is at most unique up to an additive constant. We try to x this constant by the
normalization _

pdx = 0.
If v H
1
0
()
n
and p H
1
() are arbitrary, the integration by parts formulae of 2.3
imply that
_

p vdx =
_

p v n
..
=0
dS
_

p div vdx
=
_

p div vdx.
These observations lead to the following (mixed) variational formulation of the
Stokes equations:
Find u H
1
0
()
n
, p L
2
0
(), such that
_

u : vdx
_

p div vdx =
_

f vdx for all v H


1
0
()
n
_

q div udx = 0 for all q L


2
0
().
It has the following properties:
Any solution u, p of the Stokes equations is a solution of the above variational
problem.
Any solution u, p of the variational problem which is suciently smooth is a
solution of the Stokes equations.
The variational problem is the Euler-Lagrange equation corresponding to the
constraint minimization problem
Minimize
1
2
_

[u[
2
dx
_

f udx
subject to
_

q div udx = 0 for all q L


2
0
().
22
Hence it is a saddle-point problem, i.e. u is a minimizer, p is a maximizer.
A deep mathematical result is:
The mixed variational formulation of the Stokes equations admits
a unique solution u, p. This solution depends continuously on the
force f , i.e.
[u[
1
+|p|
0
c

|f |
0
with a constant c

which only depends on the domain .


4.2 General structure of mixed nite element discretizations of the Stokes
equations. We choose a partition T of and two associated nite element spaces
X(T ) H
1
0
()
n
for the velocity and Y (T ) L
2
0
() for the pressure. Then we replace
in the mixed variational formulation of the Stokes equations the space H
1
0
()
n
by
X(T ) and the space L
2
0
() by X(T ). This gives rise to the following general mixed
nite element discretization of the Stokes equations:
Find u
T
X(T ), p
T
Y (T ), such that
_

u
T
: v
T
dx
_

p
T
div v
T
dx =
_

f v
T
dx for all v
T
X(T )
_

q
T
div u
T
dx = 0 for all q
T
Y (T ).
Remark 1: Obviously, any particular mixed nite element discretization of the
Stokes equations is determined by specifying the partition T and the spaces X(T ) and
Y (T ). The condition X(T ) H
1
0
()
n
implies that the discrete velocities are globally
continuous and vanish on the boundary. The condition Y (T ) L
2
0
() implies that the
discrete pressures have vanishing mean value, i.e.
_

p
T
dx = 0 for all p
T
Y (T ). The
condition
_

q
T
div u
T
dx = 0 for all q
T
Y (T ) in general does not imply div u
T
= 0.
4.3 A rst attempt. We consider the unit square = (0, 1)
2
and the Courant
triangulation of Example 3.1. We choose
X(T ) = S
1,0
0
(T )
2
, Y (T ) = S
0,1
(T ) L
2
0
(T )
i.e. a continuous, piecewise linear velocity approximation and a piecewise constant
pressure approximation on a triangular grid. Assume that u
T
, p
T
is a solution of the
discrete problem. Then div u
T
is piecewise constant. The condition
_

q
T
div u
T
dx =
0 for all q
T
Y (T ) therefore implies div u
T
= 0. Hence we conclude from Example
3.1 that u
T
= 0. Thus this mixed nite element discretization has the same defects
as the one of Example 3.1.
23
4.4 A necessary condition for a well-posed mixed discretization. We con-
sider an arbitrary mixed nite element discretization of the Stokes equations with
spaces X(T ) for the velocity and Y (T ) for the pressure. A minimal requirement
for such a discretization obviously is its well-posedness, i.e. that it admits a unique
solution. Hence the stiness matrix must be invertible.
Denote by n
u
the dimension of X(T ) and by n
p
the one of Y (T ) and choose arbitrary
bases for these spaces. Then the stiness matrix has the form
_
A B
B
T
0
_
with a symmetric positive denite n
u
n
u
matrix A and a rectangular n
u
n
p
matrix
B. Since A is symmetric positive denite, the stiness matrix is invertible if and only
if the matrix B has rang n
p
. Since the rang of a rectangular k m matrix is at most
mink, m, this leads to the following necessary condition for a well-posed mixed
discretization:
n
u
n
p
.
Lets have a look at the example of the previous section in the light of this condition.
Denote by N
2
the number of the squares. An easy calculation then yields n
u
=
2(N 1)
2
and n
p
= 2N
2
1. Hence we have n
p
> n
u
and the discretization cannot
be well-posed.
4.5 A second attempt. As in 4.3 we consider the unit square and divide it into
N
2
squares of equal size with N even. Contrary to 4.3 the squares are not further
sub-divided. We choose the spaces
X(T ) = S
1,0
0
(T )
2
, Y (T ) = S
0,1
(T ) L
2
0
(T )
i.e. a continuous, piecewise bilinear velocity approximation and a piecewise constant
pressure approximation on a quadrilateral grid. This discretization is often refered to
as Q1/Q0 element.
A simple calculation yields the dimensions n
u
= 2(N 1)
2
and n
p
= N
2
1. Hence
the condition n
u
n
p
of the previous section is satised provided N 4.
Denote by K
i,j
, 0 i, j N 1, the square which has the lower left corner (ih, jh)
where h =
1
N1
. We now look at the particular pressure p
T
Y (T ) which has the
constant value (1)
i+j
on K
i,j
(cf. Fig. 4.1). It is frequently called checkerboard
mode. Consider an arbitrary velocity v
T
X(T ). Using the integration by parts
24
formulae of 2.3 and evaluating line integrals with the trapezoidal rule we obtain
_
K
ij
p
T
div v
T
dx
=(1)
i+j
_
K
ij
div v
T
dx
=(1)
i+j
_
K
ij
v
T
n
K
ij
dS
=(1)
i+j
h
2
_
(v
T
e
1
)((i + 1)h, jh) + (v
T
e
1
)((i + 1)h, (j + 1)h)
(v
T
e
1
)(ih, (j + 1)h) (v
T
e
1
)(ih, jh)
+ (v
T
e
2
)((i + 1)h, (j + 1)h) + (v
T
e
2
)(ih, (j + 1)h)
(v
T
e
2
)(ih, jh) (v
T
e
2
)((i + 1)h, jh)
_
.
Due to the homogeneous boundary condition, summation with respect to all indices
i, j yields
_

p
T
div v
T
dx = 0.
Since v
T
was arbitrary, the solution of the discrete problem cannot be unique: One
may add p
T
to any pressure solution and obtains a new one.
Fig. 4.1: checkerboard mode
This phenomenon is known as checkerboard instability. It shows that the con-
dition of the previous section is only a necessary one and does not imply the well-
posedness of the discrete problem.
4.6 The inf-sup condition. In 1974 Franco Brezzi published the following
necessary and sucient condition for the well-posedness of a mixed nite element
discretization of the Stokes equations:
inf
p
T
Y (T )\{0}
sup
u
T
X(T )\{0}
_

p
T
div u
T
dx
[u
T
[
1
|p
T
|
0
> 0.
A pair X(T ), Y (T ) of nite element spaces satisfying this condition is called stable.
The same notion refers to the corresponding discretization.
25
Remark 2: In practice one usually not only considers a single partition T , but
complete families of partitions which are often obtained by successive local or global
renements. Usually they are labeled T
h
where the index h indicates that the mesh-
size gets smaller and smaller. In this situation, the above condition of Franco Brezzi
must be satised uniformly, i.e. the number must be independent of the mesh-size.
Remark 3: The above condition is known under various names. A prosaic one is
inf-sup condition. Another one, mainly used in western countries, is Babuska-
Brezzi condition. A third one, which is popular in eastern Europe and Russia, is
Ladyzhenskaya-Babuska-Brezzi condition in short LBB-condition. The addi-
tional names honour older results of Olga Ladyzhenskaya and Ivo Babuska which, in
a certain sense, lay the ground for the result of Franco Brezzi.
In the following sections we give a catalogue of various stable elements. It incor-
porates the most popular elements, but it is not complete. We distinguish between
discontinuous and continuous pressure approximations. The rst variant sometimes
gives a better approximation of the incompressibility condition; the second variant
often leads to smaller discrete systems while retaining the accuracy of a comparable
discontinuous pressure approximation.
4.7 A stable low-order element with discontinuous pressure approxima-
tion. This discretization departs from the unstable Q1/Q0-element. It is based
on the observation that the instability of the Q1/Q0-element is due to the fact that
the velocity space cannot balance pressure jumps across element boundaries. As a
remedy the velocity space is enriched by edge respectively face bubble functions (cf.
2.11) which give control on the pressure jumps.
The pair
X(T ) =S
1,0
0
(T )
n
span
E
n
E
: E c
T
,
Y (T ) =S
0,1
(T ) L
2
0
()
is stable.
Since the bubble functions
E
are contained in S
n,0
(T ) we obtain as a corollary:
The pair
X(T ) = S
n,0
0
(T )
n
, Y (T ) = S
0,1
(T ) L
2
0
()
is stable.
26
4.8 Stable higher-order elements with discontinuous pressure approxima-
tion. For the following result we assume that T exclusively consists of triangles or
tetrahedrons. Moreover, we denote for every positive integer by
P

= spanx

1
1
. . . x

n
n
:
1
+. . . +
n
=
the space of homogeneous polynomials of degree . With these restrictions and nota-
tions the following result can be proven:
For every m n the pair
X(T ) =
_
S
m,0
0
(T ) span
K
: K T , P
m2

n
,
Y (T ) =S
m1,1
(T ) L
2
0
()
is stable.
Since the element-bubble functions
K
are polynomials of degree n +1 we obtain as
a corollary:
For every m n the pair
X(T ) = S
n+m1,0
0
(T )
n
, Y (T ) = S
m1,1
(T ) L
2
0
()
is stable.
4.9 Stable low-order elements with continuous pressure approximation.
Given a partition T we denote by T1
2
the rened partition which is obtained by con-
necting in every element the midpoints of its edges. With this notation the following
results were established in the early 1980s:
Mini element
The pair
X(T ) =
_
S
1,0
0
(T ) span
K
: K T

n
,
Y (T ) =S
1,0
(T ) L
2
0
()
is stable.
Taylor-Hood element
The pair
X(T ) = S
2,0
0
(T )
n
, Y (T ) = S
1,0
(T ) L
2
0
()
is stable.
27
Modied Taylor-Hood element
The pair
X(T ) = S
1,0
0
(T1
2
)
n
, Y (T ) = S
1,0
(T ) L
2
0
()
is stable.
4.10 Stable higher-order elements with continuous pressure approxima-
tion. The stability of higher order elements with continuous pressure approxima-
tion was established only in the early 1990s:
Higher order Taylor-Hood element
For every k 3 the pair
X(T ) = S
k,0
0
(T )
n
, Y (T ) = S
k1,0
(T ) L
2
0
()
is stable.
4.11 A priori error estimates. We consider a partition T with mesh-size h and
a stable pair X(T ), Y (T ) of corresponding nite element spaces for the discretization
of the Stokes equations. We denote by k
u
and k
p
the maximal polynomial degrees k
and m such that S
k,0
0
(T )
n
X(T ) and either S
m,1
(T ) L
2
0
() Y (T ) when using
a discontinuous pressure approximation or S
m,0
(T ) L
2
0
() Y (T ) when using a
continuous pressure approximation. Set
k = mink
u
1, k
p
.
Further we denote by u, p the unique solution of the saddle-point formulation of the
Stokes equations (cf. 4.1) and by u
T
, p
T
the unique solution of the discrete problem
under consideration.
With these notations the following a priori error estimates can be proven:
Assume that u H
k+2
()
n
H
1
0
()
n
and p H
k+1
() L
2
0
(),
then
[u u
T
[
1
+|p p
T
|
0
c
1
h
k+1
|f |
k
.
If in addition is convex, then
|u u
T
|
0
c
2
h
k+2
|f |
k
.
The constants c
1
and c
2
only depend on the domain .
28
Example 1: The following table collects the numbers k
u
, k
p
, and k for the examples
of the previous sections:
pair k
u
k
p
k
4.7 1 0 0
4.8 m m1 m1
mini element 1 1 0
Taylor-Hood element 2 1 1
modied Taylor-Hood element 1 1 0
higher order Taylor-Hood element k k 1 k 1
Remark 4: The above regularity assumptions are not realistic. For a convex polyg-
onal domain, one in general only has u H
2
()
n
H
1
0
()
n
and p H
1
() L
2
().
Therfore, independently of the actual discretization, one in general only gets an O(h)
error estimate. If is not convex, but has re-entrant corners, the situation is even
worse: One in general only gets an O(h

) error estimate with an exponent


1
2
< 1
which depends on the largest interior angle at a boundary vertex of . This poor
convergence behaviour can only be remedied by an adaptive grid renement based
on an a posteriori error control.
Remark 5: The dierentiation index of the pressure always is one less than the
dierentiation index of the velocity. Therefore, discretizations with k
p
= k
u
1 are
optimal in that they do not waste degrees of freedom by choosing too large a velocity
space or too small a pressure space.
29
5. Petrov-Galerkin stabilization
5.1 Motivation. The results of 4 show that one can stabilize a given pair of nite
element spaces by either reducing the number of degrees of freedom in the pressure
space or by increasing the number of degrees of freedom in the velocity space. This
result is reassuring but sometimes not practical since it either reduces the accuracy
of the pressure or increases the number of unknowns and thus the computational
work. Sometimes one would prefer to stick to a given pair of spaces and to have
at hand a dierent stabilization process which does neither change the number of
unknowns nor the accuracy of the nite element spaces. A particular example for
this situation is the popular equal order interpolation where X(T ) = S
m.0
0
(T )
n
and Y (T ) = S
m,0
(T ) L
2
0
().
In this section we will devise a stabilization process with the desired properties. For
its motivation we will have another look at the mini element of 4.9.
5.2 The mini element revisited. We consider a triangulation T of a two di-
mensional domain and set for abbreviation
B(T ) =
_
span
K
: K T

2
.
The discretization of the Stokes equations with the mini element of 4.9 then takes
the form
Find u
T
S
1,0
0
(T )
2
B(T ), p
T
S
1,0
(T ) L
2
0
(), such that
_

u
T
: v
T
dx
_

p
T
div v
T
dx =
_

f v
T
dx for all v
T
S
1,0
0
(T )
2
B(T )
_

q
T
div u
T
dx = 0 for all q
T
S
1,0
(T ) L
2
0
().
For simplicity we assume that f L
2
()
2
.
We split the velocity u
T
in a linear part u
T ,L
S
1,0
0
(T )
2
and a bubble part
u
T ,B
B(T ):
u
T
= u
T ,L
+u
T ,B
.
Since u
T ,B
vanishes on the element boundaries, dierentiation by parts yields for
every v
T
S
1,0
0
(T )
2
_

u
T ,B
: v
T
dx =

KT
_
K
u
T ,B
: v
T
dx
=

KT
_
K
u
T ,B
v
T
. .
=0
dx
=0.
30
Hence, we have
_

u
T ,L
: v
T
dx
_

p
T
div v
T
dx =
_

f v
T
dx for all v
T
S
1,0
0
(T )
2
.
The bubble part of the velocity has the representation
u
T ,B
=

KT

K
with coecients
K
R
2
. Inserting the test function v
T
= e
i

K
with i 1, 2 and
K T in the momentum equation, we obtain
_
K
f e
i

K
dx
=
_

f (
K
e
i
)dx
=
_

u
T ,L
: (
K
e
i
)dx
. .
=0
+
_

u
T ,B
: (
K
e
i
)dx
. .
=
K,i
_
K
|
K
|
2
dx

p
T
div(
K
e
i
)dx
. .
=
_
K
p
T
x
i

K
dx
=
K,i
_
K
[
K
[
2
dx +
_
K
p
T
x
i

K
dx, i = 1, 2,
and thus

K
=
__
K
[f p
T
]
K
dx
___
K
[
K
[
2
dx
_
1
for all K T .
For abbreviation we set

K
:=
__
K
[
K
[
2
dx
_
1
.
Next we insert the representation of u
T ,B
in the continuity equation. This yields for
all q
T
S
1,0
(T ) L
2
0
()
0 =
_

q
T
div u
T
dx
=
_

q
T
div u
T ,L
dx +

KT
_
K
q
T
div(
K

K
)dx
. .
=
_
K

K
q
T
dx
=
_

q
T
div u
T ,L
dx

KT

K
__
K

K
q
T
dx
_

__
K

K
[f p
T
]dx
_
.
This proves that u
T ,L
S
1,0
0
(T )
2
, p
T
S
1,0
(T ) L
2
0
() solve the modied problem
_

u
T ,L
: v
T
dx
_

p
T
div v
T
dx =
_

f v
T
dx for all v
T
S
1,0
0
(T )
2
_

q
T
div u
T ,L
dx +c
T
(p
T
, q
T
) =
T
(q
T
) for all q
T
S
1,0
(T ) L
2
0
()
31
where
c
T
(p
T
, q
T
) =

KT

K
_
K
p
T
q
T
dx

T
(q
T
) =

KT

K
__
K

K
q
T
dx
_

__
K

K
f dx
_

K
=
K
[K[
1
__
K

K
dx
_
2
.
Note that
K
is proportional to h
2
K
.
The new problem can be interpreted as a P1/P1 discretization of the dierential
equation
u + grad p = f in
div u p = div f in
u = 0 on
with a suitable penalty parameter . Taking into account that u
T
vanishes
elementwise, the discrete problem does not change if we also add the term div u
to the left-hand side of the second equation. This shows that in total we may add the
divergence of the momentum equation as a penalty. Since the penalty vanishes for
the exact solution of the Stokes equations, this approach is also called consistent
penalty.
5.3 General form of Petrov-Galerkin stabilizations. Given a partition T of
we choose two corresponding nite element spaces X(T ) H
1
0
()
n
and Y (T )
L
2
0
(). For every element K T and every edge respectively face E c
T
we further
choose non-negative parameters
K
and
E
.
With these notations we consider the following discrete problem:
Find u
T
X(T ), p
T
Y (T ), such that
_

u
T
: v
T
dx
_

p
T
div v
T
dx =
_

f v
T
dx
_

q
T
div u
T
dx
+

KT

K
h
2
K
_
K
[u
T
+p
T
] q
T
dx
+

EE
T

E
h
E
_
E
[p
T
]
E
[q
T
]
E
dS =

KT

K
h
2
K
_
K
f q
T
dx
for all v
T
X(T ), for all q
T
Y (T ).
Recall that [.]
E
denotes the jump across E.
32
Remark 1: The terms involving
K
correspond to the equation
div[u +p] = div f .
The terms involving
E
are only relevant for discontinuous pressure approximations.
When using a continuous pressure approximation, they vanish.
5.4 Choice of stabilization parameters. With the notations of the previous
section we set

max
=maxmax
KT

K
, max
EE
T

E
,

min
=
_
minmin
KT

K
, min
EE
T

E
if pressures are discontinuous,
min
KT

K
if pressures are continuous.
A good choice of the stabilization parameters then is determined by the condition

max

min
.
5.5 Choice of spaces. The a priori error estimates are optimal when the poly-
nomial degree of the pressure approximation is one less than the polynomial degree
of the velocity approximation. Hence a standard choice is
X(T ) = S
k,0
0
(T ),
Y (T ) =
_
S
k1,0
(T ) L
2
0
() continuous pressure approximation,
S
k1,1
(T ) L
2
0
() discontinuous pressure approximation,
where k 1 for discontinuous pressure approximations and k 2 for continuous pres-
sure approximations. These choices yield O(h
k
) error estimates provided the solution
of the Stokes equations is suciently smooth.
5.6 Structure of the discrete problem. The stiness matrix of a Petrov-
Galerkin scheme has the form
_
A B
B
T
C
_
with symmetric, positive denite, square matrices A and C and a rectangular matrix
B. The entries of C are by a factor of h
2
smaller than those of A.
Recall that C = 0 for the discretizations of 4.
33
6. Non-conforming methods
6.1 Motivation. Up to now we have always imposed the condition X(T )
H
1
0
()
n
, i.e. the discrete velocities had to be continuous. Now, we will relax this
condition. We hope that we will be rewarded by less diculties with respect to the
incompressibility constraint.
One can prove that, nevertheless, the velocities must enjoy some minimal continuity:
On each edge the mean value of the velocity jump across this edge must vanish.
Otherwise the consistency error will be at least of order 1.
6.2 The Crouzeix-Raviart element. We consider a triangulation T of a two
dimensional domain and set
X(T ) = v
T
: R
2
: v
T

K
R
1
(K) for all K T ,
v
T
is continuous at mid-points of interior edges,
v
T
vanishes at mid-points of boundary edges
Y (T ) = S
0,1
(T ) L
2
0
().
This pair of spaces is called Crouzeix-Raviart element. Its degrees of freedom
are the velocity-vectors at the mid-points of interior edges and the pressures at the
barycentres of elements. The corresponding discrete problem is:
Find u
T
X(T ), p
T
Y (T ), such that

KT
_
K
u
T
: v
T
dx

KT
_
K
p
T
div v
T
dx =
_

f v
T
dx for all v
T
X(T )

KT
_
K
q
T
div u
T
dx = 0 for all q
T
Y (T ).
The following result can be proven:
The Crouzeix-Raviart discretization admits a unique solution u
T
,
p
T
.
The continuity equation div u
T
= 0 is satised element-wise.
If is convex, the following error estimates hold
_

KT
[u u
T
[
2
H
1
(K)
_
1/2
+|p p
T
|
0
=O(h),
|u u
T
|
0
=O(h
2
).
34
However, the Crouzeix-Raviart discretization also has several drawbacks:
Its accuracy deteriorates drastically in the presence of re-en-
trant corners.
It has no higher order equivalent.
It has no three-dimensional equivalent.
6.3 Construction of a local solenoidal bases. One of the main attractions of
the Crouzeix-Raviart element is the fact that it allows the construction of a local
solenoidal bases for the velocity space and that in this way the computation of the
velocity and pressure can be decoupled.
For the construction of the solenoidal bases we denote by
NT the number of triangles,
NE
0
the number of interior edges,
NV
0
the number of interior vertices,
V (T ) = u
T
X(T ) : div u
T
= 0 the space of solenoidal velocities.
The quantities NT, NE
0
, and NV
0
are connected via Eulers formula
NT NE
0
+NV
0
= 1.
Since X(T ) and Y (T ) satisfy the inf-sup condition, an elementary calculation using
this formula yields
dimV (T ) = dimX(T ) dimY (T ) = 2NE
0
(NT 1) = NE
0
+NV
0
.
With every edge E c
T
we associate a unit tangential vector t
E
and a piecewise
linear function
E
which equals 1 at the midpoint of E and which vanishes at all
other midpoints of edges. With this notation we set
w
E
=
E
t
E
for all E c
T
.
These functions obviously are linearly independent. For every triangle K and every
edge E we have
_
K
div w
E
dx =
_
K
n
K
w
E
dS = 0.
Since div w
E
is piecewise constant, this implies that the functions w
E
are contained
in V (T ).
With every vertex x ^
T
we associate the set c
x
of all edges which have x as an
endpoint. Starting with an arbitrary edge in c
x
we enumerate the remaining edges
in c
x
consecutively in counter-clockwise orientation. For E c
x
we denote by t
E,x
35
and n
E,x
two orthogonal unit vectors such that t
E,x
is tangential to E, points away
from x, and satises det[t
E,x
, n
E,x
] > 0. With these notations we set (cf. Fig. 6.1)
w
x
=

EE
x
1
[E[

E
n
E,x
.
The functions w
x
obviously are linearly independent. Since the w
E
are tangential
to the edges and the w
x
are normal to the edges, both sets of functions are linearly
independent.
Fig. 6.1: velocity eld w
x
corresponding to vertex x
Next consider a triangle K T and a vertex x ^
T
of K and denote by E
1
, E
2
the two edges of K sharing the vertex x. Denote by m
E
i
the midpoint of E
i
, i = 1, 2.
Using the integration by parts formulae of 2.3 and evaluating line integrals with the
help of the midpoint formula, we conclude that
_
K
div w
x
dx =
_
K
w
x
n
K
dS
=
2

i=1
[E
i
[w
x
(m
E
i
) n
K
=
2

i=1
n
E
i
,x
n
K
=0.
This proves that w
x
V (T ).
Hence we have
V (T ) = spanw
x
, w
E
: x ^
T
, E c
T

and the discrete velocity eld of the Crouzeix-Raviart discretization is given by the
problem:
Find u
T
V (T ) such that

KT
_
K
u
T
: v
T
dx =
_

f v
T
dx for all v
T
V (T ).
36
This is a linear system of equations with NE
0
+ NV
0
equations and unknowns and
with a symmetric, positive denite stiness matrix. The stiness matrix, however, has
a condition of O(h
4
) compared with a condition of O(h
2
) of the larger, symmetric,
but indenite stiness matrix of the original mixed problem.
The above problem only yields the velocity. The pressure, however, can be computed
by a simple post-processing process. To describe it, denote by m
E
the midpoint of
any edge E c
T
. Using the integration by parts formulae of 2.3 and evaluating line
integrals with the help of the midpoint formula, we conclude that
_

f
E
n
E
dx

KT
_
K
u
T
:
E
n
E
dx =

KT
_
K
p
T
div
E
n
E
dx
=
_
E
[
E
p
T
]
E
dS
=[E[[
E
(m
E
)p
T
]
E
=[E[[p
T
]
E
.
Hence, we can compute the pressure jumps edge by edge by evaluating the left-hand
side of this equation. Starting with a triangle K which has an edge on the boundary
, we set p
T
= 0 on this triangle and compute it on the remaining triangles by
passing through adjacent triangles and adding the pressure jump corresponding to
the common edge. Finally, we compute
P :=

KT
h
[K[
[[
p
T

K
and subtract P from p
T
. This yields the pressure p
T
of the Crouzeix-Raviart dis-
cretization which has mean-value zero.
37
7. Stream function formulation
7.1 Motivation. The methods of the previous sections all discretize the variational
formulation of the Stokes equations of 4.1 and yield simultaneously approximations
for the velocity and pressure. The discrete velocity elds in general are not solenoidal,
i.e. the incompressibility constraint is satised only approximately. In 6 we obtained
an exactly solenoidal approximation but had to pay for this by abandoning the con-
formity. In this section we will consider another variational formulation of the Stokes
equations which leads to conforming solenoidal discretizations. As we will see this
advantage has to be paid for by other drawbacks.
Throughout this section we assume that is a two dimensional, simply connected
polygonal domain.
7.2 The curl operators. The subsequent analysis is based on two curl-operators
which correspond to the rot-operator in three dimensions and which are dened as
follows:
curl =
_

x
_
,
curl v =
v
1
y

v
2
x
.
They fulll the following chain rule
curl(curl ) = for all H
2
()
curl(curl v) = v +(div v) for all v H
2
()
2
and the following integration by parts formula
_

v curl dx =
_

curl vdx +
_

v tdS for all v H


1
()
2
, H
1
().
Here t denotes a unit tangent vector to the boundary .
The following deep mathematical result is fundamental:
A vector-eld v : R
2
is solenoidal, i.e. div v = 0, if and
only if there is a unique stream function : R such that
v = curl in and = 0 on .
7.3 Stream function formulation of the Stokes equations. Let u, p be the
solution of the Stokes equations with exterior force f and homogeneous boundary
conditions and denote by the stream function corresponding to u. Since
u t = 0 on ,
38
we conclude that in addition

n
= t curl = 0 on .
Inserting this representation of u in the momentum equation and applying the oper-
ator curl we obtain
curl f =curlu +p
=(curl u) + curl(p)
. .
=0
=(curl(curl ))
=
2
.
This proves that the stream function solves the biharmonic equation

2
= curl f in
= 0 on

n
= 0 on .
Conversely, one can prove. If solves the above biharmonic equation, there is a unique
pressure p with mean-value 0 such that u = curl and p solve the Stokes equations.
In this sense, the Stokes equations and the biharmonic equation are equivalent.
Remark 1: Given a solution of the biharmonic equation and the corresponding
velocity u = curl the pressure is determined by the equation f + u = p. But
there is no constructive way to solve this problem. Hence, the biharmonic equation is
only capable to yield the velocity eld of the Stokes equations.
7.4 Variational formulation of the biharmonic equation. With the help of
the Sobolev space
H
2
0
() =
_
H
2
() : =

n
= 0 on
_
the variational formulation of the biharmonic equation of the previous section is given
by
Find H
2
0
(), such that
_

dx =
_

curl f dx for all H


2
0
().
39
Remark 2: The above variational problem is the Euler-Lagrange equation corre-
sponding to the minimization problem
J() =
1
2
_

()
2
dx
_

curl f dx min in H
2
0
().
Therefore it is tempting to discretize the biharmonic equation by replacing in its
variational formulation the space H
2
0
() by a nite element space X(T ) H
2
0
().
But, this would require C
1
-elements! The lowest polynomial degree for which C
1
-
elements exist, is ve!
7.5 A non-conforming discretization of the biharmonic equation. One pos-
sible remedy to the diculties described in Remark 7.2 is to drop the C
1
-continuity
of the nite element functions. This leads to non-conforming discretizations of the
biharmonic equation. The most popular one is based on the so-called Morley ele-
ment. It is a triangular element, i.e. the partition T exclusively consists of triangles.
The corresponding nite element space is given by
M(T ) = S
2,1
(T ) :is continuous at the vertices,
n
E
is continuous at the midpoints of edges.
The degrees of freedom are
the values of at the vertices and
the values of n
E
at the midpoints of edges.
The discrete problem is given by:
Find
T
M(T ), such that

KT
_
K

T

T
dx =

KT
_
K
curl f
T
dx for all
T
M(T ).
One can prove that this discrete problem admits a unique solution. The stiness
matrix is symmetric, positive denite and has a condition of O(h
4
).
There is a close relation between this problem and the Crouzeix-Raviart discretization
of 6:
If
T
M(T ) is the solution of the Morley element discretization
of the biharmonic equation, then u
T
= curl
T
is the solution of
the Crouzeix-Raviart discretization of the Stokes equations.
40
7.6 Mixed nite element discretizations of the biharmonic equation. An-
other remedy to the diculties described in Remark 7.2 is to use a saddle-point
formulation of the biharmonic equation and a corresponding mixed nite element
discretization. This saddle-point formulation is obtained by introducing the vortic-
ity = curl u. It is given by:
Find H
1
0
(), L
2
(), H
1
() such that
_

curl curl dx =
_

f curl dx for all H


1
0
()
_

dx
_

dx = 0 for all L
2
()
_

curl curl dx
_

dx = 0 for all H
1
()
and nd p H
1
() L
2
0
() such that
_

p qdx =
_

(f curl ) qdx for all


q H
1
() L
2
0
().
Remark 3: Compared with the saddle-point formulation of the Stokes equations
of 4.1, the above problem imposes weaker regularity conditions on the velocity u =
curl and stronger regularity conditions on the pressure p. The two quantities and
are both vorticities. The second equation means that they are equal in a weak sense.
But, this equality is not a point-wise one since both quantities have dierent regularity
properties. The computation of the pressure is decoupled from the computation of
the other quantities.
For the mixed nite element discretization we depart from a triangulation T of
and choose an integer 1 and set k = max1, 1. Then the discrete problem is
given by:
Find
T
S
,0
0
(T ),
T
S
,1
(T ),
T
S
,0
(T ) such that
_

curl
T
curl
T
dx =
_

f curl
T
dx
_

T

T
dx
_

T

T
dx = 0
_

curl
T
curl
T
dx
_

T

T
dx = 0
for all
T
S
,0
0
(T ),
T
S
,1
(T ),
T
S
,0
(T )
and nd p
T
S
k,0
(T ) L
2
0
() such that
_

p
T
q
T
dx =
_

(f curl
T
) q
T
dx
for all q
T
S
k,0
(T ) L
2
0
().
41
One can prove that this discrete problem is well-posed and that its solution satises
the following a priori error estimate
|
T
|
1
+|
T
|
0
+|p p
T
|
0
c
_
h
m1
_
||
m+1
+||
m
+|p|
max{1,m1}
_
+h
m
||
m
_
,
where 1 m depends on the regularity of the solution of the biharmonic equation.
In the lowest order case = 1 this estimate does not imply convergence. But, using
a more sophisticated analysis, one can prove in this case an O(h
1
2
)-error estimate
provided H
3
(), i.e. u H
2
()
2
.
42
8. Solution of the discrete problems
8.1 General structure of the discrete problems. For the discretization of the
Stokes equations we choose a partition T of the domain and nite element spaces
X(T ) and Y (T ) for the approximation of the velocity and the pressure, respectively.
With these choices we either consider a mixed method as in 4 or a Petrov-Galerkin
one as in 5. Denote by
n
u
the dimension of X(T ) and by
n
p
the dimension of Y (T ) respectively.
Then the discrete problem has the form
_
A B
B
T
C
__
u
p
_
=
_
f
g
_
(1)
with
= 0 for the mixed methods of 4,
> 0 and 1 for the Petrov-Galerkin methods of 5,
a square, symmetrix, positive denite n
u
n
u
matrix A with condition of O(h
2
),
a rectangular n
u
n
p
matrix B,
a square, symmetric, positive denite n
p
n
p
matrix C with condition of O(1),
a vector f of dimension n
u
discretizing the exterior force, and
a vector g of dimension n
p
which equals 0 for the mixed methods of 4 and which
results from the stabilization terms on the right-hand sides of the methods of 5.
Remark 1: For simplicity, we drop in this section the index T indicating the
discretization. Moreover, we identify nite element functions with their coecient
vectors with respect to a nodal bases. Thus, u and p are now vectors of dimension
n
u
and n
p
, respectively.
The stiness matrix
_
A B
B
T
C
_
of the discrete problem (1) is symmetric, but indenite, i.e. it has positive and negative
real eigenvalues. Correspondingly, well-established methods such as the conjugate
gradient algorithm cannot be applied. This is the main diculty in solving the linear
systems arising from the discretization of the Stokes equations.
Remark 2: The indeniteness of the stiness matrix results from the saddle-point
structure of the Stokes equations. This cannot be remedied by any stabilization pro-
cedure.
8.2 The Uzawa algorithm. The Uzawa algorithm is probably the simplest al-
gorithm for solving the discrete problem (1).
43
Algorithm 1: (Uzawa algorithm)
0. Given: an initial guess p
0
for the pressure, a tolerance > 0 and a relaxation
parameter > 0.
Sought: an approximate solution of the discrete problem (1).
1. Set i = 0.
2. Apply a few Gauss-Seidel iterations to the linear system
Au = f Bp
i
and denote the result by u
i+1
. Compute
p
i+1
= p
i
+B
T
u
i+1
g Cp
i
.
3. If
|Au
i+1
+Bp
i+1
f | +|B
T
u
i+1
Cp
i+1
g|
return u
i+1
and p
i+1
as approximate solution; stop. Otherwise increase i by 1
and go to step 2.
Remark 3: The relaxation parameter usually is chosen in the interval (1, 2); a
typical choice is = 1.5.
|.| denotes any vector norm. A popular choice is the scaled Euclidean norm, i.e.
|v| =
_
1
n
u
v v for the velocity part and |q| =
_
1
n
p
q q for the pressure part.
The problem Au = f Bp
i
is a discrete version of two, if R
2
, or three, if R
3
,
Poisson equations for the components of the velocity eld.
The Uzawa algorithm iterates on the pressure. Therefore it is sometimes called a
pressure correction scheme.
The Uzawa algorithm is very simple, but extremely slow. Therefore it cannot be
recommended for practical use. We have given it nevertheless, since it is the bases
for the more ecient algorithm of 8.4.
8.3 The conjugate gradient algorithm revisited. The algorithm of the next
section is based on the conjugate gradient algorithm (CG algorithm). For complete-
ness we recapitulate this algorithm.
Algorithm 2: (Conjugate gradient algorithm)
0. Given: a linear system of equations Lx = b with a symmetric, positive denite
matrix L, an initial guess x
0
for the solution, and a tolerance > 0.
Sought: an approximate solution of the linear system.
1. Compute
r
0
= b Lx
0
,
d
0
= r
0
,

0
= r
0
r
0
.
44
Set i = 0.
2. If

i
<
2
return x
i
as approximate solution; stop. Otherwise go to step 3.
3. Compute
s
i
= Ld
i
,

i
=
i
/(d
i
s
i
),
x
i+1
= x
i
+
i
d
i
,
r
i+1
= r
i

i
s
i
,

i+1
= r
i+1
r
i+1
,

i
=
i+1
/
i
,
d
i+1
:= r
i+1
+
i
d
i
.
Increase i by 1 and go to step 2.
The convergence rate of the CG-algorithm is given by (

1)/(

+1) where is
the condition of L and equals the ratio of the largest to the smallest eigenvalue of L.
The following Java methods implement the CG-algorithm.
// CG algorithm
public void cg() {
int iter = 0;
double alpha, beta, gamma;
res = multiply(a, x);
res = add(b, res, 1.0, -1.0);
d = new double[dim];
copy(d, res);
gamma = innerProduct(res, res)/dim;
residuals[0] = Math.sqrt(gamma);
while ( iter < maxit-1 && residuals[iter] > tol ) {
iter++;
b = multiply(a, d);
alpha = innerProduct(d, b)/dim;
alpha = gamma/alpha;
accumulate(x, d, alpha);
accumulate(res, b, -alpha);
beta = gamma;
gamma = innerProduct(res, res)/dim;
residuals[iter] = Math.sqrt(gamma);
beta = gamma/beta;
d = add(res, d, 1.0, beta);
}
} // end of cg
// copy vector v to vector u
public void copy(double[] u, double[] v) {
for( int i = 0; i < dim; i++ )
u[i] = v[i];
} // end of copy
45
// multiply matrix c with vector y
public double[] multiply(double[][] c, double[] y) {
double[] result = new double[dim];
for( int i = 0; i < dim; i++ )
result[i] = innerProduct(c[i], y);
return result;
} // end of multiply
// return s*u+t*v
public double[] add(double[] u, double[] v, double s, double t) {
double[] w = new double[dim];
for( int i = 0; i < dim; i++ )
w[i] = s*u[i] + t*v[i];
return w;
} // end of add
// inner product of two vectors
public double innerProduct(double[] u, double[] v) {
double prod = 0;
for( int i = 0; i < dim; i++ )
prod += u[i]*v[i];
return prod;
} // end of inner product
// add s times vector v to vector u
public void accumulate(double[] u, double[] v, double s) {
for( int i = 0; i < dim; i++ )
u[i] += s*v[i];
} // end of accumulate
8.4 An improved Uzawa algorithm. Since the matrix A is positive denite,
we may solve the rst equation in the system (1) for the unknown u
u = A
1
(f Bp)
and insert the result in the second equation
B
T
A
1
(f Bp) Cp = g.
This gives a problem which only incorporates the pressure
[B
T
A
1
B +C]p = B
T
A
1
f g. (2)
One can prove that the matrix B
T
A
1
B + C is symmetric, positive denite and
has a condition of O(1), i.e. the condition does not increase when rening the mesh.
Therefore one may apply the CG-algorithm to problem (2). The convergence rate
then is independent of the mesh-size and does not deteriorate when rening the
mesh. This approach, however, requires the evaluation of A
1
, i.e. problems of the
form Av = g must be solved in every iteration. These are two, if R
2
, or three, if
R
3
, discrete Poisson equations for the components of the velocity v. The crucial
idea now is to solve these auxiliary problems only approximately with the help of a
standard multigrid algorithm for the Poisson equation.
This idea results in the following algorithm.
46
Algorithm 3: (Improved Uzawa algorithm)
0. Given: an initial guess p
0
for the pressure and a tolerance > 0.
Sought: an approximate solution of the discrete problem (1).
1. Apply a multigrid algorithm with starting value zero and tolerance to the linear
system Av = f Bp
0
and denote the result by u
0
. Compute
r
0
= B
T
u
0
g Cp
0
,
d
0
= r
0
,

0
= r
0
r
0
.
Set u
0
= 0 and i = 0.
2. If

i
<
2
compute p = p
0
+ p
i
, apply a multigrid algorithm with starting value zero and
tolerance to the linear system Av = f Bp, denote the result by u, and return
u, p as approximate solution of problem (1); stop.
Otherwise go to step 3.
3. Apply a multigrid algorithm with starting value u
i
and tolerance to the linear
system Av = Bd
i
and denote the result by u
i+1
. Compute
s
i
= B
T
u
i+1
+Cd
i
,

i
=
i
/(d
i
s
i
),
p
i+1
= p
i
+
i
d
i
,
r
i+1
= r
i

i
s
i
,

i+1
= r
i+1
r
i+1
,

i
=
i+1
/
i
,
d
i+1
:= r
i+1
+
i
d
i
.
Increase i by 1 and go to step 2.
Remark 4: The improved Uzawa algorithm is a nested iteration: The outer iteration
is a CG-algorithm for problem (2), the inner iteration is a standard multigrid algo-
rithm for discrete Poisson equations. The convergence rate of the improved Uzawa
algorithm does not deteriorate when rening the mesh. It usually lies in the range of
0.5 to 0.8. For the inner loop usually 2 to 4 multigrid iterations are sucient.
8.5 The multigrid algorithm. The multigrid algorithm is based on a sequence
of meshes T
0
, . . . , T
R
, which are obtained by successive local or global renement,
and associated discrete problems L
k
x
k
= b
k
, k = 0, . . . , R, corresponding to a partial
dierential equation. The nest mesh T
R
corresponds to the problem that we actually
47
want to solve. In our applications, the dierential equation is either the Stokes prob-
lem or the Poisson equation. In the rst case L
k
is the stiness matrix of problem
(1) corresponding to the partition T
k
. The vector x
k
then incorporates the velocity
and the pressure approximation. In the second case L
k
is the upper left block A in
problem (1) and x
k
only incorporates the discrete velocity.
The multigrid algorithm has three ingredients:
a smoothing operator M
k
, which should be easy to evaluate and which at the
same time should give a reasonable approximation to L
1
k
,
a restriction operator R
k,k1
, which maps functions on a ne mesh T
k
to the
next coarser mesh T
k1
, and
a prolongation operator I
k1,k
, which maps functions from a coarse mesh T
k1
to the next ner mesh T
k
.
For a concrete multigrid algorithm these ingredients must be specied. This will be
done in the next sections. Here, we discuss the general form of the algorithm and its
properties.
Algorithm 4: (MG (k, ,
1
,
2
, L
k
, b
k
, x
k
) one iteration of the multigrid algo-
rithm on mesh T
k
)
0. Given: the level number k of the actual mesh, parameters ,
1
, and
2
, the
stiness matrix L
k
of the actual discrete problem, the actual right-hand side b
k
,
and an inital guess x
k
.
Sought: improved approximate solution x
k
.
1. If k = 0 compute
x
0
:= L
1
0
b
0
;
stop. Otherwise go to step 2.
2. (Pre-smoothing) Perform
1
steps of the iterative procedure
x
k
= x
k
+M
k
(b
k
L
k
x
k
).
3. (Coarse grid correction)
3.1. Compute
f
k1
=R
k,k1
(b
k
L
k
x
k
)
x
k1
=0.
3.2 Perform iterations of MG(k 1, ,
1
,
2
, L
k1
, b
k1
, x
k1
) and denote
the result by x
k1
.
3.3 Compute
x
k
= x
k
+I
k1,k
x
k1
.
4. (Post-smoothing) Perform
2
steps of the iterative procedure
x
k
= x
k
+M
k
(b
k
L
k
x
k
).
48
The following Java method implements the multigrid method with = 1. Note that
the recursion has been resolved.
// one MG cycle
// non-recursive version
public void mgcycle( int lv, SMatrix a ) {
int level = lv;
count[level] = 1;
while( count[level] > 0 ) {
while( level > 1 ) {
smooth( a, 1 ); // presmoothing
a.mgResidue( res, x, bb ); // compute residue
restrict( a ); // restrict
level--;
count[level] = cycle;
}
smooth( a, 0 ); // solve on coarsest grid
count[level]--;
boolean prolongate = true;
while( level < lv && prolongate ) {
level++;
prolongateAndAdd( a ); // prolongate to finer grid
smooth( a, -1 ); // postsmoothing
count[level]--;
if( count[level] > 0 )
prolongate = false;
}
}
} // end of mgcycle
The used variables and methods have the following meaning:
lv number of actual level, corresponds to k,
a stiness matrix on actual level, corresponds to L
k
,
x actual approximate solution, corresponds to x
k
,
bb actual right-hand side, corresponds to b
k
,
res actual residual, corresponds to b
k
L
k
x
k
,
smooth perform the smoothing,
mgResidue compute the residual,
restrict perform the restriction,
prolongateAndAdd compute the prolongation and add the result to the current
approximation.
Remark 5: The parameter determines the complexity of the algorithm. Popular
choices are = 1 called V-cycle and = 2 called W-cycle. For the case = 1 and
R = 2 (three meshes), the multigrid algorithm can be represented schematically as
follows:
S

1 T
S

1 T
E

49
Here, o denotes smoothing, 1 restriction, T prolongation, and c exact solution.
The number of smoothing steps per multigrid iteration, i.e. the parameters
1
and

2
, should not be chosen too large. A good choice for positive denite problems such
as the Poisson equation is
1
=
2
= 1. For indenite problems such as the Stokes
equations a good choice is
1
=
2
= 2.
If 2, one can prove that the computational work of one multigrid iteration is
proportional to the number of unknowns of the actual discrete problem.
Under suitable conditions on the smoothing algorithm, which is determined by the
matrix M
k
, one can prove that the convergence rate of the multigrid algorithm is in-
dependent of the mesh-size, i.e. it does not deteriorate when rening the mesh. These
conditions will be discussed in the next section. In practice one observes convergence
rates of 0.1 0.5 for positive denite problems such as the Poisson equation and of
0.3 0.7 for indenite problems such as the Stokes equations.
8.6 Smoothing. The symmetric Gauss-Seidel algorithm is the most popular
smoothing algorithm for positive denite problems such as the Poisson equation.
This corresponds to the choice
M
k
= (D
k
U
T
k
)D
1
k
(D
k
U
k
),
where D
k
and U
k
denote the diagonal and the strictly upper diagonal part of L
k
respectively. The following Java method implements the Gauss-Seidel algorithm for
smoothing.
// one Gauss-Seidel sweep (x and b are defined on all levels)
// dir = 0: forward and backward
// dir = 1: only forward
// dir = -1; only backward
public void mgSGS( double[] x, double[] b, int dir ) {
double y;
if ( dir >= 0 ) { // forward sweep
for ( int i = dim[ lv-1 ]; i < dim[lv]; i++ ) {
y = b[i];
for ( int j = r[i]; j < r[ i+1 ]; j++ )
y -= m[j]*x[ dim[lv-1]+c[j] ];
x[i] += y/m[ d[i] ];
}
}
if ( dir <= 0 ) { // backward sweep
for ( int i = dim[lv] - 1; i >= dim[ lv-1 ]; i-- ) {
y = b[i];
for ( int j = r[i]; j < r[ i+1 ]; j++ )
y -= m[j]*x[ dim[lv-1]+c[j] ];
x[i] += y/m[ d[i] ];
}
}
} // end of mgSGS
The variables have the following meaning:
50
lv number of actual level, corresponds to k in the multigrid algorithm,
dim dimensions of the discrete problems on the various levels,
m stiness matrix on all levels, corresponds to the L
k
s,
x approximate solution on all levels, corresponds to the x
k
s,
b right-hand side on all levels, corresponds to the b
k
s.
For indenite problems such as the Stokes equations the most popular smoothing
algorithm is the squared Jacobi iteration. This is the Jacobi iteration applied to the
squared system L
T
k
L
k
x
k
= L
T
k
b
k
and corresponds to the choice
M
k
=
2
L
T
k
with a suitable damping parameter satisfying > 0 and = O(h
2
K
). The following
Java method implements this algorithm:
// one squared Richardson iteration (x and b are defined on all levels)
// res is an auxiliary array to store the residual
public void mgSR( double[] x, double[] b, double[] res, double om ) {
copy( res, b, 0, dim[lv-1], dim[lv] );
for( int i = 0; i < dim[lv] - dim[ lv-1 ]; i++ )
for( int j = r[ dim[lv-1]+i ]; j < r[ dim[lv-1]+i+1 ]; j++ ) {
res[i] -= m[j]*x[ dim[lv-1]+c[j] ];
}
for( int i = 0; i < dim[lv] - dim[ lv-1 ]; i++ )
for( int j = r[ dim[lv-1]+i ]; j < r[ dim[lv-1]+i+1 ]; j++ )
x[ dim[lv-1]+c[j] ] += m[j]*res[i]/om;
} // end of mgSR
The variable om is the damping parameter . The other variables and methods are
as explained before.
Another class of popular smoothing algorithms for the Stokes equations is given by
the so-called Vanka methods. The idea is to loop through patches of elements and
to solve exactly the equations associated with the nodes inside the actual patch while
retaining the current values of the variables associated with the nodes outside the
actual patch.
There are many possible choices for the patches.
One extreme case obviously consists in choosing exactly one node at a time. This
yields the classical Gauss-Seidel method and is not applicable to indenite problems,
since it in general diverges for those problems.
Another extreme case obviously consists in choosing all elements. This of course is
not practicable since it would result in an exact solution of the complete discrete
problem.
In practice, one choses patches that consist of
a single element, or
the two elements that share a given edge or face, or
the elements that share a given vertex.
51
8.7 Prolongation. Since the partition T
k
of level k always is a renement of the
partition T
k1
of level k 1 (cf. 9.6, 9.7), the corresponding nite element spaces
are nested, i.e. nite element functions corresponding to level k 1 are contained in
the nite element space corresponding to level k. Therefore, the values of a coarse-
grid function corresponding to level k 1 at the nodal points corresponding to level
k are obtained by evaluating the nodal bases functions corresponding to T
k1
at the
requested points. This denes the interpolation operator I
k1,k
.
Figures 8.1 and 8.2 show the regular partition of a triangle and of a square, respec-
tively (cf. 9.6). The numbers outside the element indicate the enumeration of the
element vertices and edges. Thus, e.g. edge 2 of the triangle has the vertices 0 and
1 as its endpoints. The numbers +0, +1 etc. inside the elements indicate the enu-
meration of the child elements. The remaining numbers inside the elements give the
enumeration of the vertices of the child elements.
Fig. 8.1: regular partition of a triangle
Fig. 8.2: regular partition of a quadrilateral
Example 1: Consider a piecewise constant approximation, i.e. S
0,1
(T ). The nodal
points are the barycentres of the elements. Every element in T
k1
is subdivided
into several smaller elements in T
k
. The nodal value of a coarse-grid function at the
barycentre of a child element in T
k
then is its nodal value at the barycentre of the
parent element in T
k
.
52
Example 2: Consider a piecewise linear approximation, i.e. S
1,0
(T ). The nodal
points are the vertices of the elements. The renement introduces new vertices at the
midpoints of some edges of the parent element and possibly when using quadrilat-
erals at the barycentre of the parent element. The nodal value at the midpoint of
an edge is the average of the nodal values at the endpoints of the edge. Thus, e.g. the
value at vertex 1 of child +0 is the average of the values at vertices 0 and 1 of the
parent element. Similarly, the nodal value at the barycentre of the parent element is
the average of the nodal values at the four element vertices.
8.8 Restriction. The restriction is computed by expressing the nodal bases func-
tions corresponding to the coarse partition T
k1
in terms of the nodal bases functions
corresponding to the ne partition T
k
and inserting this expression in the variational
formulation. This results in a lumping of the right-hand side vector which, in a certain
sense, is the transpose of the interpolation.
Example 3: Consider a piecewise constant approximation, i.e. S
0,1
(T ). The nodal
shape function of a parent element is the sum of the nodal shape functions of the
child elements. Correspondingly, the components of the right-hind side vector corre-
sponding to the child elements are all added and associated with the parent element.
Example 4: Consider a piecewise linear approximation, i.e. S
1,0
(T ). The nodal
shape function corresponding to a vertex of a parent triangle takes the value 1 at
this vertex, the value
1
2
at the midpoints of the two edges sharing the given vertex
and the value 0 on the remaining edges. If we label the current vertex by a and
the midpoints of the two edges emanating form a by m
1
and m
2
, this results in the
following formula for the restriction on a triangle
R
k,k1
(a) = (a) +
1
2
(m
1
) +(m
2
).
When considering a quadrilateral, we must take into account that the nodal shape
functions take the value
1
4
at the barycentre b of the parent quadrilateral. Therefore
the restriction on a quadrilateral is given by the formula
R
k,k1
(a) = (a) +
1
2
(m
1
) +(m
2
) +
1
4
(b).
Remark 6: An ecient implementation of the prolongation and restrictions loops
through all elements and performs the prolongation or restriction element-wise. This
process is similar to the usual element-wise assembly of the stiness matrix and the
load vector.
8.9 Variants of the CG-algorithm for indenite problems. The CG-algo-
rithm can only be applied to symmetric positive denite systems of equations. For
53
non-symmetric or indenite systems it in general breaks down. However, there are
various variants of the CG-algorithm which can be applied to these problems.
A naive approach consists in applying the CG-algorithm to the squared system
L
T
k
L
k
x
k
= L
T
k
b
k
which is symmetric and positive denite. This approach cannot
be recommended since squaring the systems squares its condition number and thus
at least doubles the required number of iterations.
A more ecient algorithm is the stabilized bi-conjugate gradient algorithm,
shortly Bi-CG-stab. The underlying idea roughly is to solve simultaneously the
original problem L
k
x
k
= b
k
and its adjoint L
T
k
y
k
= b
T
k
.
Algorithm 5: (Stabilized bi-onjugate gradient algorithm Bi-CG-stab)
0. Given: a linear system of equations Lx = b, an initial guess x
0
for the solution,
and a tolerance > 0.
Sought: an approximate solution of the linear system.
1. Compute
r
0
= b Lx
0
,
and set
r
0
= r
0
, v
1
= 0 , p
1
= 0 ,

1
= 1 ,
1
= 1 ,
1
= 1 .
Set i = 0.
2. If
r
i
r
i
<
2
return x
i
as approximate solution; stop. Otherwise go to step 3.
3. Compute

i
= r
i
r
i
,

i1
=

i

i1

i1

i1
.
If
[
i1
[ <
there is a possible break-down; stop. Otherwise compute
p
i
= r
i
+
i1
p
i1

i1
v
i1
,
v
i
= Lp
i
,

i
=

i
r
0
v
i
.
If
[
i
[ <
54
there is a possible break-down; stop. Otherwise compute
s
i
= r
i

i
v
i
,
t
i
= Ls
i
,

i
=
t
i
s
i
t
i
t
i
,
x
i+1
= x
i
+
i
p
i
+
i
s
i
,
r
i+1
= s
i

i
t
i
.
Increase i by 1 and go to step 2.
The following Java method implements the Bi-CG-stab algorithm. Note that it per-
forms an automatic restart upon break-down at most MAXRESTART times.
// pre-contioned stabilized bi-conjugate gradient method
public void pBiCgStab( SMatrix a, double[] b ) {
set(ab, 0.0, dim);
a.mvmult(ab, x);
add(res, b, ab, 1.0, -1.0, dim);
set(s, 0.0, dim);
set(rf, 0.0, dim);
double alpha, beta, gamma, rho, omega;
it = 0;
copy(rf, res, dim);
int restarts = -1; // restart in case of breakdown
while ( it < maxit && norm(res) > tolerance && restarts < MAXRESTART ) {
restarts++;
rho = 1.0, alpha = 1.0, omega = 1.0;
set(d, 0.0, dim);
set(v, 0.0, dim);
while ( it < maxit && lastRes > tolerance ) {
gamma = rho*omega;
if( Math.abs( gamma ) < EPS ) break; // break-down do restart
rho = innerProduct(rf, res, dim);
beta = rho*alpha/gamma;
acc(d, v, -omega, dim);
add(d, res, d, 1.0, beta, dim);
a.mvmult(v, d);
gamma = innerProduct(rf, v, dim);
if( Math.abs( gamma ) < EPS ) break; // break-down do restart
alpha = rho/gamma;
add(s, res, v, 1.0, -alpha, dim);
a.mvmult(ab, s);
gamma = innerProduct(ab, ab, dim);
omega = innerProduct(ab, s, dim)/gamma;
acc(x, d, alpha, dim);
acc(x, s, omega, dim);
add(res, s, ab, 1, -omega, dim);
it++;
}
}
} // end of pBiCgStab
55
9. A posteriori error estimation and adaptive grid renement
9.1 Motivation. Suppose we have computed the solution of a discretization of a
partial dierential equation such as the Stokes equations. What is the error of our
computed solution?
A priori error estimates do not help in answering this question. They only describe
the asymptotic behaviour of the error. They tell us how fast it will converge to zero
when rening the underlying mesh. But for a given mesh and discretization they give
no information on the actual size of the error.
Another closely related problem is the question about the spatial distribution of the
error. Where is it large, where is it small? Obviously we want to concentrate our
resources in areas of a large error.
In summary, we want to compute an approximate solution of the partial dierential
equation with a given tolerance and a minimal amount of work. This task is achieved
by adaptive grid renement based on a posteriori error estimation.
Throughout this section we denote by X(T ) and Y (T ) nite element spaces for the
velocity and pressure, respectively associated with a given partition T of the domain
. With these spaces we associate either a mixed method as in 4 or a Petrov-Galerkin
method as in 5. The solution of the corresponding discrete problem is denoted by
u
T
, p
T
, whereas u, p denotes the solution of the Stokes equations.
9.2 General structure of the adaptive algorithm. The adaptive algorithm
has a general structure which is independent of the particular dierential equation.
Algorithm 1: (General adaptive algorithm)
0. Given: A partial dierential equation and a tolerance .
Sought: An approximate solution with an error less than .
1. Construct an initial admissible partition T
0
and set up the associated discrete
problem. Set i = 0.
2. Solve the discrete problem corresponding to T
i
.
3. For each element K T
i
compute an estimate
K
of the error on K and set

i
=
_

KT
i

2
k
_
1/2
.
4. If

i

return the current discrete solution as approximate solution; stop. Otherwise go
to step 5.
5. Determine a subset

T
i
of elements in T
i
that must be rened. Determine T
i+1
such that it is an admissible partition and such that all elements in

T
i
are rened.
56
Set up the discrete problem corresponding to T
i+1
. Increase i by 1 and go to step
2.
In order to make the adaptive algorithm operative we must obviously specify the
following ingredients:
an algorithm that computes the
K
s (a posteriori error estimation),
a rule that selects the elements in

T
i
(marking strategy),
a rule that renes the elements in

T
i
(regular renement),
an algorithm that constructs T
i+1
(additional renement).
Remark 1: The
K
s are usually called (a posteriori) error estimators or in-
dicators.
9.3 A residual a posteriori error estimator. The simplest and most popular a
posteriori error estimator is the residual error estimator. For the Stokes equations
it is given by

K
=
_
h
2
K
|f + u
T
p
T
|
2
L
2
(K)
+| div u
T
|
2
L
2
(K)
+
1
2

EE
T
EK
h
E
|[n
E
(u
T
p
T
I)]
E
|
2
L
2
(E)
_
1/2
.
Note that:
The rst term is the residual of the discrete solution with respect to the momen-
tum equation u +p = f in its strong form.
The second term is the residual of the discrete solution with respect to the
continuity equation div u = 0 in it strong form.
The third term contains the boundary terms that appear when switching from
the strong to the weak form of the momentum equation by using an integration
by parts formula element-wise.
The pressure jumps vanish when using a continuous pressure approximation.
One can prove that the residual error estimator yields the following upper and lower
bounds on the error:
|u u
T
|
1
+|p p
T
|
0
c

KT

2
K
_
1/2
,

K
c

_
|u u
T
|
H
1
(
K
)
+|p p
T
|
L
2
(
K
)
+h
K
|f f
T
|
L
2
(
K
)
_
.
57
Here, f
T
is the L
2
-projection of f onto S
0,1
(T ) and
K
denotes the union of all
elements that share an edge with K, if R
2
, of a face, if R
3
. The f f
T
-term
is of higher order. The constant c

depends on the constant c

in the stability result


at the end of 4.1 and on the shape parameter max
KT
h
K
/
K
of the partition T .
The constant c

depends on the shape parameter of T and on the polynomial degree


of the spaces X(T ) and Y (T ).
Remark 2: The lower bound on the error is a local one whereas the upper bound
is a global one. This is not by chance. The lower error bound involves the dierential
operator which is a local one: local variations in the velocity and pressure result in
local variations of the force terms. The upper error bound on the other hand involves
the inverse of the dierential operator which is a global one: local variations of the
exterior forces result in a global change of the velocity and pressure.
Remark 3: An error estimator, which yields an upper bound on the error, is called
reliable. An estimator, which yields a lower bound on the error, is called ecient.
Any decent error estimator must be reliable and ecient.
9.4 Error estimators based on the solution of auxiliary problems. Two
other classes of popular error estimators are based on the solution of auxiliary dis-
crete local problems with Neumann and Dirichlet boundary conditions. For their
description we denote by k
u
and k
p
the maximal polynomial degrees k and m such
that
S
k,0
0
(T )
n
X(T )
and either
S
m,1
(T ) L
2
0
() Y (T ) when using a discontinuous pressure approximation
or
S
m,0
(T ) L
2
0
() Y (T ) when using a continuous pressure approximation.
Set
k
T
=maxk
u
+n, k
p
1,
k
E
=maxk
u
1, k
p
,
where n is the space dimension, i.e. R
n
.
For the Neumann-type estimator we introduce for every element K T the spaces
X(K) =span
K
v ,
E
w : v R
k
T
(K)
n
, w R
k
E
(E)
n
, E c
T
K,
Y (K) =span
K
q : q R
k
u
1
(K),
where
K
and
E
are the element and edge respectively face bubble functions dened
in 2.11. One can prove that the denition of k
T
ensures that the local discrete
58
problem
Find u
K
X(K), p
K
Y (K), such that
_
K
u
K
: v
K
dx
_
K
p
K
div v
K
dx =
_
K
f + u
T
p
T
v
K
dx
+
_
K
[n
K
(u
T
p
T
I)]
K
v
K
dS
_
K
q
K
div u
K
dx =
_
K
q
K
div u
T
dx
for all v
K
X(K) , q
K
Y (K)
has a unique solution. With this solution we dene the Neumann estimator by

N,K
=
_
[u
K
[
2
H
1
(K)
+|p
K
|
2
L
2
(K)
_
1/2
.
The above local problem is a discrete version of the Stokes equations with Neumann
boundary conditions
v + grad q =

f in K
div v = g in K
n
K
v qn
K
= b on K
where the data

f , g, and b are determined by the exterior force f and the discrete
solution u
T
, p
T
.
For the Dirichlet-type estimator we denote as in the previous sub-section for every
element K T by
K
the union of all elements in T that share an edge, if n = 2, or
a face, if n = 3, and set

X(K) =span
K
v ,
E
w : v R
k
T
(K

)
n
, K

T
K
,
w R
k
E
(E)
n
, E c
T
K,

Y (K) =span
K
q : q R
k
u
1
(K

) , K

T
K
.
Again, one can prove that the denition of k
T
ensures that the local discrete problem
Find u
K


X(K), p
K


Y (K), such that
_

K
u
K
: v
K
dx
_

K
p
K
div v
K
dx =
_

K
f v
K
dx
_

K
u
T
: v
K
dx
+
_

K
p
T
div v
K
dx
_

K
q
K
div u
K
dx =
_

K
q
K
div u
T
dx
for all v
K


X(K) , q
K


Y (K).
59
has a unique solution. With this solution we dene the Dirichlet estimator by

D,K
=
_
[ u
K
[
2
H
1
(
K
)
+| p
K
|
2
L
2
(
K
)
_
1/2
.
This local problem is a discrete version of the Stokes equations with Dirichlet bound-
ary conditions
v + grad q =

f in
K
div v = g in
K
v = 0 on
K
where the data

f and g are determined by the exterior force f and the discrete solution
u
T
, p
T
.
One can prove that both estimators are reliable and ecient and equivalent to the
residual estimator:
|u u
T
|
1
+|p p
T
|
0
c
1
_

KT

2
N,K
_
1/2
,

N,K
c
2
_
|u u
T
|
H
1
(
K
)
+|p p
T
|
L
2
(
K
)
+h
K
|f f
T
|
L
2
(
K
)
_
,

K
c
3

N,K
,

N,K
c
4
_

K

2
K

_
1/2
,
|u u
T
|
1
+|p p
T
|
0
c
5
_

KT

2
D,K
_
1/2
,

D,K
c
6
_
|u u
T
|
H
1
(
K
)
+|p p
T
|
L
2
(
K
)
+h
K
|f f
T
|
L
2
(
K
)
_
,

K
c
7

D,K
,

D,K
c
8
_
_
_

2
K

_
_
_
1/2
.
Here,
K
is the union of all elements in T that share at least a vertex with K.
The constants c
1
, . . . , c
8
only depend on the shape parameter of the partition T , the
polynomial degree of the discretization, and the stability parameter c

of the Stokes
equations.
60
Remark 4: The computation of the estimators
N,K
and
D,K
obviously is more ex-
pensive than the one of the residual estimator
K
. This is recompensed by a higher ac-
curacy. The residual estimator, on the other hand, is completely satisfactory for iden-
tifying the regions for mesh-renement. Thus it is recommended to use the cheaper
residual estimator for rening the mesh and one of the more expensive Neumann-type
or Dirichlet-type estimators for determining the actual error on the nal mesh.
9.5 Marking strategies. There are two popular marking strategies for determin-
ing the set

T
i
in the general adaptive algorithm: the maximum strategy and the
equilibration strategy.
Algorithm 2: (Maximum strategy)
0. Given: a partition T , error estimates
K
for the elements K T , and a threshold
(0, 1).
Sought: a subset

T of marked elements that should be rened.
1. Compute

T ,max
= max
KT

K
.
2. If

K

T ,max
mark K for renement and put it into the set

T .
Algorithm 3: (Equilibration strategy)
0. Given: a partition T , error estimates
K
for the elements K T , and a threshold
(0, 1).
Sought: a subset

T of marked elements that should be rened.
1. Compute

T
=

KT

2
K
.
Set

T
= 0
and

T = .
2. If

T

T
return

T ; stop. Otherwise go to step 3.
3. Compute

T ,max
= max
KT \ T

K
.
61
4. For all elements K T

T check whether

K
=
T ,max
.
If this is the case, put K in

T and add
2
K
to
T
. Otherwise skip K.
When all elements have been treated, return to step 2.
At the end of this algorithm the set

T satises

K T

2
K

KT

2
K
.
Both marking strategies yield comparable results. The maximum strategy obviously
is cheaper than the equilibration strategy. In both strategies, a large value of leads
to small sets

T , i.e. very few elements are marked. A small value of leads to large
sets

T , i.e. nearly all elements are marked. A popular and well established choice is
0.5.
9.6 Regular renement. Elements that are marked for renement usually are
rened by connecting their midpoints of edges.
Triangles and quadrilaterals are thus subdivided into four smaller triangles and
quadrilaterals that are similar to the parent element, i.e. have the same angles. Thus
the shape parameter of the elements does not change.
This is illustrated in Figs. 9.1 and 9.2. The numbers outside the elements indicate the
local enumeration of edges and vertices of the parent element. The numbers inside
the elements close to the vertices indicate the local enumeration of the vertices of the
child elements. The numbers +0, +1 etc. inside the elements give the enumeration of
the children. Note that the enumeration of new elements and new vertices is chosen
in such a way that triangles and quadrilaterals may be treated simultaneously with
a minimum of case selections.
Fig. 9.1: regular partition of a triangle
Parallelepipeds are also subdivided into eight smaller similar parallelepipeds by join-
ing the midpoints of edges.
For tetrahedrons, the situation is more complicated. Joining the midpoints of edges
introduces four smaller similar tetrahedrons at the vertices of the parent tetrahedron
plus a double pyramid in its interior. The latter one is subdivided into four small
62
tetrahedrons by cutting it along two orthogonal planes. These tetrahedrons, however,
are not similar to the parent tetrahedron. But there are rules which determine the
cutting planes such that a repeated renement according to these rules leads to at
most four similarity classes of elements originating from a parent element. Thus these
rules guarantee that the shape parameter of the partition does not deteriorate during
a repeated adaptive renement procedure.
Fig. 9.2: regular partition of a quadrilateral
9.7 Additional renement. Since not all elements are rened regularly, we need
additional renement rules in order to avoid hanging nodes. These rules are illustrated
in Figs. 9.3 9.7. For abbreviation we call the resulting elements green, blue, and
purple.
Fig. 9.3: green partition of a triangle
As shown in Figs. 9.3 and 9.4 a green element is obtained by bisecting exactly one
edge.
Fig. 9.4: green partition of a quadrilateral
63
As shown in Figs. 9.5 and 9.6 a blue element is obtained by bisecting exactly two
edges.
Figure 9.7 shows a purple quadrilateral which is obtained by bisecting exactly three
edges.
In order to avoid too acute or too abstuse triangles, the blue and green renement of
triangles obey to the following two rules:
(1) In a blue renement of a triangle, the longest one of the renement edges is
bisected rst.
(2) Before performing a green renement of a triangle it is checked whether the
renement edge is part of an edge which has been bisected during the last ng
generations. If this is the case, a blue renement is performed instead.
Fig. 9.5: blue partitions of a triangle
Fig. 9.6: blue partitions of a quadrilateral
Fig. 9.7: purple partition of a quadrilateral
Rule (2) is illustrated in Fig. 9.8. The cross in the left part represents a hanging node
64
which should be eliminated by a green renement. The right part shows the blue
renement which is performed instead. Here the cross represents the new hanging
node which is created by the blue renement. Numerical experiments indicate that
the optimal value of ng is 1. Larger values result in an excessive blow-up of the
renement zone.
Fig. 9.8: forbidden green renement and resulting blue renement
9.8 Required data structures. In this sub-section we shortly describe the re-
quired data structures for a Java or C++ implementation of an adaptive nite element
algorithm. For simplicity we consider only the two-dimensional case. Note that the
data structures are independent of the particular dierential equation and apply to
all engineering problems which require the approximate solution of partial dierential
equations.
The class NODE realizes the concept of a node, i.e. of a vertex of a grid. It has three
members c, t, and d.
The member c stores the co-ordinates in Euclidean 2-space. It is a double array of
length 2.
The member t stores the type of the node. It equals 0 if it is an interior point of the
computational domain. It is k, k > 0, if the node belongs to the k-th component of
the Dirichlet boundary part of the computational domain. It equals k, k > 0, if the
node is on the k-th component of the Neumann boundary.
The member d gives the address of the corresponding degree of freedom. It equals 1
if the corresponding node is not a degree of freedom, e.g. since it lies on the Dirichlet
boundary. This member takes into account that not every node actually is a degree
of freedom.
The class ELEMENT realizes the concept of an element. Its member nv determines the
element type, i.e. triangle or quadrilateral. Its members v and e realize the vertex
and edge informations, respectively. Both are integer arrays of length 4. It is assumed
that v[3] = 1 if nv= 3. A value e[i] = 1 indicates that the corresponding edge is
on a straight part of the boundary. Similarly e[i] = k 2, k 0, indicates that the
endpoints of the corresponding edge are on the k-th curved part of the boundary. A
value e[i] = j 0 indicates that edge i of the current element is adjacent to element
number j. Thus the member e decribes the neighbourhood relation of elements. The
members p, c, and t realize the grid hierarchy and give the number of the parent,
65
the number of the rst child, and the renement type, respectively. In particular we
have
t
_

_
0 , if the element is not rened,
1, . . . , 4 , if the element is rened green,
5 , if the element is rened red,
6, . . . , 24 , if the element is rened blue,
25, . . . , 100 , if the element is rened purple.
At rst sight it may seem strange to keep the information about nodes and elements
in dierent classes. But this approach has several advantages:
It minimizes the storage requirement. The co-ordinates of a node must be stored
only once. If nodes and elements are represented by a common structure, these
co-ordinates are stored 4 6 times.
The elements represent the topology of the grid which is independent of the
particular position of the nodes. If nodes and elements are represented by die-
rent structures it is much easier to implement mesh smoothing algorithms which
aect the position of the nodes but do not change the mesh topology.
When creating a hierarchy of adaptively rened grids, the nodes are completely hi-
erarchical, i.e. a node of grid T
i
is also a node of any grid T
j
with j > i. Since in
general the grids are only partly rened, the elements are not completely hierarchical.
Therefore, all elements of all grids are stored.
The information about the dierent grids is implemented by the class LEVEL. Its
members nn, nt, nq, and ne give the number of nodes, triangles, quadrilaterals, and
edges, resp. of a given grid. The members first and last give the addresses of the
rst element of the current grid and of the rst element of the next grid, respectively.
The member dof yields the number of degrees of freedom of the corresponding discrete
nite element problems.
66
10. Discretization of the stationary Navier-Stokes equations
10.1 Variational formulation. We recall the stationary incompressible Navier-
Stokes equations of 1.13 with no-slip boundary condition and the re-scaling of Re-
mark 1.2
u +Re(u )u + grad p = f in
div u = 0 in
u = 0 on
where Re > 0 is the Reynolds number. The variational formulation of this problem
is given by
Find u H
1
0
()
n
, p L
2
0
(), such that
_

u : vdx
_

p div vdx
+
_

Re[(u )u] vdx =


_

f vdx for all v H


1
0
()
n
_

q div udx = 0 for all q L


2
0
().
It has the following properties:
Any solution u, p of the Navier-Stokes equations is a solution of the above vari-
ational problem.
Any solution u, p of the variational problem, which is suciently smooth, is a
solution of the Navier-Stokes equations.
10.2 Fixed-point formulation. For the mathematical analysis it is convenient
to write the variational formulation of the Navier-Stokes equations as a xed-point
equation. To this end we denote by T the Stokes operator which associates with
each g the unique solution v = Tg of the Stokes equations
Find v H
1
0
()
n
, q L
2
0
(), such that
_

v : wdx
_

q div wdx =
_

g wdx for all w H


1
0
()
n
_

r div vdx = 0 for all r L


2
0
().
Then the variational formulation of the Navier-Stokes equations takes the equivalent
xed-point form
u = T(f Re(u )u).
67
10.3 Existence and uniqueness results. The following existence and unique-
ness results can be proven for the variational formulation of the Navier-Stokes equa-
tions:
The variational problem admits at least one solution.
Every solution of the variational problem satises the a priori
bound
[u[
1
Re|f |
0
.
The variational problem admits a unique solution provided
Re|f |
0
< 1,
where the constant only depends on the domain and can
be estimated by
diam()
4n
2
2
n1
2
.
Every solution of the variational problem has the same regular-
ity properties as the solution of the Stokes equations.
The mapping, which associates with Re a solution of the vari-
ational problem, is dierentiable. Its derivative with respect to
Re is a continuous linear operator which is invertible with a
continuous inverse for all but nitely many values of Re. I.e.
there are only nitely many turning or bifurcation points.
10.4 Finite element discretization. For the nite element discretization of the
Navier-Stokes equations we chose a partition T of the domain and corresponding
nite element spaces X(T ) and Y (T ) for the velocity and pressure. These spaces have
to satisfy the inf-sup condition of 4.6. We then replace in the variational problem
the spaces H
1
0
()
n
and L
2
0
() by X(T ) and Y (T ), respectively. This leads to the
following discrete problem:
Find u
T
X(T ), p
T
Y (T ), such that
_

u
T
: v
T
dx
_

p
T
div v
T
dx
+
_

Re[(u
T
)u
T
] v
T
dx =
_

f v
T
dx for all v
T
X(T )
_

q
T
div u
T
dx = 0 for all q
T
Y (T ).
68
10.5 Fixed-point formulation of the discrete problem. The nite element
discretization of the Navier-Stokes can be written in a xed-form similar to the vari-
ational problem. To this end we denote by T
T
the discrete Stokes operator which
associates with every g the solution v
T
= T
T
g of the discrete Stokes problem
Find v
T
X(T ), q
T
Y (T ), such that
_

v
T
: w
T
dx
_

q
T
div w
T
dx =
_

g w
T
dx for all w
T
X(T )
_

r
T
div v
T
dx = 0 for all r
T
Y (T ).
The discrete Navier-Stokes problem then takes the equivalent xed-point form
u
T
= T
T
(f Re(u
T
)u
T
).
Note, that as for the variational problem this equation also determines the pressure
via the operator T
T
.
10.6 Properties of the discrete problem. The discrete problem has similar
properties as the variational problem:
The discrete problem admits at least one solution.
Every solution of the discrete problem satises the a priori
bound
[u
T
[
1
Re|f |
0
.
The discrete problem admits a unique solution provided
Re|f |
0
< 1,
where the constant is the same as for the variational problem.
The mapping, which associates with Re a solution of the dis-
crete problem, is dierentiable. Its derivative with respect to
Re is a continuous linear operator which is invertible with a
continuous inverse for all but nitely many values of Re. I.e.
there are only nitely many turning or bifurcation points.
Remark 1: The number of turning or bifurcation points of the discrete problem of
course depends on the partition T and on the choice of the spaces X(T ) and Y (T ).
69
10.7 Symmetrization. The integration by parts formulae of 2.3 imply for all
u, v, w H
1
0
()
n
the identity
_

[(u )v] wdx =


_

[(u )w] vdx +


_

v wdiv udx.
If u is solenoidal, i.e. div u = 0, this in particular yields
_

[(u )v] wdx =


_

[(u )w] vdx


for all v, w H
1
0
()
n
.
This symmetry in general is violated for the discrete problem since div u
T
,= 0. To
enforce the symmetry, one often replaces in the discrete problem the term
_

Re[(u
T
)u
T
] v
T
dx
by
1
2
_

Re[(u
T
)u
T
] v
T
dx
1
2
_

Re[(u
T
)v
T
] u
T
dx.
10.8 A priori error estimates. As in 4.11 we denote by k
u
and k
p
the maximal
polynomial degrees k and m such that
S
k,0
0
(T )
n
X(T )
and either
S
m,1
(T ) L
2
0
() Y (T ) when using a discontinuous pressure approximation
or
S
m,0
(T ) L
2
0
() Y (T ) when using a continuous pressure approximation.
Set
k = mink
u
1, k
p
.
Further we denote by u, p a solution of the variational formulation of the Navier-
Stokes equations and by u
T
, p
T
a solution of the discrete problem.
With these notations the following a priori error estimates can be proved:
Assume that
u H
k+2
()
n
H
1
0
()
n
and p H
k+1
() L
2
0
(),
hRe|f |
0
is suciently small, and
u is no turning or bifurcation point of the variational problem,
then
[u u
T
[
1
+|p p
T
|
0
c
1
h
k+1
Re
2
|f |
k
.
If in addition is convex, then
|u u
T
|
0
c
2
h
k+2
Re
2
|f |
k
.
The constants c
1
and c
2
only depend on the domain .
70
Remark 2: As for the Stokes equations, the above regularity assumptions are not
realistic for practical problems.
The condition hRe|f |
0
suciently small can in general not be quantied. Therefore
it cannot be checked for a given discretization.
One cannot conclude from the computed discrete solution whether the analytical
solution is a turning or bifurcation point or not.
For most practical examples, the right-hand side of the above error estimates behaves
like O(hRe
2
) or O(h
2
Re
2
). Thus they require unrealistically small mesh-sizes for large
Reynolds numbers.
These observations show that the a priori error estimates are of purely academic
interest. Practical informations can only be obtained from a posteriori error estimates.
10.9 A warning example. We consider the one-dimensional Navier-Stokes equa-
tions
u

+Re uu

=0 in I := (1, 1)
u(1) = 1 , u(1) = 1.
Since
uu

= (
1
2
u
2
)

,
we conclude that
u

+
Re
2
u
2
= c
is constant.
To determine the constant c, we integrate the above equation and obtain
2c =
_
1
1
cdx =
_
1
1
u

+
Re
2
u
2
dx = 2 +
Re
2
_
1
1
u
2
dx
. .
0
.
This shows that c 1 and that we may write c =
2
with a dierent constant 1.
Hence every solution of the dierential equation satises
u

=
Re
2
u
2

2
.
Therefore it must be of the form
u(x) =
Re
tanh(
Re
x)
with suitable parameters
Re
and
Re
depending on Re.
The boundary conditions imply that

Re
=
1
tanh(
Re
)
.
71
Hence we have
u(x) =
tanh(
Re
x)
tanh(
Re
)
.
Inserting this expression in the dierential equation yields
0 =
_
u

+
Re
2
u
2
_

=
_

Re
tanh(
Re
)
+
_
Re
2

Re
tanh(
Re
)

u
2
_

=2
_
Re
2

Re
tanh(

uu

.
Since neither u nor its derivative u

vanish identically, we obtain the dening relation


2
Re
tanh(
Re
) = Re
for the parameter
Re
.
Due to the monotonicity of tanh, this equation admits for every Re > 0 a unique
solution
Re
. Since tanh(x) 1 for x 1, we have
Re

Re
2
for Re 1. Hence,
the solution u has a sharp interior layer at the origin for large values of Re. Figure
10.1 depicts the solution u for Re = 100.
Fig. 10.1: solution of the one-dimensional Navier-Stokes equations with Re = 100
For the discretization, we chose an integer N 1, divide the interval (1, 1) into
N small sub-intervals of equal length h =
2
N+1
, and use continuous piecewise linear
nite elements on the resulting mesh. We denote by u
i
, 0 i N + 1, the value of
the discrete solution at the mesh-point x
i
= 1 + ih and evaluate all integrals with
the Simpson rule. Since all integrands are piecewise polynomials of degree at most 2,
72
this is an exact integration. With theses notations, the discretization results in the
following nite dierence scheme:
2u
i
u
i1
+u
i+1
h
+
Re
6
(u
i
u
i1
)(2u
i
+u
i1
)
+
Re
6
(u
i+1
u
i
)(2u
i
+u
i+1
) = 0 for 1 i N
u
0
= 1 , u
N+1
= 1.
For its solution, we try the ansatz
u
i
=
_
1 for i = 0
for 0 i N
1 for i = N + 1
with an unknown constant . When inserting this ansatz in the dierence equations,
we see that the equations corresponding to 2 i N 1 are satised independently
of the value of . The equations for i = 1 and i = N on the other hand result in
0 =
1
h
+
Re
6
( 1)(2 + 1)
=
1
h
_
1 +
Reh
6
(2 + 1)
_
and
0 =
+ 1
h
+
Re
6
( 1)(2 1)
=
+ 1
h
_
1
Reh
6
(2 1)
_
respectively.
If Reh = 6, these equations have the two solutions = 1 and = 1. Both solutions
obviously have nothing in common with the solution of the dierential equation.
If Reh ,= 6, the above equations have no solution. Hence, our ansatz does not work.
A more detailed analysis, however, shows that for Reh 6 the discrete solution has
nothing in common with the solution of the dierential equation.
In summary, we see that the nite element discretization yields a qualitatively correct
approximation only when h <
6
Re
. Hence we have to expect a prohibitively small
mesh-size for real-life problems.
When using a standard symmetric nite dierence approximation, things do not
change. The dierence equations then take the form
2u
i
u
i1
+u
i+1
h
+
Re
2
u
i
(u
i+1
u
i1
) = 0 for 1 i N
u
0
= 1 , u
N+1
= 1.
73
When Reh = 2, our ansatz now leads to the same solution as before. Again, one can
prove that one obtains a completely useless discrete solution when Reh 2. Thus the
principal result does not change in this case. Only the critical mesh-size is reduced
by a factor 3.
Next, we try a backward dierence approximation of the rst order derivative. This
results in the dierence equations
2u
i
u
i1
+u
i+1
h
+Reu
i
(u
i
u
i1
) = 0 for 1 i N
u
0
= 1 , u
N+1
= 1.
When trying our ansatz, we see that equations corresponding to 2 i N 1 are
again satised independently of . The equations for i = 0 and i = N now take the
form
0 =
1
h
+Re( 1)
=
1
h
[1 +Reh]
and
0 =
+ 1
h
+Re0
=
+ 1
h
respectively. Thus, in the case Reh = 1 we obtain the unique solution = 1. A
more rened analysis shows, that we obtain a qualitatively correct discrete solution
only if h
1
Re
.
Finally, we try a forward dierence approximation of the rst order derivative. This
yields the dierence equations
2u
i
u
i1
+u
i+1
h
+Reu
i
(u
i+1
u
i
) = 0 for 1 i N
u
0
= 1 , u
N+1
= 1.
Our ansatz now results in the two conditions
0 =
1
h
+Re0
=
1
h
and
0 =
+ 1
h
+Re(1 )
=
+ 1
h
[1 Reh] .
74
For Reh = 1 this yields the unique solution = 1. A qualitatively correct discrete
solution is obtained only if h
1
Re
.
These experiences show that we need a true up-winding, i.e. a backward dierence
approximation when u > 0 and a forward dierence approximation when u < 0. Thus
the up-wind direction and with it the discretization depend on the solution of the
discrete problem!
10.10 Up-wind methods. The previous section shows that we must modify the
nite element discretization of 10.4 in order to obtain qualitatively correct approxi-
mations also for large values of hRe.
One possibility to achieve this goal is to use an up-wind dierence approximation
for the convective derivative (u
T
)u
T
. To describe the idea we consider only the
lowest order method.
In a rst step, we approximate the integral involving the convective derivative by a
one-point quadrature rule
_

[(u
T
)u
T
] v
T
dx

KT
[K[[(u
T
(x
K
) )u
T
(x
K
)] v
T
(x
K
).
Here [K[ is the area respectively volume of the element K and x
K
denotes its barycen-
tre. When using a rst order approximation for the velocity, i.e. X(T ) = S
1,0
0
(T )
n
,
this does not deteriorate the asymptotic convergence rate of the nite element dis-
cretization.
In a second step, we replace the convective derivative by a suitable up-wind dierence
(u
T
(x
K
) )u
T
(x
K
)
1
|x
K
y
K
|
|u
T
(x
K
)|(u
T
(x
K
) u
T
(y
K
)).
Here |.| denotes the Euclidean norm in R
n
and y
K
is the intersection of the half-line
x
K
su
T
(x
K
) : s > 0 with the boundary of K (cf. Fig. 10.2).
Fig. 10.2: upwind direction
In a last step, we replace u
T
(y
K
) by I
T
u
T
(y
K
) where I
T
u
T
denotes the linear
interpolate of u
T
in the vertices of the edge respectively face of K which contains y
K
.
If in Figure 10.2, e.g., |y
K
b| =
1
4
|ab|, we have I
T
u
T
(y
K
) =
1
4
u
T
(a)+
3
4
u
T
(b).
For large values of hRe, this up-winding yields a better approximation than the
straight-forward discretization of 10.4. For suciently small mesh-sizes, the error
75
converges to zero linearly with h. The up-wind direction depends on the discrete
solution. This has the awkward side-eect that the discrete non-linear problem is
not dierentiable and leads to severe complications for the solution of the discrete
problem.
10.11 The streamline-diusion method. The streamline-diusion method has
an up-wind eect, but avoids the dierentiability problem of the up-wind scheme
of the previous section. In particular, the resulting discrete problem is dierentiable
and can be solved with a Newton method. Moreover, the streamline-diusion method
simultaneously has a stabilizing eect with respect to the incompressibility constraint.
In this respect it generalizes the Petrov-Galerkin method of 5.
The idea is to add an articial viscosity in the streamline direction. Thus the solution
is slightly smeared in its smooth direction while retaining its steep gradient in the
orthogonal direction. The articial viscosity is added via a suitable penalty term
which is consistent in the sense that it vanishes for any solution of the Navier-Stokes
equations.
Retaining the notations of 10.4, the streamline-diusion discretization is given by:
Find u
T
X(T ), p
T
Y (T ), such that
_

u
T
: v
T
dx
_

p
T
div v
T
dx
+
_

Re[(u
T
)u
T
] v
T
dx
+

KT

K
h
2
K
_
K
Re[f u
T
+p
T
+Re(u
T
)u
T
] [(u
T
)v
T
]dx
+

KT

K
_
K
div u
T
div v
T
dx =
_

f v
T
dx
_

q
T
div u
T
dx
+

KT

K
h
2
K
_
K
[u
T
+p
T
+Re(u
T
)u
T
] q
T
dx
+

EE
T

E
h
E
_
E
[p
T
]
E
[q
T
]
E
dS =

KT

K
h
2
K
_
K
f q
T
dx
for all v
T
X(T ), for all q
T
Y (T ).
Recall that [.]
E
denotes the jump across E. The stabilization parameters
K
and
E
are chosen as described in 5.5. The additional parameter
K
has to be non-negative
76
and can be chosen equal to zero. Computational experiments, however, suggest that
the choice
K
1 is preferable. When setting Re = 0 and
K
= 0 the above
discretization reduces to the Petrov-Galerkin discretization of the Stokes equations
presented in 5.4.
77
11. Solution of the discrete nonlinear problems
11.1 General structure. For the solution of discrete nonlinear problems which
result from a discretization of a nonlinear partial dierential equation one can proceed
in two ways:
One applies a nonlinear solver, such as e.g. the Newton method, to the nonlinear
dierential equation and then discretizes the resulting linear partial dierential
equations.
One directly applies a nonlinear solver, such as e.g. the Newton method, to the
discrete nonlinear problems. The resulting discrete linear problems can then be
interpreted as discretizations of suitable linear dierential equations.
Both approaches often are equivalent and yield comparable approximations. In this
section we will follow the rst approach since it requires less notation. All algorithms
can easily be re-interpreted in the second sense described above.
We recall the xed-point formulation of the Navier-Stokes equations of 10.2
u = T(f Re(u )u) (1)
with the Stokes operator T which associates with each g the unique solution v = Tg
of the Stokes equations
v + grad q = g in
div v = 0 in
v = 0 on .
Most of the algorithms require the solution of discrete Stokes equations or of slight
variations thereof. This can be achieved with the methods of 8.
11.2 Fixed-point iteration. The xed-point iteration is given by
u
i+1
= T(f Re(u
i
)u
i
).
It results in the following algorithm:
Algorithm 1: (Fixed-point iteration)
0. Given: an initial guess u
0
and a tolerance > 0.
Sought: an approximate solution of the stationary incompressible Navier-Stokes
equations.
1. Set i = 0.
2. Solve the Stokes equations
u
i+1
+p
i+1
= f Re(u
i
)u
i
in
div u
i+1
= 0 in
u
i+1
= 0 on .
78
3. If
[u
i+1
u
i
[
1

return u
i+1
, p
i+1
as approximate solution; stop. Otherwise increase i by 1 and
go to step 2.
The xed-point iteration converges if Re
2
|f |
0
1. The convergence rate approxi-
mately is 1 Re
2
|f |
0
. Therefore this algorithm can only be recommended for prob-
lems with very small Reynolds numbers.
11.3 Newton iteration. Equation (1) can be re-written in the form
F(u) = u T(f Re(u )u) = 0.
We may apply Newtons method to F. Then we must solve in each step a linear
problem of the form
g =DF(u)v
=v +ReT((u )v + (v )u).
This results in the following algorithm:
Algorithm 2: (Newton iteration)
0. Given: an initial guess u
0
and a tolerance > 0.
Sought: an approximate solution of the stationary incompressible Navier-Stokes
equations.
1. Set i = 0.
2. Solve the modied Stokes equations
u
i+1
+p
i+1
+Re(u
i
)u
i+1
+Re(u
i+1
)u
i
= f +Re(u
i
)u
i
in
div u
i+1
= 0 in
u
i+1
= 0 on .
3. If
[u
i+1
u
i
[
1

return u
i+1
, p
i+1
as approximate solution; stop. Otherwise increase i by 1 and
go to step 2.
The Newton iteration converges quadratically. However, the initial guess must be
close to the sought solution, otherwise the iteration may diverge. To avoid this,
one can use a damped Newton iteration. The modied Stokes problems incorporate
convection and reaction terms which are proportional to the Reynolds number. For
79
large Reynolds numbers this may cause severe diculties with the solution of the
modied Stokes problems.
11.4 Path tracking. Instead of the single problem (1) we now look at a whole
family of Navier-Stokes equations with a parameter
u

= T(f (u

)u

).
Its solutions u

depend dierentiably on the parameter . The derivative v

=
du

d
solves the modied Stokes equations
v

= T((v

)u

+(u

) + (u

)u

).
If we know the solution u

0
corresponding to the parameter
0
, we can compute v

0
and may use u

0
+ (
1

0
)v

0
as initial guess for the Newton iteration applied
to the problem with parameter
1
>
0
. If
1

0
is not too large, a few Newton
iterations will yield a suciently good approximation of v

1
.
This idea leads to the following algorithm:
Algorithm 3: (Path tracking)
0. Given: a Reynolds number Re, an initial parameter 0 < Re, an increment
> 0, and a tolerance > 0.
Sought: an approximate solution of the stationary incompressible Navier-Stokes
equations with Reynolds number Re.
1. Set u

= 0.
2. Apply a few Newton iterations to the Navier-Stokes equations with Reynolds
number , initial guess u

, and tolerance . Denote the result by u

.
3. If = Re return the velocity u

and the corresponding pressure p

as approxi-
mate solution; stop. Otherwise go to step 4.
4. Solve the modied Stokes equations
v

+q

+(u

)v

+(v

)u

= f (u

)u

in
div v

= 0 in
v

= 0 on .
5. Replace u

by u

+ v

and by minRe, + . Go to step 2.


The path tracking algorithm should be combined with a step-length control: If the
Newton algorithm in step 2 does not converge suciently well, the increment
should be reduced.
11.5 A nonlinear CG-algorithm. The idea is to apply a nonlinear CG-algorithm
to the least-squares minimization problem
minimize
1
2
[u T(f Re(u )u)[
2
1
.
It leads to the following algorithm:
80
Algorithm 4: (Non-linear CG-algorithm of Polak-Ribi`ere)
0. Given: an initial guess u
0
and a tolerance > 0.
Sought: an approximate solution of the stationary incompressible Navier-Stokes
equations.
1. Compute the solutions z
0
and g
0
the Stokes problems
z
0
+r
0
= Re(u
0
)u
0
f in
div z
0
= 0 in
z
0
= 0 on
and
g
0
+ s
0
= Re(u
0
+z
0
) (u
0
) (u
0
)(u
0
+z
0
) in
div g
0
= 0 in
g
0
= 0 on .
Set i = 0 and w
0
= g
0
= u
0
+z
0
+ g
0
.
2. If
__

[w
i
[
2
dx
_
1/2

return the velocity u
i
and the corresponding pressure p
i
as approximate solution;
stop. Otherwise go to step 3.
3. Compute the solutions z
i
1
and z
i
2
of the Stokes problems
z
i
1
+r
i
1
= Re(u
i
)w
i
+ (w
i
)u
i
in
div z
i
1
= 0 in
z
i
1
= 0 on
and
z
i
2
+r
i
2
= Re(w
i
)w
i
in
div z
i
2
= 0 in
z
i
2
= 0 on .
Compute
=
_

(u
i
+z
i
) : (w
i
+z
i
1
)dx
=
_

[(w
i
+z
i
1
)[
2
dx +
_

(u
i
+z
i
) : z
i
2
dx
=
3
2
_

(w
i
+z
i
1
) : z
i
2
dx
=
1
2
_

[z
i
2
[
2
.
81
Determine the smallest positive zero
i
of
+ +
2
+
3
and set
u
i+1
=u
i

i
w
i
z
i+1
=z
i

i
z
i
1
+
1
2

i
2
z
i
2
.
Compute the solution g
i+1
of the Stokes problem
g
i+1
+ s
i+1
= Re(u
i+1
+z
i+1
) (u
i+1
)
(u
i+1
)(u
i+1
+z
i+1
) in
div g
i+1
= 0 in
g
i+1
= 0 on
and set
g
i+1
= g
i+1
+u
i+1
+z
i+1
.
Compute

i+1
=
__

[g
i+1
[
2
dx
_
1
_

(g
i+1
g
i
) : g
i+1
dx
and set
w
i+1
= g
i+1
+
i+1
w
i
.
Increase i by 1 and go to step 2.
This algorithm has the advantage that it only requires the solution of Stokes problems
and thus avoids the diculties associated with large convection and reaction terms.
11.6 Operator splitting. The idea is to decouple the diculties associated with
the nonlinear convection term and with the incompressibility constraint. This leads
to the following algorithm:
Algorithm 5: (Operator Splitting)
0. Given: an initial guess u
0
, a damping parameter (0, 1), and a tolerance
> 0.
Sought: an approximate solution of the stationary incompressible Navier-Stokes
equations.
1. Set i = 0.
2. Solve the Stokes equations
2u
i+
1
4
u
i+
1
4
+p
i+
1
4
=2u
i
+
1

f
1

(u
i
)u
i
in
div u
i+
1
4
=0 in
u
i+
1
4
=0 on
82
3. Solve the nonlinear Poisson equations
u
i+
3
4
u
i+
3
4
+
1

(u
i+
3
4
)u
i+
3
4
=u
i+
1
4
+
1

f p
i+
1
4
in
u
i+
3
4
=0 on
4. Solve the Stokes equations
2u
i+1
u
i+1
+p
i+1
=2u
i+
3
4
+
1

f
1

(u
i+
3
4
)u
i+
3
4
in
div u
i+1
=0 in
u
i+1
=0 on .
5. If
[u
i+1
u
i
[
1

return u
i+1
, p
i+1
as approximate solution; stop. Otherwise increase i by 1 and
go to step 2.
The nonlinear problem in step 3 is solved with one of the algorithms presented in the
previous sub-sections. This task is simplied by the fact that the incompressibility
condition and the pressure are now missing.
11.7 Multigrid algorithms. When applying the multigrid algorithm of 8.5 to
nonlinear problems one only has to modify the pre- and post-smoothing steps. This
can be done in two possible ways:
Apply a few iterations of the Newton algorithm to the nonlinear problem com-
bined with very few iterations of a classical iterative scheme, such as e.g. Gau-
Seidel iteration, for the auxiliary linear problems that must be solved during the
Newton iteration.
Successively chose a node and the corresponding equation, freeze all unknowns
that do not belong to the current node, and solve for the current unknown by
applying a few Newton iterations to the resulting nonlinear equation in one
unknown.
The second variant is often called nonlinear Gau-Seidel algorithm.
Alternatively one can apply a variant of the multigrid algorithm of 8.5 to the linear
problems that must be solved in the algorithms described above. Due to the lower
costs for implementation, this variant is often preferred in practice.
83
12. Adaptivity for nonlinear problems
12.1 General structure. The general structure of an adaptive algorithm as de-
scribed in 9.2 directly applies to nonlinear problems. One only has to adapt the a
posteriori error estimator. The marking strategy, the regular renement, the addi-
tional renement, and the data structures described in 9.5 9.8 do not change.
Throughout this section we denote by X(T ) and Y (T ) nite element spaces for the
velocity and pressure, respectively associated with a given partition T of the domain
. With these spaces we associate a discretization of the stationary incompressible
Navier-Stokes equations as described in 10. The computed solution of the corre-
sponding discrete problem is denoted by u
T
, p
T
, whereas u, p denotes a solution of
the Navier-Stokes equations.
12.2 A residual a posteriori error estimator. The residual a posteriori error
estimator for the Navier-Stokes equations is given by

K
=
_
h
2
K
|f + u
T
p
T
Re(u
T
)u
T
|
2
L
2
(K)
+| div u
T
|
2
L
2
(K)
+
1
2

EE
T
EK
h
E
|[n
E
(u
T
p
T
I)]
E
|
2
L
2
(E)
_
1/2
.
When comparing it with the residual estimator for the Stokes equations, we observe
that the nonlinear convection term has been added to the element residual.
Under suitable conditions on the solution of the Navier-Stokes equations, one can
prove that as in the linear case the residual error estimator is reliable and ecient.
12.3 Error estimators based on the solution of auxiliary problems. The
error estimators based on the solution of auxiliary local discrete problems are very
similar to those in the linear case. In particular the nonlinearity only enters into the
data, the local problems itself remain linear.
We recall the notations of 9.4 and set
X(K) =span
K
v ,
E
w : v R
k
T
(K)
n
, w R
k
E
(E)
n
, E c
T
K,
Y (K) =span
K
q : q R
k
u
1
(K),

X(K) =span
K
v ,
E
w : v R
k
T
(K

)
n
, K

T
K
,
w R
k
E
(E)
n
, E c
T
K,

Y (K) =span
K
q : q R
k
u
1
(K

) , K

T
K
,
where
k
T
=maxk
u
(k
u
1), k
u
+n, k
p
1,
k
E
=maxk
u
1, k
p
,
84
and k
u
and k
p
denote the polynomial degrees of the velocity and pressure approxi-
mation respectively. Note that the denition of k
T
diers from the one in 9.4 and
takes into account the polynomial degree of the nonlinear convection term.
With these notations we consider the following discrete Stokes problem with Neu-
mann boundary conditions
Find u
K
X(K), p
K
Y (K), such that
_
K
u
K
: v
K
dx
_
K
p
K
div v
K
dx =
_
K
f + u
T
p
T
Re(u
T
)u
T
v
K
dx
+
_
K
[n
K
(u
T
p
T
I)]
K
v
K
dS
_
K
q
K
div u
K
dx =
_
K
q
K
div u
T
dx
for all v
K
X(K) , q
K
Y (K).
With the solution of this problem, we dene the Neumann estimator by

N,K
=
_
[u
K
[
2
H
1
(K)
+|p
K
|
2
L
2
(K)
_
1/2
.
Similarly we can consider the following discrete Stokes problem with Dirichlet bound-
ary conditions
Find u
K


X(K), p
K


Y (K), such that
_

K
u
K
: v
K
dx
_

K
p
K
div v
K
dx =
_

K
f v
K
dx
_

K
u
T
: v
K
dx
+
_

K
p
T
div v
K
dx

K
Re(u
T
)u
T
v
K
dx
_

K
q
K
div u
K
dx =
_

K
q
K
div u
T
dx
for all v
K


X(K) , q
K


Y (K).
With the solution of this problem, we dene the Dirichlet estimator by

D,K
=
_
[ u
K
[
2
H
1
(
K
)
+| p
K
|
2
L
2
(
K
)
_
1/2
.
85
As in the linear case, one can prove that both estimators are reliable and ecient
and comparable to the residual estimator. Remark 9.4 also applies to the nonlinear
problem.
86
13. Discretization of the instationary Navier-Stokes equations
13.1 Variational formulation. We recall the instationary incompressible Na-
vier-Stokes equations of 1.12 with no-slip boundary condition
u
t
u + (u )u grad p = f in (0, T)
div u = 0 in (0, T)
u = 0 on (0, T)
u(., 0) = u
0
in .
Here, T > 0 is given nal time and u
0
denotes a given initial velocity.
The variational formulation of this problem is given by
Find a velocity eld u with
max
0<t<T
_

[u(x, t)[
2
dx +
_
T
0
_

[u(x, t)[
2
dxdt <
and a pressure p with
_
T
0
_

[p(x, t)[
2
dxdt <
such that
_
T
0
_

_
u(x, t)
v(x, t)
t
+u(x, t) : v(x, t)
+ [(u(x, t) )u(x, t)] v(x, t) p(x, t) div v(x, t)
_
dxdt
=
_
T
0
_

f (x, t) v(x, t)dxdt +


_

u
0
(x) v(x, 0)dx
_
T
0
_

q(x, t) div u(x, t)dxdt = 0


holds for all v with
max
0<t<T
_

_
[
v(x, t)
t
[
2
dx +[v(x, t)[
2
_
dx <
and all q with
max
0<t<T
_

[q(x, t)[
2
dx < .
87
13.2 Existence and uniqueness results. The variational formulation of the
instationary incompressible Navier-Stokes equations admits at least one solution. In
two space dimensions, this solution is unique. In three space dimensions, uniqueness
of the solution can only be guaranteed within a restricted class of more regular
functions. But, the existence of such a more regular solution cannot be guaranteed.
Any solution of the instationary incompressible Navier-Stokes equations behaves like

t for small times t. For larger times the smoothness with respect to time is better.
This singular behaviour for small times must be taken into account for the time-
discretization.
13.3 Numerical methods for ordinary dierential equations revisited. Be-
fore presenting the various discretization schemes for the time-dependent Navier-
Stokes equations, we shortly recapitulate some basic facts on numerical methods for
ordinary dierential equations.
Suppose that we have to solve an initial value problem
dy
dt
= F(y, t) , y(0) = y
0
(1)
in R
n
on the time interval (0, T).
We chose an integer N 1 and intermediate times 0 = t
0
< t
1
< . . . < t
N
= T and
set
i
= t
i
t
i1
, 1 i N. The approximation to y(t
i
) is denoted by y
i
.
The simplest and most popular method is the -scheme. It is given by
y
0
= y
0
,
y
i
y
i1

i
= F(y
i
, t
i
) + (1 )F(y
i1
, t
i1
), 1 i N,
where [0, 1] is a xed parameter. The choice = 0 yields the explicit Euler
scheme, = 1 corresponds to the implicit Euler scheme, and the choice =
1
2
gives the Crank-Nicolson scheme. The -scheme is implicit unless = 0. It is
A-stable provided
1
2
. The -scheme is of order 1, if ,=
1
2
, and of order 2, if
=
1
2
.
Another class of popular methods is given by the various Runge-Kutta schemes.
They take the form
y
0
= y
0
y
i,j
= y
i1
+
i
r

k=1
a
jk
F(t
i1
+c
k

i
, y
i,k
), 1 j r
y
i
= y
i1
+
i
r

k=1
b
k
F(t
i1
+c
k

i
, y
i,k
) , 1 i N,
88
where 0 c
1
... c
r
1. The number r is called stage number of the Runge-
Kutta scheme. The scheme is called explicit, if a
jk
= 0 for all k j, otherwise it is
called implicit.
For the ease of notation one usually collects the numbers c
k
, a
jk
, b
k
in a table of the
form
c
1
a
11
a
12
. . . a
1r
.
.
.
.
.
.
.
.
.
.
.
.
c
r
a
r1
a
r2
. . . a
rr
b
1
b
2
. . . b
r
.
The Euler and Crank-Nicolson schemes are Runge-Kutta schemes. They correspond
to the tables
0 0
1
1 1
1
0 0 0
1
1
2
1
2
1
2
1
2
.
expl. Euler impl. Euler Crank-Nicolson
Strongly diagonal implicit Runge-Kutta schemes (in short SDIRK schemes)
are particularly well suited for the discretization of time-dependent partial dierential
equations since they combine high order with good stability properties. The simplest
representatives of this class are called SDIRK 2 and SDIRK 5. They are both A-stable
and have orders 3 and 4, respectively. They are given by the data
3+

3
6
3+

3
6
0
3

3
6

3
3
3+

3
6
1
2
1
2
1
4
1
4
0 0 0 0
3
4
1
2
1
4
0 0 0
11
20
17
50

1
25
1
4
0 0
1
2
371
1360

137
2720
15
544
1
4
0
1
25
24

49
48
125
16

85
12
1
4
25
24

49
48
125
16

85
12
1
4
.
SDIRK 2 SDIRK 5
13.4 Method of lines. This is the simplest discretization scheme for time-depen-
dent partial dierential equations.
We chose a partition T of the spatial domain and associated nite element spaces
X(T ) and Y (T ) for the velocity and pressure, respectively. These spaces must satisfy
the inf-sup condition of 4.6. Then we replace in the variational formulation the
89
velocities u, v and the pressures p, q by discrete functions u
T
, v
T
and p
T
, q
T
which
depend upon time and which for every time t have their values in X(T ) and Y (T ),
respectively. Next, we chose a bases for the spaces X(T ) and Y (T ) and identify u
T
and p
T
with their coecient vectors with respect to the bases. Then we obtain the
following dierential algebraic equation for u
T
and p
T
du
T
dt
= f
T
A
T
u
T
B
T
p
T
N
T
(u
T
)
B
T
T
u
T
= 0.
Denoting by w
i
, 1 i dim X(T ), and r
j
, 1 j dim Y (T ), the bases functions
of X(T ) and Y (T ) respectively, the coecients of the stiness matrices A
T
and B
T
and of the vectors f
T
and N
T
(u
T
) are given by
A
T ij
=
_

w
i
(x) : w
j
(x)dx,
B
T ij
=
_

r
j
(x) div w
i
(x)dx,
f
T i
=
_

f (x, t) w
i
(x)dx,
N
T
(u
T
)
i
=
_

[(u(x, t) )u(x, t)] w


i
(x)dx.
Formally, this problem can be cast in the form (1) by working with test-functions
v
T
in the space V (T ) = v
T
X(T ) :
_

q
T
div v
T
dx = 0 for all q
T
Y (T ) of
discretely solenoidal functions. The function F in (1) is then given by
F(y, t) = f
T
A
T
y N
T
(y).
If we apply the -scheme and denote by u
i
T
and p
i
T
the approximate values of u
T
and p
T
at time t
i
, we obtain the fully discrete scheme
u
0
T
= I
T
u
0
u
i
T
u
i1
T

i
= B
T
p
i
T
+
_
f
T
(t
i
) A
T
u
i
T
N
T
(u
i
T
)
_
+ (1 )
_
f
T
(t
i1
) A
T
u
i1
T
N
T
(u
i1
T
)
_
B
T
T
u
i
T
= 0 , 1 i N,
where I
T
: H
1
0
()
n
X(T ) denotes a suitable interpolation operator (cf. 2.10).
90
The equation for u
i
T
, p
i
T
can be written in the form
1

i
u
i
T
+A
T
u
i
T
+B
T
p
i
T
+N
T
(u
i
T
) =g
i
B
T
T
u
i
T
=0
with
g
i
=
1

i
u
i1
T
+f
T
(t
i
) + (1 )
_
f
T
(t
i1
) A
T
u
i1
T
N
T
(u
i1
T
)
_
.
Thus it is a discrete version of a stationary incompressible Navier-Stokes equation.
Hence the methods of 11 can be used for its solution.
Due to the condition number of O(h
2
) of the stiness matrix A
T
, one must chose
the parameter
1
2
. Due to the singularity of the solution of the Navier-Stokes
equations at time 0, it is recommended to rst perform a few implicit Euler steps,
i.e. = 1, and then to switch to the Crank-Nicolson scheme, i.e. =
1
2
.
The main drawback of the method of lines is the xed (w.r.t. time) spatial mesh.
Thus singularities, which move through the domain in the course of time, cannot
be resolved adaptively. This either leads to a very poor approximation or to an
enormous overhead due to an excessively ne spatial mesh.
13.5 Rothes method. In the method of lines we rst discretize in space and
then in time. This order is reversed in Rothes method. We rst apply a -scheme or
a Runge-Kutta method to the instationary Navier-Stokes equations. This leaves us
in every time-step with a stationary Navier-Stokes equation.
For the -scheme, e.g., we obtain the problems
1

i
u
i
u
i
+(u
i
)u
i
grad p
i
= f (., t
i
) +
1

i
u
i1
+ (1 )f (., t
i1
) u
i1
+ (u
i1
)u
i1
in
div u
i
= 0 in
u
i
= 0 on .
The stationary Navier-Stokes equations are then discretized in space.
The main dierence to the methods of lines is the possibility to chose a dierent par-
tition and spatial discretization at each time-level. This obviously has the advantage
that we may apply an adaptive mesh-renement on each time-level separately. The
main drawback of Rothes method is the lack of a mathematically sound step-size
control for the temporal discretization. If we always use the same spatial mesh and
the same spatial discretization, Rothes method of course yields the same discrete
solution as the method of lines.
91
13.6 Space-time nite elements. This approach circumvents the drawbacks of
the method of lines and of Rothes method. When combined with a suitable space-
time adaptivity as described in the next section, it can be viewed as a Rothes method
with a mathematically sound step-size control in space and time.
To describe the method we chose as in 13.3 an integer N 1 and intermediate times
0 = t
0
< t
1
< . . . < t
N
= T and set
i
= t
i
t
i1
, 1 i N. With each time t
i
we associate a partition T
i
of the spatial domain and corresponding nite element
spaces X(T
i
) and Y (T
i
) for the velocity and pressure, respectively. These spaces must
satisfy the inf-sup condition of 4.6. We denote by u
i
T
X(T
i
) and p
i
T
Y (T
i
) the
approximations of the velocity and pressure, respectively at time t
i
. The discrete
problem is then given by
Find u
0
T
X(T
0
) such that
_

u
0
T
v
0
T
dx =
_

u
0
v
0
T
dx
for all v
0
T
X(T
0
) and determine u
i
T
X(T
i
) and p
i
T
Y (T
i
) for
i = 1, . . . , N successively such that
1

i
_

u
i
T
v
i
T
dx
+
_

u
i
T
: v
i
T
dx

p
i
T
div v
i
T
dx
+
_

[(u
i
T
)u
i
T
] v
i
T
dx =
1

i
_

u
i1
T
v
i
T
dx
+
_

f (x, t
i
) v
i
T
dx
+ (1 )
_

f (x, t
i1
) v
i
T
dx
+ (1 )
_

u
i1
T
: v
i
T
dx
+ (1 )
_

[(u
i1
T
)u
i1
T
] v
i
T
dx
_

q
i
T
div u
i
T
dx =0
holds for all v
i
T
X(T
i
) and q
i
T
Y (T
i
).
The parameter is chosen either equal to
1
2
or equal to 1. The parameter is chosen
92
either equal to or equal to 1.
Note, that u
0
T
is the L
2
-projection of u
0
onto X(T
0
) and that the right-hand side of
the equation for u
i
T
involves the L
2
-projection of functions in X(T
i1
) onto X(T
i
).
Roughly speaking, these projections make the dierence between the space-time nite
elements and Rothes method. Up to these projections one also recovers the method
of lines when all partitions and nite element spaces are xed with respect to time.
On each time-level we have to solve a discrete version of a stationary Navier-Stokes
equation. This is done with the methods of 11.
13.7 The transport-diusion algorithm. This method is based on the obser-
vation that due to the transport theorem of 1.3 the term
u
t
+ (u )u
is the material derivative along the trajectories of the ow. Therefore
_
u
t
+ (u )u
_
(x, t)
is approximated by the backward dierence
u(x, t) u(y(t ), t )

where s y(s) is the trajectory which passes at time t through the point x. The
remaining terms are approximated in a standard nite element way.
To describe the algorithm more precisely, we retain the notations of the previous
sub-section and introduce in addition on each partition T
i
a quadrature formula
_

dx

xQ
i

x
(x)
which is exact at least for piecewise constant functions. The most important examples
are given by
Q
i
the barycentres x
K
of the elements in T
i
,
x
K
=[K[,
Q
i
the vertices xin T
i
,
x
= [
x
[,
Q
i
the midpoints x
E
of the edges in T
i
,
x
E
=[
E
[.
Here, [[ denotes the area, if n = 2, or the volume, if n = 3, of a set R
n
and

x
and
E
are the unions of all elements that share the vertex x or the edge E
respectively (cf. 2.9, 2.11).
93
With these notations the transport-diusion algorithm is given by:
Find u
0
T
X(T
0
) such that

xQ
0

x
u
0
T
(x) v
0
T
(x) =

xQ
0

x
u
0
(x) v
0
T
(x)
for all v
0
T
X(T
0
). For i = 1, . . . , N successively, solve the initial
value problems (transport step)
dy
x
(t)
dt
= u
i1
T
(y
x
(t), t) for t
i1
< t < t
i
y
x
(t
i
) = x
for all x Q
i
and nd u
i
T
X(T
i
) and p
i
T
Y (T
i
) such that
(diusion step)
1

xQ
i

x
u
i
T
(x) v
i
T
(x)
+
_

u
i
T
: v
i
T
dx

p
i
T
div v
i
T
dx =
1

xQ
i

x
u
i1
T
(y
x
(t
i1
)) v
i
T
(x)
+
_

f (x, t
i
) v
i
T
dx
+ (1 )
_

f (x, t
i1
) v
i
T
dx
+ (1 )
_

u
i1
T
: v
i
T
dx
_

q
i
T
div u
i
T
dx =0
holds for all v
i
T
X(T
i
) and q
i
T
Y (T
i
).
In contrast to the previous algorithms we now only have to solve discrete Stokes
problems at the dierent time-levels. This is the reward for the necessity to solve the
initial value problems for the y
x
and to evaluate functions in X(T
i
) at the points
y
x
(t
i1
) which are not nodal degrees of freedom.
94
14. Space-time adaptivity
14.1 Overview. When compared to adaptive discretizations of stationary prob-
lems an adaptive discretization scheme for instationary problems requires some ad-
ditional features:
We need an error estimator which gives upper and lower bounds on the total
error, i.e. on both the errors introduced by the spatial and the temporal dis-
cretization.
The error estimator must allow a distinction between the temporal and spatial
part of the error.
We need a strategy for adapting the time-step size.
The renement strategy for the spatial discretization must also allow the coars-
ening of elements in order to take account of singularities which in the course of
time move through the spatial domain.
For the Navier-Stokes equations some special diculties arise in addition:
The velocities are not exactly solenoidal. This introduces an additional consis-
tency error which must be properly estimated and balanced.
The convection term may be dominant. Therefore the a posteriori error estima-
tors must be robust, i.e. the ratio of upper and lower error bounds must stay
bounded uniformly with respect to large values of Re|u|
1
or
1

|u|
1
.
14.2 A residual a posteriori error estimator. The error estimator now con-
sists of two components: a spatial part and a temporal one. The spatial part is a
straightforward generalization of the residual estimator of 12.2 for the stationary
Navier-Stokes equation. With the notations of 13.6 the spatial contribution on time-
level i is given by

i
h
=
_

KT
i
h
2
K
|f (., t
i
) + (1 )f (., t
i1
)
u
i
T
u
i1
T

i
+u
i
T
+ (1 )u
i1
T
p
i
T
(u
i
T
)u
i
T
(1 )(u
i1
T
)u
i1
T
|
2
L
2
(K)
+

KT
i
| div u
i
T
|
2
L
2
(K)
+

EE
T
i
h
E
|[n
E
(u
i
T
+ (1 )u
i1
T
p
i
T
I)]
E
|
2
L
2
(E)
_
1/2
.
Recall that c
T
i
denotes the set of all interior edges, if n = 2, respectively interior
faces, if n = 3, in T
i
.
95
In order to obtain a robust estimator, we have to invest some work in the computation
of the temporal part of the estimator. For this part we have to solve on each time-level
the following discrete Poisson equations:
Find u
i
T
S
1,0
0
(T
i
)
n
such that

u
i
T
: v
i
T
dx =
_

[((u
i
T
+ (1 )u
i1
T
) )(u
i
T
u
i1
T
)] v
i
T
dx
holds for all u
i
T
S
1,0
0
(T
i
)
n
.
The temporal contribution of the error estimator on time-level i then is given by

=
_
[u
i
T
u
i1
T
[
2
1
+[ u
i
T
[
2
1
+

KT
i
h
2
K
|((u
i
T
+ (1 )u
i1
T
) )(u
i
T
u
i1
T
) + u
i
T
|
2
L
2
(K)
+

EE
T
i
h
E
|[ u
i
T
]
E
|
2
L
2
(E)
_
1/2
.
With these ingredients the residual a posteriori error estimator for the instationary
incompressible Navier-Stokes equations takes the form
_
N

i=1

i
_
_

i
h
_
2
+
_

_
2
_
_
1/2
.
14.3 Time adaptivity. Assume that we have solved the discrete problem up to
time-level i 1 and that we have computed the error estimators
i1
h
and
i1

. Then
we set
t
i
=
_
_
_
minT, t
i1
+
i1
if
i1


i1
h
,
minT, t
i1
+ 2
i1
if
i1


1
2

i1
h
.
In the rst case we retain the previous time-step; in the second case we try a larger
time step.
Next, we solve the discrete problem on time-level i with the current value of t
i
and
compute the error estimators
i
h
and
i

.
If
i


i
h
, we accept the current time-step and continue with the space adaptivity,
which is described in the next sub-section.
96
If
i

2
i
h
, we reject the current time-step. We replace t
i
by
1
2
(t
i1
+t
i
) and repeat
the solution of the discrete problem on time-level i and the computation of the error
estimators.
The described strategy obviously aims at balancing the two contributions
i
h
and
i

of the error estimator.


14.4 Space adaptivity. For time-dependent problems the spatial adaptivity must
also allow for a local mesh coarsening. Hence, the marking strategies of 9.5 must be
modied accordingly.
Assume that we have solved the discrete problem on time-level i with an actual
time-step
i
and an actual partition T
i
of the spatial domain and that we have
computed the estimators
i
h
and
i

. Moreover, suppose that we have accepted the


current time-step and want to optimize the partition T
i
.
We may assume that T
i
currently is the nest partition in a hierarchy T
0
i
, . . . , T

i
of
nested, successively rened partitions, i.e. T
i
= T

i
and T
j
i
is a (local) renement of
T
j1
i
, 1 j .
Now, we go back m generations in the grid-hierarchy to the partition T
m
i
. Due
to the nestedness of the partitions, each element K T
m
i
is the union of several
elements K

T
i
. Each K

gives a contribution to
i
h
. We add these contributions
and thus obtain for every K T
m
i
an error estimator
K
. With these estimators
we then perform M steps of the marking strategy of 9.5. This yields a new partition
T
m+M
i
which usually is dierent from T
i
. We replace T
i
by this partition, solve the
corresponding discrete problem on time-level i and compute the new error estimators

i
h
and
i

.
If the newly calculated error estimators satisfy
i
h

i

, we accept the current parti-


tion T
i
and proceed with the next time-level.
If
i
h
2
i

, we successively rene the partition T


i
as described in 9 with the
i
h
as
error estimators until we arrive at a partition which satises
i
h

i

. When this goal


is achieved we accept the spatial discretization and proceed with the next time-level.
Typical values for the parameters m and M are 1 m 3 and m M m+ 2.
97
15. Discretization of compressible and inviscid problems
15.1 Systems in divergence form. In this section we consider problems of the
following form: Given a domain R
n
with n = 2 or n = 3, an integer m n, a
vector eld g : R
m
(0, ) R
m
, a vector eld M : R
m
R
m
, a tensor
eld F : R
m
R
mn
, and a vector eld U
0
: R
m
, we are looking for a vector
eld U : (0, ) R
m
such that
M(U)
t
+ div F(U) = g(U, x, t) in (0, )
U(., 0) = U
0
in .
Such a problem, which has to be complemented with suitable boundary conditions,
is called a system (of dierential equations) in divergence form.
Note, that the divergence is taken row-wise, i.e.
div F(U) =
_
_
n

j=1
F(U)
i,j
x
j
_
_
1im.
The tensor eld F is called the ux of the system. It is often split into an advective
ux F
adv
which contains no derivatives and a viscous ux F
visc
which contains
spatial derivatives, i.e
F = F
adv
+F
visc
.
The compressible Navier-Stokes equations and the Euler equations (with = 0) of
1.9, 1.10 t into this framework. For both equations we have
m = n + 2
U = (, v, e)
T
M(U) =
_
_

v
e
_
_
F
adv
(U) =
_
_
v
v v +pI
ev +pv
_
_
g =
_
_
0
f
f v
_
_
.
98
For the Navier-Stokes equations the viscous forces yield a viscous ux
F
visc
(U) =
_
_
0
T+pI
(T+pI) v +[cr
_
_
.
These equations are complemented by the constitutive equations for p, T, and
given in 1.
15.2 Finite volume schemes. Finite volume schemes are particularly suited for
the discretization of systems in divergence form.
To describe the idea in its simplest form, we chose a time-step > 0 and a partition
T of the domain . The partition may consist of arbitrary polyhedrons. From 2.6 we
only retain the condition that the sub-domains must not overlap.
In a rst step, we x an i and an element K T . Then we integrate the system over
the set K [(i 1), i]. This yields
_
i
(i1)
_
K
M(U)
t
dxdt +
_
i
(i1)
_
K
div F(U)dxdt =
_
i
(i1)
_
K
g(U, x, t)dxdt.
Using the integration by parts formulae of 2.3, we obtain for the left-hand side
_
i
(i1)
_
K
M(U)
t
dxdt =
_
K
M(U(x, i))dx
_
K
M(U(x, (i 1)))dx
_
i
(i1)
_
K
div F(U)dxdt =
_
i
(i1)
_
K
F(U) n
K
dSdt,
where n
K
denotes the exterior unit normal of K.
Now, we assume that Uis piecewise constant with respect to space and time. Denoting
by U
i
K
and U
i1
K
its constant values on K at times i and (i 1) respectively, we
obtain
_
K
M(U(x, i))dx [K[M(U
i
K
)
_
K
M(U(x, (i 1)))dx [K[M(U
i1
K
),
where [K[ denotes the area, if n = 2, respectively volume, if n = 3, of the element K.
Next we approximate the ux term
_
i
(i1)
_
K
F(U) n
K
dSdt
_
K
F(U
i1
K
) n
K
dS.
The right-hand side is approximated by
_
i
(i1)
_
K
g(U, x, t)dxdt [K[g(U
i1
K
, x
K
, (i 1)),
99
where x
K
denotes an a priori xed point in K, e.g. its barycentre.
Finally, we approximate the boundary integral for the ux by a numerical ux

_
K
F(U
i1
K
) n
K
dS

T
KK

E
T
[K K

[F
T
(U
i1
K
, U
i1
K

),
where c
T
denotes the set of all edges, if n = 2, respectively faces, if n = 3, in T and
where [K K

[ is the length respectively area of the common edge or face of K


and K

.
With these approximations the simplest nite volume scheme for a system in
divergence form is given by
For every element K T compute
U
0
K
=
1
[K[
_
K
U
0
(x)dx.
For i = 1, 2, . . . successively compute for all elements K T
M(U
i
K
) =M(U
i1
K
)

T
KK

E
T
[K K

[
[K[
F
T
(U
i1
K
, U
i1
K

)
+g(U
i1
K
, x
K
, (i 1)).
For a concrete nite volume scheme we of course have to specify
the partition T and
the numerical ux F
T
.
This will be the subject of the following sections.
Remark 1: In practice one works with a variable time-step and variable partitions.
To this end one choses an increasing sequence 0 = t
0
< t
1
< t
2
< . . . of times and
associates with each time t
i
a partition T
i
of . Then is replaced by
i
= t
i
t
i1
and K and K

are elements in T
i1
or T
i
. Moreover one has to furnish an interpolation
operator which maps piecewise constant functions with respect to one partition to
piecewise constant functions with respect to another partition.
15.3 Construction of the partitions. An obvious possibility is to construct a
nite volume partition T in the same way as a nite element partition. In practice,
however, one prefers so-called dual meshes.
100
To describe the idea, we consider the two-dimensional case, i.e. n = 2. We start from
a standard nite element partition

T which satises the conditions of 2.6. Then we
subdivide each element

K

T into smaller elements by either
drawing the perpendicular bisectors at the midpoints of edges of

K (cf. Fig. 15.1)
or by
connecting the barycentre of

K with its midpoints of edges (cf. Fig. 15.2).
Then the elements in T consist of the unions of all small elements that share a
common vertex in the partition

T .
Fig. 15.1: dual mesh via perpendicular bisectors
Fig. 15.2: dual mesh via barycentres
Thus the elements in T can be associated with the vertices in ^
T
. Moreover, we
may associate with each edge in c
T
exactly two vertices in ^
T
such that the line
connecting these vertices intersects the given edge.
The rst construction has the advantage that this intersection is orthogonal. But
this construction also has some disadvantages which are not present with the second
construction:
The perpendicular bisectors of a triangle may intersect in a point outside the
triangle. The intersection point is within the triangle only if its largest angle is
at most a right one.
The perpendicular bisectors of a quadrilateral may not intersect at all. They
intersect in a common point inside the quadrilateral only if it is a rectangle.
The rst construction has no three dimensional analogue.
15.4 Relation to nite element methods. The fact that the elements of a
dual mesh can be associated with the vertices of a nite element partition gives a
link between nite volume and nite element methods: Consider a function that
is piecewise constant on the dual mesh T , i.e. S
0,1
(T ). With we associate a
101
continuous piecewise linear function S
1,0
(

T ) corresponding to the nite element


partition

T such that (x
K
) =
K
for the vertex x
K
^
T
corresponding to K T .
This link sometimes considerably simplies the analysis of nite volume methods.
For example it suggests a very simple and natural approach to a posteriori error
estimation and mesh adaptivity for nite volume methods:
Given the solution of the nite volume scheme compute the corresponding
nite element function .
Apply a standard a posteriori error estimator to .
Given the error estimator apply a standard mesh renement strategy to the nite
element mesh

T and thus construct a new, locally rened partition

T .
Use

T to construct a new dual mesh T

. This is the renement of T .


15.5 Construction of the numerical uxes. In order to construct the numerical
ux F
T
(U
i1
K
, U
i1
K

) corresponding to the common boundary of two elements K and


K

in a nite volume partition, we split K K

into straight edges, if n = 2, or


plane faces, if n = 3.
Consider such an edge respectively face E. To simplify the notation, we denote the
adjacent elements by K
1
and K
2
and write U
1
and U
2
instead of U
i1
K
1
and U
i1
K
2
,
respectively.
We assume that T is the dual mesh to a nite element partition

T as described in
15.3. Denote by x
1
and x
2
the two vertices in ^
T
such that their connecting line
intersects E.
In order to construct the contribution of E to the numerical ux F
T
(U
1
, U
2
), we
split the ux in an advective part F
T adv
(U
1
, U
2
) and a viscous part F
T visc
(U
1
, U
2
)
similar to the splitting of the analytical ux F.
For the viscous part of the numerical ux we introduce a local coordinate system

1
, . . . ,
n
such that the direction
n
is parallel to the direction x
1
x
2
and such that the
other directions are tangential to E. Note, that in general x
1
x
2
will not be orthogonal
to E. Then we express all derivatives in F
visc
in tems of the new coordinate system,
suppress all derivatives not involving
n
, and approximate derivatives with respect to

n
by dierence quotients of the form

1

2
x
1
x
2

. Here, |x
1
x
2
| denotes the Euclidean
distance of the two points x
1
and x
2
.
For the advective part of the numerical ux we need some additional notations.
Consider an arbitrary vector V R
m
. Denote by D(F
adv
(V) n
K
1
) R
mm
the
derivative of F
adv
(V) n
K
1
with respect to V. One can prove that for many systems
in divergence form including the compressible Navier-Stokes and Euler equations
this matrix can be diagonalized. I.e. there is an invertible m m matrix Q(V) and
a diagonal mm matrix (V) such that
Q(V)
1
D(F
adv
(V) n
K
1
)Q(V) = (V).
The entries of (V) are of course the eigenvalues of D(F
adv
(V) n
K
1
).
102
For any real number z we set
z
+
= maxz, 0 , z

= minz, 0
and dene
(V)

=
_
_
_
_
(V)

11
0 . . . 0
0 (V)

22
. . . 0
.
.
.
.
.
.
.
.
.
0 0 . . . (V)

mm
_
_
_
_
and
C(V)

= Q(V)(V)

Q(V)
1
.
With these notations, the Steeger-Warming approximation of the advective ux is
given by
F
T
(U
1
, U
2
) = C(U
1
)
+
U
1
+C(U
2
)

U
2
.
Another popular numerical ux is the van Leer approximation which is given by
F
T
(U
1
, U
2
) =
_
C(U
1
) +C(
1
2
(U
1
+U
2
))
+
C(
1
2
(U
1
+U
2
))

_
U
1
+
_
C(U
2
) C(
1
2
(U
1
+U
2
))
+
+C(
1
2
(U
1
+U
2
))

_
U
2
.
In both schemes one has to compute the derivatives DF
adv
(V) n
K
1
and their eigen-
values and their eigenvectors for suitable values of V. At rst sight the van Leer
scheme seems to be more costly than the Steeger-Warming scheme since it requires
three evaluations of C(V) instead of two. For the compressible Navier-Stokes and Eu-
ler equations, however, this can be reduced to one evaluation since for these equations
F
adv
(V) n
K
1
= C(V)V holds for all V.
103

Você também pode gostar