This action might not be possible to undo. Are you sure you want to continue?
Burgerscentrum
Research School for Fluid Mechanics
Finite element methods for
the incompressible NavierStokes equations
Ir. A. Segal
2008
Delft University of Technology
Faculty of Electrical Engineering, Mathematics and Computer Science
Delft Institute of Applied Mathematics
Copyright © 2008 by Delft Institute of Applied Mathematics, Delft, The Netherlands.
No part of this work may be reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without
the prior written permission from Delft Institute of Applied Mathematics, Delft University
of Technology, The Netherlands.
Contents
1 Introduction 5
2 Introduction to the ﬁnite element method 8
2.1 Diﬀerential equations and boundary conditions . . . . . . . . . . . . . . . . . 8
2.2 Weak formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 The Galerkin method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 The ﬁnite element method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5 Computation of the element matrix and element vector . . . . . . . . . . . . 15
2.6 Higher order elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.7 Structure of the large matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3 Convectiondiﬀusion equation by the ﬁnite element method 22
3.1 Formulation of the equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2 Standard Galerkin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3 Solution of the system of ordinary diﬀerential equations . . . . . . . . . . . . 24
3.4 Accuracy aspects of the SGA . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.5 Streamline Upwind Petrov Galerkin . . . . . . . . . . . . . . . . . . . . . . . 30
3.6 Some classical benchmark problems for convectiondiﬀusion solvers . . . . . . 35
4 Discretization of the incompressible NavierStokes equations by standard
Galerkin 39
4.1 The basic equations of ﬂuid dynamics . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Initial and boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3 Axisymmetric ﬂow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.4 The weak formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.5 The standard Galerkin method . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.6 Treatment of the nonlinear terms . . . . . . . . . . . . . . . . . . . . . . . . 46
4.7 Necessary conditions for the elements . . . . . . . . . . . . . . . . . . . . . . . 48
4.8 Examples of admissible elements . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.9 Solution of the system of linear equations due to the discretization of Navier
Stokes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5 The penalty function method 56
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.2 The discrete penalty functions approach . . . . . . . . . . . . . . . . . . . . . 57
5.3 The continuous penalty function method . . . . . . . . . . . . . . . . . . . . . 58
5.4 Practical aspects of the penalty function method . . . . . . . . . . . . . . . . 60
6 Divergencefree elements 62
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.2 The construction of divergencefree basis functions for 2D elements . . . . . . 63
6.3 The construction of element matrices and vectors for (approximate) divergence
free basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.4 Boundary conditions with respect to the divergencefree elements . . . . . . . 69
6.5 Computation of the pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
6.6 Practical aspects of the divergencefree elements . . . . . . . . . . . . . . . . 71
3
7 The instationary NavierStokes equations 72
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
7.2 Solution of the instationary NavierStokes equations by the method of lines . 72
7.3 The pressurecorrection method . . . . . . . . . . . . . . . . . . . . . . . . . . 74
A Derivation of the integration by parts for the momentum equations 78
4
1 Introduction
In this second course on numerical ﬂow problems we shall focus our attention to two speciﬁc
subjects:
 the solution of the incompressible NavierStokes equations by ﬁnite elements;
 the eﬃcient solution of large systems of linear equations.
Although, at ﬁrst sight there seems no connection between both subjects, it must be remarked
that the numerical solution of partial diﬀerential equations and hence also of the NavierStokes
equations, always results in the solving of a number of large systems of sparse linear systems.
Since, in general the solution of these systems and the storage of the corresponding matrices
take the main part of the resources (CPU time and memory), it is very natural to study
eﬃcient solution methods.
In the ﬁrst part of these lectures we shall be concerned with the discretization of the incom
pressible NavierStokes equations by the ﬁnite element method (FEM). First we shall give a
short introduction of the FEM itself. The application of the FEM to potential problems is
considered and the extension to convectiondiﬀusion type problems is studied. The Galerkin
method is introduced as a natural extension of the socalled weak formulation of the partial
diﬀerential equations. One of the reasons why ﬁnite elements have been less popular in the
past than ﬁnite diﬀerences, is the lack of upwind techniques. In the last decade, however,
accurate upwind methods have been constructed. The most popular one, the socalled stream
line upwind PetrovGalerkin method (SUPG), will be treated in Chapter 3. It is shown that
upwinding may increase the quality of the solution considerably. Another important aspect of
upwinding is that it makes the systems of equations more appropriate for the iterative meth
ods treated in part II. As a consequence both the number of iterations and the computation
time decrease.
In Chapter 4 the discretization of the incompressible NavierStokes equations is considered.
Since the pressure is an unknown in the momentum equations but not in the continuity equa
tion, the discretization must satisfy some special requirements. In fact one is no longer free to
choose any combination of pressure and velocity approximation but the ﬁnite elements must
be constructed such that the socalled BrezziBabuˇska (or BB) condition is satisﬁed. This
condition makes a relation between pressure and velocity approximation. In ﬁnite diﬀerences
and ﬁnite volumes the equivalent of the BB condition is satisﬁed if staggered grids are ap
plied. Even if the BB condition is satisﬁed we are still faced with a problem with respect to
the solution of the linear systems of equations. The absence of the pressure in the continuity
equation induces zeros at some of the diagonal elements of the matrix. In general linear
solvers may be inﬂuenced by such zeros, some iterative solvers even do not allow nonpositive
diagonal elements. For that reason alternative solution methods have been developed, which
all try to segregate the pressure and velocity computation.
Chapter 5 treats the most popular segregated method, the socalled penalty function formu
lation. In this approach the continuity equation is perturbed with a small compressibility
including the pressure.
From this perturbed equation the pressure is expressed in terms of velocity and this is sub
stituted into the momentum equations. In this way the velocity can be computed ﬁrst and
afterwards the pressure. A disadvantage of this method is that the perturbation parameter
5
introduces extra complications.
In Chapter 6 an alternative formulation is derived, the socalled solenoidal approach. In this
method, the elements are constructed in such a way that the approximate divergence freedom
is satisﬁed explicitly. To that end it is necessary to introduce the stream function as help
unknown. This method seems very attractive, however, the extension to threedimensional
problems is very diﬃcult.
Finally, in Chapter 7, methods for the timedependent incompressible NavierStokes equa
tions are treated. For this type of methods an alternative segregation is possible, the socalled
pressurecorrection method. This method is also popular in ﬁnite diﬀerences and ﬁnite vol
umes.
In the second part we consider the eﬃcient solution of large system of linear equations. As
applications and examples we mostly use systems of equations resulting from the discretiza
tion of 2 and 3 dimensional partial diﬀerential equations.
We start in Chapter 2.1 by considering direct methods as there are: Gaussian elimination
and Cholesky decomposition. These methods are used if the dimension of the system is not
too large. Since these methods are implemented on computers we consider the behavior of
the methods with respect to rounding errors. For large problems the memory requirements
of direct methods are a bottle neck, using special methods for banded, proﬁle or ”general
sparse” matrices we can solve much larger systems. These methods only use the non zero
part of the resulting decomposition.
In Chapter 2 we consider classical iterative methods for linear equations. These methods are
very cheap with respect to memory requirements. However, convergence can be very slow so
the computing time may be much larger than for direct methods.
In Chapter 3 and 4 we consider modern iterative methods of Krylov subspace type. In Chapter
3 the conjugate gradient method for symmetric positive deﬁnitive matrices, and in Chapter 4
Krylov methods for general matrices. The rate of convergence is much better than for basic
iterative methods, whereas no knowledge of the spectrum is needed in contrast with some
basic iterative methods. A drawback for general matrices is that there are many methods
proposed and until now there is no clear winner. We shall summarize the most successful
ones and try to give some guidelines for choosing a method depending on the properties of
the problem.
The Krylov subspace methods become much faster if they are combined with a preconditioner.
For the details we refer to Chapter 5. We only note that in essence a preconditioned Krylov
method is a combination of a method given in chapter 3 and 4 and a basic iterative method
or an incomplete direct method.
In many applications eigenvalues give information of physical properties (like eigenmodes) or
they are used to analyze, and enhance mathematical methods for solving a physical problem.
If only a small number of eigenvalues are needed for a very large matrix it is a good idea to
use iterative methods, which are given in Chapter 6. We start with the Power method which
is easy to understand, and approximate the largest eigenvalue. Thereafter we consider the
Lanczos method for symmetric matrices, which is closely related to the CG method. Again
for general matrices diﬀerent methods are proposed and it is not always clear, which one is
6
the best.
Finally in Chapter 7 we give a summary of present day supercomputers. There are mainly
two types: vector and parallel computers. For the problems considered in this report super
computers are necessary to obtain results for large 3 dimensional problems. At this moment
vector computers give the best results, with respect to computing time and memory. However,
we expect that in the near future parallel computers (especially those based on a clustering
of very fast nodes) will beat them for real live problems.
7
2 Introduction to the ﬁnite element method
2.1 Diﬀerential equations and boundary conditions
The ﬁnite element method (FEM) may be considered as a general discretization tool for
partial diﬀerential equations. In this sense the FEM forms an alternative for ﬁnite diﬀerence
methods (FDM) or ﬁnite volume methods (FVM). The main reason to use the FEM is its
ability to tackle relatively easily, problems that are deﬁned on complex geometries. However,
the programming of ﬁnite element methods is more complicated than that of ﬁnite diﬀerences,
and hence in general requires standard software packages.
In this lecture we shall restrict ourselves to the application of the FEM to two general types of
diﬀerential equations: the convectiondiﬀusion equation and the incompressible NavierStokes
equations. The last type of equations are the subject of Chapter 4, and convectiondiﬀusion
type of equations will be the subject of Chapter 3. In this introductory chapter we shall
neglect the convective terms and focus ourselves to diﬀusion type problems:
ρ
∂c
∂t
−
n
¸
i,j=1
∂
∂x
i
a
ij
∂c
∂x
j
+βc = f (2.1)
where c denotes the unknown, for example the potential, temperature or concentration. The
matrix A with elements a
ij
represents the diﬀusion tensor and is supposed to be symmetric
and positive deﬁnite. The coeﬃcient β is zero in many practical problems, but is added for
the sake of generality. f represents a source term and ρ
∂c
∂t
the timederivative part, where
ρ must be positive in the instationary case. All coeﬃcients ρ, a
ij
, β and f may depend on
time and the space variable x. n is the dimension of space which in our applications varies
from 1 to 3.
If the coeﬃcients also depend on the solution, the equations become nonlinear. In this
chapter we restrict ourselves to linear problems only.
Equation 2.1 is usually written in vector notation:
ρ
∂c
∂t
−div (A∇c) +βc = f, (2.2)
where ∇ denotes the gradient operator.
In this chapter we shall only consider stationary problems, so equation (2.2) reduces to
−div(A∇c) +βc = f (2.3)
In order that equation (2.3) has a unique solution, and to make the problem well posed it is
necessary to prescribe exactly one boundary condition at each part of the boundary. In the
sequel the region at which the diﬀerential equation is deﬁned is called Ω and its boundary is
denoted by Γ. Common boundary conditions in equation (2.3) are:
c = g
1
on Γ
1
, (2.4)
A∇c · n = g
2
on Γ
2
, (2.5)
σc +A∇c · n = g
3
on Γ
3
(σ ≥ 0), (2.6)
8
where the boundary Γ is subdivided into three parts Γ
1
, Γ
2
and Γ
3
.
Boundary conditions of type (2.4) are called Dirichlet boundary conditions, boundary con
ditions of type (2.5) Neumann conditions and boundary conditions of type (2.6) are called
Robbins boundary conditions. In fact (2.5) may be considered as a special case of (2.6).
Other types of boundary conditions may also be applied, but they will not be studied in this
lecture.
It can be shown that equation (2.3) with boundary conditions (2.4) to (2.6) has a unique so
lution provided the coeﬃcients and the boundary of the region are suﬃciently smooth. Only
in the special case Γ
1
= φ, Γ
3
= φ and β = 0, the function ϕ is determined up to an additive
constant. In that case the functions f and g
2
must satisfy the compatibility condition
Ω
f dΩ = −
Γ
g
2
dΓ . (2.7)
(2.7) can be derived by integrating equation (2.3) over the domain Ω and applying the Gauss
divergence theorem.
2.2 Weak formulation
Before applying the FEM to solve equation (2.3) under the boundary conditions (2.4) to (2.6),
it is necessary to transform the equation into a more suitable form. To do that there are two
alternatives:
1. one can derive an equivalent minimization problem, which has exactly the same solution
as the diﬀerential equation.
2. one can derive a socalled weak formulation.
Both methods lead ﬁnally to exactly the same result, however, since for the general equations
to be treated in Chapters 2 and 4, no equivalent minimization problem exists, we shall restrict
ourselves to method 2.
Originally the weak formulation has been introduced by pure mathematicians to investigate
the behavior of the solution of partial diﬀerential equations, and to prove existence and
uniqueness of the solution. Later on numerical schemes have been based on this formulation
which lead to an approximate solution in a constructive way.
The weak formulation of equation (2.3) can be derived by multiplying (2.3) by a socalled
test function v and integrating over the domain. So:
Ω
(−div(A∇c) +βc) v dΩ =
Ω
fv dΩ . (2.8)
The choice of the class of functions to which v belongs, determines whether (2.8) has a solution
and whether this solution is unique.
It is common practice to apply integration by parts to equation (2.8) in order to get rid of
the second derivative term. integration by parts is derived by applying the Gauss divergence
theorem:
Ω
div a dΩ =
Γ
a · n dΓ (2.9)
9
to the function
a = v A∇c . (2.10)
Hence
div a = div(vA∇c) = ∇v · A∇c +vdiv A∇c . (2.11)
Substitution of (2.11) in (2.9) yields
Ω
vdiv A∇c dΩ = −
Ω
∇v · A ∇c dΩ +
Γ
v A∇c · ndΓ (2.12)
and so (2.8) can be written as
Ω
{A∇c · ∇v +βcv} dΩ −
Γ
vA∇c · ndΓ =
Ω
fvdΩ . (2.13)
The boundary conditions (2.4) to (2.6) are applied by evaluating the boundary integral at
(2.13) if possible. This boundary integral can be subdivided into three parts:
Γ
vA∇c · ndΓ =
Γ
1
vA∇c · ndΓ +
Γ
2
vA∇c · ndΓ +
Γ
3
vA∇c · ndΓ . (2.14)
On boundary Γ
1
we have the boundary condition c = g
1
. Since this boundary condition can
not be incorporated explicitly in (2.14) we demand that the function c in (2.13) satisﬁes (2.4)
and furthermore in order to get rid of the boundary integral over Γ
1
:
v = 0 at Γ
1
. (2.15)
On boundary Γ
2
we can substitute the boundary condition (2.5) and the same is true for
boundary Γ
3
. For that reason we do not demand anything for the solution c or the test
function v at these boundaries.
The boundary condition (2.4) is called essential, since it should be satisﬁed explicitly. The
boundary conditions (2.5), (2.6) are called natural, since they are implicitly satisﬁed by the
formulation. These terms are in ﬁrst instance motivated by the corresponding minimization
problem.
The weak formulation corresponding to equation (2.3) under the boundary conditions (2.4)
to (2.6) now becomes:
ﬁnd c with c
Γ
1
= g
1
such that
Ω
{A∇c · ∇v +βcv} dΩ +
Γ
3
σ cv dΓ =
Ω
fv dΩ +
Γ
2
g
2
v dΓ +
Γ
3
g
3
v dΓ , (2.16)
for all functions v satisfying v
Γ
1
= 0.
Furthermore it is necessary to demand some smoothness requirements for the functions c and
v. One can prove that it is suﬃcient to require that all integrals in (2.16) exist, which means
that both ∇c and ∇v must be square integrable.
We see in this expression that an essential boundary condition automatically implies that the
10
corresponding test function is equal to zero, whereas the natural boundary conditions do not
impose any condition either to the unknown or to the test function. It is not immediately
clear whether a boundary condition is essential or natural, except in the case where we have a
corresponding minimization problem. In general, however, one can say that for second order
diﬀerential equations, all boundary conditions containing ﬁrst derivatives are natural, and a
given function at the boundary is essential.
In fourth order problems the situation is more complex. However, for physical problems, in
general, one can state that if the boundary conditions contain second or third derivatives
they are natural, whereas boundary conditions containing only the function or ﬁrst order
derivatives are essential. The easiest way to check whether a boundary condition is essential
or natural is to consider the boundary integrals. If in some way the boundary condition can
be substituted, the boundary condition is natural. Otherwise the condition is essential and
the test functions must be chosen such that the boundary integral vanishes.
2.3 The Galerkin method
Formulation (2.16) is one of the various possible weak formulations. However, it is the most
common one and also the most suitable for our purpose. In the FEM we use formulation (2.16)
instead of (2.3)(2.6) to derive the discretization. Starting point is the socalled Galerkin
method. In this method the solution c is approximated by a linear combination of expansion
functions the socalled basis functions:
c
n
(x) =
n
¸
j=1
c
j
ϕ
j
(x) +c
0
(x) (2.17)
where the parameters c
j
are to be determined. The basis functions ϕ
j
(x) must be linearly
independent.
Furthermore they must be such that an arbitrary function in the solution space can be ap
proximated with arbitrary accuracy, provided a suﬃcient number of basis functions is used
in the linear combination (2.17). The function c
0
(x) must be chosen such that c
n
(x) satisﬁes
the essential boundary conditions. In general this means that
c
0
(x) = g at Γ
1
(2.18)
ϕ
j
(x) = 0, at Γ
1
(2.19)
In order to determine the parameters c
j
(j = 1, 2, ..., n) the test functions v are chosen in the
space spanned by the basis functions ϕ
1
(x) to ϕ
n
(x).
It is suﬃcient to substitute
v(x) = ϕ
i
(x) i = 1(1)n (2.20)
into equations (2.16). This leads to a linear system of n equations with n unknowns. The
choice (2.20) implies immediately that v satisﬁes the essential boundary conditions for v.
After substitution of (2.17) and (2.20) into (2.16) we get the socalled Galerkin formulation
Ω
{A∇c
n
· ∇ ϕ
i
+β c
n
ϕ
i
} dΩ +
Γ
3
σc
n
ϕ
i
dΓ
=
Ω
f ϕ
i
dΩ +
Γ
2
g
2
ϕ
i
dΓ +
Γ
3
g
3
ϕ
i
dΓ , (2.21)
11
with c
n
=
n
¸
j=1
c
j
ϕ
j
+c
0
.
Hence
n
¸
j=1
c
j
Ω
{A∇ϕ
j
· ∇ϕ
i
+β ϕ
i
ϕ
j
}dΩ +
Γ
3
σ ϕ
j
ϕ
i
dΓ
=
Ω
f ϕ
i
dΩ +
Γ
2
g
2
ϕ
i
dΓ +
Γ
3
g
3
ϕ
i
dΓ −
Ω
{A∇c
0
· ∇ ϕ
i
+β c
0
ϕ
i
} dΩ . (2.22)
Clearly (2.22) is a system of n linear equations with n unknowns, which can be written in
matrixvector notation as
S c = F , (2.23)
with
s
ij
=
Ω
{A∇ϕ
j
· ∇ϕ
i
+β ϕ
i
ϕ
j
} dΩ +
Γ
3
σ ϕ
j
ϕ
i
dΓ , (2.24a)
F
i
=
Ω
f ϕ
i
dΩ +
Γ
3
g
2
ϕ
i
dΓ +
Γ
3
g
3
ϕ
i
dΓ −
Ω
{A∇c
0
· ∇ϕ
i
+β c
0
ϕ
i
} dΩ .
(2.24b)
2.4 The ﬁnite element method
The FEM oﬀers us a constructive way to create the basis functions ϕ
i
and to compute the
integrals in (2.24a2.24b) in a relatively simple way. To that end the region Ω is subdivided
into simple elements. In IR
1
these elements are intervals, in IR
2
usually triangles or quadri
laterals and in IR
3
tetrahedra and hexahedra are very popular. The subdivision of a region
in elements is performed by a socalled mesh generator.
In each element a number of nodal points are chosen and the unknown function is approxi
mated by a polynomial. Although other types of approximations are permitted it is common
practice to restrict one selves to lower degree polynomials (linear or quadratic). These poly
nomial approximations implicitly deﬁne the basis functions ϕ
i
.
For example a piecewise linear polynomial in IR
1
deﬁned on n elements e
i
(x
i−1
, x
i
) (see Fig
ure 2.1),
n
x x x x
f
f
f
f
0 1 n1 n
0
1
n1
Figure 2.1: Piecewise linear approximation of function f(x)
can be written as
f
n
(x) =
n
¸
j=0
f(x
j
)λ
j
(x), (2.25)
12
where λ
j
(x) is deﬁned as follows:
λ
j
(x) is linear on each element,
λ
j
(x
k
) = δ
jk
.
(2.26)
So in terms of the Galerkin method the function values f(x
j
) take the role of the parameters
and the shape functions λ
j
(x) the role of the basis functions. Figure 2.2 shows a typical linear
basis function ϕ
i
(x).
i
x x x
ϕ
i1 i i+1
(x)
Figure 2.2: Example of a linear basis function
In the case of socalled quadratic elements in IR
1
we deﬁne the vertices as well as the centroid
as nodal points and the basis functions ϕ
i
(x) are deﬁned by
ϕ
i
(x) is quadratic on each element,
ϕ
i
(x
j
) = δ
ij
. (2.27)
Figure 2.3 shows the two types of quadratic basis functions we may expect in IR
1
.
i+1/2
b) a)
x x x x x x x x
i1 i1/2 i i+1 i1 i1/2 i
Figure 2.3: Quadratic basis functions in IR
1
a) corresponding to vertex b) corresponding to
midpoint
In IR
2
and IR
3
the basis functions are merely extensions of the onedimensional basis functions.
Typical elements in IR
2
have been sketched in Figure 2.4.
With respect to the linear elements, the boundaries of the elements are usually straight,
however for quadratic elements, the boundaries of the elements may be quadratic in order to
get a good approximation of the boundary. In general one can state that the boundary must
be approximated with the same type of polynomials as the solution. Once the basis functions
have been constructed it is necessary to compute the integrals (2.24a) and (2.24b) in order
to build the matrix and righthand side of the system of equations (2.23). For a typical ﬁnite
element grid as the one depicted in Figure 2.5, these computations seem rather complicated.
For that reason the integrals over the region are split into integrals over the elements, i.e.
Ω
{A∇ϕ
i
· ∇ϕ
i
+β ϕ
i
ϕ
j
} dΩ =
ne
¸
k=1
Ω
e
k
{A∇ϕ
i
· ∇ϕ
i
+β ϕ
i
ϕ
j
} dΩ, (2.28)
13
d) a) b) c)
Figure 2.4: Examples of elements inIR
2
: a) linear triangle, b) quadratic triangle, c) bilinear
quadrilateral, d) biquadratic quadrilateral
X
Y
Figure 2.5: Typical example of a twodimensional ﬁnite element mesh.
and so on. In (2.28) n
e
is the number of elements and Ω
e
k
is the area of element e
k
. Since
the mesh generator produces automatically the topological information of the mesh, it is an
easy task for the computer to carry out the additions. If we restrict ourselves to a typical
element e
k
, then it is clear that only a very little number of the possible integrals
Ω
e
k
{A∇ϕ
i
· ∇ϕ
i
+β ϕ
i
ϕ
j
} dΩ (2.29)
are unequal to zero. Only those basis functions corresponding to nodal points in the element
e
k
have a nonzero contribution to the integrals. So it is suﬃcient to compute only those
integrals that are nonzero on the element and store them in a socalled element matrix. For
a linear triangle such an element matrix is for example of size 3 ×3.
In exactly the same way it is natural to introduce the socalled element vector, which in a
linear triangle reduces to a 3 ×1 vector, with elements
Ω
e
k
f ϕ
i
dΩ (2.30)
In order to compute the boundary integrals in (2.24a) and (2.24b) socalled boundary elements
or line elements are introduced. These boundary elements are identical to the intersection
14
of the internal elements with the boundaries Γ
2
and Γ
3
and have no other purpose then to
evaluate the boundary integrals. Here we have assumed that the boundary is identical to the
outer boundary of the elements.
Hence we get:
Γ
3
σ ϕ
i
ϕ
j
dΓ =
n
be
3
¸
k=1
Γ
e
k
3
σ ϕ
i
ϕ
j
dΓ
Γ
2
g
2
ϕ
i
dΓ =
n
be
2
¸
k=1
Γ
e
k
2
g
2
ϕ
i
dΓ
Γ
3
g
3
ϕ
i
dΓ =
n
be
3
¸
k=1
Γ
e
k
3
g
3
ϕ
i
dΓ
(2.31)
2.5 Computation of the element matrix and element vector
The evaluation of the system of equations (2.23), (2.24a2.24b) is now reduced to the compu
tation of some integrals over an arbitrary element. For the sake of simplicity we shall restrict
ourselves to IR
2
. As an example we consider the computation of the integral given by (2.29):
S
e
k
ij
=
Ω
e
k
{A∇ϕ
j
· ∇ϕ
i
+β ϕ
j
ϕ
i
} dΩ (2.32)
Before we are able to compute this integral it is necessary to compute the basis functions ϕ
i
.
For a socalled linear triangle (see Figure 2.6), ϕ
i
(x) = λ
i
(x) is deﬁned by (2.26).
From (2.26,(1)) it follows that:
λ
i
(x) = a
i
0
+a
i
1
x +a
i
2
y (2.33)
and from (2.26,(2)):
XA = I , with
A =
a
1
0
a
2
0
a
3
0
a
1
1
a
2
1
a
3
1
a
1
2
a
2
2
a
2
2
¸
¸
¸ X =
1 x
1
y
1
1 x
2
y
2
1 x
3
y
3
¸
¸
¸ (2.34)
and hence A = X
−1
3
1
2
Figure 2.6: Linear triangle with local numbering
where the local numbering of Figure 2.6 is used. A necessary condition for the existence of
15
λ
i
(x) is that the determinant of the matrix to be inverted is unequal to zero.
This determinant is given by:
△ = (x
2
−x
1
)(y
3
−y
2
) −(y
2
−y
1
)(x
3
−x
2
) (cyclic) (2.35)
One can prove that △ is equal to two times the area of the triangle, hence the triangle may
not deform to a line. In practice it is necessary that the largest angle of the triangle is limited
by some angle (for example 150
◦
).
The coeﬃcients a
i
1
and a
i
2
are easily computed from (2.34) and one immediately veriﬁes that
they are given by:
a
1
1
=
1
△
(y
2
−y
3
) a
2
1
=
1
△
(y
3
−y
1
) a
3
1
=
1
△
(y
1
−y
2
)
a
1
2
=
1
△
(x
3
−x
2
) a
2
2
=
1
△
(x
1
−x
3
) a
3
2
=
1
△
(x
2
−x
1
) .
(2.36)
Since ∇λ
i
=
¸
a
i
1
a
i
2
¸
, (2.36) immediately deﬁnes the gradient of ϕ
i
.
In general the integral (2.32) can not be computed exactly and some quadrature rule must
be applied. A quadrature rule has usually the shape:
Ω
e
k
Int (x)dΩ =
m
¸
k=1
w
k
Int (x
k
), (2.37)
where m is the number of quadrature points in the element, w
k
are the weights and x
k
the
coordinates of the quadrature points. We distinguish between the socalled NewtonCotes
rule based upon exact integration of the basis functions and socalled Gauss quadrature.
The weights and quadrature points of the Gauss rules can be found in the literature, see for
example Strang and Fix (1973) or Hughes (1987).
The NewtonCotes rule can be derived by:
Int (x) =
n+1
¸
k=1
Int (x
k
) ϕ
k
(x), (2.38)
where n + 1 is the number of basis functions in the element, and application of the general
rule:
simplex
λ
m
1
1
λ
m
2
2
. . . λ
m
n+1
n+1
dΩ =
m
1
! m
2
! . . . m
n+1
!
(m
1
+m
2
+. . . +m
n+1
+n)!
△, (2.39)
where n denotes the dimension of space. For a proof, see Holand and Bell (1969), page 84.
From (2.28) and (2.39) it follows that the NewtonCotes rule for the linear element is deﬁned
by:
Ω
en
Int (x)dΩ =
△
6
3
¸
k=1
Int (x
k
), (2.40)
where x
k
is the k
th
vertex of the triangle.
Application of (2.40) to (2.32) gives
S
e
k
ij
=
△
6
3
¸
k=1
A(x
k
)∇ ϕ
i
· ∇ ϕ
j
+β(x
k
)δ
ij
(2.41)
16
In the same way (2.30) may be approximated by
f
e
k
i
=
△
6
f(x
i
) . (2.42)
In order to evaluate the boundary integrals (2.31) we use linear boundary elements as sketched
in Figure 2.7.
1
2
Figure 2.7: Linear boundary element in IR
2
, with local numbering.
One easily veriﬁes that the NewtonCotes rule for this element is identical to the trapezoid
rule:
Γ
e
Int(x) =
h
2
(Int(x
1
) + Int(x
2
)) , (2.43)
where h is the length of the element:
h =
(x
2
−x
1
)
2
+ (y
2
−y
1
)
2
(2.44)
Application of (2.43) to the three integrals (2.31) gives
Γ
e
k
3
σ ϕ
i
ϕ
i
dΓ =
h
2
σ(x
i
)δ
ij
,
Γ
e
k
2
g
2
ϕ
i
dΓ =
h
2
g
2
(x
i
),
Γ
e
k
3
g
3
ϕ
i
dΓ =
h
2
g
3
(x
i
).
(2.45)
2.6 Higher order elements
In (2.5) we have derived the element matrix and vector for linear triangles. However, in
practice also other types of elements are used. A simple extension of the linear triangle is for
example the quadratic triangle. For that element both the vertices and the midside points
are used as nodal points. See Figure 2.8 for the deﬁnition of the nodes. One can verify
that the basis functions ϕ
i
(x) may be expressed in terms of the linear basis function λ
i
(x)
by:
ϕ
i
(x) = λ
i
(2λ
i
−1), i = 1, 2, 3,
ϕ
ij
(x) = 4λ
i
λ
j
, 1 ≤ i < j ≤ 3.
(2.46)
See for example Cuvelier et al (1986) for a derivation.
Quadrilateral elements are not so easy to derive. Nodal points will be either the vertices
(bilinear elements) or the vertices and midside points (biquadratic elements). However to
derive the basis function the quadrilateral is mapped onto a square reference element.
Such a mapping is plotted in Figure 2.9.
17
3
1 12 2
23 13
Figure 2.8: Quadratic triangle with nodal points and local numbering.
2
T
3 4
y
1
x
1 2
3 4
η
ξ
Figure 2.9: Mapping T from quadrilateral in (x, y)plane onto square in (ξ, η) plane.
All basis functions are derived in the reference element by choosing products of onedimensional
basis functions. Also all integrals to be computed over the quadrilateral are transformed to
integrals over the reference element.
For example:
Ω
e
k
xy
A∇ϕ
i
· ∇ϕ
i
+β ϕ
i
ϕ
j
dΩ
xy
=
Ω
e
k
ξη
{A∇ϕ
i
· ∇ϕ
i
+β ϕ
i
ϕ
j
} J dΩ
ξη
, (2.47)
where J is the Jacobian of the transformation. The transformation itself is a socalled isopara
metric transformation deﬁned by the basis functions in the following way:
x
y
=
4
¸
k=1
ϕ
i
(ξ, η)
x
k
y
k
. (2.48)
For details of the derivation of basis functions and element matrices and vectors the reader
is referred to Cuvelier et al (1986).
2.7 Structure of the large matrix
The ﬁnite element method applied to the linear diﬀerential equation (2.3) leads to linear
systems of equations of the form (2.23):
S c = F (2.49)
The matrix is often referred to as the stiﬀness matrix. From the relation (2.24a) it is clear that
this matrix is symmetric. Furthermore one can prove that the matrix S is positive deﬁnite,
18
except in the case of Neumann boundary conditions and β = 0, in which case the matrix is
singular because the original problem is singular.
If we consider a number of adjacent triangles in a mesh as sketched in Figure 2.10, then it is
clear that the basis function corresponding to nodal point i is only nonzero in those elements
l
i
n
m
k
j
O
Figure 2.10: Nodal point i with direct neighbors j −o as part of a triangular mesh.
containing node i. As a consequence products with basis functions that correspond to nodes
not in these triangles are zero.
If we identify row i in matrix S with nodal point i, it is clear that only the entries s
ii
, s
ij
, . . . , s
io
may be unequal to zero. All other matrix elements in row i are identical to zero. So we see
that in the matrix S, only a very limited number of entries is nonzero. Such a matrix is
called sparse.
If the numbering of the nodal points is chosen in a clever way, the sparse matrix S may
have a band structure. For example if we consider the mesh in Figure 2.11 with rectangular
elements, then a natural numbering is to use either a horizontal or a vertical numbering of
m
1 2 n
1
2
Figure 2.11: Rectangular elements in a rectangle, with n nodes in horizontal and m nodes in
vertical direction.
the nodes. Figure 2.12a shows that in case of a horizontal numbering the band width is equal
19
to 2n +3, where n is the number of nodes in horizontal direction. Figure 2.12b shows that a
vertical numbering leads to a band width of 2m+ 3, with m the number of nodes in vertical
direction. Hence an optimal band width is achieved if nodes are numbered in the shortest
direction.
b) a)
i+1 i+m+1
im
i
im+1
im1 i1 i+m1
i+m
i+n i+n+1
i
in in+1
i+1 i1
in1
i+n1
Figure 2.12: Connections of node i with neighbors a) horizontal numbering b) vertical num
bering.
In general ﬁnite element meshes are not so structured as the one in Figure 2.11. and so locally
a larger band width may be present. A typical example is sketched in Figure 2.13
band
profile
Figure 2.13: Example of a matrix with a local wide proﬁle.
The external nonzero elements in this matrix deﬁne the socalled proﬁle. A very simple ex
ample of a proﬁle matrix is created by a onedimensional example with periodical boundary
conditions as sketched in Figure 2.14. In this example point i is connected to points i −1 and
i + 1 leading to a band width of 3. However, because of the periodical boundary conditions,
(n=1) 1 2 n1
Figure 2.14: Onedimensional mesh, for problem with periodical boundary conditions.
point n and 1 have the same unknown and point 1 is connected to both n − 1 and 2. Point
n − 1 connected to n − 2 and 1. The corresponding matrix gets the structure as sketched in
Figure 2.15. The band width of this matrix is equal to n −1, which means that in case of a
band storage, the matrix is full. The proﬁle sketched in Figure 2.15b is much smaller.
20
a) b)
Figure 2.15: a) nonzero pattern of onedimensional problem with periodical boundary con
ditions, b) corresponding proﬁle.
Methods employing the bandstructure are called band methods, whereas methods using the
proﬁle of the matrix only are called proﬁle methods. Both methods belong to the class of
direct solvers. Iterative methods fully utilize the sparsity pattern of the matrix and are there
fore recommended in case of problems with many unknowns.
A good numbering may reduce the band width or the proﬁle of the matrix considerably. For
ﬁnite element methods various renumbering algorithms have been constructed. Many of them
are variants of the socalled CuthillMckee renumbering algorithm. See for example George
and Liu (1981).
Part II of this book is devoted to eﬃcient methods for the solution of systems of equations of
the form (2.49).
21
3 Convectiondiﬀusion equation by the ﬁnite element method
3.1 Formulation of the equations
In this chapter we shall investigate the solution of convectiondiﬀusion equations of the shape:
ρ
∂c
∂t
−
n
¸
i,j=1
∂
∂x
i
(a
ij
∂c
∂x
j
) +
n
¸
i=1
u
i
∂c
∂x
i
+βc = f . (3.1)
Compared to equation (2.1), equation (3.1) is extended with the convective term
n
¸
i=1
u
i
∂c
∂x
i
, (3.2)
or in vector notation
(u · ∇ c) , (3.3)
where u denotes the velocity.
In the stationary case, (3.1) reduces to:
−div (A ∇ c) + (u · ∇c) +βc = f . (3.4)
For a unique solution of (3.4) it is necessary to prescribe exactly one boundary condition at
each part of the boundary. Theoretically exactly the same type of boundary conditions as
for equation (2.3) may be used. In many practical ﬂow problems, however, the convection
term strongly dominates the diﬀusive terms. Numerically this means that the character of
the equations resembles more that of the pure convection equation than that of the diﬀusion
equation. For a pure convection equation, boundary conditions should only be given at inﬂow
not at outﬂow. Since for the convectiondiﬀusion equation, boundary conditions must be
given at outﬂow, it is advised to use those boundary conditions that inﬂuence the solution as
little as possible. In general this means that at outﬂow one usually applies natural boundary
conditions; Dirichlet boundary conditions may result in unwanted wiggles.
With respect to the instationary equation it is not only necessary to prescribe boundary
conditions, but also to deﬁne an initial condition.
In the remainder of this chapter we shall study the discretization of the convectiondiﬀusion
equation by ﬁnite elements and standard Galerkin. It will be shown that this discretization
might introduce inaccurate solutions in the case of dominant convection. For that reason
an upwinding technique is introduced. It will be shown that this upwinding improves the
accuracy considerably.
3.2 Standard Galerkin
In order to apply the standard Galerkin approach (SGA) the weak formulation of (3.1) under
the boundary conditions (2.4)  (2.6) is derived.
22
Multiplication of (3.1) by a timeindependent test function v and integration over the domain
yields:
Ω
ρ
∂c
∂t
vdΩ +
Ω
{−div (A∇c) + (u · ∇c) +βc}vdΩ =
Ω
fvdΩ . (3.5)
After application of the Gauss divergence theorem, which results in relation (2.12), (3.5) can
be written as
Ω
ρ
∂c
∂t
vdΩ +
Ω
{(A∇c · ∇v +βcv +u · ∇c)v}dΩ −
Γ
vA∇c · ndΓ =
Ω
fvdΩ . (3.6)
Substitution of the boundary conditions in the same way as is performed in Chapter 2 results
in the weak formulation:
Find c(x, t) with c(x, 0) given and c
Γ
1
= g
1
such that
Ω
ρ
∂c
∂t
vdΩ +
Ω
{(A∇c · ∇v) +u · ∇cv +βcv}dΩ +
Γ
3
σcvdΓ =
Ω
fvdΩ +
Γ
2
g
2
vdΓ +
Γ
3
g
3
vdΓ , (3.7)
for all functions v(x) satisfying v
Γ
1
= 0 .
In the SGA the weak form (3.7) is approximated by a ﬁnite dimensional subspace. To that
end we deﬁne timeindependent basis functions in exactly the same way as for the potential
problem. The solution c is approximated by a linear combination of the basis functions:
c
h
(x, t) =
n
¸
j=1
c
j
(t)ϕ
j
(x) +c
0
(x, t) . (3.8)
The basis functions ϕ
j
(x) and the function c
0
(x, t) must satisfy the same requirements as in
Chapter 2, i.e. (2.18) and (2.19) are still necessary.
For the test functions v(x) again the basis functions ϕ
i
(x) (i = 1, 2, ..., n) are substituted. So
ﬁnally we arrive at the Galerkin formulation:
n
¸
j=1
∂c
j
∂t
Ω
ϕ
i
ϕ
j
dΩ +
n
¸
j=1
c
j
{
Ω
[(A∇ϕ
j
· ∇ϕ
i
) + (u · ∇ϕ
j
)ϕ
i
+βϕ
i
ϕ
j
]dΩ
+
Γ
3
σϕ
i
ϕ
j
dΓ} =
Ω
fϕ
i
dΩ +
Γ
2
g
2
ϕ
i
dΓ +
Γ
3
g
3
ϕ
i
dΓ (3.9)
−
Ω
{(A∇c
0
· ∇ϕ
i
) +βc
0
ϕ
i
+ (u · ∇c
0
)ϕ
i
}dΩ −
Ω
∂c
0
∂t
ϕ
i
dΩ , i = 1(1)n .
Clearly (3.9) forms a system of n linear ordinary diﬀerential equations with n unknowns,
which can be written in matrixvector notation as
M˙ c +Sc = F , (3.10)
23
where
.
denotes diﬀerentiation with respect to time, M is the socalled mass matrix and S
the stiﬀness matrix. The elements of the matrices and righthand side are deﬁned by:
m
ij
=
Ω
ϕ
i
ϕ
j
dΩ (3.11a)
s
ij
=
Ω
{(A∇ϕ
j
· ∇ϕ
j
) + (u · ∇ϕ
j
)ϕ
i
+βϕ
i
ϕ
j
}dΩ +
Γ
3
σϕ
i
ϕ
j
dΓ (3.11b)
F
i
=
Ω
fϕ
i
dΩ −
Ω
{(A∇c
0
· ∇ϕ
i
) + (u · ∇c
0
)ϕ
i
+βc
0
ϕ
i
}dΩ
−
Ω
∂c
0
∂t
ϕ
i
dΩ +
Γ
2
g
2
ϕ
i
dΓ +
Γ
3
g
3
ϕ
i
dΓ . (3.11c)
The construction of the basis functions and the computation of the integrals is exactly the
same as for the potential problem. The only extra parts are the timederivative with the mass
matrix and the extra convective terms in the stiﬀness matrix. Due to these extra convective
terms the stiﬀness matrix becomes nonsymmetric.
The computation of the massmatrix can be performed exactly or by a quadrature rule. In
general M has exactly the same structure as S. However, if the integrals (3.11a) are computed
by the Newton Cotes rule corresponding to the basis functions, the matrix M reduces to a
diagonal matrix. In that case one speaks of a lumped massmatrix. A nonlumped mass
matrix is also known as a consistent mass matrix. The (dis)advantages of both types of
matrices will be treated in Paragraphs 3.3 and 3.5.
In the next paragraph we shall consider some methods to solve the instationary equations.
After that, problems in case of a dominant convective term will be investigated and a upwind
technique will be introduced.
3.3 Solution of the system of ordinary diﬀerential equations
The discretization of the instationary convectiondiﬀusion equation results in a system of
ordinary diﬀerential equations of the shape (3.10). In order to solve this system of equations
any classical method for the solution of ordinary diﬀerential equations may be used.
In general one may distinguish between explicit and implicit methods and between onestep
and multistep methods. In this chapter we shall restrict ourselves to onestep methods only.
That means that to compute the solution at a certain timestep only information of the
preceding timestep is used and not of older timesteps.
In most ordinary diﬀerential equation solvers the time derivative in (3.10) is replaced by a
forward diﬀerence discretization:
˙ c =
c
k+1
−c
k
∆t
, (3.12)
where k denotes the present timelevel and k + 1 the next timelevel. A method is called
explicit if the term Sc is only taken at the timelevel k. As soon as Sc is also taken at the
new timelevel k + 1, the method is called implicit. The reason is that in that case always a
system of equations has to be solved, even if the matrix M is the identity matrix.
Among the many available methods for solving the system (3.10) we restrict ourselves to the
24
socalled θmethod:
M
c
k+1
−c
k
∆t
+θSc
k+1
+ (1 −θ)Sc
k
= θF
k+1
+ (1 −θ)F
k
, 0 ≤ θ ≤ 1 , (3.13)
The most common values for θ are:
θ = 0 , Explicit Euler
θ = 1 , Implicit Euler and
θ = 1/2 , Implicit Heun or Crank Nicolson.
For θ = 0, (3.13) reduces to
Mc
k+1
= (M −∆tS)c
k
+ ∆tF
k
. (3.14)
Although it concerns an explicit method, we still have to solve a system of equations. However,
in the case of a lumped mass matrix, the solution implies only the inversion of a diagonal
matrix. In that case an explicit method is relatively cheap. A clear disadvantage of an explicit
method is that the timestep must be restricted in order to get a stable solution. For example
in the case of a pure timedependent diﬀusion problem a stability criterion of the shape
∆t ≤ C∆x
2
(3.15)
is required, where C is some constant and ∆x a local diameter of the elements.
In the case of a dominant convection, the Euler explicit method is not longer stable and one
should use either an implicit method or a higher order explicit method. For such problems
the classical fourth order Runge Kutta method is a good choice.
For θ = 1 (3.13) reduces to
(M + ∆tS)c
k+1
= Mc
k
+ ∆tF
k+1
,
which is a purely implicit method. One can show that this method is unconditionally stable,
for the convection equation (see for example Cuvelier et al 1986), so the only reason to restrict
the timestep is because of accuracy requirements. It can be easily veriﬁed that the accuracy
of both the implicit and the explicit Euler timediscretization is of O(∆t). The implicit Euler
method belongs to the class of ultrastable methods, which means that errors in time always
will be damped.
The most accurate scheme is achieved for θ = 1/2 (Crank Nicolson). This scheme can be
written as
(M +
∆t
2
S)c
k+1
= (M −
∆t
2
S)c
k
+
∆t
2
(F
k
+F
k+1
) . (3.16)
One can show that this scheme is also unconditionally stable and that the accuracy is one
order higher, i.e. of O(∆t
2
). This scheme does not have the damping property of Euler
implicit and as a consequence once produced errors in time will always be visible. This one
usually starts in these cases with one step Euler implicit.
So the solution of the systems of ordinary diﬀerential equations is always reduced to a time
stepping algorithm in combination with matrixvector multiplications, and sometimes the
solution of a system of linear equations.
25
For θ = 0 it is easier to replace the θmethod (3.13) by the socalled modiﬁed θmethod:
M
c
k+θ
−c
k
∆t
+θSc
k+θ
= F
k+θ
, 0 ≤ θ ≤ 1 (3.17)
c
k+1
=
1
θ
c
k+θ
+
1 −θ
θ
c
k
(3.18)
One can prove that equation (3.13) is equal to equation (3.17) if the system of equations to be
solved is linear. In case of a nonlinear system the approximation (3.17) is of the order ∆t
2
.
A clear advantage of (3.17) above (3.13) is that the matrix to be solved is always independent
of θ and that no explicit matrixvector multiplication is required.
A disadvantage of the θmethod is the ﬁxed θ. It could be advantageous to combine a number
of diﬀerent θ’s per time step in such a way that second order accuracy is accomplished, and
some damping is ensured as well. Two methods that oﬀer this opportunity are the fractional
θmethod and the generalized θmethod. The latter is a generalization of the fractional θ
method, so we will restrict ourselves to the description of the generalized θmethod. We
rewrite equation ( 3.13) as follows, letting Σ
k
=
¸
k
i=1
θ
i
:
c
n+Σ
2
= c
n
+ ∆t
θ
1
f(x, t
n
) +θ
2
f(x, t
n+Σ
2
)
c
n+Σ
4
= c
n+Σ
2
+ ∆t
θ
3
f(x, t
n+Σ
2
) +θ
4
f(x, t
n+Σ
4
)
(3.19)
.
.
.
.
.
.
c
n+Σ
2k
= c
n+Σ
2k−2
+ ∆t
θ
2k−1
f(x, t
n+Σ
2k−2
) +θ
2k
f(x, t
n+Σ
2k
)
There are two necessary conditions:
1. Σ
2k
= 1 for a kstage method. This gives a ﬁrst order method, and is only a scaling
requirement.
2.
¸
k
i=1
θ
2
2i−1
=
¸
k
i=1
θ
2
2i
to guarantee second order accuracy.
A third condition is optional, but guarantees some damping:
1. θ
2i−1
= 0 for at least one i ∈ 1, . . . , k.
This condition includes at least one Implicit Euler step per time step.
The generalized θmethod is a 3stage method, and is therefore 3 times as expensive as the
CrankNicolson method. However, one may choose ∆t
genθ
= 3 · ∆t
CN
to accomplish similar
results for both methods. A common choice for the generalized θmethod is the following
‘optimum’ for k = 3:
θ
1
= θ
5
=
α
2
, θ
3
= 0,
θ
2
= θ
6
= α
√
3
6
, θ
4
= α
√
3
3
(3.20)
α =
1 +
2
√
3
−1
.
26
A common choice for the fractional θmethod is the following:
θ
1
= θ
5
= βθ, θ
3
= α(1 −2θ),
θ
2
= θ
6
= αθ, θ
4
= β(1 −2θ), (3.21)
α =
1 −2θ
1 −θ
, β =
θ
1−θ
,
θ = 1 −
1
2
√
2.
3.4 Accuracy aspects of the SGA
One can show that the SGA in combination with the FEM yields an accuracy of O(h
k+1
),
where h is some representative diameter of the elements and k is the degree of the polynomials
used in the approximation per element. However, this is only true for problems where the
convection does not dominate the diﬀusion. As soon as the convection dominates, the accuracy
strongly decreases as can be seen in Table 3.1, which shows the accuracy of the following
artiﬁcial mathematical example:
−ε△c +u · ∇c = f , x ∈ Ω (3.22a)
c(x, y) = sin(x) sin(y) , x ∈ Γ (3.22b)
where u =
x
y
and f = 2ε sin(x) sin(y) +x cos(x) sin(y) +y sin(x) cos(y) . (3.22c)
One easily veriﬁes that the exact solution of this problem is given by
c(x, y) = sin(x) sin(y) . (3.23)
This problem has been solved on the square (0, 1)×(0, 1) using linear and quadratic elements.
Table 3.1 shows the maximal error for ε = 1, 10
−3
respectively 10
−6
and triangular elements.
The results for quadrilaterals are comparable. In the linear case a subdivision in 6×6, 11×11
respectively 21 × 21 nodes has been made, in the quadratic case only 11 × 11 and 21 × 21
nodes have been used. From this table we may draw the following conclusions:
number of linear triangles quadratic triangles
nodes ε = 1 ε = 10
−3
ε = 10
−6
ε = 1 ε = 10
−3
ε = 10
−6
6 ×6 3.0
10
−4 3.3
10
−2 3.9
10
1   
11 ×11 7.6
10
−5 4.1
10
−3 1.5
10
0 8.0
10
−6 5.4
10
−3 2.2
10
0
21 ×21 1.9
10
−5 1.0
10
−3 8.4
10
−2 6.3
10
−7 4.8
10
−4 9.8
10
−2
Table 3.1: Error in maxnorm of convectiondiﬀusion problem (3.22a3.22c) for various values
of ε. Linear and quadratic triangles
 for relatively small convection the accuracy of the linear elements is O(h
2
), and for the
quadratic elements at least O(h
3
),
 for convectiondominant ﬂow the numerical solution is very inaccurate especially for
coarse grids,
27
 the use of quadratic elements makes only sense for problems with small convection.
Remark: the conclusions are based on an example with a very smooth solution. For prob
lems with steep gradients the conclusion may be diﬀerent, especially for the quadratic
elements, in which cases the O(h
3
) cannot be expected anymore.
The most important part of the conclusion is that SGA is not a good method for convection
dominant ﬂows. This conclusion is also motivated by the following less trivial problem.
Rotating cone problem
Consider the region Ω sketched in Figure 3.1. The region consists of a square with a cut B. In
Ω
(0,0)
y
B
(1/2, 1/2)
(1/2, 1/2)
(0, 1/2)
x
Figure 3.1: Deﬁnition region for rotating cone problem
the inner region we suppose that the concentration satisﬁes the convectiondiﬀusion equation
−ε△c +u · ∇c = 0 , (3.24)
where ε is chosen equal to 10
−6
and the velocity u is such that the ﬂow rotates counter
clockwise. This is achieved by setting u =
¸
−y
x
¸
. At the outer boundary we use the
boundary condition
c
Γ
= 0 . (3.25)
On the starting curve B the concentration c is set equal to
c
B
= cos(2π(y +
1
4
)) , (3.26)
and due to the small diﬀusion one expects that the concentration at the end curve is nearly
the same. The end curve has the same coordinates as B but the nodal points diﬀer, which
means that the solution may be diﬀerent from the starting one. Since no boundary condition
is given at the outﬂow curve ”B” implicitly the boundary condition
ε
∂c
∂n

B
= 0 , (3.27)
is prescribed.
28
Figure 3.2 shows a 23 × 23 mesh consisting of triangles. The direction of the diagonals in
the squares are chosen randomly. Figure 3.3 shows the lines of equal concentration. For the
exact solution these should be concentration circles with levels 0, 0.1, . . . , 10. However, the
standard Galerkin method completely destroys the result. Finally Figure 3.4 shows a 3D plot
of the concentration, which contains a large number of wiggles. It must be remarked that the
solution is relatively smooth in the case of a grid consisting of squares or triangles all pointing
in the same direction.
Figure 3.2: Triangular mesh for rotating cone problems random diagonals.
1
2
2
2
2
2
2
2
2 2
2
2
2
2
3
3
3
3
3
3
3
3
4
4
4
5
5
5
5
5
6
6
6
6
7
7
7
7
8
8
8
8
8
8
8
8
9
9
9
9
9
9
9
9
9
9
9
9 9
9
9
9
9
9
9
9
9
10
10
10
10
10
10 10
10
10
10
10
10 10
10
10
10
10
10
10
11
LEVELS
1 .263
2 .122
3 .019
4 .161
5 .302
6 .443
7 .585
8 .726
9 .867
10 1.009
11 1.150
Figure 3.3: Equiconcentration lines for rotating cone problem computed by SGA.
29
Figure 3.4: 3D plot of concentration in rotating cone problem computed by SGA.
3.5 Streamline Upwind Petrov Galerkin
In the previous paragraph we have seen that the SGA method may lead to wiggles and
inaccurate results for convectiondominant ﬂows. In ﬁnite diﬀerences this phenomenon is
well known for a long time and one has tried to solve it by socalled upwind methods. This
has motivated researchers in ﬁnite elements to construct schemes, which are comparable to
classical ﬁnite diﬀerence upwind schemes. Among the various upwind techniques for the
FEM, the streamline upwind PetrovGalerkin method (SUPG) is the most popular one. This
method has ﬁrst been derived by Brooks and Hughes (1982) and is later on improved by a
large number of authors.
Starting point for SUPG is the weak formulation (3.5). However, instead of choosing the test
function in the same space as the solution a test function ¯ v is introduced according to
¯ v = v +p , (3.28)
where v is the classical test function and p denotes a correction in order to take care of the
upwinding part. Substitution of (3.28) in (3.5) gives:
Ω
ρ
∂c
∂t
(v +p)dΩ +
Ω
{−div (A∇c) +u · ∇c +βc}(v +p)dΩ =
Ω
f(v +p)dΩ . (3.29)
The function v is chosen in the same space as the solution, which means that the ﬁrst derivative
is square integrable. However, with respect to the function p, we assume that it may be
discontinuous over the elements. As a consequence Gauss’ divergence theorem may only be
applied to the v part of (3.29). Hence after integration by parts we get
Ω
ρ
∂c
∂t
vdΩ +
Ω
{A∇c · ∇v + (u · ∇c)v +βcv}dΩ +
Γ
3
σcvdΓ
+
Ω
{ρ
∂c
∂t
−div A∇c +u · ∇c +βc −f}pdΩ =
Ω
fvdΩ +
Γ
2
g
2
vdΓ +
Γ
3
g
3
vdΓ .
(3.30)
Actually the second derivative of c does not have to exist over the element boundaries and is
certainly not integrable in the examples of elements we have given before. So we are not able
to compute the integral containing the p term. In order to solve that problem the integral
is split into a sum of integrals over the elements, and the interelement contributions are
30
neglected. So instead of (3.30) we write:
Ω
ρ
∂c
∂t
vdΩ +
Ω
{A∇c · ∇v + (u · ∇c)v +βcv}dΩ +
Γ
3
σcvdΓ
+
ne
¸
k=1
Ω
e
k
{ρ
∂c
∂t
−div A∇c +u · ∇c +βc}pdΩ =
Ω
fvdΩ +
Γ
2
g
2
vdΓ +
Γ
3
g
3
vdΓ +
ne
¸
k=1
Ω
e
k
fpdΩ . (3.31)
One can see that the approximation (3.31) itself is consistent since it consists of a standard
Galerkin part, which itself is consistent, and a summation of residuals of the diﬀerential
equation per element multiplied by a function. With consistency we mean that at least the
constant and ﬁrst term of the Taylor series expansion of the solution are represented exactly.
At this moment the choice of the function p per element is completely free. However, it is
clear that the choice of p actually deﬁnes the type of SUPG method used. In fact a complete
class of diﬀerent SUPG methods may be deﬁned by diﬀerent choices of p.
A common choice for the function p is inspired by the onedimensional stationary diﬀusion
equation:
−ε
d
2
c
dx
2
+u
dc
dx
= 0 , (3.32)
with boundary conditions
c(0) = 0 , c(1) = 1 . (3.33)
The solution of (3.32), (3.33) is sketched in Figure 3.5 for ε = 0.01. It has a steep gradient in
the neighborhood of x = 1. The size of this gradient depends on the value of ε. The smaller
ε, the steeper the gradient. If a central diﬀerence scheme:
−ε
c
i+1
−2c
i
+c
i−1
∆x
2
+u
c
i+1
−c
i−1
2∆x
= 0 , (i = 1, 2, ..., n) , (3.34)
c
0
= 0 , c
n+1
= 1 ,
is applied with an equidistant stepsize ∆x, the solution shows wiggles as long as ∆x >
2
Pe
,
where the Peclet number Pe is deﬁned as
Pe =
u
ε
. (3.35)
Figure 3.5 shows an example for ∆x = 0.1, u = 1 and ε = 0.01.
In the classical ﬁnite diﬀerence upwind scheme one tries to get rid of these wiggles by replacing
the ﬁrst derivative by a backward diﬀerence scheme provided the velocity u is positive. The
idea for this choice is based on the fact that for a pure convection problem all information is
transported from left to right and hence the discretization of the convective term should also
be based upon information from the left. Figure 3.6 shows the result of the upwinding; the
wiggles have been disappeared and the numerical solution has been smoothed. This ﬁgure
makes it clear that, although backward diﬀerences suppress the wiggles, it also makes the
31
0.0 0.2 0.4 0.6 0.8 1.0
1.0
0.8
0.6
0.4
0.2
0.0
0.2
0.4
0.6
0.8
1.0
x
y
Figure 3.5: Solution of equation (3.32) for ε = 0.01 and u = 1: — exact solution,
−◦ − numerical solution for ∆x = 0.1 and central diﬀerences.
.0 .2 .4 .6 .8 1.0
1.0
.8
.6
.4
.2
.0
.2
.4
.6
.8
1.0
x
y
Figure 3.6: Solution of equation (3.32) for ε = 0.01 and u = 1; — exact solution, + numerical
solution for ∆x = 0.1 and backward diﬀerences.
solution inaccurate. In the literature many upwinding schemes for ﬁnite diﬀerence methods
have been derived which are much more accurate than the backward diﬀerence scheme.
The backward diﬀerence scheme for (3.32), (3.33) reads:
−ε
c
i+1
−2c
i
+c
i−1
∆x
2
+u
c
i
−c
i−1
∆x
= 0 (i = 1, 2, ..., n) , (3.36)
c
0
= 0 , c
n+1
= 1 .
Using Taylor series expansion one can show that (3.36) gives a local truncation error of
−
u∆x
2
d
2
c
dx
2
+O(∆x
2
) , (3.37)
which is only of order ∆x instead of ∆x
2
. Moreover, the second derivative appears in the
truncation error, which implies that in fact one may consider (3.36) as the discretization of a
32
convectiondiﬀusion equation with a diﬀusion of
ε +
u∆x
2
. (3.38)
In fact (3.36) can be derived by taking the central diﬀerence scheme of the diﬀerential equation
−(ε +
u∆x
2
)
d
2
c
dx
2
+u
dc
dx
= 0 , (3.39)
c(0) = 0 , c(1) = 1 .
The term −
u∆x
2
d
2
c
dx
2
is usually called artiﬁcial diﬀusion. Many of the upwind schemes in
ﬁnite diﬀerences may be considered as a central diﬀerence scheme with artiﬁcial diﬀusion.
For example the exact solution of (3.32) is constructed by the Il’in scheme, which may be
considered as a central diﬀerence scheme with artiﬁcial diﬀusion equal to
u∆x
2
¯
ξ
d
2
c
dx
2
, (3.40a)
¯
ξ = coth (α) −
1
α
, α =
u∆x
2ε
. (3.40b)
Diﬀerent schemes lead to diﬀerent choices of
¯
ξ. The following values of
¯
ξ are commonly
proposed:
Classical upwind scheme
Il’in scheme
Double asymptotic approximation
Critical approximation
¯
ξ = sign(α) , (3.41a)
¯
ξ = coth(α) −1/α . (3.41b)
¯
ξ =
α/3 −3 ≤ α ≤ 3
sign(α) α > 3 .
(3.41c)
¯
ξ =
−1 −1/α α ≤ −1
0 −1 ≤ α ≤ 1
1 −1/α α ≥ 1 .
(3.41d)
The last choice is such that the amount of artiﬁcial diﬀusion is minimal in order to get a
diagonally dominant matrix. In this way it may be considered as a variant of the socalled
hybrid method.
This observation motivates us to choose the function p such that an artiﬁcial diﬀusion of the
form (3.40a) is constructed. If we conﬁne ourselves to linear elements, the second derivative
of the approximate solution is zero per element and hence SUPG applied to (3.32), (3.33)
reduces to
Ω
{u
dc
h
dx
v
h
+ε
dc
h
dx
dv
h
dx
}dΩ +
ne
¸
k=1
Ω
e
k
p
h
u
dc
h
dx
dΩ = 0 , (3.42)
where c
h
is deﬁned by (3.8), v
h
represents the discretized classical test function and p
h
the
discretization of the extra function p.
In order to get an artiﬁcial diﬀusion of the shape (3.40a) it is suﬃcient to choose p
h
equal to
p
h
=
h
¯
ξ
2
dv
h
dx
, (3.43)
33
where h = ∆x.
With Taylor series expansion it can be shown that if
¯
ξ is chosen according to one of the
possible values of (3.41a3.41d) (except the choice
¯
ξ = 1), the accuracy of the scheme is
O(∆x
2
) +εO(∆x), which may be considered to be of O(∆x
2
) for small values of ε.
If the step size ∆x is not a constant, h in formula (3.43) must be replaced by the step size. For
quadratic elements h equal to half the local element width, has proven to be a good choice.
If we apply the SUPG method based upon formula (3.43) in 2D in each of the directions, a
typical crosswind diﬀusion arises. That means that the solution perpendicular to the ﬂow
direction is smoothed and becomes inaccurate. For that reason the SUPG method must be
extended in such a way that the upwinding is applied in the direction of the ﬂow only. Brooks
and Hughes (1982) have solved this problem by giving the perturbation parameter p a tensor
character
p =
h
¯
ξ
2
u · ∇v
h
u
. (3.44)
In this formula h is the local element width, which may depend on the quadrature point.
Mizukami (1985) has extended (3.44) for triangles.
Many extensions of the SUPG method have been proposed, all based on diﬀerent choices of
the function p. These improvements usually have a special function, for example to create
monotonous solutions (Rice and Schnipke 1984), discontinuity capturing (Hughes et al 1986),
or for timedependent problems (Shahib 1988).
The SUPG method diﬀers from the classical upwind methods in the sense that not only the
advective term is perturbed, but also the righthand side and the time derivative. This has
two important consequences:
 the treatment of source terms is considerably better than for classical upwind techniques.
 the mass matrix is nonsymmetric and may not be lumped. Hence explicit methods are
as expensive as implicit ones.
Table 3.2 shows the example of Table 3.1 but now with SGA replaced by SUPG. The im
provement for small values of ε and coarse grids is immediately clear. This table does not
clearly show the accuracy of the method in terms of orders ∆x
p
. Besides the accuracy as
number of linear triangles quadratic triangles
nodes ε = 1 ε = 10
−3
ε = 10
−6
ε = 1 ε = 10
−3
ε = 10
−6
6 ×6 6.0
10
−4 5.2
10
−3 5.9
10
−3
11 ×11 1.6
10
−4 1.6
10
−3 2.0
10
−3 1.6
10
−5 2.8
10
−4 7.6
10
−5
21 ×21 4.0
10
−5 4.2
10
−4 5.5
10
−4 1.1
10
−6 1.3
10
−4 1.3
10
−5
Table 3.2: Error in maxnorm of convectiondiﬀusion problem (3.22a 3.22c) for various values
of ε Solution by SUPG. Linear and quadratic triangles.
pects the SPUG method has an another important advantage. The use of upwind makes the
matrices to be solved more diagonally dominant. As a consequence iterative matrix solvers
34
will converge much faster than for SGA. This will be demonstrated in Paragraph 3.6.
Finally we show some results of classical benchmark problems to investigate the behavior of
various schemes.
3.6 Some classical benchmark problems for convectiondiﬀusion solvers
In this section we shall investigate the performance of the standard Galerkin approach as well
as the streamline upwind Petrov Galerkin method for some benchmark problems.
First we consider the rotating cone problem introduced in Section 3.4. The solution by SGA
is plotted in Figure 3.4. Figure 3.7 shows the lines of equal concentration produced by SUPG
and Figure 3.8 the corresponding threedimensional plot. Exactly the same mesh as for the
central scheme is used. These pictures show a large qualitative improvement of the accuracy
compared to SGA. Not only the accuracy of the solution is enlarged considerably, also the
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
LEVELS
1 .029
2 .075
3 .179
4 .284
5 .388
6 .492
7 .597
8 .701
9 .806
10 .910
11 1.014
Figure 3.7: Equiconcentration lines for rotating cone problem computed by SUPG.
Figure 3.8: 3D plot of concentration for rotating cone problem computed by SUPG
condition with respect to linear solvers. All previous pictures have been created by using a
direct linear solver. However, for large problems an iterative solver is much more attractive.
Numerical computations show that upwinding has a very important eﬀect on the number of
iterations necessary for reaching a certain level of accuracy. Table 3.3 shows the number of
iterations required to solve the rotating cone problem for ǫ = 10
−3
and ǫ = 10
−6
.
In this table SGA and SUPG are compared for various mesh sizes. From this table it is clear
35
that for small values of ǫ the SUPG method is superior to SGA with respect to iterative
solvers.
SGA SUPG
ǫ number of nodes accuracy 10
−3
accuracy 10
−6
accuracy 10
−3
accuracy 10
−6
10
−3
21 ×21 15 19 6 9
41 ×41 17 21 6 9
81 ×81 31 38 27 32
10
−6
21 ×21   9 12
41 ×41   13 17
81 ×81   24 32
Table 3.3: Number of iterations by a preconditioned CGS solver for the solution of the rotating
cone problem of Section 3.4. SGA and SUPG. A  in the table means that no convergence
was possible.
As last benchmark problem we consider is a timedependent one dimensional convection
diﬀusion equation given by:
∂c
∂t
+u
∂c
∂x
= D
∂
2
c
∂x
2
0 ≤ x ≤ 1 , (3.45)
c(x, 0) = sin π
x−a
b−a
a ≤ x ≤ b ,
c(x, 0) = 0 elsewhere, (3.46)
c(0, t) = c(1, t) = 0 ,
u = 1, D = 0.002, a = 0.2 and b = 0.4 . (3.47)
This benchmark problem has been solved by SGA with and without lumping of the mass
matrix and SUPG. Figures 3.93.11 shows the results of the various methods. These ﬁgures
show that lumping drastically decreases the accuracy of the numerical solution. Furthermore
for this moderate Peclet number, the standard Galerkin method performs a little bit better
than SUPG.
36
.0 .4 .8
.2
.0
.2
.4
.6
.8
1.0
1.2
x
c
.0 .4 .8
.2
.0
.2
.4
.6
.8
1.0
1.2
x
c
Figure 3.9:
SGA applied to (3.40)(3.42)
40 linear elements, lumped mass matrix
– exact solution, + numerical solution
Figure 3.10:
SGA applied to (3.40)(3.42)
40 linear elements, consistent mass matrix
– exact solution, numerical solution
37
.0 .4 .8
.2
.0
.2
.4
.6
.8
1.0
1.2
x
c
Figure 3.9: SUPG with stationary upwind parameter applied to (3.40)(3.42), 40 linear ele
ments: – exact solution, + numerical solution
38
4 Discretization of the incompressible NavierStokes equations
by standard Galerkin
4.1 The basic equations of ﬂuid dynamics
In this chapter we shall consider ﬂuids with the following properties:
• The medium is incompressible,
• The medium has a Newtonian character,
• The medium properties are temperature independent and uniform,
• The ﬂow is laminar.
For a threedimensional ﬂow ﬁeld the basic equations of ﬂuid ﬂow under the above restrictions,
can be written as:
The Continuity equation
div u =
∂u
1
∂x
1
+
∂u
2
∂x
2
+
∂u
3
∂x
3
= 0 . (4.1)
The NavierStokes equations
ρ
∂u
∂t
+ (u.∇)u
−div σ = ρf, (4.2)
in which u = (u
1
, u
2
, u
3
)
T
denotes the velocity vector, ρ the density of the ﬂuid, f =
(f
1
, f
2
, f
3
) the body force per unit of mass, and σ the stress tensor.
Componentwise (4.2) reads:
ρ
∂u
i
∂t
+u
1
∂u
i
∂x
1
+u
2
∂u
i
∂x
2
+u
3
∂u
i
∂x
3
−
∂σ
i1
∂x
1
+
∂σ
i2
∂x
2
+
∂σ
i3
∂x
3
= ρ f
i
, (i = 1, 2, 3) .
(4.3)
For an incompressible and isotropic medium the stress terms σ can be written as
σ = −p I +d = −p I + 2µ e , (4.4)
where p denotes the pressure,
I the unit tensor
e the rate of strain tensor,
d the deviatoric stress tensor and
µ the viscosity of the ﬂuid.
The components e
ij
of the tensor e are deﬁned by
e
ij
=
1
2
∂u
i
∂x
j
+
∂u
j
∂x
i
, (4.5)
so
σ
ij
= −pδ
ij
+µ
∂u
i
∂x
j
+
∂u
j
∂x
i
. (4.6)
39
If µ is constant it is possible to simplify the expression(4.2) by substitution of the incompress
ibility condition (4.1) to
ρ
∂u
∂t
+ (u . ∇)u
−µ △ u +∇ p = ρf, (4.7)
however, we shall prefer expression (4.2) because boundary conditions will be implemented
more easily in (4.2) than in (4.7).
Equation (4.2) can be made dimensionless by the introduction of the Reynolds number Re
deﬁned by
Re =
ρUL
µ
, (4.8)
where U is some characteristic velocity and L a characteristic length. Substitution of (4.8)
into (4.2), (4.4) gives
∂u
∂t
+ (u . ∇)u −div σ = f (4.9a)
σ = −p I +
2
Re
e (4.9b)
provided ρ does not depend on the space coordinates.
4.2 Initial and boundary conditions
In order to solve the equations (4.1), (4.2), it is necessary to prescribe both initial and bound
ary conditions. Since only ﬁrst derivatives of time are present in (4.2), it is suﬃcient to
prescribe the initial velocity ﬁeld at t = 0. Of course this velocity ﬁeld must satisfy the
incompressibility condition (4.1)
Since (4.2) is a system of second order diﬀerential equations in space, it is necessary to pre
scribe boundary conditions for each velocity component on the complete boundary of the
domain. However, at high Reynolds numbers the convective terms dominate the stress tensor
and as a consequence the boundary conditions at outﬂow must be such that they restrict the
ﬂow as little as possible.
The continuity equation and the pressure play a very special role in the incompressible Navier
Stokes equations. In fact there is a strong relation between both. It can be shown (Ladyshen
skaya, 1969), that for incompressible ﬂows no explicit boundary conditions for the pressure
must be given. Usually boundary conditions for the pressure are implicitly given by prescrib
ing the normal stress.
The following types of boundary conditions are commonly used for the twodimensional in
compressible NavierStokes equations (the extension to IR
3
is straight forward):
1 u given (Dirichlet boundary condition), (4.10a)
2 u
n
and σ
nt
given, (4.10b)
3 u
t
and σ
nn
given, (4.10c)
4 σ
nt
and σ
nt
given, (4.10d)
40
where u
n
denotes the normal component of the velocity on the boundary and u
t
the tangential
component. σ
nn
(n·σ·n) denotes the normal component of the stress tensor on the boundary
and σ
nt
(n · σ · t) the tangential component.
Typical examples of these boundary conditions are:
• At ﬁxed walls: noslip condition u = o. This is an example of type (4.10b).
• At inﬂow the velocity proﬁle given: u = g. This is also an example of type (4.10b).
Typical inﬂow proﬁles are u
t
= 0, u
n
parabolic or u
t
= 0 and u
n
constant.
At outﬂow one may prescribe the velocity. However, for convection dominated ﬂows, such a
boundary condition may lead to wiggles due to inaccuracies of the boundary conditions. Less
restrictive boundary conditions are for example u
t
= 0 and σ
nn
= 0 or σ
nt
= 0 and σ
nn
= 0.
The ﬁrst one (u
t
= 0, σ
nn
= 0) prescribes a parallel outﬂow with zero normal stress. From
(4.6) it can be derived that
σ
nn
= −p +
2
Re
∂u
n
∂n
, (4.11)
and σ
nt
=
1
Re
∂u
n
∂t
+
∂u
t
∂n
. (4.12)
As a consequence for high Reynolds numbers σ
nn
is approximately equal to −p. So σ
nn
= 0
implies that implicitly p is set equal to zero.
The boundary condition u
t
= 0, σ
nn
= 0 is correct for channel ﬂow. The boundary condition
σ
nt
= 0, σ
nn
= 0 is in general not correct. For a channel ﬂow, in which case we have a
parabolic velocity proﬁle,
∂un
∂t
is linear and hence σ
nt
= 0. However, in practical situations we
usually do not have a channel ﬂow and it is very hard to formulate correct boundary conditions
at outﬂow. Vosse (1987) has shown that the boundary condition σ
nt
= 0, σ
nn
= 0, although
incorrect, may be a good choice in numerical computations.
He performed some experiments in the ﬂow over a backward facing step. Figure 4.1 shows
the streamlines for Re = 150, and the length of the channel after the step large enough. In
this case the ﬂow at the end may be considered as a channel ﬂow and the boundary condition
1 2 3
4 5
6 7
Figure 4.1: Streamlines in backward step. Length of channel is 44H, where H is the step
height. Outﬂow boundary conditions σ
nn
= 0, u
t
= 0. Only the part (−6H, 6H) is plotted.
u
t
= 0, σ
nt
= 0 is a good approximation. However, if we make the length of the channel
such that the outﬂow boundary intersects the recirculation zone, it is impossible to deﬁne
correct boundary conditions. Figure 4.2 shows the results of computations with the boundary
conditions σ
nt
= 0, σ
nn
= 0. The agreement with the computations in the long channel is
remarkably good.
For a free surface we have the condition that there is no ﬂow through the surface and that the
tangential stress is equal to zero. In that case we use the boundary condition u
n
= 0, σ
nt
= 0.
41
1 2 3
4 5
6 7
7
7
8
9
10
11
12
13
Figure 4.2: Streamlines in backward step. Length of channel is 12H. Outﬂow boundary
conditions σ
nn
= 0, σ
nt
= 0.
One can show that the equations (4.1), (4.2) with a given initial ﬂow ﬁeld and combinations
of boundary conditions of type (4.10b4.10d) have a unique solution. There is, however, one
exception. If we solve the stationary incompressible NavierStokes equations with the velocity
prescribed on the complete boundary (actually each combination in which the normal velocity
component is prescribed), the velocity is unique, but the pressure is ﬁxed up to an additive
constant.
4.3 Axisymmetric ﬂow
Since in general threedimensional ﬂow computations are very expensive, one usually tries
to reduce the dimension by considering symmetry in the ﬂow or neglect ﬂow in a certain
direction. The last possibility results in twodimensional ﬂow, such as channel ﬂow. If we use
cylinder symmetry the ﬂow reduces to socalled axisymmetric ﬂow.
In such a case the NavierStokes equations and the velocity vector have to be transformed to
a cylindrical coordinate system with coordinates r, ϕ and z and velocity components u
r
, u
ϕ
and u
z
. In an axisymmetric ﬂow the variation in ϕdirection is zero and all ϕderivatives
may be neglected. Whether the u
ϕ
component may be neglected depends on the ﬂow. In
a rotating ﬂow u
ϕ
is not equal to zero and we have in that case three velocity unknowns,
although we have only two directions.
The incompressible NavierStokes equations in cylinder coordinates are still given by the
expressions (4.1) and (4.2). However, the operators divergence and gradient as well as the
stress tensor get a diﬀerent shape:
∇v =
∂v
∂r
,
1
r
∂v
∂ϕ
,
∂v
∂z
T
, (4.13a)
div u =
1
r
∂ru
r
∂r
+
∂u
ϕ
∂ϕ
+
∂ru
z
∂z
= 0 , (4.13b)
σ
rr
= −p + 2µ
∂u
r
∂r
, σ
ϕϕ
= −p + 2µ
u
r
r
+
1
r
∂u
ϕ
∂
ϕ
, (4.13c)
σ
zz
= −p + 2µ
∂u
z
∂z
, σ
rϕ
= σ
ϕr
= µ
r
∂
∂r
u
ϕ
r
+
1
r
∂u
r
∂ϕ
,
σ
ϕz
= σ
zϕ
= µ
1
r
∂u
z
∂ϕ
+
∂u
ϕ
∂z
, σ
rz
= σ
zr
= µ
∂u
r
∂z
+
∂u
z
∂r
.
42
Note that in these expressions the term 1/r frequently occurs. As a consequence one has to
be careful in the numerical computations at r = 0. At the symmetry axis r = 0, we need
extra boundary conditions, the socalled symmetry conditions. One immediately veriﬁes that
these symmetry conditions are given by:
u
r
= 0 ,
∂u
z
∂r
= 0 , u
ϕ
= 0 at r = 0 , (4.14)
or translated to stresses:
u
r
= 0 , u
ϕ
= 0 and σ
nt
= 0 at r = 0 . (4.15)
4.4 The weak formulation
In the next paragraph we shall derive the standard Galerkin equation for the incompressible
NavierStokes equations. First we shall derive the weak formulation. In order to consider the
four boundary conditions (4.10b 4.10d), we shall assume that the boundary consists of four
parts each with one of the boundary conditions (4.10b4.10d). Furthermore we shall restrict
ourselves in this chapter to stationary problems. The instationary case will be treated in
Chapter 7.
Γ
Γ
Γ
3
Γ
Ω
4
1
2
Figure 4.3: Artiﬁcial example with region Ω and boundaries Γ
1
, Γ
2
, Γ
3
and Γ
4
.
Furthermore we restrict ourselves for the moment to the twodimensional case. Figure 4.3
shows an artiﬁcial example of a region Ω with four boundaries Γ
1
to Γ
4
. On each of these
boundaries we have a diﬀerent type of boundary condition. The formulation of our example
is now: For x ∈ Ω solve u satisfying
div u = 0 , (4.16a)
−div σ +ρ(u · ∇ u) = ρf , (4.16b)
σ
ij
= −pδ
ij
+µ
∂u
i
∂x
j
+
∂u
j
∂x
i
, (4.16c)
u = g
1
for x ∈ Γ
1
, (4.16d)
u
n
= g
2
, σ
nt
= g
3
, x ∈ Γ
2
, (4.16e)
u
t
= g
4
, σ
nn
= g
5
, x ∈ Γ
3
, (4.16f)
σ
nt
= g
6
σ
nn
= g
7
, x ∈ Γ
4
. (4.16g)
43
In order to derive the weak formulation, equation (4.16a4.16b) must be multiplied by test
functions. First equation (4.16a) is multiplied by a test function q resulting in
Ω
q div u dΩ = 0 (4.17)
The momentum equations (4.16b) consist of two equations, which may be each multiplied by
separate test functions v
1
and v
2
. If we deﬁne v = (v
1
, v
2
)
T
these equations can be combined
to:
Ω
(−div σ +ρ(u · ∇ u)) · v dΩ =
Ω
f · v dΩ . (4.18)
Choosing v
2
respectively v
1
equal to zero gives us the original weak formulation for each of
the equations.
The ﬁrst term in (4.18) may be further reduced by applying integration by parts (Gauss
theorem) to
Ω
(−div σ) · v dΩ =
Ω
σ · ∇ v dΩ −
Γ
(v
n
σ
nn
+v
t
σ
nt
)dΓ, (4.19)
where Γ denotes the boundary of Ω, v
n
the component of v in the normal direction and v
t
in
the tangential direction. For a derivation of formula (4.19) we refer to Appendix A.
In order to apply the boundary conditions (4.16d4.16g), the boundary integral over Γ is split
into 4 parts Γ
1
, to Γ
4
.
On Γ
1
we have a prescribed velocity and hence the test function v is chosen equal to zero.
On boundary Γ
2
u
n
is prescribed and so v
n
is chosen equal to zero, and on boundary Γ
3
u
t
is
prescribed and v
t
is set equal to zero.
If we furthermore substitute relation (4.4) into (4.19), the ﬁrst term of (4.18) can be written
as:
Ω
−(div σ) · v dΩ =
Ω
2µ e · ∇ v dΩ −
Ω
p div v dΩ
−
Γ
2
g
3
v
t
dΓ −
Γ
3
g
5
v
n
dΓ −
Γ
4
g
6
v
t
+g
7
v
n
dΓ . (4.20)
Combinations of all these results leads to the weak formulation of the NavierStokes equations
(4.16a4.16g):
Find u , p with
u = g
1
at Γ
1
, u
n
= g
2
at Γ
2
, u
t
= g
4
at Γ
3
,
such that
Ω
q div u dΩ = 0 , (4.21)
Ω
2µe · ∇ v dΩ +
Ω
ρ(u · ∇ u) · v dΩ −
Ω
p div v dΩ =
Γ
2
g
3
v
t
dΓ +
Γ
3
g
5
v
n
dΓ +
Γ
4
g
6
v
t
+g
7
v
n
dΓ +
Ω
ρf · v dΩ , (4.22)
44
for all v such that v = o at Γ
1
, v
n
= 0 at Γ
2
and v
t
= 0 at Γ
3
, and e given by (4.5).
We see that in the relations (4.21) and (4.22) no derivatives of p and q are necessary. Hence
it is suﬃcient that p and q are integrable. With respect to u and v, ﬁrst derivatives are
required and hence not only u and v but also their ﬁrst derivatives must be integrable. As
a consequence we do not need continuity of p and q in the Galerkin formulation, but the
functions u and v must be continuous over the element boundaries.
The weak formulation (4.214.22) shows a strong relation between u and v, as well as between
p and q. If we for example demand that both u and v are divergence free, then the ﬁrst
equation (4.21) vanishes and the pressure disappears from (4.22). Indeed in all theoretical
investigations with respect to the weak form of the NavierStokes equations, p and q are taken
from the same space and u and v are taken from the same space. This observation motivates
the choice of the basis functions in the standard Galerkin method.
4.5 The standard Galerkin method
In the standard Galerkin method we deﬁne two types of basis functions, basis function Ψ
i
(x)
corresponding to the pressure and functions ϕ
i
(x) corresponding to the velocity components.
We may combine the velocity basis functions into vector form by
ϕ
i1
(x) =
ϕ
i
(x)
0
, ϕ
i2
(x) =
0
ϕ
i
(x)
. (4.23)
Now the approximation of u and p will be deﬁned by
p
h
=
m
¸
j=1
p
j
Ψ
j
(x) , (4.24)
u
h
=
n
¸
j=1
u
1j
ϕ
j1
(x) +u
2j
ϕ
j2
(x) =
2n
¸
j=1
u
j
ϕ
j
(x) . (4.25)
In (4.25) u
j
is deﬁned by u
j
= u
1j
, (j = 1(1)n), u
j+n
= u
2j
, (j = 1(1)n) and ϕ
j
in the same
way. For simplicity the summation has been carried out over all degrees of freedom including
the prescribed ones at the boundary. The test functions, however, must only be coupled to
the free degrees of freedom. Mark that the number of basis functions ϕ
i
(x) and Ψ
i
(x) do
not have to be the same, nor that these basis functions must have the same shape. In fact,
in most practical applications ϕ
i
(x) and Ψ
i
(x) are chosen diﬀerently.
In order to get the standard Galerkin formulation we substitute v = ϕ
i
(x), q = Ψ
i
(x) into
the weak formulation (4.214.22).
In this way we get:
Find p
n
and u
n
deﬁned by (4.24),(4.25) such that
Ω
Ψ
i
div u
h
dΩ = 0 , i = 1(1)m , (4.26)
45
and
Ω
2µ (e
h
· ∇ ϕ
i
)dΩ +
Ω
ρ(u
h
· ∇ u
h
) · ϕ
i
dΩ
−
Ω
p
h
div ϕ
i
) dΩ =
Γ
2
g
3
(ϕ
i
· t) dΓ +
Γ
3
g
5
(ϕ
i
· n) dΓ
+
Γ
4
g
6
(ϕ
i
· t) +g
7
(ϕ
i
· n) dΓ +
Ω
ρf · ϕ
i
dΩ
(4.27)
where e
h
is given by (4.5); u replaced by u
h
i in (4.27) must be taken for all free degrees of freedom u
i
.
Expression (4.27) may be easily evaluated as long as n or t on the boundaries Γ
2
, Γ
3
and Γ
4
are in the direction of the coordinate axis. If they are not in that direction it is necessary
to transform the unknowns on the boundary locally such that they are expanded into normal
and tangential direction. The technique of local transformations is described in Zienkiewicz
and Taylor (1989).
The ﬁnite element method may be used to construct the basis functions ϕ
i
and Ψ
i
, in the
same way as for the potential problem in Chapter 1. Once the basis functions are known, the
integrals (4.26) and (4.27) may be evaluated elementwise. Finally we arrive at a system of
m+2n −n
p
nonlinear equations with m+2n −n
p
unknowns, where n
p
denotes the number
of prescribed boundary values, and m and N are deﬁned in (4.24), (4.25).
Formally the system of equations can be written as
SU +N(U) −L
T
P = F (4.28a)
LU = o (4.28b)
where U denotes the vector of unknowns u
1i
and u
2i
, P denotes the vector of unknowns
p
i
, SU denotes the discretization of the viscous terms, N(U) the discretization of the non
linear convective terms, LU denotes the discretization of the divergence of u and −L
T
P the
discretization of the gradient of p. The righthand side F contains all contributions of the
source term, the boundary integral as well as the contribution of the prescribed boundary
conditions.
The solution of the system of equations (4.28a4.28b) introduces two diﬃculties. Firstly the
equations are nonlinear and as a consequence some iterative solution procedure is necessary.
Secondly equation (4.28b) does not contain the unknown pressure P. The last aspect intro
duces a number of extra complications which will be treated in Paragraph 4.7. The nonlinear
iterative procedure will be the subject of Paragraph 4.6.
4.6 Treatment of the nonlinear terms
In order to solve the system of nonlinear equations, an iterative procedure is necessary. In
general such a procedure consists of the following steps:
make an initial estimation
46
while (not converged) do
linearize the nonlinear equations based on the previous solution
solve the resulting system of linear equations
Examples of such methods are Newton methods, quasiNewton methods, and Picard type
methods.
In order to derive the iterative method one may proceed in two ways. Firstly one can apply
the method to equations (4.28a4.28b), which is the classical approach. An alternative is to
linearize the nonlinear diﬀerential equations ﬁrst and then to discretize the resulting linear
equation. Sometimes both approaches are identical. The last approach is conceptually easier
than the ﬁrst one and will therefore be applied in this paragraph. Since it is the only non
linear term in equation (4.16a4.16g) we only consider the convective terms.
Suppose we have computed the solution u
k
at a preceding iteration level k. We write this so
lution as u
k
. First we shall derive the Newton linearization. To that end we deﬁne f(u, ∇u)
as
f(u, ∇ u) = u · ∇ u . (4.29)
Taylorseries expansion of (4.29) gives
f
k+1
(u, ∇ u) = f
k
u
k
, ∇ u
k
+
u
k+1
−u
k
·
∂f
k
∂u
+∇
u
k+1
−u
k
·
∂f
k
∂∇u
+O
u
k+1
−u
k
2
.
(4.30)
Neglecting the quadratic terms and substitution of (4.29) gives
u
k+1
· ∇ u
k+1
≈ u
k
· ∇ u
k
+
u
k+1
−u
k
· ∇ u
k
+∇
u
k+1
−u
k
· u
k
= u
k+1
· ∇ u
k
+u
k
· ∇ u
k+1
−u
k
· ∇ u
k
.
(4.31)
(4.31) forms the standard Newton linearization. Alternative linearization are constructed by
the socalled Picard iteration methods in which one or both terms in (4.29) are taken at the
old level.
Hence:
(u · ∇ u)
k+1
≃ u
k+1
· ∇ u
k
, (4.32)
(u · ∇ u)
k+1
≃ u
k
· ∇ u
k+1
, (4.33)
(u · ∇ u)
k+1
≃ u
k
· ∇ u
k
. (4.34)
Numerical experiments have shown that from these last three possibilities only (4.33) produces
a good convergence. (4.31) shows that Newton is in fact a linear combination of (4.32)(4.34).
After linearization of the convective terms the standard Galerkin method may be applied,
resulting in a system of linear equations.
An important question with respect to these iterative methods is, how to ﬁnd a good initial
estimate. It is well known that Newton’s method converges fast (i.e. quadratically) as soon
as the iteration is in the neighborhood of the ﬁnal solution. However, if the distance between
iteration and solution is too large, Newton may converge slowly or even diverge. The Picard
iteration seems to have a larger convergence region, which means that this iteration does not
47
need the same accurate initial estimate, however, this method converges only linearly.
A possible strategy to converge to the ﬁnal solution is the following:
 start with some initial guess,
 perform one step Picard iteration in order to approach the ﬁnal solution, sometimes
more than one step,
 use Newton iteration in the next steps.
An initial guess may be for example the solution of the Stokes problem, which is formed by
the NavierStokes equations where the convective terms have been neglected. If the Reynolds
number is too high it is possible that the distance between the solution of Stokes and Navier
Stokes is too large. In that case the solution of NavierStokes with a smaller Reynolds number
might be a good choice. A process in which the Reynolds number is increased gradually is
called a continuation method.
In general one may expect that the iteration process no longer converges as soon as the ﬂow
becomes instationary or turbulent.
4.7 Necessary conditions for the elements
In Paragraph 4.5 it has been derived that the standard Galerkin method results in a system of
nonlinear equations of the form (4.28a4.28b). After linearization this system can be written
as
SU +N(U
k
)U −L
T
P = F ,
LU = o ,
(4.35)
where U
k
is the solution of the previous iteration.
In Section 4.5 it has already been pointed out that with respect to the velocity it is neces
sary that the approximation over the elementsides must be continuous, whereas the pressure
approximation may be discontinuous over the element boundaries. However, there is an
other problem. The continuity equation, discretized as LU = o, does contain only velocity
unknowns. However, the number of rows in this equation is completely determined by the
number of pressure unknowns. Suppose that there are more pressure unknowns than velocity
unknowns. In that case equation (4.35) contains more rows than unknowns and we have
either a dependent or inconsistent system of equations. In both cases the matrix to be solved
is singular. So we have to demand that the number of pressure unknowns never exceeds the
number of velocity unknowns. Since we want to solve the NavierStokes equations by ﬁnite
element methods for various grid size, this demand should be valid independently of the num
ber of elements. This demand restricts the number of applicable elements considerably. In
order to satisfy this criterion, a general accepted rule is that the order of approximation of the
pressure must be one lower than the order of approximation of the velocity. So if the velocity
is approximated by a linear polynomial, then the pressure is approximated by a constant per
element and so on.
Unfortunately this rule is not suﬃcient to guarantee that the number of pressure unknowns
is not larger than the number of velocity unknowns independently of the number of elements.
Consider for example the mesh in Figure 4.4a, based upon linear elements for the velocity
48
and constant elements for the pressure. For convenience the constant has been coupled to the
centroid of the element. In this example the mesh contains 8 pressure nodes and 9 velocity
b)
p=8, K=9, L=8 p=8, K=16, L=8
element
Ω Region with
P: pressure nodal points
K: velocity nodal points
on the outer boundary
L: velocity nodal points
a)
Figure 4.4: Triangular elements with three nodal points for the velocity (x) and one nodal
point for the pressure (0): a) vertices are the velocity nodal points: conforming element, b)
midpoints of the sides are the velocity nodal points: nonconforming element.
nodes. Suppose we have Dirichlet boundary conditions for the velocity, which means that all
boundary velocities are prescribed. The pressure is unique except for an additive constant.
To ﬁx this constant one of the pressure unknowns is given. So ﬁnally we have 2 velocity
unknowns and 7 pressure unknowns. Hence we have an example of a singular matrix. The
corresponding element is not admissible. One might remark that if we add suﬃcient elements
to the mesh eventually the number of velocity unknowns will be larger than the number of
pressure unknowns. However, practical computations have shown that in that case still the
matrix remains singular.
Figure 4.4b gives an example of an admissible element. The velocity unknowns are not posi
tioned in the vertices of the triangle but in the midside points. The velocity approximation
is linear but not continuous over the element boundaries. Such an element is called non
conforming and introduces for that reason extra problems with the approximation. However,
with respect to the continuity equation the element satisﬁes the demand that there must be
more velocity unknowns than pressure unknowns. A simple count shows that for the given
mesh, the number of velocity unknowns is equal to 16 and the number of pressure unknowns
49
equal to 7 in the case of Dirichlet boundary conditions.
The derivation of the admissibility condition given above is rather adhoc and does not ex
plain why an element is admissible. It just helps to identify nonadmissible elements. In the
literature, see for example Cuvelier et al (1986), an exact admissibility condition is derived.
This condition is known under the name BrezziBabuˆska condition (or BB condition). How
ever, the BB condition is rather abstract and in practice it is very diﬃcult to verify whether
the BB condition is satisﬁed or not. Fortin (1981) has given a simple method to check the
BB condition on a number of elements.
The method is based on the following statement:
an element satisﬁes the BB condition, whenever, given a continuous diﬀerentiable vector
ﬁeld u, one can explicitly build a discrete vector ﬁeld ˜ u such that:
Ω
Ψ
i
div ˜ u dΩ =
Ω
Ψ
i
div u dΩ for all basis functions Ψ
i
. (4.36)
In Cuvelier et al (1986) it is demonstrated how (4.36) can be checked for a number of elements.
Fortin (1981) formulates the following engineering statement with respect to the admissibility
of elements.
Midside velocity points in two dimensions and centroid velocity points on surfaces in
three dimensions make it possible to control the amount of ﬂow through a side (2D)
and through a surface (3D) of an element, without altering the amount of ﬂow through
other sides or surfaces. Hence such nodal points make it easier to satisfy the continuity
equations.
In fact it is suﬃcient that the normal component of the velocity in these centroid points is
available as unknowns.
In the literature frequently elements are used, that do not satisfy the BB condition. Such
elements cannot be used with the standard Galerkin method, however the penalty function
method (see Chapter 5), permits the use of these elements.
4.8 Examples of admissible elements
In this section we shall treat some of the admissible elements for twodimensional applica
tions. For a more thorough review as well as threedimensional elements we refer to Cuvelier
et al (1986) and Fortin (1981).
With respect to the types of elements that are applied we make a subdivision into two groups:
elements with continuous pressure (The TaylorHood family) and elements with discontinuous
pressure (The CrouzeixRaviart family). We shall restrict ourselves to quadratic elements,
since these elements are the most frequently used.
The TaylorHood family
TaylorHood elements (Taylor and Hood 1973) are characterized by the fact that the pressure
is continuous in the region Ω. A typical example is the quadratic triangle of Figure 4.5. In
this element the velocity is approximated by a quadratic polynomial and the pressure by a
50
2
Velocity:
x x x
x x
x
3
5 4
1 6 2
quadratic (6 nodal points: x)
Pressure: linear (3 nodal points: 0)
Accuracy velocity:
Accuracy pressure:
O(h )
3
O(h )
Figure 4.5: TaylorHood element (P
2
−P
1
).
linear polynomial. One can easily verify that both approximations are continuous over the
element boundaries. It can be shown, Segal (1979), that this element is admissible if at least
3 elements are used. The quadrilateral counterpart of this triangle is given in Figure 4.6.
2
(9 nodal points: x)
Velocity:
(4 nodal points: 0)
Pressure:
Accuracy velocity:
Accuracy pressure: O(h
O(h
3
)
)
bilinear
biquadratic
Figure 4.6: TaylorHood element (Q
2
−Q
1
)
The TaylorHood family is very suitable for the standard Galerkin methods treated in this
chapter. However, with respect the special methods of Chapter 5 and 6, the discontinuous
pressure elements are most favorable. For that reason we consider some of these elements.
The CrouzeixRaviart family
These elements are characterized by a discontinuous pressure; discontinuous on element
boundaries. For output purposes (printing, plotting etc.) these discontinuous pressures are
averaged in vertices for all the adjoining elements, see Figure 4.7. We shall discuss some of
the CrouzeixRaviart elements. The most simple CrouzeixRaviart element has already been
mentioned in Section 4.7. It is the nonconforming linear triangle with constant pressure.
Figure 4.8 shows this element again. Although this element has no practical signiﬁcance, we
shall use it to demonstrate how Fortin’s translation (4.36) of the BB condition can be checked.
To that end we explicitly create a vector ˜ u such that (4.36) is satisﬁed, i.e.
Ω
e
k
div u dΩ =
Ω
e
k
div ˜ u dΩ =
δΩ
e
k
˜ u . n dΓ (4.37)
given the continuous vector ﬁeld u. In (4.37) we have used the fact that the pressure is
constant per element, but discontinuously over the element boundary. As a consequence the
51
k
p
p
p
p
p
x
k
k
k
k
k
Figure 4.7: Averaging in each nodal point x
k
over all elements containing x
k
in order to get
a continuous pressure for CrouzeixRaviart elements.
Γ Γ
Γ
O(h )
3
1 2
Velocity:
Pressure:
Accuracy pressure:
Accuracy velocity:
Constant (1 nodal points: 0)
linear (3 nodal points: x)
2
O(h)
Figure 4.8: CrouzeixRaviart element (p
1
−p
0
)
basis functions Ψ
i
(x) are deﬁned by
Ψ
i
(x) =
1 in element e
i
,
0 in all other elements .
(4.38)
If we deﬁne ˜ u in the midside point of element e
i
by
Γ
k
u dΓ =
Γ
k
˜ u dΓ = Γ
k
 u
k
, (4.39)
with Γ
k
the kth side of e
i
, Γ
k
 the length of Γ
k
and u
k
the velocity in the midside point of
side Γ
k
, we see immediately that (4.37) is satisﬁed. (4.39) implicitly deﬁnes ˜ u. The deﬁnition
is unique and does not introduce inconsistencies along adjacent elements since (4.39) is deﬁned
along one side of the elements only. The natural extension of the linearconstant element is
the quadratic velocity, linear pressure element. The discontinuous linear pressure is deﬁned
by three parameters, for example the pressure and the gradient of the pressure in the centroid.
Application of the counting mechanism demonstrated in Section 4.7 shows that this element
cannot be admissible. In order to make it admissible it is necessary to introduce the velocity
vector in the centroid as extra unknowns. In this way we get the socalled extended quadratic
triangle of Figure 4.9.
The basis function for this element can be expressed in terms of the linear basis functions
52
Velocity:
2
x x x
x x x
x
3
5 4 7
1 6 2
enriched quadratic
Pressure:
(7 nodal points: x)
linear (1 nodal point: 0
including 2 derivatives)
Accuracy velocity: O(h )
3
Accuracy pressure: O(h )
Figure 4.9: CrouzeixRaviart element (P
+
2
−P
1
)
Ψ
i
(x) for triangles, deﬁned in Chapter 2:
˜ u
i
=
7
¸
j=1
u
ij
φ
j
,
with φ
j
= λ
j
(2λ
j
−1) + 3λ
1
λ
2
λ
3
, j = 1, 2, 3,
φ
4
= 4λ
2
λ
3
−12λ
1
λ
2
λ
3
, ϕ
5
= 4λ
1
λ
3
−12λ
1
λ
2
λ
3
, φ
6
= 4λ
1
λ
2
−12λ
1
λ
3
λ
3
,
φ
7
= 27λ
1
λ
2
λ
3
, (4.40)
and ˜ p = p
7
Ψ
1
+
∂p
∂x
1
x
7
Ψ
2
+
∂p
∂x
2
x
7
Ψ
3
,
with Ψ
1
= 1, (4.41)
Ψ
2
= x
1
−x
7
1
,
Ψ
3
= x
2
−x
7
2
.
The natural quadrilateral extension of this triangle is given in Figure 4.10.
3
(9 nodal points: x)
Velocity:
Pressure:
biquadratic
linear
(1 nodal point: 0,
including 2 derivatives)
Accuracy velocity:
Accuracy pressure: O(h )
O(h )
2
Figure 4.10: CrouzeixRaviart quadrilateral (Q
2
−P
1
)
4.9 Solution of the system of linear equations due to the discretization of
NavierStokes
In Sections 4.5 and 4.6 the discretization of NavierStokes equations has been derived. It has
been shown that in each step of the nonlinear iteration process it is necessary to solve a
system of linear equations of the shape
Su −L
t
p = F , (4.42a)
53
Lu = 0. (4.42b)
Here Su denotes the discretization of both the viscous terms and the linearized convective
terms. If the unknowns are numbered in the sequence: ﬁrst all velocity unknowns and then
all pressure unknowns it is clear that the system of equations gets the shape as sketched in
Figure 4.11 provided an optimal nodal point numbering is applied. Unfortunately this num
bering (velocity ﬁrst, pressure last) is far from optimal. The total proﬁle is still very large.
velocity
pressure
Figure 4.11: Proﬁle of the large matrix.
A much smaller proﬁle may be achieved if pressure and velocity unknowns are intermixed.
Figure 4.12 shows a typical example of such a numbering.
. . .
6 8 10 7 9
1 2 3 4 5
a
b . . .
p
1
, p
3
, . . .
Degrees of freedom:
c Degrees of freedom: u , u ,
12 11
p
1
, u
u , u ,
12 11
u , . . . ; u
21
, u
22
, u
23
,
12
,
13
u
22
, u
13
, u
23
, p
3
,
Figure 4.12: Renumbering of unknowns: a the region Ω, b sequence of unknowns component
wise, c sequence of unknowns nodal point wise.
The resulting system of equations has a much smaller proﬁle than the one for the original
system of equations. Due to renumbering, however, it is possible that the ﬁrst diagonal el
ements of the matrix are equal to zero. This is for example the case in Figure 4.12 where,
54
because of the boundary conditions, the ﬁrst degrees of freedom are pressures, which do not
appear in the continuity equation. In order to prevent zeros on the main diagonal, partial
pivoting must be applied. Unfortunately, partial pivoting reorders the sequence of the equa
tions and increases the proﬁle or band width. Therefore a large amount of extra computing
time and computer memory is required. However, it still remains cheaper than application of
the numbering of Figure 4.12b. It is possible to deﬁne a numbering which produces a nearly
optimal proﬁle and prevents the appearance of zeros at the start of the main diagonal. Such
a numbering, however, goes beyond the scope of this lecture.
Another problem arising from the zeros at the main diagonal is that it is not simple to use
iterative methods for the solution of the systems of linear equations.
In Chapters 5 and 6 we shall derive some alternative solution techniques in which the com
putation of pressure and velocity are segregated and as a consequence partial pivoting is not
longer necessary.
55
5 The penalty function method
5.1 Introduction
In Chapter 4 the discretization of the NavierStokes equations has been derived. It has
been shown that the direct solution of the resulting system of linear equations introduces
extra complications due to the absence of the pressure in the incompressibility constraint.
In this chapter we shall discuss a method which tries to solve this problem by segregating
computation of velocity and pressure. For the sake of simplicity we shall restrict ourselves to
the stationary Stokes equations, the extension to the instationary and to the nonlinear case
is straightforward.
Consider the stationary linear Stokes equation in dimensionless form:
−
1
Re
∆u +∇p = f , (5.1a)
div u = 0 . (5.1b)
(5.1a) follows from (4.9a) by neglecting the timederivative and the convective terms, sub
stitution of (4.9b) and the incompressibility condition in (4.9a4.9b). For the sake of the
argument we restrict ourselves to homogeneous Dirichlet boundary conditions:
u = 0 x ∈ ∂Ω (5.2)
The pressure p is unique up to an additive constant. The idea of the penalty method is to
perturb the continuity equation (5.1b) by a small term containing the pressure. An obvious
choice is
εp +div u = o , (5.3)
however, in the literature several other possibilities have been proposed.
The pressure p can be eliminated from (5.3) and substituted into (5.1a) resulting in an equa
tion for the velocity:
p = −
1
ε
div u , (5.4)
−
1
Re
∆u −
1
ε
∇(div u) = f . (5.5)
So one can ﬁrst solve the velocity from (5.5) and afterwards compute the pressure directly
from (5.4). Such an approach will be called segregated approach.
The perturbation (5.3) makes only sense if the solution of (5.4), (5.5) approaches the solution
of (5.1a5.1b) for ε approaching zero. It is a simple mathematical exercise to show that this
is indeed the case. See for example Cuvelier et al (1986) for the details.
The discretization of the penalty function method may be applied in two ways. One may
ﬁrst discretize the Stokes equations and then apply the penalty function method, or one may
discretize the formulation (5.4), (5.5). Both approaches will be treated separately in the
Sections 5.2 and 5.3.
56
Remark: the origin of the penalty method is motivated by the theory of optimization with
constraints. One can show (see Chapter 6) that (5.1a5.1b) is equivalent to the con
strained minimization problem:
Ω
1
2
1
Re
∇u
2
−u · f dΩ , (5.6)
for all functions u satisfying divu = 0.
5.2 The discrete penalty functions approach
In the discrete penalty function method, the (Navier)stokes equations are discretized before
applying the penalty function method. So we start with the formulation (4.42a4.42b):
Su −L
T
p = F , (5.7a)
Lu = 0 . (5.7b)
The continuity equation is perturbed by a term εM
p
p, where M
p
is the socalled pressure
mass matrix, deﬁned by
M
p
(i, j) =
Ω
ψ
i
ψ
j
dΩ , (5.8)
Hence
εM
p
p +Lu = 0 , (5.9)
or
p = −
1
ε
M
−1
p
Lu . (5.10)
Substitution of (5.10) in (5.7a) gives
(S +
1
ε
L
T
M
−1
p
L)u = F . (5.11)
So u is computed from (5.11) and afterwards p is computed from (5.10). In exactly the
same way as for the continuous equation, it can be shown that the solution of (5.10), (5.11)
approaches the solution of (5.7a5.7b).
If we want to solve (5.10), (5.11), it is necessary that the matrix M
−1
p
can be computed
easily. This is for example the case if M
p
is a lumped mass matrix. In the discontinuous
pressure elements, M
p
is in a block diagonal matrix, i.e. a diagonal matrix consisting of
small matrices as diagonal elements. One can easily verify that these small matrices have
the size of the number of pressure unknowns per element, since M
p
(i, j) = 0 if ψ
i
and ψ
j
correspond to diﬀerent elements. So for the TaylorHood family the matrix M
p
is lumped,
in the CrouzeixRaviart family inversion of M
p
is quite simple.
Another practical aspect is that the building of the matrix L
T
M
−1
p
L must be easy. Moreover,
it would be very nice if this matrix could be build per element by element matrices. In that
case the structures of S and L
T
M
−1
p
L are identical and the solution of (5.11) is as simple as
the solution of Su = F. One can immediately verify that for the TaylorHood elements this
is not the case. Consider for example the simple triangular mesh in Figure 5.1. For simplicity
57
1 2
9
3
4
5
6
7 8
Figure 5.1: Triangular mesh with quadratic TaylorHood triangles.
only the vertices of the triangles have been numbered. The midside points are present but
are not shown. From Chapter 2 it is clear that in the momentum equation for unknowns in
point 5 only the vertex unknowns in the points 1, 2, 4, 5, 6, 8 and 9 are present not those
of the points 3 and 7. If we furthermore simplify the matrix M
p
to a unity matrix, we can
compute the elements of L
T
M
−1
p
L relatively simple by:
L
T
L(i, j) =
¸
k
L
T
(i, k)L(k, j) =
¸
k
L(k, i)L(k, j) . (5.12)
Let us for the sake of the argument identify the matrix elements with the vertex numbers. In
fact each matrix element is in that case a 2 ×2 matrix itself.
From chapter 2 it is clear that S (5, 7) is equal to zero, since node 5 and node 7 do not belong
to the same element. However, L
T
L(5, 7) =
¸
k
L(k, 5)L(k, 7) is in general unequal to zero,
since for example L(4, 5) and L(4, 7) are unequal to zero. So L
T
L has a larger bandwidth or
proﬁle than S.
In the case of a CrouzeixRaviart element L(i, j) is only nonzero as long as point i and pointj
belong to the same element, because of the discontinuity of the pressure approximation. As
a consequence the matrix L
T
M
−1
p
L may be split into a sum over element matrices and
L
T
M
−1
p
L may be evaluated at element level. This makes the implementation of the penalty
function method relatively easy.
Before we consider some practical remarks concerning the penalty method in Section 5.4, we
shall ﬁrst analyze the socalled continuous penalty function method.
5.3 The continuous penalty function method
The penalty function method as introduced in Section 5.2 will be called discrete penalty
function method, since ﬁrst the equations are discretized and then the pressure is eliminated.
Conceptually it is much easier to start with the penalty function formulation (5.4), (5.5), and
then to discretize the equations.
For the sake of the argument we shall restrict ourselves to Dirichlet boundary conditions for
the velocity. Application of the standard Galerkin method to equation (5.5) gives component
58
wise:
Ω
{
1
Re
∇(u
h
)
k
· ∇ϕ
i
+
1
ε
div u
h
∂ϕ
i
∂x
k
}dΩ =
Ω
f
k
ϕ
i
dΩ , (5.13)
i = 1, 2, ..., n; k = 1, 2, 3,
where (u
h
)
k
denotes the kth component of u
h
and f
k
the kth component of f.
In matrix vector notation (5.13) can be written as
Su +
1
ε
Au = F . (5.14)
A clear advantage of the formulation (5.14) is that it is no longer necessary to compute the ma
trix L
T
M
−1
p
L and as a consequence TaylorHood elements are as simple as CrouzeixRaviart
elements. However, a closer examination of (5.13) shows that (5.14) has a disadvantage which
is not present in (5.11).
If in (5.11) we let ε approach zero, it is immediately clear that
L
T
M
−1
p
Lu →0 , (5.15)
and it is easy to show that also
Lu →0 . (5.16)
From (5.14) it follows that ε →0 implies
Au →0 , (5.17)
or
Ω
div u
n
div ϕ
i
dΩ = 0 , (5.18)
for all basis functions ϕ
i
.
(5.18) is equivalent to (4.26), where div ϕ
i
plays the role of the basis function ψ
i
.
Now consider the quadratic TaylorHood element. In equation (5.18) div ϕ
i
is a linear discon
tinuous polynomial. So relation (5.18) is comparable to the discretization of the continuity
equation for a quadratic CrouzeixRaviart element with linear pressure. From Section 4.8,
however, we know that such an element is not admissible.
Although the penalty function formulation does not give rise to singular systems of equations,
still one can expect some troubles with elements which in the limit approach nonadmissible
elements. Indeed, computations with this approach, show that the velocity behaves rather
good, but that the pressure produce unrealistic wiggles (Sani et al 1981). These wiggles are
generally known as spurious modes or checkerboard modes for the pressure.
In the literature nonadmissible elements are frequently used. To suppress the wiggles one
either uses some ﬁltering (smoothing) of the computed pressure, or the penalty matrix is
computed with a socalled reduced integration technique (Malhus et al 1978). The ﬁltering
technique may produce nice results, however, this technique is not so easy at nonrectangular
grids. With the reduced integration technique, actually the term
Ω
div u
h
div ϕ
i
dΩ is approx
imated by an inaccurate quadrature rule. This is comparable to approximating div ϕ
i
by
59
a lower degree polynomial. As a consequence the actual pressure approximation is reduced,
leading to an admissible but less accurate element.
From the discussion given above it is clear that the discrete penalty function approach is su
perior above the continuous penalty method. In the remainder of this lecture we shall restrict
ourselves to this discrete form.
5.4 Practical aspects of the penalty function method
In the previous sections the continuous and discrete penalty function method have been
derived. It has been shown that the discrete penalty function method, applied to admissible
elements is the most recommendable. What remains is the choice of the parameter ε. It is
clear that ε must be so small that the computed velocity and pressure approximates the actual
solution accurately. However, there is one draw back with respect to the penalty function
formulation. In fact we add the matrix
1
ε
L
T
M
−1
p
L to the matrix S in (5.11). The matrix S
corresponds to the discretization of a vector Laplacian equation (in the case of Stokes ﬂow)
or a convectiondiﬀusion type vector equation (NavierStokes ﬂow). It is well known that this
matrix is good conditioned and has nice properties for many kinds of solvers.
The matrix L is a m × 2n matrix, where in general m ≪ n. The maximal rank of L is
m or m− 1, depending on the type of boundary conditions. As a consequence the rank of
the 2n × 2n matrix L
T
L can also not exceed m or m− 1. The same is true for the matrix
L
T
M
−1
p
L. As a consequence the penalty matrix is a singular matrix with a large number
of dependent rows. This penalty matrix is multiplied by a large number 1/ε and added to a
nonsingular matrix. It is very natural to assume that the resulting matrix has a condition
number which is proportional to 1/ε. Indeed practical computations show such a behavior.
As a consequence ε may not be chosen too small since otherwise the condition of the resulting
matrix is so bad that an accurate numerical solution is not longer possible. As a rule of the
thumb one may choose ε such that
εp ≈ ku , (5.19)
where k is some value between O(10
−3
) and O(10
−9
). This statement is based on a 64 bits
accuracy for the computations, i.e. double precision arithmetic on a 32  bits computer.
Especially for very viscous ﬂow, which for example appear in nonnewtonian ﬂuids, a good
choice for ε may be hard to ﬁnd.
The fact that we have to choose ε carefully is a clear disadvantage. The relative large condi
tion number has also another disadvantage. It is nearly impossible to solve the matrix with
standard iterative techniques. Only if we enlarge the value of ε and use some outer iterative
procedure, it is possible to use penalty function type methods in combination with iterative
linear solvers. A well known outer iterative procedure is the socalled Uzawa scheme (Cuvelier
et al 1986), which is however, beyond the scope of this lecture.
Despite the clear disadvantages of the penalty function method, still this method is very
popular. The reason is that it is a rather simple and fast method, provided the number of
unknowns are not too large. The segregation of pressure and velocity gives a large reduction
in computing time compared to the direct solution of the original equations. Only for large
threedimensional problems, direct linear solvers become so expensive that it is practically
60
nearly impossible to apply this method.
In the next chapter we shall derive an alternative segregated method to solve the incompress
ible NavierStokes equations, the socalled solenoidal approach.
61
6 Divergencefree elements
6.1 Introduction
In Chapter 4 we have treated the standard Galerkin approach. It has been shown that this
method may be applied, provided an admissible element is used. A clear disadvantage of the
Galerkin method is the unavailability of the pressure in the continuity equation, and as a
consequence the presence of zeros on the main diagonal of the equations (4.42a4.42b). As a
consequence the solution of the equations introduces extra diﬃculties. In the penalty function
method we have solved this problem by segregating pressure and velocity, thus reducing the
number of unknowns as well as avoiding the zeros at the main diagonal. The only problem
with this method is that it is sometimes diﬃcult to get a good of choice of the small parameter
ε and the bad condition of the remaining system of equations. Especially for very viscous
(nonnewtonian ﬂuids) this may be a problem. In this chapter we shall derive an alternative
segregated approach in which it is not necessary to choose some parameter, and which does
not lead to ill conditioned systems of equations.
To that end we consider the weak formulation (4.214.22). If for the sake of simplicity we ne
glect both the convective terms and all boundary integrals, substitute the continuity equation
in the stress tensor and use the dimensionless form, (4.214.22) can be written as:
Ω
q div udΩ = 0 , (6.1a)
Ω
1
Re
∇u · ∇vdΩ −
Ω
p div vdΩ =
Ω
f · vdΩ . (6.1b)
Except with respect to the essential boundary conditions, u and v are chosen in the same
space. So if we restrict this space to all divergencefree vector ﬁelds, then it is immediately
clear that (6.1a) is satisﬁed automatically and, moreover,
Ω
p div vdΩ vanishes. In other words
an equation in the velocity alone remains. Unfortunately it is very hard to ﬁnd functions
which are completely divergencefree. However, formulation (6.1a6.1b) shows that it is not
necessary to demand div u = 0, but that it is suﬃcient to weaken this statement to
Ω
q div vdΩ = 0 for all q . (6.2)
If both our test functions and the solution u satisfy (6.2), (6.1a) is satisﬁed and (6.1b) reduced
to
Ω
1
Re
∇u · ∇vdΩ =
Ω
f · vdΩ, for all v , (6.3)
which is again an equation for the velocity alone.
If we construct a basis ϕ
i
in the space of approximately divergencefree vector ﬁelds satisfying
(6.2), (6.3) can be written as:
u
h
=
n
¸
j=1
u
j
ϕ
j
(x) , (6.4a)
62
n
¸
j=1
u
j
Ω
1
Re
∇ϕ
j
· ∇ϕ
i
dΩ =
Ω
f · ϕ
i
dΩ , i = 1(1)n . (6.4b)
The extension to the nonlinear NavierStokes equations, the general form of stress tensor
and nonvanishing boundary integrals is trivial.
The system of equations (6.4b) is of double Laplacian type (in IR
2
), and may be solved quite
easily. The only problem is of course, how to construct basis functions that are divergencefree
in the sense of (6.2). In Section 6.2 we shall show the construction of such basis functions for
one speciﬁc element.
6.2 The construction of divergencefree basis functions for 2D elements
In this section we shall construct divergencefree basis functions in the sense of (6.2) for two
dimensional elements. The extension to IR
3
is quite complicated and introduces a number
of extra problems. We refer to Cuvelier et al (1986) for a derivation. The construction of
divergencefree basis functions is relatively simple for elements of the CrouzeixRaviart type,
how to construct such functions for TaylorHood elements is not known at this moment. For
simplicity we shall restrict ourselves to triangular elements; the extension to quadrilaterals
is straightforward. In fact we shall derive these basis functions for the extended quadratic
triangle of Figure 4.9, with the basis functions given in (4.40). But in order to get some insight
in the problems associated with this derivation we shall ﬁrst consider the nonconforming
linear triangle with constant pressure given in Figure 4.8.
In general (6.2) can be written as
Ω
Ψ
i
div u
h
dΩ = 0 for all pressure basis functions Ψ
i
. (6.5)
In other words we have to construct basis functions ϕ
i
such that
Ω
Ψ
j
div ϕ
i
dΩ = 0 , for all Ψ
j
. (6.6)
One may expect that the basis functions ϕ
i
(x) satisfying (6.6), have vector components,
which are both nonzero, so these will be linear combinations of the classical basis functions
deﬁned by (4.23).
In order to ﬁnd these linear combinations we recall that for the nonconforming element, (6.6)
reduces to
Ω
e
j
div ϕ
i
dΩ = 0 , (6.7)
for all elements e
j
, since Ψ
j
is one in element e
j
and zero outside the element.
Application of the Gaussdivergence theorem to (6.7) gives
Γ
e
j
ϕ
i
· ndΓ = 0 , (6.8)
where Γ
e
j
is the boundary of the triangle e
j
. In each triangle we have 6 unknown velocities
corresponding to the three midside points. In all previous examples (compare with 4.25) these
63
velocity components were in fact the Cartesian components. However, for our purposes it is
better to decompose the velocity in a tangential and a normal component along the boundary
of the triangle. See Figure 6.1 for a deﬁnition. In this element the velocity u is approximated
by
t
x x x
x x
x
x
x
x
3
4 5
1 6 2
3
5
1
Γ
Γ Γ
Γ
2
3
1 2
n
Figure 6.1: Element e, with boundary Γ
2
separately plotted. Normal and tangential unity
vectors on Γ
2
are indicated.
u
h
=
¸
k=2,4,6
u
1k
ϕ
k1
(x) +u
2k
ϕ
k2
(x) , (6.9)
which can be written as
u
h
=
¸
k=2,4,6
u
nk
ϕ
kn
(x) +u
tk
ϕ
kt
(x) , (6.10)
where u
nk
respectively u
tk
denote the normal and tangential component of u in node k.
ϕ
kn
(x) and ϕ
kt
(x) are deﬁned by
ϕ
kn
(x) = ϕ
k
(x)n
k
, (6.11a)
ϕ
kt
(x) = ϕ
k
(x)t
k
. (6.11b)
Here ϕ
k
(x) denotes the scalar basis function corresponding to point k and n
k
and t
k
the
normal respectively tangential vector corresponding to the edge on which node k is positioned.
The basis functions ϕ
kt
(x) satisfy (6.8) exactly, since ϕ
k
(x) = 1 on the edge containing node k
and linear from 1 to 1 at the other sides. On the edge containing node k we have n
k
·t
k
= 0, on
the other edges n is constant and the integral over ϕ
k
(x) vanishes because of the linearity. So
one set of divergencefree basis functions is formed by the set of basis functions corresponding
to the tangential components.
The other set of basis functions must be constructed such that (6.8) is satisﬁed. Now
Γ
k
u
h
· ndΓ (6.12)
deﬁnes the amount of ﬂow through side Γ
k
. For an incompressible ﬂow one can deﬁne a
stream function Ψ by
u = (
∂Ψ
∂y
, −
∂Ψ
∂x
) . (6.13)
64
An important property of the stream function is that the diﬀerence between the values of
the stream function in two points deﬁnes the amount of ﬂow between these two points. See
Figure 6.2 for an explanation. So it is quite natural to deﬁne a discrete stream function in
2
1
2
u
Γ
Ψ
Ψ
1
Figure 6.2: Amount of ﬂow between points 1 and 2 is given by
Γ
u · ndΓ = Ψ
2
−Ψ
1
the vertices by
Ψ
k+1
−Ψ
k
=
Γ
k+2
u
h
· ndΓ , k = 1, 2, 3 , (6.14)
where a cyclic permutation with the numbers 1, 2 and 3 is used. It is clear that deﬁnition
(6.14) does not introduce any contradictions. Moreover, this stream function Ψ is constructed
such that (6.8) is satisﬁed exactly.
Deﬁnition (6.14) is unique for the complete mesh, since in (6.14) only values on one element
side are used, so the deﬁnition in contiguous elements is the same. Furthermore, given
a divergencefree vector ﬁeld in the sense of (6.2) or (6.5), the stream function Ψ can be
computed in each vertex, provided it is ﬁxed in an arbitrary vertex.
From (6.14) we can express the normal component on the mid side points into the values of
the stream function on the vertices. Using the fact that the basis function ϕ
k
(x) is equal to
1 along the edge corresponding to node k, it follows immediately that
u
n2
=
Ψ
2
−Ψ
1
L
1
, u
n4
=
Ψ
3
−Ψ
2
L
2
, u
n6
=
Ψ
1
−Ψ
3
L
3
, (6.15)
where L
k
denotes the length of side Γ
k
.
Substitution of (6.15) into (6.10) gives
u
h
=
¸
k=2,4,6
u
tk
ϕ
kt
(x) + (
1
L
2
ϕ
6n
−
1
L
3
ϕ
2n
)Ψ
1
+(
1
L
3
ϕ
2n
−
1
L
1
ϕ
4n
)Ψ
2
+ (
1
L
1
ϕ
4n
−
1
L
2
ϕ
6n
)Ψ
3
. (6.16)
In other words, the second set of basis functions, denoted by ϕ
kΨ
(k = 1, 2, 3) is given by
ϕ
kΨ
=
1
L
k+1
ϕ
2(k+2)n
−
1
L
k+2
ϕ
2k
(cyclic) . (6.17)
One easily veriﬁes that these functions satisfy (6.8).
65
This completes the construction of the 6 basis functions that are divergencefree. Substitution
of these basis functions into the weak formulation (6.4b) gives a system of linear equations in
the unknowns u
tk
and Ψ
k
.
The basis functions ϕ
kt
and ϕ
kΨ
are characterized by the following properties:
i The components of ϕ
kt
and ϕ
kΨ
are linear in x and y per element.
ii ϕ
tj
= 0 at the midside nodes not equal to j. ϕ
tj
is equal to the unit tangential vector
in midside node j.
iii ϕ
Ψj
= 0 at the midside node opposite to vertex j. ϕ
Ψj
is equal to plus or minus the
unit normal vector divided by the length of the side, in the two midside points of the
sides containing the vertex j. The sign is opposite for these two points.
It must be remarked that in order to get a unique deﬁnition of normal and tangential compo
nents, it is necessary to deﬁne the normal and tangential vector in the same way in adjacent
elements. A possible unique deﬁnition is to choose the tangential vector from smallest node
number to highest node number and deﬁning the corresponding normal vector in the clock
wise direction. See Figure 6.3.
In conclusion, the procedure to construct divergencefree basis functions consists of the fol
lowing steps:
 deﬁne basis functions corresponding to normal components and tangential components
at mid side points
 the ﬁrst set of basis functions is formed by the basis functions corresponding to the
tangential components
 Introduce stream function unknowns at the vertices and eliminate the normal com
ponents of the velocity at midside points by expressing them in the stream function
unknowns. The basis functions corresponding to the stream function unknowns from
the second set of basis functions.
The computation of the pressure is postponed to Section 6.5. Now we have seen how the
3
2
1
8
6
t n
e
e
1
Figure 6.3: Deﬁnition of normal and tangential vector at side 16 for elements e
1
and e
2
. The
global node numbering is plotted.
66
divergencefree basis functions may be derived for the nonconforming triangle, we shall apply
the same procedure for the more complex extended quadratic triangle with linear pressure.
The ﬁrst step in the construction of the divergencefree basis functions is the elimination of
the velocity in the centroid points of the elements and as a consequence the gradient of the
pressure in these points. This process is also known as static condensation.
Substitution of the pressure basis functions given in (4.40) into (6.5) gives
e
div u
h
dΩ = 0 , (6.18a)
e
(x −x
7
) div u
h
dΩ = 0 , (6.18b)
where the centroid is denoted by x
7
.
From (6.18b) u
h
in the centroid can be expressed in terms of the velocity components in the
remaining points of the element. It can be easily shown that (6.18b) is a regular system of
equations for u
7
(see for example Cuvelier et al 1986). Substitution of the basis functions
ϕ
17
(x) and ϕ
27
(x) per element into (6.1b) gives an expression for the gradient of the pressure
in terms of the velocity unknowns at the boundary. Also in Cuvelier et al (1986) it is shown
that this expression is never singular. So in fact both the pressure gradient and the velocity
in the centroid have been eliminated. The practical procedure will be treated in Section 6.3.
Once the velocity components in the centroid have been eliminated, twelve velocity compo
nents remain, six in the vertices and six in the mid side points.
We write the approximation u
h
in the following form per triangle
u
h
=
3
¸
i=1
{u
1i
Φ
1i
+u
2i
Φ
2i
} +
6
¸
i=4
{u
ni
Φ
ni
+u
ti
Φ
ti
} . (6.19)
The functions Φ
1i
and Φ
2i
are adapted basis functions because of the elimination of the
centroid degrees of freedom. The velocity components in the midside points are split in normal
and tangential components in exactly the same way as for the nonconforming element.
For this element again, the stream function in the vertices is introduced as new unknowns
and the velocity components in the midside points are eliminated using relation (6.14). It
can be shown that the thus constructed basis functions are divergencefree.
In the next section we shall treat how the element matrices and vectors corresponding to the
(approximate) divergencefree basis functions may be computed, without actually creating
these basis functions.
6.3 The construction of element matrices and vectors for (approximate)
divergencefree basis functions
The Galerkin equations for the Stokes equations using divergencefree basis functions are
given in (6.4b). The corresponding element matrices and vectors may be constructed by ex
plicit substitution of the divergencefree basis functions constructed in Section 6.2.
67
However, an alternative possibility is to start with the original set of equations (4.26), (4.27)
using the classical basis functions and then to perform the elimination process. Let us demon
strate this process for the extended quadratic triangle. We shall execute the algorithm in two
steps. In the ﬁrst step the centroid velocity components and the gradient of the pressure are
eliminated. In the second step the normal components of the velocity at midside points are
eliminated.
To perform step 1 we start with the system of linear equations (4.42a4.42b):
Su −L
T
p = F , (6.20a)
Lu = 0 . (6.20b)
The velocity u will be split into a part corresponding to the centroid (u
z
) and the rest of the
velocities (ˆ u). In the same way the pressure p will be split into a part p
∇
corresponding to
the gradient of the pressure in the centroid and a part ˆ p corresponding to the values of p in
the centroids. Hence we deﬁne
u =
¸
ˆ u
u
z
¸
, p =
¸
ˆ p
p
∇
¸
. (6.21)
If we split equations (6.20a6.20b) according to (6.21) we get
S
1
ˆ u +S
2
u
z
−L
T
2
ˆ p
∇
= F , (6.22a)
L
1
u = L
11
ˆ u +L
12
u
z
= 0 , (6.22b)
L
2
u = L
21
ˆ u +L
22
u
z
= 0 . (6.22c)
The elimination of the velocity components in the centroid follows from (6.22c):
u
z
= −L
−1
22
L
21
ˆ u , (6.23)
in other words
u = R
z
ˆ u , (6.24)
with
R
z
=
¸
I
R
0
¸
=
¸
I
−L
−1
22
L
21
¸
. (6.25)
From (6.25) we get
L
2
R
z
= L
21
I +L
22
R
0
= L
21
−L
22
L
−1
22
L
21
= 0 , (6.26)
and hence also
R
T
z
L
2
= 0 . (6.27)
Substitution of (6.24) into (6.22a) gives:
S
1
ˆ u +S
2
R
0
ˆ u −L
T
1
ˆ p −L
T
2
p
∇
= 0 . (6.28)
If we premultiply (6.28) by R
T
z
and use (6.27) we get:
(R
T
z
S
1
+R
T
z
S
2
R
0
)ˆ u −R
T
z
L
T
1
ˆ p = R
T
z
F , (6.29)
68
and (6.22b) can be written as
L
1
u = L
1
R
z
ˆ u = 0 . (6.30)
In other words the result of the elimination process is
ˆ
Sˆ u −
ˆ
L
T
ˆ p =
ˆ
F , (6.31a)
ˆ
Lˆ u = 0 , (6.31b)
with
ˆ
S = R
T
z
S
1
+R
T
z
S
2
R
0
, (6.32a)
ˆ
L = L
1
R
z
, (6.32b)
ˆ
F = R
T
z
F . (6.32c)
Due to the discontinuous character of the pressure, the matrices
ˆ
S and
ˆ
L and the righthand
side vector
ˆ
F may be computed at element level.
The next step is the elimination of the normal components in the midside points in favor of
the stream function at the vertices. This elimination process can be expressed by a matrix
R
d
according to
ˆ u = R
d
u
d
, (6.33)
where u
d
is the vector of new unknowns.
The transformation is such that the continuity equation is satisﬁed exactly in other words
ˆ
LR
d
= 0 . (6.34)
Substitution of (6.34) in (6.31a6.31b) and premultiplication by R
T
d
gives
R
T
d
ˆ
SR
d
u
d
= R
T
d
ˆ
F . (6.35)
Again the matrix and vector can be constructed at elements level.
So we have shown that it is not necessary to construct the divergencefree basis functions
explicitly. It is suﬃcient to construct the transformation matrices R
z
and R
d
per element and
to compute the ﬁnal element matrix and element righthand side by matrixmatrix respectively
matrixvector multiplications.
We have constructed a new set of equations with new unknowns. The question that remains
is of course: is this new system of equations uniquely solvable? Furthermore, which type of
boundary conditions must be prescribed to the new unknowns. These questions will be the
subject of Section 6.4.
6.4 Boundary conditions with respect to the divergencefree elements
In the construction of the divergencefree elements treated in the preceding sections, it was
necessary to introduce new unknowns. First of all the velocity has been decomposed into
normal and tangential part. With respect to the boundary conditions this does not introduce
extra problems, since in general boundary conditions are formulated in tangential and normal
direction and not in Cartesian directions. Next the stream function has been introduced as
69
new unknown. This introduces two extra problems. The ﬁrst one is that the stream function
is never unique but ﬁxed up to an additive constant. As a consequence, it is necessary to
prescribe the stream function in at least one point. The second one is that, if the normal
velocity is unknown at a part of the boundary, it is not automatically possible to compute
the stream function along that part. This is best demonstrated with the conﬁguration of
Figure 6.4. In this Figure we have one inﬂow with prescribed velocity ﬁeld (boundary i),
three ﬁxed walls with noslip boundary condition (boundaries ii, iv and vi) and two outﬂow
boundaries where for example the normal stress is prescribed (boundaries iii and v). If the
stream function at the common point of sides i and vi is set equal to zero then Ψ along
sides i, ii and vi may be computed from the deﬁnition (6.14). The stream function value at
sides iii and v does not have to be prescribed, since the normal component at these sides is
not prescribed. However, at side iv we have a noslip condition, implying u
n
= 0. Hence Ψ
is constant at side iv but the value is unknown. So for such boundaries it is necessary to
prescribe the boundary condition Ψ is unknown constant. For a practical implementation of
such a boundary condition the reader is referred to Cuvelier at al (1986).
v
ii
vi
i
iv
iii
Figure 6.4: Example of a region with two outﬂow parts. On the boundary iv we have the
boundary condition Ψ equals unknown constant
6.5 Computation of the pressure
Once the velocity is known, the pressure must be computed. Let us ﬁrst restrict ourselves
to the nonconforming triangle. We return to the weak formulation (6.1b), and substitute
nondivergencefree basis functions. An obvious choice is to use the basis functions ϕ
nh
corresponding to the normal components of the velocity. Substitution of these basis functions
in (6.1b) gives
Ω
1
Re
∇u
h
· ∇ϕ
nk
dΩ −
Ω
p
h
div ϕ
nk
=
Ω
fϕ
nk
dΩ , k = 1, 2, ... . (6.36)
Since u
h
is known, this is an equation in the unknowns p alone. Since ϕ
nk
= 0 outside the
two elements containing node k it is suﬃcient to consider two adjacent elements e
1
and e
2
as
indicated in Figure 6.5. (6.36) reduces to
e
1
∪e
2
p
h
div ϕ
n
dΩ =
e
1
∪e
2
{
1
Re
∇u
h
· ∇ϕ
n
−f · ϕ
n
}dΩ , (6.37)
70
where ϕ
n
is the abbreviated notation for ϕ
nk
in the common midside point. Application of
2
1 2
e
e
4 3
n
1
2
p
p
1
Figure 6.5: Two adjacent elements e
1
and e
2
. The pressure nodal points have been indicated.
the Gauss divergence theorem to the lefthand side of (6.37) gives
e
1
∪e
2
p
h
div ϕ
n
dΩ =
∂e
1
p
h
ϕ
h
· ndΓ +
∂e
2
p
h
ϕ
n
· ndΓ = (p
1
−p
2
)L
23
, (6.38)
where L
23
is the length of side 23.
Hence given p
1
, p
2
can be computed immediately. This procedure may be repeated for all
adjacent elements. So starting by prescribing the pressure in one element, the pressure can
be computed in all elements by ﬁnding neighboring elements and applying (6.38).
The computation of the pressure in the case of the extended quadratic CrouzeixRaviart
triangle is again performed in two steps. In step 1 the pressure in the centroids is computed
using the method described for the nonconforming triangle.
In the second step the gradient of the pressure in the centroid is computed. To that end
equation (6.22a) is applied at element level. This is possible since each row of the divergence
matrix L has only nonzero contributions for one element at a time, due to the discontinuous
pressure deﬁnition.
Hence
−L
T
2
p
∇
= F −S
1
ˆ u −S
2
u
z
+L
T
1
ˆ p , (6.39)
where u
z
= −L
−1
22
L
21
ˆ u.
Per element L
T
2
reduces to a (2×2) matrix, hence (6.39) immediately deﬁnes p
∇
per element.
6.6 Practical aspects of the divergencefree elements
In this chapter we have shown how divergencefree elements may be constructed in 2D. The
derivation has been restricted to discontinuous pressure elements. The extension to three
dimensional element is quite complicated, and seems rather impractical. The construction
of element matrices and vectors may be performed by the introduction of transformation
matrices. Complicating factor may be the deﬁnition of boundary conditions as shown in
Section 6.4. Once the velocity is computed a postprocessing step is necessary to compute
the pressure. A clear advantage of the use of divergencefree elements is that velocity and
pressure are segregated, without the introduction of an extra parameter to be chosen. As a
consequence, this method allows the solution of the resulting systems of equations by iterative
techniques. So for twodimensional problems the method based on divergencefree elements
seems very promising.
71
7 The instationary NavierStokes equations
7.1 Introduction
Until now we have restricted ourselves to stationary NavierStokes equations only. However,
in some practical applications one is also interested in the timedependent behavior of the
solution. Or, alternatively, sometimes it is hard to ﬁnd the solution of a stationary problem,
because the iteration process does not converge well enough. In that case, considering the
stationary solution as limit of a timedependent solution may help to get a convergent solution.
For that reason we shall consider some methods to solve the timedependent NavierStokes
equations.
In ﬁrst instance we shall use the method of lines as derived in Chapter 3. With respect to the
discretization of the continuity equation all three methods derived in the previous chapters
may be applied. This well be the subject of Section 7.2.
In Section 7.3 an alternative approach will be treated, which is especially developed for
timedependent incompressible ﬂows. This method, the socalled pressure correction method,
consists of two steps per timestep. In ﬁrst instance the velocity is computed using the pressure
at the old timelevel and neglecting the continuity equation. In general, the computed velocity
is not divergencefree. In the next step the velocity is projected onto the space of divergence
free vectors. This step also introduces a Laplacian type equation for the pressure.
7.2 Solution of the instationary NavierStokes equations by the method of
lines
The instationary incompressible NavierStokes equations read (compare with 4.3):
ρ
∂u
∂t
+ρu · ∇u −div σ = ρf , (7.1a)
div u = 0 . (7.1b)
In order to get a ﬁnite element discretization, the weak from of (7.1a)  (7.1b) is derived. To
that end equation (7.1a) is multiplied by a timeindependent test function v and (7.1b) by a
test function q. If we neglect the boundary integrals and furthermore apply (4.4) in the same
way as for the stationary case, the weak form of (7.1a) may be written as
Ω
ρ
∂u
∂t
· vdΩ +
Ω
2µe · ∇vdΩ +
Ω
ρ(u · ∇u)vdΩ −
Ω
pdiv vdΩ =
Ω
f · vdΩ , (7.2a)
Ω
q div udΩ = 0 . (7.2b)
We see that (7.2b) does not contain a timederivative, and this will be an extra complicating
factor. If we approximate u and p in the same way as in (4.24), (4.25), however, with
timedependent coeﬃcients, and if we substitute the timeindependent basis functions ϕ
i
(x)
72
respectively Ψ
i
(x), the Galerkin method reduces to the solution of a system of nonlinear
ordinary diﬀerential equations of the form
M ˙ u +N(u) −L
T
p = F , (7.3a)
Lu = 0 , (7.3b)
where N, L, f, u and p are deﬁned as in (4.28a4.28b) and M denotes the velocity mass
matrix, which can be written as:
M =
M
1
0
0 M
1
, (7.4)
M
1
(i, j) =
Ω
ϕ
i
(x)ϕ
j
(x)dΩ .
The absence of a timederivative in (7.3b) has as consequence that (7.3b) must be satisﬁed
in every stage of the time integration. An important consequence is that if the equations
(7.3a7.3b) are solved in a coupled way, explicit methods do not make sense. With respect
to the timeintegration, all the classical methods, such as for example the ones mentioned
in Chapter 3 may be used. Very popular are the θ methods, especially θ = 1/2 and θ = 1,
and the twostep AdamsBashfort discretization. In this last formulation one usually uses
an implicit formulation with respect to the viscous terms and an explicit formulation for the
convective terms. The reason for this splitting is that the matrix due to the convective terms
changes in each timestep, whereas the other matrices remain constant in time.
Of course the solution of the coupled equations (7.3a7.3b), introduces exactly the same
problems as for the stationary case. As a consequence the same type of solution procedures
will be used. Hence it is quite usual to apply a segregated formulation in order to solve
(7.3a7.3b). Both the penalty function approach, as the method with divergencefree basis
functions may be applied.
The penalty function approach, applied to (7.3a7.3b) reads (compare with 5.12):
M ˙ u +N(u) +
1
ε
L
T
M
−1
p
Lu = F , (7.5a)
p = −
1
ε
M
−1
p
Lu . (7.5b)
It is clear that the pressure has only to be computed, if at a certain moment the pressure is
required. In the timestepping algorithm it is suﬃcient to solve (7.5a).
With respect to the nonlinear terms, it is necessary to perform a kind of linearization. In
general exactly the same type of linearization as for the stationary case are used. However,
in contrast to the stationary case, no iteration per timestep is applied. In general, the non
linear terms are linearized with respect to the solution at the preceding timelevel. If the
linearization is not accurate enough, a smaller timestep must be used.
The Picard type linearization of Section 4.6, all produce an 0(∆t) error, whereas the Newton
type linearization gives an 0(∆t
2
). Hence if the CrankNicolson scheme is applied, it is more
or less necessary to combine this scheme with a Newton linearization.
We have seen in the stationary case that the matrix corresponding to the penalty function
73
method has a large condition number. As a consequence it was not possible to use iterative
methods for the solution of the linear systems of equations. With respect to the instationary
case there is another drawback. One can show that the solution of (7.5a) by an explicit time
integrator, requires timesteps which are proportional to ε, due to stability requirements.
Hence, in practice, only implicit methods are used to solve (7.5a). See Cuvelier et al (1986)
for the details. The Crank Nicolson scheme has the property that it does not damp high
frequencies. Due to the penalty term such frequencies may always be present in the equations.
As a consequence extra damping is necessary if the solution is nonsmooth in time. For
example in the case of a transient one usually starts with one timestep Eulerimplicit in
order to damp high frequencies, and than one resumes with CrankNicolson in order to get a
good accuracy.
An alternative for the penalty function method is of course to use divergencefree elements.
Although it looks as if there is no reason to use implicit timemethods for this approach, it
must be remarked that due to the coupled character of the basis functions, the mass matrix
M can never be put into diagonal form. As a consequence, even an explicit method, requires
the solution of system of linear equations per timestep.
Finally in the next section we shall treat an alternative approach for the incompressible
timeindependent NavierStokes equations, the socalled pressurecorrection formulation.
7.3 The pressurecorrection method
The pressurecorrection method has, in ﬁrst instance, been developed for ﬁnite diﬀerence
methods. It is a special method for incompressible ﬂows. In fact the pressurecorrection
method consists of two steps. In the ﬁrst step the momentum equation is solved with the
pressure at the preceding timelevel. In this step the continuity equation is not taken into
account. The resulting velocity ﬁeld may be considered as an intermediate ﬁeld. In the next
step this intermediate ﬁeld is projected onto the space of divergencefree vector ﬁelds. This
step implicitly introduces a Poissontype equation for the pressure. The pressurecorrection
method is strongly coupled with the type of timediscretization. We shall demonstrate it for
the general θmethod. First we shall derive pressurecorrection in the case that the space
discretization has not yet been applied. Next we shall apply the space discretization ﬁrst and
then derive the pressurecorrection method.
Continuous approach
Consider the incompressible NavierStokes equations in dimensionless form:
∂u
∂t
−
1
Re
∆u +u · ∇u +∇p = f , (7.6a)
div u = 0 . (7.6b)
The θ method applied to (7.6a7.6b) reads
u
n+1
−u
n
∆t
+ θ(−
1
Re
∆u
n+1
+u
n+1
· ∇u
n+1
+∇p
n+1
)
+ (1 −θ)(−
1
Re
∆u
n
+u
n
· ∇u
n
+∇p
n
) = θf
n+1
+ (1 −θ)f
n
, (7.7a)
74
div u
n+1
= 0 . (7.7b)
Here, n denotes the old time level and n + 1 the new time level. In the ﬁrst step of the
algorithm, the momentum equation is solved using p at the old time level. This yields an
intermediate velocity ﬁeld u
∗
satisfying
u
∗
−u
n
∆t
+ θ(−
1
Re
∆u
∗
+u
∗
· ∇u
∗
) + (1 −θ)(−
1
Re
∆u
n
+u
n
· ∇u
n
) +∇p
n
= θf
n+1
+ (1 −θ)f
n
. (7.8)
u
∗
is provided with the boundary conditions at level n + 1. In order to solve (7.8) of course
the term u
∗
· ∆u
∗
must be linearized with respect to the old solution u
n
.
Subtraction of (7.8) from (7.7a) gives
u
n+1
−u
∗
∆t
+ θ(−
1
Re
∆u
n+1
+u
n+1
· ∇u
n+1
+
1
Re
∆u
∗
−u
∗
· ∇u
∗
)
+ θ∇(p
n+1
−p
n
) = 0 . (7.9)
It can be shown that the second term of (7.9) is of the same order as the truncation error of
the method and hence may be neglected. As a consequence (7.9) reduces to
u
n+1
−u
∗
∆t
+θ∇(p
n+1
−p
n
) = 0 . (7.10)
In the second step u
∗
is projected onto the space of divergencefree vector ﬁelds by applying
the divergence operator to (7.10):
div u
n+1
−div u
∗
∆t
+θ div ∇(p
n+1
−p
n
) = 0 . (7.11)
Since div u
n+1
= 0, (7.11) can be considered as an equation for the pressure diﬀerence
p
n+1
−p
n
:
∆(p
n+1
−p
n
) =
div u
∗
θ∆t
. (7.12)
We have implicitly assumed that θ = 0; θ = 0 requires a slight modiﬁcation.
Equation (7.12) may be solved by a standard Galerkin method, provided boundary conditions
for the pressure are deﬁned along the complete boundary.
Once the pressure correction p
n+1
−p
n
has been computed, p
n+1
follows immediately. Finally
u
n+1
may be computed from (7.10).
The pressurecorrection method requires the solution of two partial diﬀerential equations:
(7.8) and (7.12). For both equations the standard Galerkin method may be used. Since no
special parameter is introduced, it is possible to solve the resulting systems of linear equations
by iterative methods. A clear disadvantage of the continuous pressurecorrection method is
that it is necessary to deﬁne boundary conditions for the pressure. This may be diﬃcult for
some types of boundaries and is not natural since the originating NavierStokes equations do
not require any pressure boundary conditions at all. This problem does not appear in the
socalled discrete pressurecorrection method, in which ﬁrst the space discretization is applied
and afterwards the pressure correction.
75
Discrete approach
In the discrete approach we start with the discrete equations (7.3a7.3b). For simplicity we
consider only the Stokes equations. The extension to NavierStokes is straightforward. So
we start with:
M ˙ u +Su −L
T
p = F , (7.13a)
Lu = 0 . (7.13b)
Application of the θ method to (7.13a) gives
M
u
n+1
−u
n
∆t
+θ(Su
n+1
−L
T
p
n+1
) +(1 −θ)(Su
n
−L
T
p
n
) = θF
n+1
+(1 −θ)F
n
, (7.14a)
Lu
n+1
= 0 . (7.14b)
Now the momentum equation (7.14a) is solved with the pressure at the old level. Hence
M
u
∗
−u
∆t
+θSu
∗
+ (1 −θ)Su
n
−L
T
p
n
= θF
n+1
+ (1 −θ)F
n
(7.15)
Subtraction of (7.15) from (7.14a), and neglecting the diﬀerence of the viscous terms gives:
M
u
n+1
−u
∗
∆t
−θL
T
(p
n+1
−p
n
) = 0 . (7.16)
In order to apply the continuity equation (7.14b), it is necessary to premultiply (7.16) by
M
−1
. Then the pressurecorrection step becomes:
θLM
−1
L
T
(p
n+1
−p
n
) = −
Lu
∗
∆t
. (7.17)
In order to solve this equation in a simple way it is necessary that the matrix M is a diagonal
matrix and furthermore that the matrix LL
T
can be constructed in an easy way. In practice
this is a problem, since the structure of the matrix LL
T
is in general diﬀerent from the
structure of a standard Laplacian matrix. Only for the discontinuous pressure elements, both
structures are the same. Eﬃcient solution of (7.17) is still a research subject.
Once (7.17) has been solved p
n+1
can be computed, and ﬁnally u
n+1
from (7.16).
76
77
A Derivation of the integration by parts for the momentum
equations
In this appendix we shall prove the relation
Ω
(−div σ · v)dΩ =
Ω
σ · ∇v −
Γ
σ
nn
v
n
+σ
nt
v
t
dΓ . (A.1)
Proof:
If we substitute w = vu in the Gauss divergence theorem
Ω
div wdΩ =
Γ
w· ndΓ , (A.2)
and use the relation
div w = v div u +u · ∇v , (A.3)
we get
−
Ω
v div udΩ =
Ω
u · ∇vdΩ −
Γ
vu · ndΓ . (A.4)
Writing div σ · v in components (we restrict ourselves to 2D), we get by applying (A.4) to
the lefthand side of (A.1)
Ω
−(div
σ
11
σ
12
v
1
+div
σ
21
σ
22
v
2
)dΩ =
Ω
σ · ∇vdΩ −
Γ
v
1
σ
11
σ
12
n +v
2
σ
12
σ
22
ndΓ . (A.5)
So it remains to prove that the boundary integrals in (A.1) and (A.5) are equal.
The integrand in the boundary integral in (A.5) can be written as
σ · v · n = n · σ · v = n · σ(v
n
n +v
t
t)
= n · σ · nv
n
+n · σ · tv
t
= σ
nn
v
n
+σ
nt
v
t
(A.6)
78
References
1. A.N. Brooks and T.J.R. Hughes. Streamline upwind/Petrov Galerkin formulstion for
convection dominated ﬂows with particular emphasis on the incompressible NavierStokes
equation. Comp. Meth. Appl. Mech. Eng., 32:199–259, 1982.
2. C. Cuvelier, A. Segal, and A.A. van Steenhoven. Finite Element Methods and Navier
Stokes Equations. Reidel Publishing Company, Dordrecht, Holland, 1986.
3. M. Fortin. Old and new ﬁnite elements for incompressible ﬂows. Int. J. Num. Meth. in
Fluids, 1:347–364, 1981.
4. A. George and J.W.H. Liu. Computer Solution of Large Sparse Positive Deﬁnite Systems.
PrenticeHall, Engelwood Cliﬀs, New Jersey, (USA), 1981.
5. T.J.R. Hughes. The Finite Element Method, Linear Static and Dynamic Finite Element
Analysis. Prentice Hall Inc., Englewood Cliﬀs, New Yersey, 1987.
6. T.J.R. Hughes, M. Mallet, and M. Mizukami. A new ﬁnite element formulation for compu
tational ﬂuid dynamics: II. Beyond SUPG. Comp. Meth. Appl. Mech. Eng., 54:341–355,
1986.
7. D.S. Malkus and T.J.R. Hughes. Mixed ﬁnite element methodsreduced and selective
integration techniques: a uniﬁcation of concepts. Comp. Mech. Appl. Mech. Eng., 15:63–
81, 1978.
8. A. Mizukami. An implementation of the streamline upwind, PetrovGalerkin method for
linear triangular elements. Comp. Meth. Appl. Mech. Eng., 49:357–364, 1985.
9. J.G. Rice and R.J. Schnipke. A monotone streamline upwind ﬁnite element method for
convectiondominated ﬂows. Comp. Meth. Appl. Mech. Eng., 48:313–327, 1984.
10. R.L. Sani, P.M. Gresho, R.L. Lee, and D.F. Griﬃths. The cause and cure (?) of the
spurious pressure generated by certain FEM solutions of the incompressible NavierStokes
equations. Int. J. Num. Meth. in Fluids. Part I and Part II, 1 and 1:17–43 and 171–204,
1981.
11. A. Segal. On the numerical solution of the Stokes equations using the ﬁnite element
method. Comp. Mech. Appl. Mech. Eng., 19:165–185, 1979.
12. F. Shabib. Finite element analysis of the compressible Euler and NavierStokes equations.
PhD thesis, Dept. of Mech. Engng., Stanford University, USA, Stanford, California, USA,
1988.
13. G. Strang and G.J. Fix. An Analysis of the Finite Element Method. Prentice Hall Inc.,
Englewood Clifts, New Jersey, 1973.
14. C. Taylor and P. Hood. A numerical solution of the NavierStokes equations using the
ﬁnite element technique. Comput. Fluids, 1:73–100, 1973.
15. F.N. Van de Vosse. Numerical analysis of carotid artery ﬂow. PhD thesis, Eindhoven
University of Technology, The Netherlands, 1987.
79
16. J.J.I.M. van Kan. A secondorder accurate pressure correction method for viscous incom
pressible ﬂow. SIAM J. Sci. Stat. Comp., 7:870–891, 1986.
80
Copyright
© 2008 by Delft Institute of Applied Mathematics, Delft, The Netherlands.
No part of this work may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission from Delft Institute of Applied Mathematics, Delft University of Technology, The Netherlands.
Contents
1 Introduction 2 Introduction to the ﬁnite element method 2.1 Diﬀerential equations and boundary conditions . . . . . 2.2 Weak formulation . . . . . . . . . . . . . . . . . . . . . . 2.3 The Galerkin method . . . . . . . . . . . . . . . . . . . 2.4 The ﬁnite element method . . . . . . . . . . . . . . . . . 2.5 Computation of the element matrix and element vector 2.6 Higher order elements . . . . . . . . . . . . . . . . . . . 2.7 Structure of the large matrix . . . . . . . . . . . . . . . 5 8 8 9 11 12 15 17 18 22 22 22 24 27 30 35
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . . . . . . . . . . .
3 Convectiondiﬀusion equation by the ﬁnite element method 3.1 Formulation of the equations . . . . . . . . . . . . . . . . . . . . . 3.2 Standard Galerkin . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Solution of the system of ordinary diﬀerential equations . . . . . . 3.4 Accuracy aspects of the SGA . . . . . . . . . . . . . . . . . . . . . 3.5 Streamline Upwind Petrov Galerkin . . . . . . . . . . . . . . . . . 3.6 Some classical benchmark problems for convectiondiﬀusion solvers
4 Discretization of the incompressible NavierStokes equations by standard Galerkin 4.1 The basic equations of ﬂuid dynamics . . . . . . . . . . . . . . . . . . . . . . 4.2 Initial and boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Axisymmetric ﬂow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 The weak formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5 The standard Galerkin method . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Treatment of the nonlinear terms . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Necessary conditions for the elements . . . . . . . . . . . . . . . . . . . . . . . 4.8 Examples of admissible elements . . . . . . . . . . . . . . . . . . . . . . . . . 4.9 Solution of the system of linear equations due to the discretization of NavierStokes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 The 5.1 5.2 5.3 5.4 penalty function method Introduction . . . . . . . . . . . . . . . . . . . . . The discrete penalty functions approach . . . . . The continuous penalty function method . . . . . Practical aspects of the penalty function method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39 39 40 42 43 45 46 48 50 53 56 56 57 58 60 62 62 63 67 69 70 71
6 Divergencefree elements 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 The construction of divergencefree basis functions for 2D elements . . . . . . 6.3 The construction of element matrices and vectors for (approximate) divergencefree basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Boundary conditions with respect to the divergencefree elements . . . . . . . 6.5 Computation of the pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6 Practical aspects of the divergencefree elements . . . . . . . . . . . . . . . . 3
7 The 7.1 7.2 7.3
instationary NavierStokes equations Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Solution of the instationary NavierStokes equations by the method of lines . The pressurecorrection method . . . . . . . . . . . . . . . . . . . . . . . . . .
72 72 72 74 78
A Derivation of the integration by parts for the momentum equations
4
For that reason alternative solution methods have been developed. will be treated in Chapter 3. It is shown that upwinding may increase the quality of the solution considerably. As a consequence both the number of iterations and the computation time decrease. From this perturbed equation the pressure is expressed in terms of velocity and this is substituted into the momentum equations. Even if the BB condition is satisﬁed we are still faced with a problem with respect to the solution of the linear systems of equations. In general linear solvers may be inﬂuenced by such zeros. it is very natural to study eﬃcient solution methods. the socalled penalty function formulation.the solution of the incompressible NavierStokes equations by ﬁnite elements. at ﬁrst sight there seems no connection between both subjects. Although.1 Introduction In this second course on numerical ﬂow problems we shall focus our attention to two speciﬁc subjects: . some iterative solvers even do not allow nonpositive diagonal elements. the socalled streamline upwind PetrovGalerkin method (SUPG). is the lack of upwind techniques. In fact one is no longer free to choose any combination of pressure and velocity approximation but the ﬁnite elements must be constructed such that the socalled BrezziBabuˇka (or BB) condition is satisﬁed. Chapter 5 treats the most popular segregated method. In the ﬁrst part of these lectures we shall be concerned with the discretization of the incompressible NavierStokes equations by the ﬁnite element method (FEM). In the last decade. In ﬁnite diﬀerences and ﬁnite volumes the equivalent of the BB condition is satisﬁed if staggered grids are applied. Since. A disadvantage of this method is that the perturbation parameter 5 . which all try to segregate the pressure and velocity computation. The Galerkin method is introduced as a natural extension of the socalled weak formulation of the partial diﬀerential equations. This s condition makes a relation between pressure and velocity approximation. Another important aspect of upwinding is that it makes the systems of equations more appropriate for the iterative methods treated in part II. First we shall give a short introduction of the FEM itself. accurate upwind methods have been constructed.the eﬃcient solution of large systems of linear equations. always results in the solving of a number of large systems of sparse linear systems. The application of the FEM to potential problems is considered and the extension to convectiondiﬀusion type problems is studied. the discretization must satisfy some special requirements. however. In Chapter 4 the discretization of the incompressible NavierStokes equations is considered. Since the pressure is an unknown in the momentum equations but not in the continuity equation. In this way the velocity can be computed ﬁrst and afterwards the pressure. in general the solution of these systems and the storage of the corresponding matrices take the main part of the resources (CPU time and memory). . One of the reasons why ﬁnite elements have been less popular in the past than ﬁnite diﬀerences. In this approach the continuity equation is perturbed with a small compressibility including the pressure. it must be remarked that the numerical solution of partial diﬀerential equations and hence also of the NavierStokes equations. The absence of the pressure in the continuity equation induces zeros at some of the diagonal elements of the matrix. The most popular one.
These methods are used if the dimension of the system is not too large. This method is also popular in ﬁnite diﬀerences and ﬁnite volumes. Finally. Again for general matrices diﬀerent methods are proposed and it is not always clear. in Chapter 7. In this method. however. Thereafter we consider the Lanczos method for symmetric matrices. This method seems very attractive. In many applications eigenvalues give information of physical properties (like eigenmodes) or they are used to analyze. For this type of methods an alternative segregation is possible. Since these methods are implemented on computers we consider the behavior of the methods with respect to rounding errors. the socalled pressurecorrection method.introduces extra complications.1 by considering direct methods as there are: Gaussian elimination and Cholesky decomposition. the elements are constructed in such a way that the approximate divergence freedom is satisﬁed explicitly. In Chapter 2 we consider classical iterative methods for linear equations. the socalled solenoidal approach. For large problems the memory requirements of direct methods are a bottle neck. The rate of convergence is much better than for basic iterative methods. We only note that in essence a preconditioned Krylov method is a combination of a method given in chapter 3 and 4 and a basic iterative method or an incomplete direct method. In Chapter 3 and 4 we consider modern iterative methods of Krylov subspace type. which is closely related to the CG method. the extension to threedimensional problems is very diﬃcult. convergence can be very slow so the computing time may be much larger than for direct methods. We shall summarize the most successful ones and try to give some guidelines for choosing a method depending on the properties of the problem. The Krylov subspace methods become much faster if they are combined with a preconditioner. These methods only use the non zero part of the resulting decomposition. whereas no knowledge of the spectrum is needed in contrast with some basic iterative methods. In Chapter 3 the conjugate gradient method for symmetric positive deﬁnitive matrices. A drawback for general matrices is that there are many methods proposed and until now there is no clear winner. These methods are very cheap with respect to memory requirements. We start in Chapter 2. In the second part we consider the eﬃcient solution of large system of linear equations. As applications and examples we mostly use systems of equations resulting from the discretization of 2. and approximate the largest eigenvalue. To that end it is necessary to introduce the stream function as help unknown. We start with the Power method which is easy to understand. methods for the timedependent incompressible NavierStokes equations are treated. and enhance mathematical methods for solving a physical problem. However. If only a small number of eigenvalues are needed for a very large matrix it is a good idea to use iterative methods. using special methods for banded.and 3 dimensional partial diﬀerential equations. In Chapter 6 an alternative formulation is derived. and in Chapter 4 Krylov methods for general matrices. proﬁle or ”general sparse” matrices we can solve much larger systems. which are given in Chapter 6. For the details we refer to Chapter 5. which one is 6 .
we expect that in the near future parallel computers (especially those based on a clustering of very fast nodes) will beat them for real live problems.the best. There are mainly two types: vector. Finally in Chapter 7 we give a summary of present day supercomputers. For the problems considered in this report supercomputers are necessary to obtain results for large 3 dimensional problems. 7 .and parallel computers. However. with respect to computing time and memory. At this moment vector computers give the best results.
σc + A∇c · n = g3 on Γ3 8 A∇c · n = g2 on Γ2 . In this sense the FEM forms an alternative for ﬁnite diﬀerence methods (FDM) or ﬁnite volume methods (FVM). However.1 Introduction to the ﬁnite element method Diﬀerential equations and boundary conditions The ﬁnite element method (FEM) may be considered as a general discretization tool for partial diﬀerential equations.3) In order that equation (2. and to make the problem well posed it is necessary to prescribe exactly one boundary condition at each part of the boundary. for example the potential.5) (2. The main reason to use the FEM is its ability to tackle relatively easily. In the sequel the region at which the diﬀerential equation is deﬁned is called Ω and its boundary is denoted by Γ. so equation (2. All coeﬃcients ρ.6) . temperature or concentration. The last type of equations are the subject of Chapter 4. In this introductory chapter we shall neglect the convective terms and focus ourselves to diﬀusion type problems: ρ n ∂ ∂c − ∂t i. and convectiondiﬀusion type of equations will be the subject of Chapter 3. Common boundary conditions in equation (2.3) has a unique solution. (σ ≥ 0). where ∂t ρ must be positive in the instationary case.1) where c denotes the unknown. and hence in general requires standard software packages. ∂t (2. In this chapter we shall only consider stationary problems. β and f may depend on time and the space variable x.1 is usually written in vector notation: ρ ∂c − div (A∇c) + βc = f. The matrix A with elements aij represents the diﬀusion tensor and is supposed to be symmetric and positive deﬁnite. but is added for the sake of generality. In this chapter we restrict ourselves to linear problems only. problems that are deﬁned on complex geometries.3) are: c = g1 on Γ1 .2 2.2) where ∇ denotes the gradient operator.j=1 ∂xi aij ∂c ∂xj + βc = f (2. In this lecture we shall restrict ourselves to the application of the FEM to two general types of diﬀerential equations: the convectiondiﬀusion equation and the incompressible NavierStokes equations. Equation 2. n is the dimension of space which in our applications varies from 1 to 3. the programming of ﬁnite element methods is more complicated than that of ﬁnite diﬀerences. f represents a source term and ρ ∂c the timederivative part. The coeﬃcient β is zero in many practical problems. (2. the equations become nonlinear.2) reduces to −div (A∇c) + βc = f (2. aij .4) (2. If the coeﬃcients also depend on the solution.
3) under the boundary conditions (2. Originally the weak formulation has been introduced by pure mathematicians to investigate the behavior of the solution of partial diﬀerential equations. Γ (2. one can derive an equivalent minimization problem. since for the general equations to be treated in Chapters 2 and 4. Both methods lead ﬁnally to exactly the same result. (2.7) can be derived by integrating equation (2. which has exactly the same solution as the diﬀerential equation. no equivalent minimization problem exists. the function ϕ is determined up to an additive constant. determines whether (2.8) in order to get rid of the second derivative term. So: (−div(A∇c) + βc) v dΩ = Ω Ω f v dΩ . To do that there are two alternatives: 1. It is common practice to apply integration by parts to equation (2. Γ2 and Γ3 .4) to (2.8) The choice of the class of functions to which v belongs. 2. boundary conditions of type (2.3) by a socalled test function v and integrating over the domain. It can be shown that equation (2.7) Ω (2.4) are called Dirichlet boundary conditions.2 Weak formulation Before applying the FEM to solve equation (2. Other types of boundary conditions may also be applied. it is necessary to transform the equation into a more suitable form.5) Neumann conditions and boundary conditions of type (2. however.4) to (2.6) has a unique solution provided the coeﬃcients and the boundary of the region are suﬃciently smooth.6). The weak formulation of equation (2.where the boundary Γ is subdivided into three parts Γ1 . In fact (2. 2. Boundary conditions of type (2.6). and to prove existence and uniqueness of the solution.3) can be derived by multiplying (2.8) has a solution and whether this solution is unique. Only in the special case Γ1 = φ. but they will not be studied in this lecture. In that case the functions f and g2 must satisfy the compatibility condition f dΩ = − g2 dΓ .3) with boundary conditions (2. Γ3 = φ and β = 0.6) are called Robbins boundary conditions.5) may be considered as a special case of (2. Later on numerical schemes have been based on this formulation which lead to an approximate solution in a constructive way. we shall restrict ourselves to method 2. integration by parts is derived by applying the Gauss divergence theorem: div a dΩ = a · n dΓ (2. one can derive a socalled weak formulation.3) over the domain Ω and applying the Gauss divergence theorem.9) Ω Γ 9 .
13) if possible.14) Γ Γ1 Γ2 Γ3 On boundary Γ1 we have the boundary condition c = g1 .6) now becomes: ﬁnd c with cΓ1 = g1 such that {A∇c · ∇v + βcv} dΩ + σ cv dΓ = Γ3 Ω f v dΩ + Γ2 g2 v dΓ + Γ3 g3 v dΓ .5) and the same is true for boundary Γ3 .13) satisﬁes (2. This boundary integral can be subdivided into three parts: vA∇c · ndΓ = vA∇c · ndΓ + vA∇c · ndΓ + vA∇c · ndΓ .6) are called natural. (2. We see in this expression that an essential boundary condition automatically implies that the 10 .8) can be written as {A∇c · ∇v + βcv} dΩ − vA∇c · ndΓ = f vdΩ .10) Ω Ω Γ and so (2. (2. which means that both ∇c and ∇v must be square integrable. (2. (2.16) Ω for all functions v satisfying vΓ1 = 0. since they are implicitly satisﬁed by the formulation.4) is called essential.16) exist. The boundary condition (2.4) to (2. Substitution of (2.12) (2.9) yields vdiv A∇c dΩ = − ∇v · A ∇c dΩ + v A∇c · ndΓ (2. Hence div a = div(vA∇c) = ∇v · A∇c + vdiv A∇c .14) we demand that the function c in (2.6) are applied by evaluating the boundary integral at (2.3) under the boundary conditions (2. Furthermore it is necessary to demand some smoothness requirements for the functions c and v. Ω (2. These terms are in ﬁrst instance motivated by the corresponding minimization problem. since it should be satisﬁed explicitly. The weak formulation corresponding to equation (2.15) On boundary Γ2 we can substitute the boundary condition (2. One can prove that it is suﬃcient to require that all integrals in (2.4) and furthermore in order to get rid of the boundary integral over Γ1 : v = 0 at Γ1 .13) Ω Γ The boundary conditions (2.11) (2.to the function a = v A∇c .11) in (2. Since this boundary condition can not be incorporated explicitly in (2. The boundary conditions (2.4) to (2. For that reason we do not demand anything for the solution c or the test function v at these boundaries.5).
This leads to a linear system of n equations with n unknowns.. whereas the natural boundary conditions do not impose any condition either to the unknown or to the test function. one can say that for second order diﬀerential equations. however. the boundary condition is natural.6) to derive the discretization. It is suﬃcient to substitute v(x) = ϕi (x) i = 1(1)n (2. provided a suﬃcient number of basis functions is used in the linear combination (2. In the FEM we use formulation (2. In this method the solution c is approximated by a linear combination of expansion functions the socalled basis functions: n c (x) = j=1 n cj ϕj (x) + c0 (x) (2. In general.21) 11 . except in the case where we have a corresponding minimization problem. In general this means that c0 (x) = g at Γ1 ϕj (x) = 0.20) into (2. The basis functions ϕj (x) must be linearly independent. The function c0 (x) must be chosen such that cn (x) satisﬁes the essential boundary conditions.16) instead of (2. 2. Furthermore they must be such that an arbitrary function in the solution space can be approximated with arbitrary accuracy. Otherwise the condition is essential and the test functions must be chosen such that the boundary integral vanishes. The choice (2.. n) the test functions v are chosen in the space spanned by the basis functions ϕ1 (x) to ϕn (x). It is not immediately clear whether a boundary condition is essential or natural. After substitution of (2. and a given function at the boundary is essential.corresponding test function is equal to zero.17).20) into equations (2. . The easiest way to check whether a boundary condition is essential or natural is to consider the boundary integrals.17) where the parameters cj are to be determined.17) and (2. If in some way the boundary condition can be substituted. Starting point is the socalled Galerkin method. In fourth order problems the situation is more complex. for physical problems.3)(2.19) In order to determine the parameters cj (j = 1.. whereas boundary conditions containing only the function or ﬁrst order derivatives are essential.3 The Galerkin method Formulation (2. However. in general.16) is one of the various possible weak formulations. it is the most common one and also the most suitable for our purpose.20) implies immediately that v satisﬁes the essential boundary conditions for v. 2. one can state that if the boundary conditions contain second or third derivatives they are natural. all boundary conditions containing ﬁrst derivatives are natural. However. (2. at Γ1 (2.16) we get the socalled Galerkin formulation {A∇cn · ∇ ϕi + β cn ϕi } dΩ + = Ω σcn ϕi dΓ Γ3 Ω f ϕi dΩ + Γ2 g2 ϕi dΓ + Γ3 g3 ϕi dΓ .16).18) (2.
For example a piecewise linear polynomial in I 1 deﬁned on n elements ei (xi−1 . These polynomial approximations implicitly deﬁne the basis functions ϕi . Γ3 (2.24b) 2. (2. xi ) (see FigR ure 2.22) is a system of n linear equations with n unknowns. (2.24a) Fi = Ω g3 ϕi dΓ − Ω {A∇c0 · ∇ϕi + β c0 ϕi } dΩ . In I 1 these elements are intervals.23) with sij = Ω {A∇ϕj · ∇ϕi + β ϕi ϕj } dΩ + f ϕi dΩ + g2 ϕi dΓ + Γ3 Γ3 σ ϕj ϕi dΓ .24b) in a relatively simple way.1).with cn = Hence n n j=1 cj ϕj + c0 .22) Clearly (2. The subdivision of a region R in elements is performed by a socalled mesh generator.25) 12 .4 The ﬁnite element method The FEM oﬀers us a constructive way to create the basis functions ϕi and to compute the integrals in (2. in I 2 usually triangles or quadriR R laterals and in I 3 tetrahedra and hexahedra are very popular. (2. f1 f0 f n1 x0 x1 xn1 fn xn Figure 2. In each element a number of nodal points are chosen and the unknown function is approximated by a polynomial. To that end the region Ω is subdivided into simple elements. which can be written in matrixvector notation as S c=F . (2. Although other types of approximations are permitted it is common practice to restrict one selves to lower degree polynomials (linear or quadratic). cj j=1 Ω {A∇ϕj · ∇ϕi + β ϕi ϕj }dΩ + g2 ϕi dΓ + Γ2 Γ3 σ ϕj ϕi dΓ Γ3 = f ϕi dΩ + Ω g3 ϕi dΓ − Ω {A∇c0 · ∇ ϕi + β c0 ϕi } dΩ .24a2.1: Piecewise linear approximation of function f (x) can be written as f n (x) = j=0 n f (xj )λj (x).
24b) in order to build the matrix and righthand side of the system of equations (2. R a) b) xi1 xi1/2 xi xi+1/2 xi+1 xi1 xi1/2 xi Figure 2. i. For a typical ﬁnite element grid as the one depicted in Figure 2.e. Figure 2.3 shows the two types of quadratic basis functions we may expect in I 1 .28) 13 .where λj (x) is deﬁned as follows: λj (x) is linear on each element.23). ne Ω {A∇ϕi · ∇ϕi + β ϕi ϕj } dΩ = k=1Ωek {A∇ϕi · ∇ϕi + β ϕi ϕj } dΩ. Once the basis functions have been constructed it is necessary to compute the integrals (2. these computations seem rather complicated.3: Quadratic basis functions in I 1 a) corresponding to vertex b) corresponding to R midpoint In I 2 and I 3 the basis functions are merely extensions of the onedimensional basis functions.24a) and (2.2: Example of a linear basis function In the case of socalled quadratic elements in I 1 we deﬁne the vertices as well as the centroid R as nodal points and the basis functions ϕi (x) are deﬁned by ϕi (x) is quadratic on each element. R With respect to the linear elements. ϕi (xj ) = δij . however for quadratic elements. (2. the boundaries of the elements may be quadratic in order to get a good approximation of the boundary. In general one can state that the boundary must be approximated with the same type of polynomials as the solution. ϕi(x) xi1 xi xi+1 Figure 2.5.4.2 shows a typical linear basis function ϕi (x). For that reason the integrals over the region are split into integrals over the elements.26) So in terms of the Galerkin method the function values f (xj ) take the role of the parameters and the shape functions λj (x) the role of the basis functions. the boundaries of the elements are usually straight. R R Typical elements in I 2 have been sketched in Figure 2.27) Figure 2. λj (xk ) = δjk . (2. (2.
with elements f ϕi dΩ Ωek (2.4: Examples of elements inI 2 : a) linear triangle. For a linear triangle such an element matrix is for example of size 3 × 3. Since the mesh generator produces automatically the topological information of the mesh. and so on. then it is clear that only a very little number of the possible integrals {A∇ϕi · ∇ϕi + β ϕi ϕj } dΩ (2. c) bilinear R quadrilateral. b) quadratic triangle. In exactly the same way it is natural to introduce the socalled element vector. Only those basis functions corresponding to nodal points in the element ek have a nonzero contribution to the integrals. So it is suﬃcient to compute only those integrals that are nonzero on the element and store them in a socalled element matrix. it is an easy task for the computer to carry out the additions.24a) and (2. which in a linear triangle reduces to a 3 × 1 vector. If we restrict ourselves to a typical element ek . These boundary elements are identical to the intersection 14 .24b) socalled boundary elements or line elements are introduced.28) ne is the number of elements and Ωek is the area of element ek .29) Ωek are unequal to zero. In (2.a) b) c) d) Figure 2.5: Typical example of a twodimensional ﬁnite element mesh. d) biquadratic quadrilateral Y X Figure 2.30) In order to compute the boundary integrals in (2.
Hence we get: σ ϕi ϕj dΓ = Γ3 nbe3 k=1 Γek 3 nbe2 k=1 Γek 2 nbe3 k=1 Γek 3 σ ϕi ϕj dΓ g2 ϕi dΓ g3 ϕi dΓ (2.6 is used.31) g2 ϕi dΓ Γ2 = = g3 ϕi dΓ Γ3 2.of the internal elements with the boundaries Γ2 and Γ3 and have no other purpose then to evaluate the boundary integrals. From (2.23).(2)): XA = I . For the sake of simplicity we shall restrict ourselves to I 2 .24b) is now reduced to the computation of some integrals over an arbitrary element.32) Before we are able to compute this integral it is necessary to compute the basis functions ϕi .29): R e Sijk = Ωek {A∇ϕj · ∇ϕi + β ϕj ϕi } dΩ (2.6: Linear triangle with local numbering where the local numbering of Figure 2.6). with a1 a2 a3 0 0 0 1 A = a1 a2 a3 1 1 a1 a2 a2 2 2 2 3 (2. As an example we consider the computation of the integral given by (2. A necessary condition for the existence of 15 . Here we have assumed that the boundary is identical to the outer boundary of the elements. ϕi (x) = λi (x) is deﬁned by (2.26.26).33) and hence A = X −1 1 x1 y 1 X = 1 x2 y 2 1 x3 y 3 (2.5 Computation of the element matrix and element vector The evaluation of the system of equations (2.34) 2 1 Figure 2.26.(1)) it follows that: λi (x) = ai + ai x + ai y 0 1 2 and from (2. (2. For a socalled linear triangle (see Figure 2.24a2.
32) gives e Sijk = △ 3 A(xk )∇ ϕi · ∇ ϕj + β(xk )δij 6 k=1 16 (2. . For a proof. The weights and quadrature points of the Gauss rules can be found in the literature.39) it follows that the NewtonCotes rule for the linear element is deﬁned by: △ 3 Int (xk ).41) . In general the integral (2.32) can not be computed exactly and some quadrature rule must be applied. We distinguish between the socalled NewtonCotes rule based upon exact integration of the basis functions and socalled Gauss quadrature. λn+1 dΩ = △. From (2. The coeﬃcients ai and ai are easily computed from (2.36) immediately deﬁnes the gradient of ϕi . (2. .35) One can prove that △ is equal to two times the area of the triangle.39) 1 2 (m1 + m2 + . . (2. (2.38) where n + 1 is the number of basis functions in the element.λi (x) is that the determinant of the matrix to be inverted is unequal to zero. (2. In practice it is necessary that the largest angle of the triangle is limited by some angle (for example 150◦ ). page 84. hence the triangle may not deform to a line. . . and application of the general rule: m1 ! m2 ! . see Holand and Bell (1969).36) a1 = 2 Since ∇λi = ai 1 ai 2 − x2 ) a2 = 2 3 − x3 ) a2 = . . see for example Strang and Fix (1973) or Hughes (1987).40) to (2. This determinant is given by: △ = (x2 − x1 )(y3 − y2 ) − (y2 − y1 )(x3 − x2 ) (cyclic) (2. A quadrature rule has usually the shape: m Int (x)dΩ = Ωek k=1 wk Int (xk ).40) Int (x)dΩ = 6 k=1 Ωen where xk is the kth vertex of the triangle. (2. + mn+1 + n)! simplex where n denotes the dimension of space. (2. wk are the weights and xk the coordinates of the quadrature points. mn+1 ! mn+1 λm1 λm2 . Application of (2.34) and one immediately veriﬁes that 2 1 they are given by: 1 a1 = 1 △ (y2 1 △ (x3 − y3 ) a2 = 1 1 △ (y3 1 △ (x1 − y1 ) a3 = 1 1 △ (y1 1 △ (x2 − y2 ) − x1 ) . The NewtonCotes rule can be derived by: n+1 Int (x) = k=1 Int (xk ) ϕk (x).37) where m is the number of quadrature points in the element.28) and (2.
i = 1. 2 1 Figure 2. R One easily veriﬁes that the NewtonCotes rule for this element is identical to the trapezoid rule: h (2.30) may be approximated by fiek = △ f (xi ) . 3. One can verify that the basis functions ϕi (x) may be expressed in terms of the linear basis function λi (x) by: ϕi (x) = λi (2λi − 1). However. However to derive the basis function the quadrilateral is mapped onto a square reference element. See for example Cuvelier et al (1986) for a derivation. Such a mapping is plotted in Figure 2.31) we use linear boundary elements as sketched in Figure 2. A simple extension of the linear triangle is for example the quadratic triangle. 17 .43) to the three integrals (2.42) In order to evaluate the boundary integrals (2.9. Quadrilateral elements are not so easy to derive.7: Linear boundary element in I 2 . g3 (xi ). (2.43) Int(x) = (Int(x1 ) + Int(x2 )) .5) we have derived the element matrix and vector for linear triangles.31) gives e Γ3k e Γ2k e Γ3k σ ϕi ϕi dΓ = g2 ϕi dΓ g3 ϕi dΓ = = h 2 h 2 h 2 σ(xi )δij . with local numbering.46) ϕij (x) = 4λi λj . g2 (xi ).In the same way (2.45) 2. For that element both the vertices and the midside points are used as nodal points. 1 ≤ i < j ≤ 3. (2. in practice also other types of elements are used.8 for the deﬁnition of the nodes. 2 Γe where h is the length of the element: h= (x2 − x1 )2 + (y2 − y1 )2 (2.7. See Figure 2. 2. 6 (2.6 Higher order elements In (2.44) Application of (2. Nodal points will be either the vertices (bilinear elements) or the vertices and midside points (biquadratic elements).
For example: A∇ϕi · ∇ϕi + β ϕi ϕj dΩxy = {A∇ϕi · ∇ϕi + β ϕi ϕj } J dΩξη . 2.24a) it is clear that this matrix is symmetric.48) For details of the derivation of basis functions and element matrices and vectors the reader is referred to Cuvelier et al (1986). 18 . The transformation itself is a socalled isoparametric transformation deﬁned by the basis functions in the following way: x y 4 = k=1 ϕi (ξ.47) ek Ωxy ek Ωξη where J is the Jacobian of the transformation. y)plane onto square in (ξ. (2. All basis functions are derived in the reference element by choosing products of onedimensional basis functions.7 Structure of the large matrix The ﬁnite element method applied to the linear diﬀerential equation (2. η) plane. Furthermore one can prove that the matrix S is positive deﬁnite. η) xk yk .9: Mapping T from quadrilateral in (x. (2.49) The matrix is often referred to as the stiﬀness matrix. From the relation (2.3) leads to linear systems of equations of the form (2.23): S c=F (2. Also all integrals to be computed over the quadrilateral are transformed to integrals over the reference element.3 13 23 1 12 2 Figure 2.8: Quadratic triangle with nodal points and local numbering. 4 3 T η y 1 x 2 ξ 1 2 4 3 Figure 2.
For example if we consider the mesh in Figure 2.except in the case of Neumann boundary conditions and β = 0. . . If we identify row i in matrix S with nodal point i. in which case the matrix is singular because the original problem is singular. only a very limited number of entries is nonzero.12a shows that in case of a horizontal numbering the band width is equal 19 .10. As a consequence products with basis functions that correspond to nodes not in these triangles are zero. with n nodes in horizontal and m nodes in vertical direction. then it is clear that the basis function corresponding to nodal point i is only nonzero in those elements j O k i n l m Figure 2.11 with rectangular elements. it is clear that only the entries sii . containing node i. So we see that in the matrix S. . the nodes. . sij . Such a matrix is called sparse. then a natural numbering is to use either a horizontal or a vertical numbering of m 2 1 1 2 n Figure 2. Figure 2. sio may be unequal to zero. the sparse matrix S may have a band structure. If the numbering of the nodal points is chosen in a clever way. All other matrix elements in row i are identical to zero. If we consider a number of adjacent triangles in a mesh as sketched in Figure 2.10: Nodal point i with direct neighbors j − o as part of a triangular mesh.11: Rectangular elements in a rectangle.
15. 20 . A very simple example of a proﬁle matrix is created by a onedimensional example with periodical boundary conditions as sketched in Figure 2. point n and 1 have the same unknown and point 1 is connected to both n − 1 and 2.14. Figure 2.12: Connections of node i with neighbors a) horizontal numbering b) vertical numbering. 1 2 n1 (n=1) Figure 2. the matrix is full.to 2n + 3. The band width of this matrix is equal to n − 1.11. However. with m the number of nodes in vertical direction. The external nonzero elements in this matrix deﬁne the socalled proﬁle.13: Example of a matrix with a local wide proﬁle. Point n − 1 connected to n − 2 and 1.13 profile band Figure 2. In general ﬁnite element meshes are not so structured as the one in Figure 2. In this example point i is connected to points i − 1 and i + 1 leading to a band width of 3. The corresponding matrix gets the structure as sketched in Figure 2. i+n1 i+n i+n+1 im+1 i+1 i+m+1 a) i1 i i+1 b) im i i+m in1 in in+1 im1 i1 i+m1 Figure 2. The proﬁle sketched in Figure 2. A typical example is sketched in Figure 2. Hence an optimal band width is achieved if nodes are numbered in the shortest direction. where n is the number of nodes in horizontal direction.15b is much smaller.12b shows that a vertical numbering leads to a band width of 2m + 3. which means that in case of a band storage. for problem with periodical boundary conditions. and so locally a larger band width may be present.14: Onedimensional mesh. because of the periodical boundary conditions.
49).a) b) Figure 2. For ﬁnite element methods various renumbering algorithms have been constructed. 21 . Part II of this book is devoted to eﬃcient methods for the solution of systems of equations of the form (2. Both methods belong to the class of direct solvers. Many of them are variants of the socalled CuthillMckee renumbering algorithm. See for example George and Liu (1981).15: a) nonzero pattern of onedimensional problem with periodical boundary conditions. b) corresponding proﬁle. Iterative methods fully utilize the sparsity pattern of the matrix and are therefore recommended in case of problems with many unknowns. A good numbering may reduce the band width or the proﬁle of the matrix considerably. Methods employing the bandstructure are called band methods. whereas methods using the proﬁle of the matrix only are called proﬁle methods.
3 3.2 Standard Galerkin In order to apply the standard Galerkin approach (SGA) the weak formulation of (3. Since for the convectiondiﬀusion equation. 22 . With respect to the instationary equation it is not only necessary to prescribe boundary conditions.1) under the boundary conditions (2.3) For a unique solution of (3. It will be shown that this discretization might introduce inaccurate solutions in the case of dominant convection. however. (3. Dirichlet boundary conditions may result in unwanted wiggles. but also to deﬁne an initial condition. In the remainder of this chapter we shall study the discretization of the convectiondiﬀusion equation by ﬁnite elements and standard Galerkin. In general this means that at outﬂow one usually applies natural boundary conditions.1 Convectiondiﬀusion equation by the ﬁnite element method Formulation of the equations In this chapter we shall investigate the solution of convectiondiﬀusion equations of the shape: ρ n n ∂c ∂ ∂c ∂c − (aij )+ ui + βc = f .4) it is necessary to prescribe exactly one boundary condition at each part of the boundary.4) (3. boundary conditions must be given at outﬂow. Numerically this means that the character of the equations resembles more that of the pure convection equation than that of the diﬀusion equation. it is advised to use those boundary conditions that inﬂuence the solution as little as possible.4) . In many practical ﬂow problems. Theoretically exactly the same type of boundary conditions as for equation (2. where u denotes the velocity. For a pure convection equation.6) is derived.(2.j=1 ∂xi ∂xj ∂xi i=1 (3. equation (3. 3.1) Compared to equation (2.3) may be used.2) or in vector notation (u · ∇ c) . ∂t i.1) is extended with the convective term n ui i=1 ∂c . For that reason an upwinding technique is introduced. In the stationary case. the convection term strongly dominates the diﬀusive terms. ∂xi (3. boundary conditions should only be given at inﬂow not at outﬂow. It will be shown that this upwinding improves the accuracy considerably.1) reduces to: −div (A ∇ c) + (u · ∇c) + βc = f . (3.1).
6) Substitution of the boundary conditions in the same way as is performed in Chapter 2 results in the weak formulation: Find c(x.7) for all functions v(x) satisfying vΓ1 = 0 . The solution c is approximated by a linear combination of the basis functions: n ch (x.9) − Ω {(A∇c0 · ∇ϕi ) + βc0 ϕi + (u · ∇c0 )ϕi }dΩ − Ω Clearly (3. 2.e. t) .10) .5) ∂t Ω Ω Ω After application of the Gauss divergence theorem. which results in relation (2.9) forms a system of n linear ordinary diﬀerential equations with n unknowns.5) can be written as ρ Ω ∂c vdΩ + ∂t Ω {(A∇c · ∇v + βcv + u · ∇c)v}dΩ − Γ vA∇c · ndΓ = f vdΩ .19) are still necessary. which can be written in matrixvector notation as ˙ M c + Sc = F . t) with c(x. To that end we deﬁne timeindependent basis functions in exactly the same way as for the potential problem... Ω (3.. t) must satisfy the same requirements as in Chapter 2. 23 (3. i. (3. 0) given and cΓ1 = g1 such that ∂c vdΩ + ∂t ρ Ω Ω {(A∇c · ∇v) + u · ∇cv + βcv}dΩ + g3 vdΓ .8) The basis functions ϕj (x) and the function c0 (x. For the test functions v(x) again the basis functions ϕi (x) (i = 1. . ∂t i = 1(1)n .18) and (2. (3.Multiplication of (3.1) by a timeindependent test function v and integration over the domain yields: ∂c ρ vdΩ + {−div (A∇c) + (u · ∇c) + βc}vdΩ = f vdΩ . t) = j=1 cj (t)ϕj (x) + c0 (x.7) is approximated by a ﬁnite dimensional subspace. (2. Γ3 σcvdΓ = Γ3 f vdΩ + Ω Γ2 g2 vdΓ + (3. In the SGA the weak form (3. (3. n) are substituted. So ﬁnally we arrive at the Galerkin formulation: ∂cj ∂t j=1 + Γ3 n n ϕi ϕj dΩ + Ω j=1 cj { [(A∇ϕj · ∇ϕi ) + (u · ∇ϕj )ϕi + βϕi ϕj ]dΩ Ω σϕi ϕj dΓ} = Ω f ϕi dΩ + Γ2 g2 ϕi dΓ + Γ3 g3 ϕi dΓ ∂c0 ϕi dΩ . (3.12).
The elements of the matrices and righthand side are deﬁned by: mij = Ω ϕi ϕj dΩ {(A∇ϕj · ∇ϕj ) + (u · ∇ϕj )ϕi + βϕi ϕj }dΩ + f ϕi dΩ − σϕi ϕj dΓ Γ3 (3. In most ordinary diﬀerential equation solvers the time derivative in (3. denotes diﬀerentiation with respect to time.10) is replaced by a forward diﬀerence discretization: ck+1 − ck ˙ . As soon as Sc is also taken at the new timelevel k + 1.where . problems in case of a dominant convective term will be investigated and a upwind technique will be introduced. Among the many available methods for solving the system (3. After that. In general one may distinguish between explicit and implicit methods and between onestep and multistep methods.11a) (3.11c) The construction of the basis functions and the computation of the integrals is exactly the same as for the potential problem.5. 3. A method is called explicit if the term Sc is only taken at the timelevel k. Due to these extra convective terms the stiﬀness matrix becomes nonsymmetric.11a) are computed by the Newton Cotes rule corresponding to the basis functions. The reason is that in that case always a system of equations has to be solved. The (dis)advantages of both types of matrices will be treated in Paragraphs 3. if the integrals (3.12) c= ∆t where k denotes the present timelevel and k + 1 the next timelevel. That means that to compute the solution at a certain timestep only information of the preceding timestep is used and not of older timesteps. even if the matrix M is the identity matrix. (3. the matrix M reduces to a diagonal matrix.11b) sij = Ω Fi = Ω Ω {(A∇c0 · ∇ϕi ) + (u · ∇c0 )ϕi + βc0 ϕi }dΩ g2 ϕi dΓ + Γ2 Γ3 − Ω ∂c0 ϕi dΩ + ∂t g3 ϕi dΓ . In the next paragraph we shall consider some methods to solve the instationary equations. A nonlumped mass matrix is also known as a consistent mass matrix. In this chapter we shall restrict ourselves to onestep methods only. The computation of the massmatrix can be performed exactly or by a quadrature rule. However.3 and 3. the method is called implicit.10). M is the socalled mass matrix and S the stiﬀness matrix. In that case one speaks of a lumped massmatrix. In general M has exactly the same structure as S.10) we restrict ourselves to the 24 . The only extra parts are the timederivative with the mass matrix and the extra convective terms in the stiﬀness matrix. (3.3 Solution of the system of ordinary diﬀerential equations The discretization of the instationary convectiondiﬀusion equation results in a system of ordinary diﬀerential equations of the shape (3. In order to solve this system of equations any classical method for the solution of ordinary diﬀerential equations may be used.
e.13) The most common values for θ are: θ = 0 . (3.16) (M + 2 2 2 One can show that this scheme is also unconditionally stable and that the accuracy is one order higher. The implicit Euler method belongs to the class of ultrastable methods. In that case an explicit method is relatively cheap. 0 ≤ θ ≤ 1 . the Euler explicit method is not longer stable and one should use either an implicit method or a higher order explicit method. So the solution of the systems of ordinary diﬀerential equations is always reduced to a timestepping algorithm in combination with matrixvector multiplications. Implicit Heun or Crank Nicolson. This scheme does not have the damping property of Euler implicit and as a consequence once produced errors in time will always be visible. However. For such problems the classical fourth order Runge Kutta method is a good choice. of O(∆t2 ). For θ = 1 (3. A clear disadvantage of an explicit method is that the timestep must be restricted in order to get a stable solution. which is a purely implicit method. in the case of a lumped mass matrix. which means that errors in time always will be damped. for the convection equation (see for example Cuvelier et al 1986). One can show that this method is unconditionally stable.14) Although it concerns an explicit method. so the only reason to restrict the timestep is because of accuracy requirements. This one usually starts in these cases with one step Euler implicit.socalled θmethod: M ck+1 − ck + θSck+1 + (1 − θ)Sck = θF k+1 + (1 − θ)F k . (3. This scheme can be written as ∆t ∆t k ∆t S)ck+1 = (M − S)ck + (F + F k+1 ) . Implicit Euler and θ = 1/2 .13) reduces to M ck+1 = (M − ∆tS)ck + ∆tF k . For example in the case of a pure timedependent diﬀusion problem a stability criterion of the shape ∆t ≤ C∆x2 (3. we still have to solve a system of equations. the solution implies only the inversion of a diagonal matrix. In the case of a dominant convection.13) reduces to (M + ∆tS)ck+1 = M ck + ∆tF k+1 . (3. and sometimes the solution of a system of linear equations. Explicit Euler θ = 1 . ∆t (3. For θ = 0. 25 . It can be easily veriﬁed that the accuracy of both the implicit and the explicit Euler timediscretization is of O(∆t).15) is required. where C is some constant and ∆x a local diameter of the elements. i. The most accurate scheme is achieved for θ = 1/2 (Crank Nicolson).
However. This gives a ﬁrst order method.17) is of the order ∆t2 .13) by the socalled modiﬁed θmethod: M ck+θ − ck + θSck+θ = F k+θ .13) as follows.For θ = 0 it is easier to replace the θmethod (3. In case of a nonlinear system the approximation (3. α = 1+ √ 3 26 (3.20) . θ2i−1 = 0 for at least one i ∈ 1. and some damping is ensured as well. The latter is a generalization of the fractional θmethod.13) is equal to equation (3. tn+Σ4 ) . k. tn+Σ2 ) + θ4 f (x. tn+Σ2k ) (3. θ3 = 0.17) if the system of equations to be solved is linear. one may choose ∆tgenθ = 3 · ∆tCN to accomplish similar results for both methods.17) (3. tn+Σ2k−2 ) + θ2k f (x. .17) above (3. cn+Σ2k . The generalized θmethod is a 3stage method. k 2 i=1 θ2i−1 = k 2 i=1 θ2i to guarantee second order accuracy. but guarantees some damping: 1. so we will restrict ourselves to the description of the generalized θmethod. Σ2k = 1 for a kstage method. tn+Σ2 ) cn+Σ4 = cn+Σ2 + ∆t θ3 f (x. A third condition is optional. A common choice for the generalized θmethod is the following ‘optimum’ for k = 3: α θ1 = θ5 = . and is only a scaling requirement. tn ) + θ2 f (x. θ4 = α 33 6 2 −1 . . 0 ≤ θ ≤ 1 ∆t 1 k+θ 1 − θ k c + c ck+1 = θ θ (3. 2. . Two methods that oﬀer this opportunity are the fractional θmethod and the generalized θmethod. and is therefore 3 times as expensive as the CrankNicolson method.13) is that the matrix to be solved is always independent of θ and that no explicit matrixvector multiplication is required. letting Σk = k θi : i=1 cn+Σ2 = cn + ∆t θ1 f (x. . √2 √ 3 θ2 = θ6 = α . . .19) There are two necessary conditions: 1.18) One can prove that equation (3. . This condition includes at least one Implicit Euler step per time step. It could be advantageous to combine a number of diﬀerent θ’s per time step in such a way that second order accuracy is accomplished. = cn+Σ2k−2 + ∆t θ2k−1 f (x. A disadvantage of the θmethod is the ﬁxed θ. A clear advantage of (3. . We rewrite equation ( 3.
910−5 Table 3.310−7 4.for relatively small convection the accuracy of the linear elements is O(h2 ). Linear and quadratic triangles . which shows the accuracy of the following artiﬁcial mathematical example: −ε△c + u · ∇c = f . 10−3 respectively 10−6 and triangular elements.410−2 quadratic triangles ε = 1 ε = 10−3 ε = 10−6 8.010−3 8.110−3 1.4 Accuracy aspects of the SGA One can show that the SGA in combination with the FEM yields an accuracy of O(hk+1 ).1: Error in maxnorm of convectiondiﬀusion problem (3. α= 1−θ 1√ θ =1− 2.010−6 5. x∈Ω (3.810−2 ε=1 3.22a3.22b) (3. Table 3.2100 6.22c) c(x. 1)× (0.610−5 1. (3. θ3 = α(1 − 2θ). y) = sin(x) sin(y) . As soon as the convection dominates. the accuracy strongly decreases as can be seen in Table 3. 2 (3. .010−4 7.810−4 9. y) = sin(x) sin(y) .22a) (3.1 shows the maximal error for ε = 1.for convectiondominant ﬂow the numerical solution is very inaccurate especially for coarse grids. 11×11 respectively 21 × 21 nodes has been made. θ4 = β(1 − 2θ). this is only true for problems where the convection does not dominate the diﬀusion. in the quadratic case only 11 × 11 and 21 × 21 nodes have been used. From this table we may draw the following conclusions: number of nodes 6×6 11 × 11 21 × 21 linear triangles ε = 10−3 ε = 10−6 3. and for the quadratic elements at least O(h3 ).A common choice for the fractional θmethod is the following: θ1 = θ5 = βθ.5100 1.23) This problem has been solved on the square (0. where u = x y x∈Γ and f = 2ε sin(x) sin(y) + x cos(x) sin(y) + y sin(x) cos(y) . One easily veriﬁes that the exact solution of this problem is given by c(x.22c) for various values of ε. The results for quadrilaterals are comparable. 27 .21) 3.1.9101 4. where h is some representative diameter of the elements and k is the degree of the polynomials used in the approximation per element.310−2 3. 1) using linear and quadratic elements. β = 1−θ . In the linear case a subdivision in 6×6. 1 − 2θ θ . θ2 = θ6 = αθ.410−3 2. However.
(3.27) 28 . The most important part of the conclusion is that SGA is not a good method for convectiondominant ﬂows.the use of quadratic elements makes only sense for problems with small convection. especially for the quadratic elements. ∂c B = 0 . 1/2) Ω (0. This is achieved by setting u = ..1: Deﬁnition region for rotating cone problem the inner region we suppose that the concentration satisﬁes the convectiondiﬀusion equation −ε△c + u · ∇c = 0 .0) y x (1/2. in which cases the O(h3 ) cannot be expected anymore. The region consists of a square with a cut B. 4 (3. This conclusion is also motivated by the following less trivial problem. 1/2) (0. which means that the solution may be diﬀerent from the starting one.1. Since no boundary condition is given at the outﬂow curve ”B” implicitly the boundary condition ε is prescribed. The end curve has the same coordinates as B but the nodal points diﬀer. Remark: the conclusions are based on an example with a very smooth solution. In (1/2. At the outer boundary we use the x boundary condition cΓ = 0 . (3.26) and due to the small diﬀusion one expects that the concentration at the end curve is nearly the same. 1/2) B Figure 3. ∂n (3. For problems with steep gradients the conclusion may be diﬀerent.25) On the starting curve B the concentration c is set equal to 1 cB = cos(2π(y + )) .24) where ε is chosen equal to 10−6 and the velocity u is such that the ﬂow rotates counter −y clockwise. Rotating cone problem Consider the region Ω sketched in Figure 3.
122 .585 . The direction of the diagonals in the squares are chosen randomly. Finally Figure 3.2: Triangular mesh for rotating cone problems random diagonals.263 . 3 4 3 2 2 2 4 5 6 8 7 3 2 3 9 8 3 9 8 2 8 9 10 10 10 7 2 1 10 9 9 9 10 10 9 10 7 8 10 10 9 8 10 6 9 10 5 5 9 10 4 3 10 9 10 9 6 5 7 8 11 8 9 LEVELS 5 6 10 9 9 9 10 9 1 2 3 . .2 shows a 23 × 23 mesh consisting of triangles.150 9 10 2 10 9 9 10 9 3 4 5 6 7 2 2 8 2 3 2 2 2 9 10 11 Figure 3. Figure 3.302 . However.009 1. . It must be remarked that the solution is relatively smooth in the case of a grid consisting of squares or triangles all pointing in the same direction. . For the exact solution these should be concentration circles with levels 0. 10. 29 . the standard Galerkin method completely destroys the result.Figure 3. .443 .161 .019 .1.726 . Figure 3.867 1. which contains a large number of wiggles. 0.3: Equiconcentration lines for rotating cone problem computed by SGA.3 shows the lines of equal concentration.4 shows a 3D plot of the concentration.
and the interelement contributions are 30 . However. In order to solve that problem the integral is split into a sum of integrals over the elements. In ﬁnite diﬀerences this phenomenon is well known for a long time and one has tried to solve it by socalled upwind methods. Among the various upwind techniques for the FEM.5) gives: ρ Ω ∂c (v + p)dΩ + ∂t Ω {−div (A∇c) + u · ∇c + βc}(v + p)dΩ = f (v + p)dΩ . This has motivated researchers in ﬁnite elements to construct schemes. Actually the second derivative of c does not have to exist over the element boundaries and is certainly not integrable in the examples of elements we have given before. As a consequence Gauss’ divergence theorem may only be applied to the v part of (3.29) Ω The function v is chosen in the same space as the solution. Hence after integration by parts we get Ω ρ ∂c vdΩ + {A∇c · ∇v + (u · ∇c)v + βcv}dΩ + ∂t Ω σcvdΓ Γ3 (3.30) + {ρ ∂c − div A∇c + u · ∇c + βc − f }pdΩ = ∂t Ω f vdΩ + Ω Γ2 g2 vdΓ + Γ3 g3 vdΓ .Figure 3. instead of choosing the test function in the same space as the solution a test function v is introduced according to ¯ v =v+p. Substitution of (3.5 Streamline Upwind Petrov Galerkin In the previous paragraph we have seen that the SGA method may lead to wiggles and inaccurate results for convectiondominant ﬂows. which are comparable to classical ﬁnite diﬀerence upwind schemes. So we are not able to compute the integral containing the p term. Starting point for SUPG is the weak formulation (3.5). 3. we assume that it may be discontinuous over the elements.28) where v is the classical test function and p denotes a correction in order to take care of the upwinding part. the streamline upwind PetrovGalerkin method (SUPG) is the most popular one. which means that the ﬁrst derivative is square integrable.28) in (3.4: 3D plot of concentration in rotating cone problem computed by SGA. with respect to the function p. (3. However. This method has ﬁrst been derived by Brooks and Hughes (1982) and is later on improved by a large number of authors. ¯ (3.29).
2 Pe. u = 1 and ε = 0. If a central diﬀerence scheme: −ε ci+1 − ci−1 ci+1 − 2ci + ci−1 +u =0. (3. ε (3. A common choice for the function p is inspired by the onedimensional stationary diﬀusion equation: dc d2 c =0.neglected. ∆x2 2∆x c0 = 0 . With consistency we mean that at least the constant and ﬁrst term of the Taylor series expansion of the solution are represented exactly. (3.33) The solution of (3. (3. 2. the solution shows wiggles as long as ∆x > where the Peclet number P e is deﬁned as Pe = u ..32). (3. .35) Figure 3. n) .33) is sketched in Figure 3. This ﬁgure makes it clear that.01. In fact a complete class of diﬀerent SUPG methods may be deﬁned by diﬀerent choices of p.5 for ε = 0. In the classical ﬁnite diﬀerence upwind scheme one tries to get rid of these wiggles by replacing the ﬁrst derivative by a backward diﬀerence scheme provided the velocity u is positive. At this moment the choice of the function p per element is completely free.34) is applied with an equidistant stepsize ∆x.30) we write: ρ Ω ∂c vdΩ + ∂t {ρ Ω {A∇c · ∇v + (u · ∇c)v + βcv}dΩ + σcvdΓ Γ3 ne + k=1Ωek ∂c − div A∇c + u · ∇c + βc}pdΩ = ∂t ne f vdΩ + Ω Γ2 g2 vdΓ + Γ3 g3 vdΓ + k=1Ωek f pdΩ . However. (3. It has a steep gradient in the neighborhood of x = 1.01.31) One can see that the approximation (3. and a summation of residuals of the diﬀerential equation per element multiplied by a function. cn+1 = 1 . So instead of (3. the wiggles have been disappeared and the numerical solution has been smoothed.32) −ε 2 + u dx dx with boundary conditions c(0) = 0 . Figure 3. although backward diﬀerences suppress the wiggles. it is clear that the choice of p actually deﬁnes the type of SUPG method used.6 shows the result of the upwinding. (i = 1. The smaller ε. The size of this gradient depends on the value of ε.. the steeper the gradient. c(1) = 1 . The idea for this choice is based on the fact that for a pure convection problem all information is transported from left to right and hence the discretization of the convective term should also be based upon information from the left.31) itself is consistent since it consists of a standard Galerkin part. which itself is consistent.5 shows an example for ∆x = 0.1. it also makes the 31 ..
01 and u = 1.6: Solution of equation (3.0 x Figure 3. cn+1 = 1 . — exact solution.32) for ε = 0.6 . In the literature many upwinding schemes for ﬁnite diﬀerence methods have been derived which are much more accurate than the backward diﬀerence scheme.6 0.36) as the discretization of a 32 .0 .33) reads: −ε ci − ci−1 ci+1 − 2ci + ci−1 +u = 0 (i = 1. solution inaccurate.1 and central diﬀerences. 2 dx2 (3. .32).0 .0 x Figure 3. 2 ∆x ∆x c0 = 0 ..4 0. the second derivative appears in the truncation error.37) which is only of order ∆x instead of ∆x2 . 1.6 0.32) for ε = 0.2 0.36) Using Taylor series expansion one can show that (3.5: Solution of equation (3. which implies that in fact one may consider (3.8 1.1.0 .6 0. n) .36) gives a local truncation error of − u∆x d2 c + O(∆x2 ) . Moreover.0 0.1 and backward diﬀerences..numerical solution for ∆x = 0.2 0.0 0.8 .8 0. (3. (3.4 0.8 y 1.0 0. − ◦ − numerical solution for ∆x = 0.4 .8 1.4 .01 and u = 1: — exact solution. The backward diﬀerence scheme for (3.2 0..2 .4 0.2 .0 0.2 .4 .6 .8 y 1.0 . +. 2.6 .
38) In fact (3. 2 (3. For example the exact solution of (3.40a) 1 u∆x ¯ ξ = coth (α) − . which may be considered as a central diﬀerence scheme with artiﬁcial diﬀusion equal to u∆x ¯ d2 c . The term − u∆x is usually called artiﬁcial diﬀusion.convectiondiﬀusion equation with a diﬀusion of ε+ u∆x .41d) α≥1.41b) Il’in scheme Double asymptotic approximation Critical approximation ¯ ξ = α/3 −3 ≤ α ≤ 3 sign(α) α > 3 . (3. If we conﬁne ourselves to linear elements.43) . the second derivative of the approximate solution is zero per element and hence SUPG applied to (3.36) can be derived by taking the central diﬀerence scheme of the diﬀerential equation −(ε + d2 c dx2 u∆x d2 c dc ) 2 +u =0. (3.42) ph u {u dx dx dx dx k=1 e Ω Ω k 0 1 − 1/α α ≤ −1 −1 ≤ α ≤ 1 (3. 2 dx 33 (3. 2 dx dx (3.39) c(0) = 0 . Many of the upwind schemes in 2 ﬁnite diﬀerences may be considered as a central diﬀerence scheme with artiﬁcial diﬀusion. c(1) = 1 .40a) is constructed.32). In this way it may be considered as a variant of the socalled hybrid method.32) is constructed by the Il’in scheme. (3. (3. ξ (3.33) reduces to ne dch dvh dch dch vh + ε }dΩ + dΩ = 0 . vh represents the discretized classical test function and ph the discretization of the extra function p. where ch is deﬁned by (3. The following values of ξ are commonly proposed: ¯ ξ = sign(α) . In order to get an artiﬁcial diﬀusion of the shape (3.8). ξ 2 dx2 (3.41a) Classical upwind scheme ¯ = coth(α) − 1/α .41c) ¯ ξ = −1 − 1/α The last choice is such that the amount of artiﬁcial diﬀusion is minimal in order to get a diagonally dominant matrix.40b) α 2ε ¯ ¯ Diﬀerent schemes lead to diﬀerent choices of ξ. α = . This observation motivates us to choose the function p such that an artiﬁcial diﬀusion of the form (3.40a) it is suﬃcient to choose ph equal to ph = ¯ hξ dvh . (3.
If the step size ∆x is not a constant.210−4 5.44) for triangles.43) must be replaced by the step size. Besides the accuracy asnumber of nodes 6×6 11 × 11 21 × 21 linear triangles ε = 1 ε = 10−3 ε = 10−6 6.610−5 1.310−5 Table 3. That means that the solution perpendicular to the ﬂow direction is smoothed and becomes inaccurate.41d) (except the choice ξ O(∆x2 ) + εO(∆x). which may depend on the quadrature point. Brooks and Hughes (1982) have solved this problem by giving the perturbation parameter p a tensor character ¯ hξ u · ∇vh . discontinuity capturing (Hughes et al 1986). These improvements usually have a special function. If we apply the SUPG method based upon formula (3. The improvement for small values of ε and coarse grids is immediately clear. For quadratic elements h equal to half the local element width.510−4 quadratic triangles ε = 1 ε = 10−3 ε = 10−6 1. but also the righthand side and the time derivative. The use of upwind makes the matrices to be solved more diagonally dominant.910−3 1.the treatment of source terms is considerably better than for classical upwind techniques.110−6 2. pects the SPUG method has an another important advantage.810−4 1.010−5 4. Hence explicit methods are as expensive as implicit ones. h in formula (3.310−4 7.610−3 2. The SUPG method diﬀers from the classical upwind methods in the sense that not only the advective term is perturbed.1 but now with SGA replaced by SUPG.010−4 5. a typical crosswind diﬀusion arises.610−5 1. (3.where h = ∆x.44) p= 2 u In this formula h is the local element width.22c) for various values of ε Solution by SUPG.22a 3. For that reason the SUPG method must be extended in such a way that the upwinding is applied in the direction of the ﬂow only. This table does not clearly show the accuracy of the method in terms of orders ∆xp . for example to create monotonous solutions (Rice and Schnipke 1984).210−3 5. all based on diﬀerent choices of the function p. has proven to be a good choice. Many extensions of the SUPG method have been proposed.2 shows the example of Table 3. Mizukami (1985) has extended (3. ¯ With Taylor series expansion it can be shown that if ξ is chosen according to one of the ¯ = 1). As a consequence iterative matrix solvers 34 . the accuracy of the scheme is possible values of (3. Table 3. which may be considered to be of O(∆x2 ) for small values of ε. . or for timedependent problems (Shahib 1988).43) in 2D in each of the directions.the mass matrix is nonsymmetric and may not be lumped.2: Error in maxnorm of convectiondiﬀusion problem (3. Linear and quadratic triangles. This has two important consequences: .610−4 1.010−3 4.41a3.
4.029 .284 . Table 3. Not only the accuracy of the solution is enlarged considerably. First we consider the rotating cone problem introduced in Section 3.388 .7 shows the lines of equal concentration produced by SUPG and Figure 3.8: 3D plot of concentration for rotating cone problem computed by SUPG condition with respect to linear solvers. This will be demonstrated in Paragraph 3.will converge much faster than for SGA.179 . Exactly the same mesh as for the central scheme is used.597 .6.492 . However. From this table it is clear 35 . In this table SGA and SUPG are compared for various mesh sizes.6 Some classical benchmark problems for convectiondiﬀusion solvers In this section we shall investigate the performance of the standard Galerkin approach as well as the streamline upwind Petrov Galerkin method for some benchmark problems.014 6 7 8 9 10 11 Figure 3.701 . All previous pictures have been created by using a direct linear solver.4.910 1.075 . Figure 3.806 .7: Equiconcentration lines for rotating cone problem computed by SUPG. Figure 3. for large problems an iterative solver is much more attractive. also the 2 3 4 5 6 7 8 9 10 10 9 11 8 7 6 5 4 3 2 LEVELS 1 2 3 4 5 1 . Numerical computations show that upwinding has a very important eﬀect on the number of iterations necessary for reaching a certain level of accuracy. 3.3 shows the number of iterations required to solve the rotating cone problem for ǫ = 10−3 and ǫ = 10−6 . Finally we show some results of classical benchmark problems to investigate the behavior of various schemes. The solution by SGA is plotted in Figure 3. These pictures show a large qualitative improvement of the accuracy compared to SGA.8 the corresponding threedimensional plot.
t) = 0 . As last benchmark problem we consider is a timedependent one dimensional convectiondiﬀusion equation given by: ∂c ∂2c ∂c +u =D 2 ∂t ∂x ∂x c(x. SGA accuracy 10−3 15 17 31 SUPG accuracy 10−3 6 6 27 9 13 24 ǫ 10−3 10−6 number of nodes 21 × 21 41 × 41 81 × 81 21 × 21 41 × 41 81 × 81 accuracy 19 21 38  10−6 accuracy 10−6 9 9 32 12 17 32 Table 3.that for small values of ǫ the SUPG method is superior to SGA with respect to iterative solvers. SGA and SUPG. 0) = sin π x−a b−a =0 0≤x≤1. Figures 3. elsewhere.4 .47) This benchmark problem has been solved by SGA with and without lumping of the mass matrix and SUPG.46) c(0. a = 0. the standard Galerkin method performs a little bit better than SUPG.4.in the table means that no convergence was possible.2 and b = 0. 36 .11 shows the results of the various methods. Furthermore for this moderate Peclet number. u = 1. D = 0. A .002.93. These ﬁgures show that lumping drastically decreases the accuracy of the numerical solution.3: Number of iterations by a preconditioned CGS solver for the solution of the rotating cone problem of Section 3. t) = c(1.45) (3. (3. 0) c(x. a≤x≤b. (3.
8 c 1.10: SGA applied to (3.9: SGA applied to (3.0 x .4 .0 .0 x .2 . numerical solution 37 .8 Figure 3.4 .2 .0 c .2 1.1.4 .42) 40 linear elements.42) 40 linear elements.40)(3.6 . consistent mass matrix – exact solution.40)(3.8 .2 .0 .2 1.2 .6 . lumped mass matrix – exact solution.4 .8 .0 . + numerical solution Figure 3.
8 .8 Figure 3.2 .0 c .2 1.42).6 .0 .40)(3.9: SUPG with stationary upwind parameter applied to (3.4 .1.2 . 40 linear elements: – exact solution.0 x .4 . + numerical solution 38 .
f2 . can be written as: The Continuity equation ∂u1 ∂u2 ∂u3 + + =0.3) (4. 3) . where p I e d µ denotes the pressure. (4. ρ the density of the ﬂuid.2) reads: ρ ∂ui ∂ui ∂ui ∂ui + u1 + u2 + u3 ∂t ∂x1 ∂x2 ∂x3 − ∂σi1 ∂σi2 ∂σi3 + + ∂x1 ∂x2 ∂x3 = ρ fi . The components eij of the tensor e are deﬁned by eij = so σij = −pδij + µ 39 ∂uj ∂ui + ∂xj ∂xi . • The medium has a Newtonian character. • The ﬂow is laminar. (4.5) .6) 1 2 ∂uj ∂ui + ∂xj ∂xi . f3 ) the body force per unit of mass. u3 )T denotes the velocity vector. and σ the stress tensor. f = (f1 .1) div u = ∂x1 ∂x2 ∂x3 The NavierStokes equations ρ ∂u + (u.1 Discretization of the incompressible NavierStokes equations by standard Galerkin The basic equations of ﬂuid dynamics In this chapter we shall consider ﬂuids with the following properties: • The medium is incompressible. the deviatoric stress tensor and the viscosity of the ﬂuid. (4. ∂t (4.4) For an incompressible and isotropic medium the stress terms σ can be written as σ = −p I + d = −p I + 2µ e .2) in which u = (u1 . Componentwise (4.4 4. For a threedimensional ﬂow ﬁeld the basic equations of ﬂuid ﬂow under the above restrictions. 2. the unit tensor the rate of strain tensor. • The medium properties are temperature independent and uniform. (i = 1. (4.∇)u − div σ = ρf . u2 .
given.2). that for incompressible ﬂows no explicit boundary conditions for the pressure must be given. it is necessary to prescribe both initial and boundary conditions. (4. it is suﬃcient to prescribe the initial velocity ﬁeld at t = 0. ∇)u − µ △ u + ∇ p = ρf . Substitution of (4.2) can be made dimensionless by the introduction of the Reynolds number Re deﬁned by ρU L Re = .1) to ρ ∂u + (u .10d) 40 .If µ is constant it is possible to simplify the expression(4.2) is a system of second order diﬀerential equations in space. 1969). it is necessary to prescribe boundary conditions for each velocity component on the complete boundary of the domain. at high Reynolds numbers the convective terms dominate the stress tensor and as a consequence the boundary conditions at outﬂow must be such that they restrict the ﬂow as little as possible.8) into (4. Equation (4. (4. we shall prefer expression (4. 2 3 4 un and ut and σ nt and σ nt σ nn σ nt given. Of course this velocity ﬁeld must satisfy the incompressibility condition (4.1).9b) 4. given. (4. (4. However. Since only ﬁrst derivatives of time are present in (4.7).2). In fact there is a strong relation between both.10a) (4. Usually boundary conditions for the pressure are implicitly given by prescribing the normal stress. ∂t (4.8) µ where U is some characteristic velocity and L a characteristic length. (4.4) gives ∂u + (u .10b) (4.2) than in (4.2) by substitution of the incompressibility condition (4. The continuity equation and the pressure play a very special role in the incompressible NavierStokes equations.9a) (4.7) however. The following types of boundary conditions are commonly used for the twodimensional incompressible NavierStokes equations (the extension to I 3 is straight forward): R 1 u given (Dirichlet boundary condition). It can be shown (Ladyshenskaya.2 Initial and boundary conditions In order to solve the equations (4.2) because boundary conditions will be implemented more easily in (4.1) Since (4.2).10c) (4. ∇)u − div σ = f ∂t 2 σ = −p I + e Re provided ρ does not depend on the space coordinates.
Typical examples of these boundary conditions are: • At ﬁxed walls: noslip condition u = o. Figure 4. Only the part (−6H. In this case the ﬂow at the end may be considered as a channel ﬂow and the boundary condition 7 6 1 4 2 5 3 Figure 4. σ nn = 0. for convection dominated ﬂows. Figure 4. 41 . At outﬂow one may prescribe the velocity. Length of channel is 44H.1 shows the streamlines for Re = 150. may be a good choice in numerical computations. 6H) is plotted. σ nt = 0 is a good approximation. However. So σ nn = 0 implies that implicitly p is set equal to zero.10b). Re ∂n ∂un ∂ut + . it is impossible to deﬁne correct boundary conditions. ut = 0. He performed some experiments in the ﬂow over a backward facing step. ∂un is linear and hence σ nt = 0. such a boundary condition may lead to wiggles due to inaccuracies of the boundary conditions. For a free surface we have the condition that there is no ﬂow through the surface and that the tangential stress is equal to zero.10b). The ﬁrst one (ut = 0. • At inﬂow the velocity proﬁle given: u = g. σ nt = 0. in practical situations we ∂t usually do not have a channel ﬂow and it is very hard to formulate correct boundary conditions at outﬂow.11) (4. although incorrect. The agreement with the computations in the long channel is remarkably good. From (4. ∂t ∂n (4. σ nn (n·σ ·n) denotes the normal component of the stress tensor on the boundary and σ nt (n · σ · t) the tangential component. σ nn = 0. Outﬂow boundary conditions σ nn = 0. The boundary condition σ nt = 0. un parabolic or ut = 0 and un constant. Vosse (1987) has shown that the boundary condition σ nt = 0.12) As a consequence for high Reynolds numbers σ nn is approximately equal to −p.where un denotes the normal component of the velocity on the boundary and ut the tangential component. In that case we use the boundary condition un = 0. σ nn = 0 is correct for channel ﬂow. if we make the length of the channel such that the outﬂow boundary intersects the recirculation zone. ut = 0.2 shows the results of computations with the boundary conditions σ nt = 0. Typical inﬂow proﬁles are ut = 0. This is an example of type (4. Less restrictive boundary conditions are for example ut = 0 and σ nn = 0 or σ nt = 0 and σ nn = 0. However. σ nn = 0 is in general not correct. σ nn = 0) prescribes a parallel outﬂow with zero normal stress. This is also an example of type (4. in which case we have a parabolic velocity proﬁle. However. where H is the step height. and the length of the channel after the step large enough. The boundary condition ut = 0.6) it can be derived that σ nn = −p + and σ nt = 1 Re 2 ∂un .1: Streamlines in backward step. For a channel ﬂow.
however. However.13 12 11 10 9 8 7 6 1 4 2 5 3 7 7 Figure 4. (4. .13c) σzz = −p + 2µ σϕz = σzϕ = µ ∂uz ∂ . uϕ and uz .1) and (4. the operators divergence and gradient as well as the stress tensor get a diﬀerent shape: ∇v = div u = 1 r ∂v 1 ∂v ∂v . Whether the uϕ component may be neglected depends on the ﬂow. The incompressible NavierStokes equations in cylinder coordinates are still given by the expressions (4.13a) (4. In a rotating ﬂow uϕ is not equal to zero and we have in that case three velocity unknowns. =0. but the pressure is ﬁxed up to an additive constant.2: Streamlines in backward step.10b4. ur 1 ∂uϕ + r r ∂ϕ uϕ r (4. One can show that the equations (4. . one usually tries to reduce the dimension by considering symmetry in the ﬂow or neglect ﬂow in a certain direction. The last possibility results in twodimensional ﬂow.13b) ∂uϕ ∂ruz ∂rur + + ∂r ∂ϕ ∂z σrr = −p + 2µ ∂ur . σrϕ = σϕr = µ r ∂z ∂r + 1 ∂ur r ∂ϕ . σ nt = 0. If we solve the stationary incompressible NavierStokes equations with the velocity prescribed on the complete boundary (actually each combination in which the normal velocity component is prescribed). σϕϕ = −p + 2µ ∂r . If we use cylinder symmetry the ﬂow reduces to socalled axisymmetric ﬂow. Length of channel is 12H. the velocity is unique. one exception.1). ∂uϕ ∂uz 1 ∂uz ∂ur + + . Outﬂow boundary conditions σ nn = 0.3 Axisymmetric ﬂow Since in general threedimensional ﬂow computations are very expensive. σrz = σzr = µ r ∂ϕ ∂z ∂z ∂r 42 . ∂r r ∂ϕ ∂z T . although we have only two directions. In an axisymmetric ﬂow the variation in ϕdirection is zero and all ϕderivatives may be neglected. 4. such as channel ﬂow. There is. In such a case the NavierStokes equations and the velocity vector have to be transformed to a cylindrical coordinate system with coordinates r. (4. ϕ and z and velocity components ur .2) with a given initial ﬂow ﬁeld and combinations of boundary conditions of type (4.10d) have a unique solution.2).
16d) x ∈ Γ3 . the socalled symmetry conditions.10d). As a consequence one has to be careful in the numerical computations at r = 0. Γ2 .16c) (4. x ∈ Γ4 .16b) .10b. σ ij = −pδij + µ un = g2 .Note that in these expressions the term 1/r frequently occurs.16a) (4.3 shows an artiﬁcial example of a region Ω with four boundaries Γ1 to Γ4 . In order to consider the four boundary conditions (4. First we shall derive the weak formulation.4 The weak formulation In the next paragraph we shall derive the standard Galerkin equation for the incompressible NavierStokes equations.10d). (4. (4.16e) (4.10b4. we need extra boundary conditions. σ nt = g3 . The instationary case will be treated in Chapter 7. σ nt (4. (4. = g7 . One immediately veriﬁes that these symmetry conditions are given by: ur = 0 .15) ∂uz =0 . ut = g4 .16f) (4. σ nn nn = g5 . At the symmetry axis r = 0. uϕ = 0 and σ nt = 0 at r=0. x ∈ Γ2 . Γ3 Γ2 Ω Γ4 Γ1 Figure 4. = g6 σ 43 . The formulation of our example is now: For x ∈ Ω solve u satisfying div u = 0 . −div σ + ρ(u · ∇ u) = ρf . On each of these boundaries we have a diﬀerent type of boundary condition. Furthermore we shall restrict ourselves in this chapter to stationary problems. Figure 4. Γ3 and Γ4 .14) 4.16g) ∂uj ∂ui + ∂xj ∂xi u = g1 for x ∈ Γ1 . we shall assume that the boundary consists of four parts each with one of the boundary conditions (4. Furthermore we restrict ourselves for the moment to the twodimensional case.3: Artiﬁcial example with region Ω and boundaries Γ1 . or translated to stresses: ur = 0 . ∂r uϕ = 0 at r = 0 . (4.4.
v2 )T these equations can be combined to: (−div σ + ρ(u · ∇ u)) · v dΩ = f · v dΩ . In order to apply the boundary conditions (4. On boundary Γ2 un is prescribed and so vn is chosen equal to zero. Γ4 (4. to Γ4 . such that q div u dΩ = 0 . (4. If we furthermore substitute relation (4.18) Ω Ω Choosing v2 respectively v1 equal to zero gives us the original weak formulation for each of the equations. and on boundary Γ3 ut is prescribed and vt is set equal to zero.21) ρ(u · ∇ u) · v dΩ − p div v dΩ = Ω Ω 2µe · ∇ v dΩ + g3 vt dΓ + Ω g5 vn dΓ + Γ3 Γ4 g6 vt + g7 vn dΓ + Ω Γ2 ρf · v dΩ .16g): Find u . The ﬁrst term in (4.19).18) can be written as: Ω −(div σ) · v dΩ = g3 vt dΓ − Ω 2µ e · ∇ v dΩ − p div v dΩ Ω − Γ2 Γ3 g5 vn dΓ − g6 vt + g7 vn dΓ . equation (4. Ω (4. First equation (4. p with u = g 1 at Γ1 .4) into (4.17) The momentum equations (4.16a4. If we deﬁne v = (v1 .16a4. For a derivation of formula (4.19) we refer to Appendix A. the boundary integral over Γ is split into 4 parts Γ1 . which may be each multiplied by separate test functions v1 and v2 . vn the component of v in the normal direction and vt in the tangential direction.22) 44 .16b) must be multiplied by test functions.16a) is multiplied by a test function q resulting in q div u dΩ = 0 Ω (4.16b) consist of two equations. un = g2 at Γ2 . (4. ut = g4 at Γ3 .18) may be further reduced by applying integration by parts (Gauss theorem) to (−div σ) · v dΩ = σ · ∇ v dΩ − (vn σ nn + vt σ nt )dΓ.16d4. On Γ1 we have a prescribed velocity and hence the test function v is chosen equal to zero.16g). the ﬁrst term of (4.In order to derive the weak formulation.19) Ω Ω where Γ denotes the boundary of Ω.20) Combinations of all these results leads to the weak formulation of the NavierStokes equations (4. Γ (4.
21) vanishes and the pressure disappears from (4. We see that in the relations (4.25) In (4.24) uj ϕj (x) . in most practical applications ϕi (x) and Ψi (x) are chosen diﬀerently.22) shows a strong relation between u and v. then the ﬁrst equation (4. (j = 1(1)n) and ϕj in the same way. (4. Indeed in all theoretical investigations with respect to the weak form of the NavierStokes equations.21) and (4. nor that these basis functions must have the same shape.23) Now the approximation of u and p will be deﬁned by m ph = j=1 n pj Ψj (x) . but the functions u and v must be continuous over the element boundaries. In fact. uj+n = u2j . p and q are taken from the same space and u and v are taken from the same space.5).22) no derivatives of p and q are necessary. j=1 uh = j=1 u1j ϕj1 (x) + u2j ϕj2 (x) = (4. ϕi2 (x) = 0 ϕi (x) .26) 45 .24). With respect to u and v. Mark that the number of basis functions ϕi (x) and Ψi (x) do not have to be the same. In order to get the standard Galerkin formulation we substitute v = ϕi (x).22). Ω i = 1(1)m . 4. vn = 0 at Γ2 and vt = 0 at Γ3 . q = Ψi (x) into the weak formulation (4. (j = 1(1)n). Hence it is suﬃcient that p and q are integrable.5 The standard Galerkin method In the standard Galerkin method we deﬁne two types of basis functions.for all v such that v = o at Γ1 . as well as between p and q. ﬁrst derivatives are required and hence not only u and v but also their ﬁrst derivatives must be integrable. We may combine the velocity basis functions into vector form by ϕi1 (x) = ϕi (x) 0 . This observation motivates the choice of the basis functions in the standard Galerkin method.25) such that Ψi div uh dΩ = 0 . If we for example demand that both u and v are divergence free. however. As a consequence we do not need continuity of p and q in the Galerkin formulation. and e given by (4. The weak formulation (4.(4.214. must only be coupled to the free degrees of freedom. For simplicity the summation has been carried out over all degrees of freedom including the prescribed ones at the boundary. The test functions. In this way we get: Find pn and un deﬁned by (4. (4. basis function Ψi (x) corresponding to the pressure and functions ϕi (x) corresponding to the velocity components. 2n (4.214.22).25) uj is deﬁned by uj = u1j .
28a) (4.28b) LU where U denotes the vector of unknowns u1i and u2i . SU denotes the discretization of the viscous terms. LU denotes the discretization of the divergence of u and −LT P the discretization of the gradient of p. The righthand side F contains all contributions of the source term. N (U ) the discretization of the nonlinear convective terms. the integrals (4. P denotes the vector of unknowns pi .25). in the same way as for the potential problem in Chapter 1. and m and N are deﬁned in (4.5). The technique of local transformations is described in Zienkiewicz and Taylor (1989).27) may be evaluated elementwise. The nonlinear iterative procedure will be the subject of Paragraph 4. Formally the system of equations can be written as SU + N (U ) − LT P = F = o (4.27) must be taken for all free degrees of freedom ui . Once the basis functions are known.and Ω 2µ (eh · ∇ ϕi )dΩ + ph div ϕi ) dΩ = Γ2 Ω ρ(uh · ∇ uh ) · ϕi dΩ g5 (ϕi · n) dΓ (4. Finally we arrive at a system of m + 2n − np nonlinear equations with m + 2n − np unknowns. The solution of the system of equations (4.24). Γ3 and Γ4 are in the direction of the coordinate axis.6 Treatment of the nonlinear terms In order to solve the system of nonlinear equations. the boundary integral as well as the contribution of the prescribed boundary conditions.28b) does not contain the unknown pressure P . u replaced by uh i in (4. where np denotes the number of prescribed boundary values. (4.26) and (4. an iterative procedure is necessary. In general such a procedure consists of the following steps: make an initial estimation 46 . Expression (4.28b) introduces two diﬃculties.7.6.28a4.27) − Ω g3 (ϕi · t) dΓ + Γ3 + Γ4 g6 (ϕi · t) + g7 (ϕi · n) dΓ + Ω ρf · ϕi dΩ where eh is given by (4.27) may be easily evaluated as long as n or t on the boundaries Γ2 . The ﬁnite element method may be used to construct the basis functions ϕi and Ψi . The last aspect introduces a number of extra complications which will be treated in Paragraph 4. 4. Firstly the equations are nonlinear and as a consequence some iterative solution procedure is necessary. If they are not in that direction it is necessary to transform the unknowns on the boundary locally such that they are expanded into normal and tangential direction. Secondly equation (4.
Numerical experiments have shown that from these last three possibilities only (4. and Picard type methods.29) gives f k+1 (u. resulting in a system of linear equations.32) (4. Firstly one can apply the method to equations (4. To that end we deﬁne f (u. The Picard iteration seems to have a larger convergence region.29) are taken at the old level.while (not converged) do linearize the nonlinear equations based on the previous solution solve the resulting system of linear equations Examples of such methods are Newton methods. (4. An alternative is to linearize the nonlinear diﬀerential equations ﬁrst and then to discretize the resulting linear equation.34) (u · ∇ u) k+1 ≃ u k ≃ u k · ∇u k+1 k . · uk (4.29) Taylorseries expansion of (4. (u · ∇ u) k+1 (4. It is well known that Newton’s method converges fast (i. Sometimes both approaches are identical. quadratically) as soon as the iteration is in the neighborhood of the ﬁnal solution. We write this solution as uk . (4. · ∇u . ∇ u) as f (u. ∇ u) = f k uk .34).16g) we only consider the convective terms. quasiNewton methods.28b). An important question with respect to these iterative methods is. In order to derive the iterative method one may proceed in two ways.31) forms the standard Newton linearization. First we shall derive the Newton linearization. Hence: (u · ∇ u)k+1 ≃ uk+1 · ∇ uk . how to ﬁnd a good initial estimate. However.29) gives uk+1 · ∇ uk+1 ≈ uk · ∇ uk + uk+1 − uk · ∇ uk + ∇ uk+1 − uk = uk+1 · ∇ uk + uk · ∇ uk+1 − uk · ∇ uk .33) (4. Alternative linearization are constructed by the socalled Picard iteration methods in which one or both terms in (4. After linearization of the convective terms the standard Galerkin method may be applied. Since it is the only nonlinear term in equation (4.30) . Neglecting the quadratic terms and substitution of (4. which means that this iteration does not 47 . ∇ u) = u · ∇ u .e. if the distance between iteration and solution is too large.31) shows that Newton is in fact a linear combination of (4.31) (4. ∇ uk + uk+1 − uk +∇ uk+1 − uk · ∂f k ∂u ∂f k + O uk+1 − uk · ∂∇u 2 (4.33) produces a good convergence. Newton may converge slowly or even diverge. Suppose we have computed the solution uk at a preceding iteration level k. which is the classical approach. The last approach is conceptually easier than the ﬁrst one and will therefore be applied in this paragraph.16a4.28a4.32)(4.
whereas the pressure approximation may be discontinuous over the element boundaries. In general one may expect that the iteration process no longer converges as soon as the ﬂow becomes instationary or turbulent.5 it has been derived that the standard Galerkin method results in a system of nonlinear equations of the form (4. A process in which the Reynolds number is increased gradually is called a continuation method. If the Reynolds number is too high it is possible that the distance between the solution of Stokes and NavierStokes is too large. In order to satisfy this criterion. The continuity equation.use Newton iteration in the next steps. a general accepted rule is that the order of approximation of the pressure must be one lower than the order of approximation of the velocity. This demand restricts the number of applicable elements considerably. the number of rows in this equation is completely determined by the number of pressure unknowns. So we have to demand that the number of pressure unknowns never exceeds the number of velocity unknowns. However. where U k is the solution of the previous iteration. However.4a. discretized as LU = o. .start with some initial guess. Suppose that there are more pressure unknowns than velocity unknowns. . there is another problem. however.28a4. which is formed by the NavierStokes equations where the convective terms have been neglected. this demand should be valid independently of the number of elements. this method converges only linearly. sometimes more than one step. Since we want to solve the NavierStokes equations by ﬁnite element methods for various grid size.need the same accurate initial estimate. based upon linear elements for the velocity 48 .35) contains more rows than unknowns and we have either a dependent or inconsistent system of equations.5 it has already been pointed out that with respect to the velocity it is necessary that the approximation over the elementsides must be continuous. (4. In Section 4. 4.28b). A possible strategy to converge to the ﬁnal solution is the following: . After linearization this system can be written as SU + N (U k )U − LT P = F . So if the velocity is approximated by a linear polynomial.35) LU = o. does contain only velocity unknowns. In that case the solution of NavierStokes with a smaller Reynolds number might be a good choice. In both cases the matrix to be solved is singular. Consider for example the mesh in Figure 4. An initial guess may be for example the solution of the Stokes problem. then the pressure is approximated by a constant per element and so on. Unfortunately this rule is not suﬃcient to guarantee that the number of pressure unknowns is not larger than the number of velocity unknowns independently of the number of elements. In that case equation (4.perform one step Picard iteration in order to approach the ﬁnal solution.7 Necessary conditions for the elements In Paragraph 4.
4b gives an example of an admissible element. Figure 4. The corresponding element is not admissible. b) midpoints of the sides are the velocity nodal points: nonconforming element. The pressure is unique except for an additive constant. Suppose we have Dirichlet boundary conditions for the velocity. practical computations have shown that in that case still the matrix remains singular. One might remark that if we add suﬃcient elements to the mesh eventually the number of velocity unknowns will be larger than the number of pressure unknowns. However. For convenience the constant has been coupled to the centroid of the element. However. The velocity approximation is linear but not continuous over the element boundaries. nodes. Hence we have an example of a singular matrix. Such an element is called nonconforming and introduces for that reason extra problems with the approximation. K=16. So ﬁnally we have 2 velocity unknowns and 7 pressure unknowns. which means that all boundary velocities are prescribed. L=8 Region Ω with p=8. K=9. A simple count shows that for the given mesh.4: Triangular elements with three nodal points for the velocity (x) and one nodal point for the pressure (0): a) vertices are the velocity nodal points: conforming element. the number of velocity unknowns is equal to 16 and the number of pressure unknowns 49 .and constant elements for the pressure. L=8 a) P: pressure nodal points K: velocity nodal points L: velocity nodal points on the outer boundary b) Figure 4. with respect to the continuity equation the element satisﬁes the demand that there must be more velocity unknowns than pressure unknowns. To ﬁx this constant one of the pressure unknowns is given. In this example the mesh contains 8 pressure nodes and 9 velocity element p=8. The velocity unknowns are not positioned in the vertices of the triangle but in the midside points.
The derivation of the admissibility condition given above is rather adhoc and does not explain why an element is admissible. Hence such nodal points make it easier to satisfy the continuity equations. With respect to the types of elements that are applied we make a subdivision into two groups: elements with continuous pressure (The TaylorHood family) and elements with discontinuous pressure (The CrouzeixRaviart family). We shall restrict ourselves to quadratic elements. It just helps to identify nonadmissible elements. Midside velocity points in two dimensions and centroid velocity points on surfaces in three dimensions make it possible to control the amount of ﬂow through a side (2D) and through a surface (3D) of an element. In the literature frequently elements are used. that do not satisfy the BB condition. however the penalty function method (see Chapter 5). Such elements cannot be used with the standard Galerkin method. one can explicitly build a discrete vector ﬁeld u such that: ˜ Ψi div u dΩ = Ω Ω Ψi div u dΩ for all basis functions Ψi . The method is based on the following statement: an element satisﬁes the BB condition. In this element the velocity is approximated by a quadratic polynomial and the pressure by a 50 . an exact admissibility condition is derived. This condition is known under the name BrezziBabuˆka condition (or BB condition).5. Fortin (1981) formulates the following engineering statement with respect to the admissibility of elements. A typical example is the quadratic triangle of Figure 4. Hows ever. since these elements are the most frequently used. In fact it is suﬃcient that the normal component of the velocity in these centroid points is available as unknowns. given a continuous diﬀerentiable vector ˜ ﬁeld u. The TaylorHood family TaylorHood elements (Taylor and Hood 1973) are characterized by the fact that the pressure is continuous in the region Ω. permits the use of these elements.equal to 7 in the case of Dirichlet boundary conditions. In the literature. the BB condition is rather abstract and in practice it is very diﬃcult to verify whether the BB condition is satisﬁed or not. see for example Cuvelier et al (1986).8 Examples of admissible elements In this section we shall treat some of the admissible elements for twodimensional applications.36) In Cuvelier et al (1986) it is demonstrated how (4. (4. whenever. Fortin (1981) has given a simple method to check the BB condition on a number of elements. 4.36) can be checked for a number of elements. For a more thorough review as well as threedimensional elements we refer to Cuvelier et al (1986) and Fortin (1981). without altering the amount of ﬂow through other sides or surfaces.
that this element is admissible if at least 3 elements are used. As a consequence the 51 .36) of the BB condition can be checked. plotting etc.7. For output purposes (printing.7. Although this element has no practical signiﬁcance. Velocity: biquadratic (9 nodal points: x) Pressure: bilinear (4 nodal points: 0) Accuracy velocity: O(h 3) Accuracy pressure: O(h2 ) Figure 4. The CrouzeixRaviart family These elements are characterized by a discontinuous pressure. see Figure 4. Segal (1979).36) is satisﬁed. the discontinuous pressure elements are most favorable.e. It is the nonconforming linear triangle with constant pressure. The most simple CrouzeixRaviart element has already been mentioned in Section 4. i. Figure 4. n dΓ (4. we shall use it to demonstrate how Fortin’s translation (4.37) given the continuous vector ﬁeld u. div u dΩ = Ωek Ωek ˜ div u dΩ = δΩek ˜ u . discontinuous on element boundaries. ˜ To that end we explicitly create a vector u such that (4.x3 Velocity: quadratic (6 nodal points: x) Pressure: linear (3 nodal points: 0) x5 x4 Accuracy velocity: O(h 3) Accuracy pressure: O(h 2) x1 x6 x2 Figure 4. One can easily verify that both approximations are continuous over the element boundaries.8 shows this element again. linear polynomial.6: TaylorHood element (Q2 − Q1 ) The TaylorHood family is very suitable for the standard Galerkin methods treated in this chapter.5: TaylorHood element (P2 − P1 ).) these discontinuous pressures are averaged in vertices for all the adjoining elements. However.37) we have used the fact that the pressure is constant per element. with respect the special methods of Chapter 5 and 6. It can be shown. In (4. but discontinuously over the element boundary. For that reason we consider some of these elements. We shall discuss some of the CrouzeixRaviart elements. The quadrilateral counterpart of this triangle is given in Figure 4.6.
pk pk xk pk pk pk
Figure 4.7: Averaging in each nodal point xk over all elements containing xk in order to get a continuous pressure for CrouzeixRaviart elements.
Velocity: linear (3 nodal points: x) Pressure: Constant (1 nodal points: 0) Γ2 Γ1 Accuracy velocity: O(h 2) Accuracy pressure: O(h)
Γ3
Figure 4.8: CrouzeixRaviart element (p1 − p0 ) basis functions Ψi (x) are deﬁned by Ψi (x) = 1 in element ei , 0 in all other elements . (4.38)
˜ If we deﬁne u in the midside point of element ei by u dΓ =
Γk Γk
˜ u dΓ = Γk  uk ,
(4.39)
with Γk the kth side of ei , Γk  the length of Γk and uk the velocity in the midside point of ˜ side Γk , we see immediately that (4.37) is satisﬁed. (4.39) implicitly deﬁnes u. The deﬁnition is unique and does not introduce inconsistencies along adjacent elements since (4.39) is deﬁned along one side of the elements only. The natural extension of the linearconstant element is the quadratic velocity, linear pressure element. The discontinuous linear pressure is deﬁned by three parameters, for example the pressure and the gradient of the pressure in the centroid. Application of the counting mechanism demonstrated in Section 4.7 shows that this element cannot be admissible. In order to make it admissible it is necessary to introduce the velocity vector in the centroid as extra unknowns. In this way we get the socalled extended quadratic triangle of Figure 4.9. The basis function for this element can be expressed in terms of the linear basis functions
52
x3 Velocity: enriched quadratic (7 nodal points: x) x5 x7 x4 Pressure: linear (1 nodal point: 0 including 2 derivatives) Accuracy velocity: O(h 3) x1 x6 x2 Accuracy pressure: O(h 2)
+ Figure 4.9: CrouzeixRaviart element (P2 − P1 )
Ψi (x) for triangles, deﬁned in Chapter 2:
7
˜ ui =
j=1
uij φj ,
with φj
φ7 = 27λ1 λ2 λ3 , ∂p and p = p7 Ψ1 + ˜ ∂x1 with Ψ1 = 1, Ψ 3 = x2 − Ψ 2 = x1 − x7 , 1 x7 . 2
φ4 = 4λ2 λ3 − 12λ1 λ2 λ3 , ϕ5 = 4λ1 λ3 − 12λ1 λ2 λ3 , φ6 = 4λ1 λ2 − 12λ1 λ3 λ3 , x7 Ψ 2 + ∂p x7 Ψ 3 , ∂x2
= λj (2λj − 1) + 3λ1 λ2 λ3 , j = 1, 2, 3,
(4.40)
(4.41)
The natural quadrilateral extension of this triangle is given in Figure 4.10.
Velocity: biquadratic (9 nodal points: x) Pressure: linear (1 nodal point: 0, including 2 derivatives) Accuracy velocity: Accuracy pressure: O(h 3) O(h 2)
Figure 4.10: CrouzeixRaviart quadrilateral (Q2 − P1 )
4.9
Solution of the system of linear equations due to the discretization of NavierStokes
In Sections 4.5 and 4.6 the discretization of NavierStokes equations has been derived. It has been shown that in each step of the nonlinear iteration process it is necessary to solve a system of linear equations of the shape Su − Lt p = F , 53 (4.42a)
Lu = 0.
(4.42b)
Here Su denotes the discretization of both the viscous terms and the linearized convective terms. If the unknowns are numbered in the sequence: ﬁrst all velocity unknowns and then all pressure unknowns it is clear that the system of equations gets the shape as sketched in Figure 4.11 provided an optimal nodal point numbering is applied. Unfortunately this numbering (velocity ﬁrst, pressure last) is far from optimal. The total proﬁle is still very large.
velocity
pressure
Figure 4.11: Proﬁle of the large matrix. A much smaller proﬁle may be achieved if pressure and velocity unknowns are intermixed. Figure 4.12 shows a typical example of such a numbering.
a
6 7 8 9 10
1
2
3
4
5
b Degrees of freedom: u 11 , u 12, u 13 , . . . ; u 21 , u 22 , u 23 ., . .
p1 , p 3 , . . .
c Degrees of freedom: u 11 , u 12, p 1 , u 12 , u 22 , u 13 , u 23 , p 3 , . . .
Figure 4.12: Renumbering of unknowns: a the region Ω, b sequence of unknowns componentwise, c sequence of unknowns nodal point wise. The resulting system of equations has a much smaller proﬁle than the one for the original system of equations. Due to renumbering, however, it is possible that the ﬁrst diagonal elements of the matrix are equal to zero. This is for example the case in Figure 4.12 where, 54
because of the boundary conditions, the ﬁrst degrees of freedom are pressures, which do not appear in the continuity equation. In order to prevent zeros on the main diagonal, partial pivoting must be applied. Unfortunately, partial pivoting reorders the sequence of the equations and increases the proﬁle or band width. Therefore a large amount of extra computing time and computer memory is required. However, it still remains cheaper than application of the numbering of Figure 4.12b. It is possible to deﬁne a numbering which produces a nearly optimal proﬁle and prevents the appearance of zeros at the start of the main diagonal. Such a numbering, however, goes beyond the scope of this lecture. Another problem arising from the zeros at the main diagonal is that it is not simple to use iterative methods for the solution of the systems of linear equations. In Chapters 5 and 6 we shall derive some alternative solution techniques in which the computation of pressure and velocity are segregated and as a consequence partial pivoting is not longer necessary.
55
1a) (5.2) The pressure p is unique up to an additive constant.3) however. (5. (5.3) makes only sense if the solution of (5.1a) follows from (4.1a) resulting in an equation for the velocity: 1 (5.4) p = − div u . (5.5). See for example Cuvelier et al (1986) for the details. The pressure p can be eliminated from (5.1 The penalty function method Introduction In Chapter 4 the discretization of the NavierStokes equations has been derived.9b) and the incompressibility condition in (4.5) approaches the solution of (5.1a5. Both approaches will be treated separately in the Sections 5. It has been shown that the direct solution of the resulting system of linear equations introduces extra complications due to the absence of the pressure in the incompressibility constraint.5) Re ε So one can ﬁrst solve the velocity from (5.1b) for ε approaching zero. For the sake of simplicity we shall restrict ourselves to the stationary Stokes equations.9a4. Consider the stationary linear Stokes equation in dimensionless form: − 1 ∆u + ∇p = f . or one may discretize the formulation (5. The perturbation (5.2 and 5. It is a simple mathematical exercise to show that this is indeed the case.4). the extension to the instationary and to the nonlinear case is straightforward.4). in the literature several other possibilities have been proposed.1b) (5. 56 .3) and substituted into (5.4). (5. For the sake of the argument we restrict ourselves to homogeneous Dirichlet boundary conditions: u = 0 x ∈ ∂Ω (5. substitution of (4.9a) by neglecting the timederivative and the convective terms.5 5. Such an approach will be called segregated approach. ε 1 1 − ∆u − ∇(div u) = f .5) and afterwards compute the pressure directly from (5. The discretization of the penalty function method may be applied in two ways. Re div u = 0 . In this chapter we shall discuss a method which tries to solve this problem by segregating computation of velocity and pressure. The idea of the penalty method is to perturb the continuity equation (5.3.1b) by a small term containing the pressure. (5.9b). One may ﬁrst discretize the Stokes equations and then apply the penalty function method. An obvious choice is εp + div u = o .
6) Ω for all functions u satisfying divu = 0. One can easily verify that these small matrices have the size of the number of pressure unknowns per element.e.7b). it can be shown that the solution of (5.11) approaches the solution of (5. it is necessary that the matrix M −1 can be computed p easily.1b) is equivalent to the constrained minimization problem: 1 1 ∇u2 − u · f dΩ . (5. M p is in a block diagonal matrix.10). since M p (i. Another practical aspect is that the building of the matrix LT M −1 L must be easy.10). For simplicity 57 . So for the TaylorHood family the matrix M p is lumped. If we want to solve (5.7a) (5. p it would be very nice if this matrix could be build per element by element matrices. p ε (5. 2 Re (5. Lu = 0 .11) and afterwards p is computed from (5.Remark: the origin of the penalty method is motivated by the theory of optimization with constraints.7a5. Consider for example the simple triangular mesh in Figure 5. One can show (see Chapter 6) that (5. or 1 p = − M −1 Lu . In that case the structures of S and LT M −1 L are identical and the solution of (5. a diagonal matrix consisting of small matrices as diagonal elements. In the discontinuous pressure elements. 5. One can immediately verify that for the TaylorHood elements this is not the case. In exactly the same way as for the continuous equation. (5.1a5. ε p 1 (S + LT M −1 L)u = F . i.10) in (5.7b) The continuity equation is perturbed by a term εM p p.42b): Su − LT p = F .11) is as simple as p the solution of Su = F .1.7a) gives (5.11). (5. where M p is the socalled pressure mass matrix.8) Hence εM p p + Lu = 0 .10).42a4. in the CrouzeixRaviart family inversion of M p is quite simple. Moreover. the (Navier)stokes equations are discretized before applying the penalty function method.11) So u is computed from (5. j) = Ω ψi ψj dΩ .10) Substitution of (5. deﬁned by M p (i.2 The discrete penalty functions approach In the discrete penalty function method. This is for example the case if M p is a lumped mass matrix.9) (5. So we start with the formulation (4. j) = 0 if ψi and ψj correspond to diﬀerent elements. (5.
7) is equal to zero. Application of the standard Galerkin method to equation (5. 7) are unequal to zero. we can −1 compute the elements of LT M p L relatively simple by: LT L(i. From Chapter 2 it is clear that in the momentum equation for unknowns in point 5 only the vertex unknowns in the points 1. k)L(k. LT L(5.4. we shall ﬁrst analyze the socalled continuous penalty function method. If we furthermore simplify the matrix M p to a unity matrix.2 will be called discrete penalty function method. 8 and 9 are present not those of the points 3 and 7.5) gives component 58 . In fact each matrix element is in that case a 2 × 2 matrix itself. As −1 a consequence the matrix LT M p L may be split into a sum over element matrices and T −1 L M p L may be evaluated at element level.7 8 9 4 5 6 1 2 3 Figure 5. j) . j) is only nonzero as long as point i and pointj belong to the same element. only the vertices of the triangles have been numbered.1: Triangular mesh with quadratic TaylorHood triangles.3 The continuous penalty function method The penalty function method as introduced in Section 5. This makes the implementation of the penalty function method relatively easy. j) = k L(k. 5. For the sake of the argument we shall restrict ourselves to Dirichlet boundary conditions for the velocity. since node 5 and node 7 do not belong to the same element. So LT L has a larger bandwidth or proﬁle than S. j) = k LT (i. Conceptually it is much easier to start with the penalty function formulation (5. 5) and L(4. 5. since ﬁrst the equations are discretized and then the pressure is eliminated. 7) = L(k. 7) is in general unequal to zero. In the case of a CrouzeixRaviart element L(i. because of the discontinuity of the pressure approximation. Before we consider some practical remarks concerning the penalty method in Section 5. However. k since for example L(4.12) Let us for the sake of the argument identify the matrix elements with the vertex numbers. i)L(k. 4. and then to discretize the equations.4). The midside points are present but are not shown. (5. 6. (5. 5)L(k.5). 2. From chapter 2 it is clear that S (5.
In equation (5. where div ϕi plays the role of the basis function ψi . still one can expect some troubles with elements which in the limit approach nonadmissible elements. However. actually the term div uh div ϕi dΩ is approximated by an inaccurate quadrature rule. fk ϕi dΩ .17) (5. however. Indeed. With the reduced integration technique.13) shows that (5. If in (5.18) is equivalent to (4. . ε (5. To suppress the wiggles one either uses some ﬁltering (smoothing) of the computed pressure.16) (5. Ω (5. a closer examination of (5. this technique is not so easy at nonrectangular grids.wise: Ω { 1 1 ∂ϕi ∇(uh )k · ∇ϕi + div uh }dΩ = Re ε ∂xk i = 1. In matrix vector notation (5.14) has a disadvantage which is not present in (5. In the literature nonadmissible elements are frequently used. From (5. This is comparable to approximating div ϕi by 59 Ω .13) where (uh )k denotes the kth component of uh and fk the kth component of f . p and it is easy to show that also Lu → 0 .11).26). it is immediately clear that LT M −1 Lu → 0 .. (5.. computations with this approach.14) is that it is no longer necessary to compute the ma−1 trix LT Mp L and as a consequence TaylorHood elements are as simple as CrouzeixRaviart elements. we know that such an element is not admissible.11) we let ε approach zero. Ω (5.14) A clear advantage of the formulation (5.8. Although the penalty function formulation does not give rise to singular systems of equations. 2. The ﬁltering technique may produce nice results.. or div un div ϕi dΩ = 0 . k = 1. n.15) (5.14) it follows that ε → 0 implies Au → 0 . 2.18) is comparable to the discretization of the continuity equation for a quadratic CrouzeixRaviart element with linear pressure.13) can be written as 1 Su + Au = F . So relation (5.18) for all basis functions ϕi . but that the pressure produce unrealistic wiggles (Sani et al 1981).18) div ϕi is a linear discontinuous polynomial. show that the velocity behaves rather good. Now consider the quadratic TaylorHood element. From Section 4. These wiggles are generally known as spurious modes or checkerboard modes for the pressure. however. 3. or the penalty matrix is computed with a socalled reduced integration technique (Malhus et al 1978).
applied to admissible elements is the most recommendable. The matrix S p ε corresponds to the discretization of a vector Laplacian equation (in the case of Stokes ﬂow) or a convectiondiﬀusion type vector equation (NavierStokes ﬂow). Despite the clear disadvantages of the penalty function method. which for example appear in nonnewtonian ﬂuids. As a consequence the penalty matrix is a singular matrix with a large number p of dependent rows. In fact we add the matrix 1 LT M −1 L to the matrix S in (5. double precision arithmetic on a 32 . there is one draw back with respect to the penalty function formulation.11). i. It is nearly impossible to solve the matrix with standard iterative techniques. It is very natural to assume that the resulting matrix has a condition number which is proportional to 1/ε. As a consequence the rank of the 2n × 2n matrix LT L can also not exceed m or m − 1. a good choice for ε may be hard to ﬁnd. The same is true for the matrix LT M −1 L. The reason is that it is a rather simple and fast method. It has been shown that the discrete penalty function method. depending on the type of boundary conditions. The segregation of pressure and velocity gives a large reduction in computing time compared to the direct solution of the original equations. It is clear that ε must be so small that the computed velocity and pressure approximates the actual solution accurately.19) where k is some value between O(10−3 ) and O(10−9 ). 5. Indeed practical computations show such a behavior.bits computer.e. This penalty matrix is multiplied by a large number 1/ε and added to a nonsingular matrix. (5. Especially for very viscous ﬂow. A well known outer iterative procedure is the socalled Uzawa scheme (Cuvelier et al 1986). leading to an admissible but less accurate element. From the discussion given above it is clear that the discrete penalty function approach is superior above the continuous penalty method. The fact that we have to choose ε carefully is a clear disadvantage.a lower degree polynomial. Only for large threedimensional problems. Only if we enlarge the value of ε and use some outer iterative procedure. This statement is based on a 64 bits accuracy for the computations. it is possible to use penalty function type methods in combination with iterative linear solvers. In the remainder of this lecture we shall restrict ourselves to this discrete form. beyond the scope of this lecture. still this method is very popular. direct linear solvers become so expensive that it is practically 60 . What remains is the choice of the parameter ε.4 Practical aspects of the penalty function method In the previous sections the continuous and discrete penalty function method have been derived. which is however. However. where in general m ≪ n. As a consequence ε may not be chosen too small since otherwise the condition of the resulting matrix is so bad that an accurate numerical solution is not longer possible. As a consequence the actual pressure approximation is reduced. It is well known that this matrix is good conditioned and has nice properties for many kinds of solvers. The relative large condition number has also another disadvantage. The maximal rank of L is m or m − 1. The matrix L is a m × 2n matrix. provided the number of unknowns are not too large. As a rule of the thumb one may choose ε such that εp ≈ k u .
61 . In the next chapter we shall derive an alternative segregated method to solve the incompressible NavierStokes equations. the socalled solenoidal approach.nearly impossible to apply this method.
(4. and as a consequence the presence of zeros on the main diagonal of the equations (4.1a6. (6.22) can be written as: q div udΩ = 0 . However. In this chapter we shall derive an alternative segregated approach in which it is not necessary to choose some parameter.6 6.2) If both our test functions and the solution u satisfy (6. formulation (6. As a consequence the solution of the equations introduces extra diﬃculties. A clear disadvantage of the Galerkin method is the unavailability of the pressure in the continuity equation.2).214. (6.1b) shows that it is not necessary to demand div u = 0. Ω Ω (6. then it is immediately clear that (6. and which does not lead to ill conditioned systems of equations.1b) reduced to 1 ∇u · ∇vdΩ = f · vdΩ. Ω (6. If for the sake of simplicity we neglect both the convective terms and all boundary integrals.2). The only problem with this method is that it is sometimes diﬃcult to get a good of choice of the small parameter ε and the bad condition of the remaining system of equations. substitute the continuity equation in the stress tensor and use the dimensionless form.42b).214. provided an admissible element is used. (6.3) can be written as: n uh = j=1 uj ϕj (x) . p div vdΩ vanishes.1a) Ω 1 ∇u · ∇vdΩ − Re p div vdΩ = Ω Ω f · vdΩ . thus reducing the number of unknowns as well as avoiding the zeros at the main diagonal.1 Divergencefree elements Introduction In Chapter 4 we have treated the standard Galerkin approach. moreover.4a) 62 . It has been shown that this method may be applied. (6. To that end we consider the weak formulation (4.1a) is satisﬁed automatically and.1b) Except with respect to the essential boundary conditions. for all v . (6.1a) is satisﬁed and (6. So if we restrict this space to all divergencefree vector ﬁelds. but that it is suﬃcient to weaken this statement to q div vdΩ = 0 for all q . Unfortunately it is very hard to ﬁnd functions which are completely divergencefree.42a4.22). u and v are chosen in the same space. If we construct a basis ϕi in the space of approximately divergencefree vector ﬁelds satisfying (6. Especially for very viscous (nonnewtonian ﬂuids) this may be a problem. In the penalty function method we have solved this problem by segregating pressure and velocity.3) Re Ω Ω which is again an equation for the velocity alone. In other words an equation in the velocity alone remains.
9. (6. The extension to I 3 is quite complicated and introduces a number R of extra problems. But in order to get some insight in the problems associated with this derivation we shall ﬁrst consider the nonconforming linear triangle with constant pressure given in Figure 4.n uj j=1 Ω 1 ∇ϕj · ∇ϕi dΩ = Re Ω f · ϕi dΩ .8) Γej where Γej is the boundary of the triangle ej . The construction of divergencefree basis functions is relatively simple for elements of the CrouzeixRaviart type. i = 1(1)n . In general (6.2 we shall show the construction of such basis functions for one speciﬁc element.2) can be written as Ψi div uh dΩ = 0 for all pressure basis functions Ψi . so these will be linear combinations of the classical basis functions deﬁned by (4.25) these 63 . Application of the Gaussdivergence theorem to (6. Ω (6. We refer to Cuvelier et al (1986) for a derivation.2).5) In other words we have to construct basis functions ϕi such that Ψj div ϕi dΩ = 0 .7) Ωej for all elements ej .2) for twodimensional elements. The only problem is of course. 6. (6. (6. the extension to quadrilaterals is straightforward.4b) is of double Laplacian type (in I 2 ). For simplicity we shall restrict ourselves to triangular elements. (6.6) One may expect that the basis functions ϕi (x) satisfying (6. which are both nonzero.6). how to construct basis functions that are divergencefree in the sense of (6. The system of equations (6.2 The construction of divergencefree basis functions for 2D elements In this section we shall construct divergencefree basis functions in the sense of (6. In each triangle we have 6 unknown velocities corresponding to the three midside points.6) reduces to div ϕi dΩ = 0 . how to construct such functions for TaylorHood elements is not known at this moment. In all previous examples (compare with 4. have vector components. for all Ψj .40). and may be solved quite R easily. the general form of stress tensor and nonvanishing boundary integrals is trivial. In order to ﬁnd these linear combinations we recall that for the nonconforming element. with the basis functions given in (4.7) gives ϕi · ndΓ = 0 . Ω (6.8.23). since Ψj is one in element ej and zero outside the element.4b) The extension to the nonlinear NavierStokes equations. In fact we shall derive these basis functions for the extended quadratic triangle of Figure 4. In Section 6.
(6. on the other edges n is constant and the integral over ϕk (x) vanishes because of the linearity.4. with boundary Γ2 separately plotted.− ).11b) Here ϕk (x) denotes the scalar basis function corresponding to point k and nk and tk the normal respectively tangential vector corresponding to the edge on which node k is positioned. for our purposes it is better to decompose the velocity in a tangential and a normal component along the boundary of the triangle.12) Γk deﬁnes the amount of ﬂow through side Γk .1 for a deﬁnition.6 u1k ϕk1 (x) + u2k ϕk2 (x) . However.11a) (6. ϕkt (x) = ϕk (x)tk .13) u=( ∂y ∂x 64 . uh = k=2. See Figure 6. For an incompressible ﬂow one can deﬁne a stream function Ψ by ∂Ψ ∂Ψ .9) which can be written as uh = k=2.8) exactly.10) where unk respectively utk denote the normal and tangential component of u in node k. (6. (6.6 unk ϕkn (x) + utk ϕkt (x) . In this element the velocity u is approximated by x3 n Γ2 x5 x4 Γ1 x5 Γ2 t x3 x1 x6 Γ3 x2 x1 Figure 6. The other set of basis functions must be constructed such that (6. So one set of divergencefree basis functions is formed by the set of basis functions corresponding to the tangential components. since ϕk (x) = 1 on the edge containing node k and linear from 1 to 1 at the other sides.1: Element e.8) is satisﬁed. Now uh · ndΓ (6. (6. On the edge containing node k we have nk ·tk = 0. The basis functions ϕkt (x) satisfy (6.velocity components were in fact the Cartesian components.4. ϕkn (x) and ϕkt (x) are deﬁned by ϕkn (x) = ϕk (x)nk . Normal and tangential unity vectors on Γ2 are indicated.
So it is quite natural to deﬁne a discrete stream function in Γ 2 Ψ2 1 Ψ1 u Figure 6. Using the fact that the basis function ϕk (x) is equal to 1 along the edge corresponding to node k.2: Amount of ﬂow between points 1 and 2 is given by Γ u · ndΓ = Ψ2 − Ψ1 the vertices by Ψk+1 − Ψk = Γk+2 uh · ndΓ .10) gives uh = k=2. given a divergencefree vector ﬁeld in the sense of (6. From (6. It is clear that deﬁnition (6.17) One easily veriﬁes that these functions satisfy (6.14) only values on one element side are used.8) is satisﬁed exactly.16) 1 1 1 1 ϕ2n − ϕ4n )Ψ2 + ( ϕ4n − ϕ )Ψ3 .15) into (6. Deﬁnition (6. (6. so the deﬁnition in contiguous elements is the same.15) where Lk denotes the length of side Γk . un4 = .4. 3 . it follows immediately that un2 = Ψ3 − Ψ2 Ψ1 − Ψ3 Ψ2 − Ψ1 .6 utk ϕkt (x) + ( +( 1 1 ϕ6n − ϕ )Ψ1 L2 L3 2n (6. L3 L1 L1 L2 6n In other words. this stream function Ψ is constructed such that (6. 65 .14) we can express the normal component on the mid side points into the values of the stream function on the vertices. the second set of basis functions. 2. un6 = . 3) is given by ϕkΨ = 1 Lk+1 ϕ2(k+2)n − 1 Lk+2 ϕ2k (cyclic) . Substitution of (6. the stream function Ψ can be computed in each vertex. provided it is ﬁxed in an arbitrary vertex.An important property of the stream function is that the diﬀerence between the values of the stream function in two points deﬁnes the amount of ﬂow between these two points. since in (6.2) or (6. k = 1. 2 and 3 is used.2 for an explanation.14) where a cyclic permutation with the numbers 1. See Figure 6. L1 L2 L3 (6.5). denoted by ϕkΨ (k = 1. Furthermore. Moreover. (6.14) is unique for the complete mesh. 2.8).14) does not introduce any contradictions.
The sign is opposite for these two points. In conclusion. ϕΨj is equal to plus or minus the unit normal vector divided by the length of the side. It must be remarked that in order to get a unique deﬁnition of normal and tangential components. Now we have seen how the 6 e2 e1 3 1 t n 8 Figure 6.the ﬁrst set of basis functions is formed by the basis functions corresponding to the tangential components . it is necessary to deﬁne the normal and tangential vector in the same way in adjacent elements. The global node numbering is plotted. ii ϕtj = 0 at the midside nodes not equal to j.This completes the construction of the 6 basis functions that are divergencefree. Substitution of these basis functions into the weak formulation (6. See Figure 6.Introduce stream function unknowns at the vertices and eliminate the normal components of the velocity at midside points by expressing them in the stream function unknowns. The basis functions corresponding to the stream function unknowns from the second set of basis functions. The computation of the pressure is postponed to Section 6. ϕtj is equal to the unit tangential vector in midside node j.5.3: Deﬁnition of normal and tangential vector at side 16 for elements e1 and e2 .4b) gives a system of linear equations in the unknowns utk and Ψk . the procedure to construct divergencefree basis functions consists of the following steps: . The basis functions ϕkt and ϕkΨ are characterized by the following properties: i The components of ϕkt and ϕkΨ are linear in x and y per element. 66 . in the two midside points of the sides containing the vertex j. A possible unique deﬁnition is to choose the tangential vector from smallest node number to highest node number and deﬁning the corresponding normal vector in the clockwise direction. iii ϕΨj = 0 at the midside node opposite to vertex j.3.deﬁne basis functions corresponding to normal components and tangential components at mid side points .
6.18b) is a regular system of equations for u7 (see for example Cuvelier et al 1986). without actually creating these basis functions. From (6. Substitution of the basis functions ϕ17 (x) and ϕ27 (x) per element into (6.40) into (6.3. Substitution of the pressure basis functions given in (4. we shall apply the same procedure for the more complex extended quadratic triangle with linear pressure. (6. It can be shown that the thus constructed basis functions are divergencefree. Once the velocity components in the centroid have been eliminated.18b) e (x − x7 ) div uh dΩ = 0 . So in fact both the pressure gradient and the velocity in the centroid have been eliminated. We write the approximation uh in the following form per triangle 3 6 uh = i=1 {u1i Φ1i + u2i Φ2i } + i=4 {uni Φni + uti Φti } . Also in Cuvelier et al (1986) it is shown that this expression is never singular.14).3 The construction of element matrices and vectors for (approximate) divergencefree basis functions The Galerkin equations for the Stokes equations using divergencefree basis functions are given in (6. For this element again. In the next section we shall treat how the element matrices and vectors corresponding to the (approximate) divergencefree basis functions may be computed. The corresponding element matrices and vectors may be constructed by explicit substitution of the divergencefree basis functions constructed in Section 6.4b). The velocity components in the midside points are split in normal and tangential components in exactly the same way as for the nonconforming element.18b) uh in the centroid can be expressed in terms of the velocity components in the remaining points of the element. 67 .1b) gives an expression for the gradient of the pressure in terms of the velocity unknowns at the boundary. This process is also known as static condensation. six in the vertices and six in the mid side points.2. the stream function in the vertices is introduced as new unknowns and the velocity components in the midside points are eliminated using relation (6.18a) (6.19) The functions Φ1i and Φ2i are adapted basis functions because of the elimination of the centroid degrees of freedom.5) gives div uh dΩ = 0 . It can be easily shown that (6. twelve velocity components remain. where the centroid is denoted by x7 . The ﬁrst step in the construction of the divergencefree basis functions is the elimination of the velocity in the centroid points of the elements and as a consequence the gradient of the pressure in these points. The practical procedure will be treated in Section 6. e (6.divergencefree basis functions may be derived for the nonconforming triangle.
25) (6.42a4. ˆ L2 u = L21 u + L22 uz = 0 .28) by RT and use (6.20a6.27) using the classical basis functions and then to perform the elimination process.22a) (6. an alternative possibility is to start with the original set of equations (4. 22 in other words ˆ u = Rz u . In the same way the pressure p will be split into a part p∇ corresponding to ˆ the gradient of the pressure in the centroid and a part p corresponding to the values of p in the centroids. We shall execute the algorithm in two steps.20b) according to (6. Lu = 0 . Let us demonstrate this process for the extended quadratic triangle. The elimination of the velocity components in the centroid follows from (6.20b) The velocity u will be split into a part corresponding to the centroid (uz ) and the rest of the u velocities (ˆ ).22b) (6.27) we get: z T (RT S 1 + RT S 2 R0 )ˆ − Rz LT p = RT F . Hence we deﬁne u= ˆ u uz .20a) (6. u z z 1ˆ z (6. To perform step 1 we start with the system of linear equations (4.25) we get −1 L2 Rz = L21 I + L22 R0 = L21 − L22 L22 L21 = 0 . (6. (6.26) (6.22c): ˆ uz = −L−1 L21 u .21) If we split equations (6. (6. p= ˆ p p∇ .29) 68 .23) (6.28) If we premultiply (6.27) and hence also RT L2 = 0 .26).22a) gives: T ˆ ˆ ˆ S 1 u + S 2 R0 u − L1 p − LT p∇ = 0 . 2ˆ ˆ L1 u = L11 u + L12 uz = 0 . In the ﬁrst step the centroid velocity components and the gradient of the pressure are eliminated. with Rz = From (6.24) into (6.42b): Su − LT p = F .21) we get ˆ S 1 u + S 2 uz − LT p∇ = F . (4.22c) (6. z Substitution of (6. In the second step the normal components of the velocity at midside points are eliminated.However. (6. 2 (6.24) I R0 = I −L−1 L21 22 .
ˆu Lˆ = 0 .32c) ˆ ˆ Due to the discontinuous character of the pressure.22b) can be written as ˆ L1 u = L1 R z u = 0 . These questions will be the subject of Section 6.4. First of all the velocity has been decomposed into normal and tangential part. The transformation is such that the continuity equation is satisﬁed exactly in other words ˆ LRd = 0 . (6. This elimination process can be expressed by a matrix Rd according to ˆ u = Rd ud .31b) and premultiplication by RT gives d ˆ ˆ RT SRd ud = RT F .32b) (6.30) (6. So we have shown that it is not necessary to construct the divergencefree basis functions explicitly. which type of boundary conditions must be prescribed to the new unknowns. d d Again the matrix and vector can be constructed at elements level.31a) (6. We have constructed a new set of equations with new unknowns.32a) (6. with ˆ S = RT S 1 + RT S 2 R0 . L ˆ F = RT F . the matrices S and L and the righthand ˆ may be computed at element level.31a6.4 Boundary conditions with respect to the divergencefree elements In the construction of the divergencefree elements treated in the preceding sections. side vector F The next step is the elimination of the normal components in the midside points in favor of the stream function at the vertices.33) where ud is the vector of new unknowns.34) in (6.and (6.31b) (6. it was necessary to introduce new unknowns. With respect to the boundary conditions this does not introduce extra problems. Substitution of (6.34) 6. Next the stream function has been introduced as 69 . z z ˆ = L1 R z . The question that remains is of course: is this new system of equations uniquely solvable? Furthermore. (6. It is suﬃcient to construct the transformation matrices Rz and Rd per element and to compute the ﬁnal element matrix and element righthand side by matrixmatrix respectively matrixvector multiplications. since in general boundary conditions are formulated in tangential and normal direction and not in Cartesian directions. In other words the result of the elimination process is ˆ ˆ ˆT ˆ ˆ Su − L p = F .35) (6. z (6.
36) Ω Since uh is known. Let us ﬁrst restrict ourselves to the nonconforming triangle..1b). at side iv we have a noslip condition. three ﬁxed walls with noslip boundary condition (boundaries ii. The ﬁrst one is that the stream function is never unique but ﬁxed up to an additive constant. For a practical implementation of such a boundary condition the reader is referred to Cuvelier at al (1986). In this Figure we have one inﬂow with prescribed velocity ﬁeld (boundary i).5.36) reduces to ph div ϕn dΩ = e1 ∪e2 e1 ∪e2 { 1 ∇uh · ∇ϕn − f · ϕn }dΩ . The stream function value at sides iii and v does not have to be prescribed. ii and vi may be computed from the deﬁnition (6. implying un = 0. If the stream function at the common point of sides i and vi is set equal to zero then Ψ along sides i. iv and vi) and two outﬂow boundaries where for example the normal stress is prescribed (boundaries iii and v). Hence Ψ is constant at side iv but the value is unknown. This introduces two extra problems. (6. Substitution of these basis functions in (6.14). An obvious choice is to use the basis functions ϕnh corresponding to the normal components of the velocity. The second one is that. iii ii i iv vi v Figure 6. if the normal velocity is unknown at a part of the boundary. it is not automatically possible to compute the stream function along that part. the pressure must be computed. Since ϕnk = 0 outside the two elements containing node k it is suﬃcient to consider two adjacent elements e1 and e2 as indicated in Figure 6. We return to the weak formulation (6. On the boundary iv we have the boundary condition Ψ equals unknown constant 6. As a consequence. .5 Computation of the pressure Once the velocity is known. (6. So for such boundaries it is necessary to prescribe the boundary condition Ψ is unknown constant.37) ..1b) gives 1 ∇uh · ∇ϕnk dΩ − Re ph div ϕnk = Ω Ω f ϕnk dΩ . . and substitute nondivergencefree basis functions. Re 70 (6.4: Example of a region with two outﬂow parts. 2. This is best demonstrated with the conﬁguration of Figure 6.4. k = 1. However.new unknown. since the normal component at these sides is not prescribed. this is an equation in the unknowns p alone. it is necessary to prescribe the stream function in at least one point.
In step 1 the pressure in the centroids is computed using the method described for the nonconforming triangle. p2 can be computed immediately. Complicating factor may be the deﬁnition of boundary conditions as shown in Section 6.5: Two adjacent elements e1 and e2 . The construction of element matrices and vectors may be performed by the introduction of transformation matrices. The derivation has been restricted to discontinuous pressure elements.39) immediately deﬁnes p∇ per element. due to the discontinuous pressure deﬁnition. and seems rather impractical. This is possible since each row of the divergence matrix L has only nonzero contributions for one element at a time.38) ˆ where uz = −L−1 L21 u. hence (6. To that end equation (6. This procedure may be repeated for all adjacent elements.37) gives ph div ϕn dΩ = e1 ∪e2 ∂e1 ph ϕh · ndΓ + ∂e2 ph ϕn · ndΓ = (p1 − p2 )L23 . The computation of the pressure in the case of the extended quadratic CrouzeixRaviart triangle is again performed in two steps.22a) is applied at element level. A clear advantage of the use of divergencefree elements is that velocity and pressure are segregated.39) 2 1ˆ Per element LT reduces to a (2 × 2) matrix.where ϕn is the abbreviated notation for ϕnk in the common midside point. Once the velocity is computed a postprocessing step is necessary to compute the pressure.6 Practical aspects of the divergencefree elements In this chapter we have shown how divergencefree elements may be constructed in 2D.4. So starting by prescribing the pressure in one element. The pressure nodal points have been indicated. 2 6. without the introduction of an extra parameter to be chosen. Hence given p1 . As a consequence. this method allows the solution of the resulting systems of equations by iterative techniques. the pressure can be computed in all elements by ﬁnding neighboring elements and applying (6. 71 . 22 where L23 is the length of side 23.38). In the second step the gradient of the pressure in the centroid is computed. Hence ˆ −LT p∇ = F − S 1 u − S 2 uz + LT p . Application of 3 p2 p1 e1 1 2 n e2 4 Figure 6. the Gauss divergence theorem to the lefthand side of (6. (6. The extension to threedimensional element is quite complicated. So for twodimensional problems the method based on divergencefree elements seems very promising. (6.
1a) may be written as ρ Ω ∂u · vdΩ + ∂t Ω 2µe · ∇vdΩ + Ω ρ(u · ∇u)vdΩ − q div udΩ = 0 . with timedependent coeﬃcients.1 The instationary NavierStokes equations Introduction Until now we have restricted ourselves to stationary NavierStokes equations only.1b) In order to get a ﬁnite element discretization. This step also introduces a Laplacian type equation for the pressure.2. In Section 7. To that end equation (7.2 Solution of the instationary NavierStokes equations by the method of lines The instationary incompressible NavierStokes equations read (compare with 4.1b) by a test function q.2b) does not contain a timederivative. For that reason we shall consider some methods to solve the timedependent NavierStokes equations. considering the stationary solution as limit of a timedependent solution may help to get a convergent solution.2a) (7. which is especially developed for timedependent incompressible ﬂows. sometimes it is hard to ﬁnd the solution of a stationary problem.1a) . and if we substitute the timeindependent basis functions ϕi (x) 72 .1b) is derived. because the iteration process does not converge well enough.1a) is multiplied by a timeindependent test function v and (7. This method.3): ρ ∂u + ρu · ∇u − div σ = ρf . however. If we approximate u and p in the same way as in (4.3 an alternative approach will be treated. With respect to the discretization of the continuity equation all three methods derived in the previous chapters may be applied.1a) (7. 7.2b) Ω We see that (7. (4. ∂t div u = 0 . alternatively.4) in the same way as for the stationary case. the weak form of (7. If we neglect the boundary integrals and furthermore apply (4. consists of two steps per timestep. in some practical applications one is also interested in the timedependent behavior of the solution. the computed velocity is not divergencefree.25). In that case. However. In the next step the velocity is projected onto the space of divergencefree vectors. This well be the subject of Section 7. (7. In general. the weak from of (7. the socalled pressure correction method. In ﬁrst instance we shall use the method of lines as derived in Chapter 3. and this will be an extra complicating factor.(7. pdiv vdΩ = Ω Ω f · vdΩ . In ﬁrst instance the velocity is computed using the pressure at the old timelevel and neglecting the continuity equation. (7.7 7.24). Or.
Hence it is quite usual to apply a segregated formulation in order to solve (7. u and p are deﬁned as in (4. (7.3a7. it is more or less necessary to combine this scheme with a Newton linearization. The absence of a timederivative in (7.4) ϕi (x)ϕj (x)dΩ . especially θ = 1/2 and θ = 1.3a) (7. all produce an 0(∆t) error.5a) 1 p = − M −1 Lu . no iteration per timestep is applied.3a7.3b) must be satisﬁed in every stage of the time integration. p ε (7. Very popular are the θ methods.3b). In general. the nonlinear terms are linearized with respect to the solution at the preceding timelevel. The penalty function approach. Lu = 0 . whereas the other matrices remain constant in time. whereas the Newton type linearization gives an 0(∆t2 ). In general exactly the same type of linearization as for the stationary case are used. as the method with divergencefree basis functions may be applied. introduces exactly the same problems as for the stationary case. Of course the solution of the coupled equations (7. which can be written as: M= M 1 (i. L. applied to (7. the Galerkin method reduces to the solution of a system of nonlinear ordinary diﬀerential equations of the form ˙ M u + N (u) − LT p = F . such as for example the ones mentioned in Chapter 3 may be used. The Picard type linearization of Section 4.12): 1 ˙ M u + N (u) + LT M −1 Lu = F . In the timestepping algorithm it is suﬃcient to solve (7. explicit methods do not make sense. In this last formulation one usually uses an implicit formulation with respect to the viscous terms and an explicit formulation for the convective terms. and the twostep AdamsBashfort discretization. j) = Ω M1 0 0 M1 . it is necessary to perform a kind of linearization.3a7. (7.3b).3b) where N .3a7. f . all the classical methods.5b) ε p It is clear that the pressure has only to be computed.3b) has as consequence that (7.3b) reads (compare with 5. We have seen in the stationary case that the matrix corresponding to the penalty function 73 . As a consequence the same type of solution procedures will be used. in contrast to the stationary case. Hence if the CrankNicolson scheme is applied.5a). The reason for this splitting is that the matrix due to the convective terms changes in each timestep. Both the penalty function approach.28b) and M denotes the velocity mass matrix. With respect to the nonlinear terms. An important consequence is that if the equations (7.respectively Ψi (x). If the linearization is not accurate enough. With respect to the timeintegration.28a4.6. a smaller timestep must be used. if at a certain moment the pressure is required. (7.3b) are solved in a coupled way. However.
Finally in the next section we shall treat an alternative approach for the incompressible timeindependent NavierStokes equations.5a) by an explicit time integrator. 7. the mass matrix M can never be put into diagonal form. As a consequence extra damping is necessary if the solution is nonsmooth in time. Next we shall apply the space discretization ﬁrst and then derive the pressurecorrection method. requires the solution of system of linear equations per timestep. For example in the case of a transient one usually starts with one timestep Eulerimplicit in order to damp high frequencies. One can show that the solution of (7. the socalled pressurecorrection formulation. It is a special method for incompressible ﬂows. We shall demonstrate it for the general θmethod. In fact the pressurecorrection method consists of two steps. As a consequence. In the ﬁrst step the momentum equation is solved with the pressure at the preceding timelevel. requires timesteps which are proportional to ε. Due to the penalty term such frequencies may always be present in the equations. This step implicitly introduces a Poissontype equation for the pressure. With respect to the instationary case there is another drawback. in practice. First we shall derive pressurecorrection in the case that the space discretization has not yet been applied. The Crank Nicolson scheme has the property that it does not damp high frequencies. An alternative for the penalty function method is of course to use divergencefree elements. The pressurecorrection method is strongly coupled with the type of timediscretization.6a) (7. only implicit methods are used to solve (7. in ﬁrst instance.5a).6b) reads un+1 − un ∆t + θ(− 1 ∆un+1 + un+1 · ∇un+1 + ∇pn+1 ) Re 1 + (1 − θ)(− ∆un + un · ∇un + ∇pn ) = θf n+1 + (1 − θ)f n . due to stability requirements.6b) . (7. Hence. In the next step this intermediate ﬁeld is projected onto the space of divergencefree vector ﬁelds.7a) Re 74 (7. and than one resumes with CrankNicolson in order to get a good accuracy. Continuous approach Consider the incompressible NavierStokes equations in dimensionless form: ∂u 1 − ∆u + u · ∇u + ∇p = f . it must be remarked that due to the coupled character of the basis functions. In this step the continuity equation is not taken into account. even an explicit method.6a7. As a consequence it was not possible to use iterative methods for the solution of the linear systems of equations. been developed for ﬁnite diﬀerence methods. The resulting velocity ﬁeld may be considered as an intermediate ﬁeld. Although it looks as if there is no reason to use implicit timemethods for this approach. The θ method applied to (7. See Cuvelier et al (1986) for the details. ∂t Re div u = 0 .3 The pressurecorrection method The pressurecorrection method has.method has a large condition number.
Equation (7. (7. n denotes the old time level and n + 1 the new time level.9) is of the same order as the truncation error of the method and hence may be neglected.div un+1 = 0 . + θ(− (7. the momentum equation is solved using p at the old time level. As a consequence (7. 75 . This problem does not appear in the socalled discrete pressurecorrection method. In the ﬁrst step of the algorithm. This may be diﬃcult for some types of boundaries and is not natural since the originating NavierStokes equations do not require any pressure boundary conditions at all. Finally un+1 may be computed from (7. provided boundary conditions for the pressure are deﬁned along the complete boundary. This yields an intermediate velocity ﬁeld u∗ satisfying u∗ − un ∆t 1 1 ∆u∗ + u∗ · ∇u∗ ) + (1 − θ)(− ∆un + un · ∇un ) + ∇pn Re Re = θf n+1 + (1 − θ)f n . (7.12) may be solved by a standard Galerkin method.7a) gives un+1 − u∗ ∆t 1 1 ∆un+1 + un+1 · ∇un+1 + ∆u∗ − u∗ · ∇u∗ ) Re Re + θ∇(pn+1 − pn ) = 0 .8) from (7.10): div un+1 − div u∗ + θ div ∇(pn+1 − pn ) = 0 . Once the pressure correction pn+1 − pn has been computed.12). in which ﬁrst the space discretization is applied and afterwards the pressure correction.7b) Here.8) and (7. + θ(− (7. (7. ∆t (7.11) Since div un+1 = 0.8) u∗ is provided with the boundary conditions at level n + 1. Subtraction of (7. In order to solve (7.9) reduces to un+1 − u∗ + θ∇(pn+1 − pn ) = 0 .10). θ = 0 requires a slight modiﬁcation. For both equations the standard Galerkin method may be used. it is possible to solve the resulting systems of linear equations by iterative methods.8) of course the term u∗ · ∆u∗ must be linearized with respect to the old solution un .11) can be considered as an equation for the pressure diﬀerence pn+1 − pn : div u∗ ∆(pn+1 − pn ) = . pn+1 follows immediately. A clear disadvantage of the continuous pressurecorrection method is that it is necessary to deﬁne boundary conditions for the pressure.10) In the second step u∗ is projected onto the space of divergencefree vector ﬁelds by applying the divergence operator to (7. The pressurecorrection method requires the solution of two partial diﬀerential equations: (7. ∆t (7.9) It can be shown that the second term of (7.12) θ∆t We have implicitly assumed that θ = 0. Since no special parameter is introduced.
13a) gives M un+1 − un + θ(Sun+1 − LT pn+1 ) + (1 − θ)(Sun − LT pn ) = θF n+1 + (1 − θ)F n .15) from (7.14b).17) is still a research subject. ∆t (7.14a) is solved with the pressure at the old level.17) In order to solve this equation in a simple way it is necessary that the matrix M is a diagonal matrix and furthermore that the matrix LLT can be constructed in an easy way.14b) (7.14a). In practice this is a problem.14a) ∆t Lun+1 = 0 . and neglecting the diﬀerence of the viscous terms gives: M un+1 − u∗ − θLT (pn+1 − pn ) = 0 .Discrete approach In the discrete approach we start with the discrete equations (7.3b). So we start with: ˙ M u + Su − LT p = F . 76 . (7.13b) Now the momentum equation (7. Application of the θ method to (7.16).17) has been solved pn+1 can be computed.16) by M −1 . since the structure of the matrix LLT is in general diﬀerent from the structure of a standard Laplacian matrix. and ﬁnally un+1 from (7. For simplicity we consider only the Stokes equations. ∆t (7.16) In order to apply the continuity equation (7. Then the pressurecorrection step becomes: θLM −1 LT (pn+1 − pn ) = − Lu∗ . Hence M u∗ − u + θSu∗ + (1 − θ)Sun − LT pn = θF n+1 + (1 − θ)F n ∆t (7. (7. The extension to NavierStokes is straightforward.15) Subtraction of (7.13a) Lu = 0 .3a7. it is necessary to premultiply (7. Eﬃcient solution of (7. both structures are the same. Only for the discontinuous pressure elements. Once (7. (7.
77 .
The integrand in the boundary integral in (A.1) −(div σ11 σ12 v1 + div v1 Γ Ω σ21 σ22 n + v2 v2 )dΩ = σ12 σ22 ndΓ . we get by applying (A.2) and use the relation div w = v div u + u · ∇v .5) can be written as σ · v · n = n · σ · v = n · σ(vn n + vt t) = n · σ · nvn + n · σ · tvt = σ nn vn + σ nt vt (A.1) and (A.1) Ω Ω Proof: If we substitute w = vu in the Gauss divergence theorem div wdΩ = Ω Γ w · ndΓ . Writing div σ · v in components (we restrict ourselves to 2D).6) 78 . (A.4) to the lefthand side of (A.5) are equal. Γ (A.5) Ω σ · ∇vdΩ − σ11 σ12 So it remains to prove that the boundary integrals in (A.4) u · ∇vdΩ − Γ vu · ndΓ .A Derivation of the integration by parts for the momentum equations In this appendix we shall prove the relation (−div σ · v)dΩ = σ · ∇v − σ nn vn + σ nt vt dΓ . we get − v div udΩ = Ω Ω (A. (A.3) (A.
. Mech. Comp. 1973.. Mech. California. USA. Beyond SUPG. in Fluids. Stanford University. The Netherlands. 12. Hughes. Cuvelier.R. A. Mizukami. T. Int. 1979..R. Finite element analysis of the compressible Euler and NavierStokes equations. A new ﬁnite element formulation for computational ﬂuid dynamics: II. Prentice Hall Inc. 13. On the numerical solution of the Stokes equations using the ﬁnite element method. Appl.. Eng. D.S. Appl. Mixed ﬁnite element methodsreduced and selective integration techniques: a uniﬁcation of concepts. R. Liu. Taylor and P. 2. 15. New Jersey. Meth. Appl. of Mech. Streamline upwind/Petrov Galerkin formulstion for convection dominated ﬂows with particular emphasis on the incompressible NavierStokes equation. Eng.H.. Englewood Clifts. Hood. Fix. Numerical analysis of carotid artery ﬂow. Num. 48:313–327.J.. Comput. 1984. New Yersey. Computer Solution of Large Sparse Positive Deﬁnite Systems.. Mallet. Dept. Finite Element Methods and NavierStokes Equations. T. in Fluids. 1981. 5. Appl. A numerical solution of the NavierStokes equations using the ﬁnite element technique. Reidel Publishing Company.J. Lee. Meth. 79 . Fluids. PhD thesis. Old and new ﬁnite elements for incompressible ﬂows. G. Segal. Comp. 15:63– 81. 7.J. Eng. PetrovGalerkin method for linear triangular elements. An implementation of the streamline upwind. The cause and cure (?) of the spurious pressure generated by certain FEM solutions of the incompressible NavierStokes equations. Malkus and T. Shabib. A. Stanford. Meth. Comp.W. Van de Vosse. 1985. Mech. 4. R. 1:73–100. 11. Mech.References 1. C. 1 and 1:17–43 and 171–204. USA. 1987. Brooks and T. Engelwood Cliﬀs. Comp. Hughes. Rice and R. PrenticeHall. An Analysis of the Finite Element Method. J. Holland. and D. J. J. M. Hughes.L. 6. Part I and Part II. (USA). Mech. New Jersey. Engng. A. F.J. Num. Meth. Appl. A. 1973. Mizukami. Linear Static and Dynamic Finite Element Analysis. 1:347–364. 1987.. 9. George and J. Int. Prentice Hall Inc. Sani.L. Eng. Mech. Englewood Cliﬀs. 14. van Steenhoven. F. 1988. Meth. Comp. 1978. M. Segal. 54:341–355. P. Strang and G.F.J.A. Eng. Appl. 1986. Griﬃths. Eng. Dordrecht. Mech.J. 10.R. 1982. and A.. Schnipke.R. 1986. Comp. The Finite Element Method. Hughes.N. 19:165–185. 32:199–259. 8. Mech. 49:357–364.G.N. C.M. PhD thesis. and M. 1981. 1981. Fortin. Gresho. A monotone streamline upwind ﬁnite element method for convectiondominated ﬂows. Eindhoven University of Technology. A. 3. Meth.
. 80 . J. Sci. van Kan.J. Comp. 1986.M.I. SIAM J. Stat.16. 7:870–891. A secondorder accurate pressure correction method for viscous incompressible ﬂow.
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.