APPROXIMATION BY FINITE ELEMENTS
123
where the continuity constant is Γw! = " + !w!
# ∞ L. The continuity of $(v) of
(3.15) may be established using the trace inequality of Lemma 1.5, and the
norm equivalence in Proposition 1.6,
|$(v)| ≤! f ! !v! + " !gN !∂ΩN !v!∂ΩN
≤ !f ! !v!1,Ω + " C∂Ω !gN !∂ΩN !v!1,Ω
≤ CΩ (!f ! + " C∂Ω !gN !∂ΩN ) !∇v!.
(3.20)
It follows that the weak formulation (3.16) has a unique solution.1
3.3
Approximation by finite elements
Nearly all of the formal aspects of finite element discretization of the
convection–diffusion equation are the same as for the Poisson equation. A discrete
h
1
⊂ HE
and test space
weak formulation is defined using a discrete trial space SE
h
1
S0 ⊂ HE0 , and implementation entails choosing bases for these spaces and constructing the finite element coefficient matrix and source vector. However, a
significant difference for the convection–diffusion equation is that the presence
of layers in the solution makes it more difficult to compute accurate discrete
solutions. In this section, we discuss some things that can go wrong with the
Galerkin discretization, and we motivate and examine the streamline diffusion
method, which is designed to handle some of the difficulties.
3.3.1 The Galerkin finite element method
The Galerkin method for the convection–diffusion problem (3.16) is
h
Find uh ∈ SE
such that
a(uh , vh ) = $(vh )
for all vh ∈ S0h .
(3.21)
Implementation issues are largely the same as those described in Chapter 1 for
the Poisson equation, except that there are the additional computations required
for the convection term (3.12). The difference here is that when P & 1 the
solution can have a steep gradient, and so appropriately fine grids are often
needed to achieve accuracy.
Figures 3.6 and 3.7 illustrate Galerkin solutions to the first two reference
problems using 16×16 square grids that are too coarse to resolve the layers in the
case " = 1/200. These coarse grid solutions should be compared with the accurate
ones shown in Figures 3.2 and 3.3. The discrete solution to Example 3.1.1 shown
in Figure 3.6 is highly oscillatory at the boundary layer, and, in addition, these
oscillations propagate into the domain along the streamlines. A similar difficulty
arises for the characteristic layer in Example 3.1.2 shown in Figure 3.7. The main
1 See
Roos et al. [159, pp. 173ff] and references therein for a discussion of classical solutions.
124
THE CONVECTION–DIFFUSION EQUATION
2
1
0
1
–1
0
–2
–1
0
1 –1
y
x
Fig. 3.6. Contour plot (left) and three-dimensional surface plot (right) of the
Galerkin solution of Example 3.1.1, for " = 1/200, using Q1 approximation
on a 16 × 16 square grid.
1
0.5
0
1
1
0
y
–1
0
–1
x
Fig. 3.7. Contour plot (left) and three-dimensional surface plot (right) of the
Galerkin solution of Example 3.1.2, for " = 1/200, using Q1 approximation
on a 16 × 16 square grid.
difference is that the oscillations are localized to the unresolved layer and do not
propagate into the domain in this case.
To give some theoretical insight as to what is happening here, we note that
(the proof is in the next section) the error in the Galerkin solution uh satisfies
!∇(u − uh )! ≤
Γw!
inf !∇(u − vh )!,
" vh ∈SEh
(3.22)
APPROXIMATION BY FINITE ELEMENTS
125
where Γw! is the continuity constant in (3.19). This bound is a statement that
h
, up to the constant
the discrete solution is quasi-optimal in SE
Γw!
!w!
# ∞L
=1+
= 1 + P,
"
"
(3.23)
where P is the Peclet number introduced in (3.6). While (3.22) implies that
the approximation is good in the context of a diffusion-dominated problem —
in the limit of P → 0 (3.22) recovers the best approximation bound (1.60) — it
also suggests that the quality of the approximation can be poor for a convectiondominated problem. This lack of accuracy is typically manifested in the form of
spurious oscillations. For example, for a constant wind, nonlocal oscillations (or
wiggles) are generated if boundary layers are not resolved on the mesh, that is,
if the mesh Peclet number
Ph :=
h
P
×
2
L
(3.24)
is larger than unity. Extensive discussion and a more complete theoretical
explanation of the issues involved will be given in Section 3.4. A good way
to develop insight initially is to consider a vertical slice of the problem in
Example 3.1.1. This avenue is explored in Problem 3.3.
The error bound (3.22) can be combined with the argument used to prove
Theorem 1.10 in Section 1.5 to show that the accuracy of Galerkin discretization
is certain to increase if uniform mesh refinement is used. For large Peclet numbers however, it is too costly to compute globally accurate solutions in this way.
Instead, a more effective strategy is to refine the mesh locally, that is, only in
regions where layers occur. In some cases it may be possible to do this without
any a priori information about the solution. Using specially constructed fine
meshes near outflow boundaries is an obvious tactic, since this is where exponential layers arise. An example of such a mesh is given in Figure 3.11 at the end of
Section 3.4.1. Moreover, discontinuous boundary conditions on an inflow boundary inevitably give rise to an internal layer, so it is important to use a mesh such
that the
√ boundary discontinuity is commensurate with a generated layer of width
O(1/ P). (It makes little sense to try to solve the problem in Example 3.1.3
using uniform grids with h bigger than 1/20, see Computational Exercise 3.1.)
A similar consideration applies to characteristic layers,
where the elements need
√
to be small enough to resolve layers of width O(1/ P) that typically arise. This
issue is explored in Computational Exercise 3.2.
In general, of course, it is not possible to know about all non-smooth behavior
of the solution, when, for example, the streamlines are complicated. In such
cases, accurate solutions can be generated through the use of adaptive local
mesh refinement: a discrete solution is computed on an initial grid, and then the
error associated with this solution is estimated using techniques for a posteriori
error approximation discussed in Section 3.4.2. This information is then used to
refine the mesh in regions where the error is large so that an improved solution
126
THE CONVECTION–DIFFUSION EQUATION
can be constructed on the refined mesh. For this strategy to be effective, it is
important that errors do not propagate into regions where refinement is not
needed. A similar issue arises for use of the multigrid algorithm for solving the
discrete system, see Chapter 4. Even if the grid where the solution is computed
(the “fine grid”) provides suitable accuracy, the solution algorithm in this case
requires a sequence of coarser grids, and it is important that the discretizations
on these grids capture the character of the solution with a reasonable degree
of accuracy. For these reasons, it is necessary to have available a discretization
strategy that does not have the deficiencies exhibited by the Galerkin method.
This issue is considered next.
3.3.2 The streamline diffusion method
The numerical results in the previous section show that the Galerkin discretization is inaccurate if the mesh is not fine enough to resolve steeply varying layers
in the solution, and that inaccuracies may also pollute the discrete solution in
regions of the domain where the exact solution is well-behaved. Such difficulties
can be ameliorated by modifying the discretization to enhance its coercivity, thereby increasing stability. We now discuss an elegant approach (due to
Hughes & Brookes [107]) for achieving this, the streamline diffusion method.
We will motivate this methodology by first considering a closely related
approach (due to Brezzi et al. [35]) that, given a finite element mesh, enhances
the quality of the discrete solution on that mesh by incorporating information
interior to elements, where the Galerkin method provides no information. Loosely
speaking, this is done by
• augmenting the space on which the solution is defined by adding basis
functions with support contained entirely in element interiors, improving
the quality of the discrete approximation in regions where resolution is
lacking; and
• eliminating the unknowns associated with these new basis functions,
producing an improved solution on the original grid.
Since the augmenting basis functions are local to elements and vanish on element
boundaries, they are referred to as bubble functions. An assumption underlying this approach is that the problem produced on the given mesh contains as
many unknowns as can be handled in the computational environment available.
Therefore, the process is done implicitly, in the sense that no new unknowns are
literally introduced into the problem. Instead, the weak formulation and corresponding algebraic system is modified in a way that reflects the introduction of
new information. The procedure bears an analogy to static condensation, or, in
algebraic terms, block Gaussian elimination, whereby the equations associated
with unknowns on the element boundaries are modified by the elimination of
unknowns associated with element interiors.
Let Th denote a triangulation of Ω with individual elements {+k }. To keep
this discussion simple, we assume we are solving a homogeneous problem; that
APPROXIMATION BY FINITE ELEMENTS
127
is gD = 0 and gN = 0 in (1.2) cf. (1.18). Hence, the Galerkin discretization seeks
uh ∈ S0h such that a(uh , vh ) = $(vh ) for all vh ∈ S0h . Suppose S0h is augmented
1
, producing a new, larger space
by another space B0h ⊂ HE
0
1
Ŝ0h = S0h + B0h ⊂ HE
,
0
where we are assuming that functions in Ŝ0h are uniquely expressible as a sum
of elements in the two spaces S0h , B0h , and that the restrictions of functions in
Ŝ0h to individual elements +k lie in H2 (+k ). In principle, this expanded space
could be used to construct a more accurate solution ûh ∈ Ŝ0h such that
a(ûh , v̂h ) = $(v̂h )
for all v̂h ∈ Ŝ0h .
(3.25)
With the assumption that the new space B0h contains only bubble functions, any
bh ∈ B0h is uniquely expressible as
bh =
!
(k)
bh ,
k
(k)
where the support of bh lies in the interior of an individual element +k ∈ Th .
Let us denote members of the augmented space as
ûh = uh + bh ,
uh ∈ S0h ,
v̂h = vh + ch ,
bh ∈ B0h ,
vh ∈ S0h ,
(3.26)
ch ∈ B0h .
Since the relation (3.25) holds for all test functions v̂h ∈ Ŝ0h , it is valid in
particular when v̂h is taken to be a member of the augmenting space B0h . That
is, if ûh is expressed as in (3.26), then the augmenting function bh must satisfy
a(bh , ch ) = (f, ch ) − a(uh , ch )
for all ch ∈ B0h .
(k)
If ch = ch , with support only in the interior of element +k , then
"
"
(k)
f ch =
f ch ,
$(ch ) =
#k
Ω
and
"
"
a(uh , ch ) = " ∇uh · ∇ch + (w
# · ∇uh )ch
Ω
"
="
=
"
Ω
#k
#k
∇uh ·
(k)
∇ch
+
"
#k
(k)
(w
# · ∇uh )ch
(k)
(−"∇2 uh + w
# · ∇uh ) ch ,
(3.27)
128
THE CONVECTION–DIFFUSION EQUATION
(k)
where, in integrating by parts in the last step, we have used the fact that ch = 0
on ∂+k . It follows that the expression on the right side of (3.27) is
"
#
$ (k)
f − (−"∇2 uh + w
# · ∇uh ) ch .
#k
Similarly, the left side of (3.27) is
"
(k)
(−"∇2 bh + w
# · ∇bh ) ch .
a(bh , ch ) =
#k
(k)
The fact that B0h is a suitably rich space then implies that bh
version of (3.1):
(k)
(k)
(k)
−"∇2 bh + w
# · ∇bh = rh
satisfies a local
in +k ,
(3.28)
where
(k)
rh = f − (−"∇2 uh + w
# · ∇uh )
(k)
is the element residual associated with uh , with bh = 0 on ∂+k . This shows
that, given uh ∈ S0h , the function bh can be viewed as a correction to uh up to
inter-element boundaries. Consequently the approach is often referred to as a
subgrid model.
We will now introduce two simplifying assumptions, first, that the discretization S0h uses piecewise linear basis functions on Th , and second, that in the
convection–diffusion equation (3.1), w
# and f are piecewise constant on Th . These
assumptions imply that for any uh ∈ S0h , the residual of uh on +k , which now
(k)
# · ∇uh , is constant. In this case, the solution to
has the form rh = f − w
equation (3.28) (and hence equation (3.27)) is given by
(k)
(k) (k)
b h = d h rh ,
(3.29)
(k)
where dh satisfies
(k)
(k)
−"∇2 dh + w
# · ∇dh = 1 in +k ,
(k)
dh = 0 on ∂+k .
(3.30)
(k)
Notice that dh is a strictly positive function in +k (see Problem 3.4).
Returning to relation (3.25), let the test function now be chosen as v̂h =
vh ∈ S0h . This leads to
a(uh , vh ) = $(vh ) − a(bh , vh ) = $(vh ) −
!
k
(k)
a(bh , vh ).
(3.31)
APPROXIMATION BY FINITE ELEMENTS
129
(k)
In (3.31), the summand a(bh , vh ) satisfies
"
"
(k)
(k)
∇bh · ∇vh +
a(bh , vh ) = "
#k
"
= −"
"
=−
(k)
#k
bh ∇2 vh −
"
(k)
#k
(w
# · ∇bh )vh
(k)
#k
div (vh w)
# bh
(k)
#k
bh (w
# · ∇vh ),
(3.32)
where we have used the facts that vh is piecewise linear (to eliminate the secondorder term), and div w
# = 0. Substitution of (3.29) into (3.32), together with the
(k)
facts that rh and w
# · ∇vh are piecewise constant on +k , leads to
%"
&
(k)
(k)
(k)
a(bh , vh ) = −
dh
# · ∇vh )
rh (w
#k
=−
%"
#k
= −δk
(k)
dh
"
#k
&
"
1
|+k |
#k
(f − w
# · ∇uh ) (w
# · ∇vh )
(f − w
# · ∇uh ) (w
# · ∇vh ),
where
1
δk =
|+k |
%"
#k
(k)
dh
&
.
(3.33)
(3.34)
The characterization (3.33) and (3.34) means that (3.31) is equivalent to the
condition
"
"
! "
# · ∇uh )vh +
δk
(w
# · ∇uh )(w
# · ∇vh )
" ∇uh · ∇vh + (w
Ω
Ω
! "
= $(vh ) +
δk
k
#k
k
fw
# · ∇vh .
#k
(3.35)
Imposing (3.35) for all vh ∈ S0h determines a new discrete system of equations
with the same number of unknowns as the Galerkin system (3.21) but for which
additional information associated with element interiors has been incorporated
via (3.34). Moreover, setting vh = uh shows that the bilinear form in (3.35) may
be written as a(uh , uh ) + h(uh , uh ) where
! "
δk
(w
# · ∇uh )(w
# · ∇vh ).
h(uh , vh ) =
k
#k
The fact that δk > 0 (left as an exercise, see Problem 3.4) implies that the
coercivity of the bilinear form in (3.35) is stronger than that of a(·, ·).
130
THE CONVECTION–DIFFUSION EQUATION
The streamline diffusion (sd) method can be viewed as a parameterized weak
formulation of the convection–diffusion equation associated with (3.35). For low
order (linear or bilinear) elements, the sd method is defined by the requirement
that (3.35) holds for all vh ∈ S0h , where the parameters {δk }, rather than being
explicitly defined by (3.34), are instead “user-specified” quantities that can serve
as tuning mechanisms to enhance the effectiveness of the approach. In the special
case where both w
# or f are piecewise constant functions, the streamline diffusion discretization with parameter choice (3.34) corresponds to the addition and
elimination of the bubble functions defined in (3.29)–(3.30) and thus offers the
possibility of improved accuracy.
In practice, it is not feasible to compute {δk } by solving the convection–
diffusion problem (3.30) in every element +k . A more practical alternative,
(k)
explored later in this section, is to construct approximate solutions d∗ of (3.30),
leading to the explicitly computable parameter
%"
&
1
(k)
∗
d∗
δk =
.
(3.36)
|+k |
#k
(k)
Notice that only the mean value of dh is needed in (3.34), suggesting that even
a crude approximate solution of (3.30) will lead to an effective method. Notice
also that for the particular choice δk = 0 for all k, the sd method reduces to the
Galerkin discretization.
A more traditional derivation of the streamline diffusion discretization uses a
specific Petrov–Galerkin formulation. This leads to a realization of the sd method
that is defined for all types of elements and any order of approximation, with
no element-oriented restrictions on the functions w
# or f . We now describe this
approach. The basic idea of Petrov–Galerkin approximation is to specify a weak
formulation in which the test space is taken to be different from the trial space.
That is, given a problem Lu = f , the goal is to find u ∈ S for some trial space S
such that, for some (different) test space T and a suitable inner product,
(Lu, v) = (f, v)
for all v ∈ T.
(3.37)
In a streamline diffusion context, L is the convection–diffusion operator, the trial
h
space is SE
, and the test space is taken to be the space spanned by functions
# · ∇vh where vh ∈ S0h and δ > 0 is a constant parameter
of the form vh + δ w
(locally defined parameter values will be introduced subsequently). With uh ∈
h
denoting the trial function, the left-hand side of (3.37) is
SE
"
"
"
∂u
+ (w
(Lu, v) = " ∇uh · ∇vh − "
vh
# · ∇uh ) vh
Ω
∂ΩN ∂n
Ω
"
"
+ δ (w
# · ∇uh )(w
# · ∇vh ) − δ" (∇2 uh )(w
# · ∇vh ) .
(3.38)
Ω
Ω
In the case gN = 0, (3.38) simplifies since the boundary integral is zero. The
tricky issue here is that since uh is not required to have a second derivative,
APPROXIMATION BY FINITE ELEMENTS
131
the last integral in (3.38) may not be well-defined. However, assuming that
the restriction of functions in S0h to individual elements +k lie in H2 (+k ), a
legitimate method can be constructed by replacing this integral by an elementwise sum, namely,
!"
(∇2 uh )(w
# · ∇vh ).
(3.39)
−δ"
k
#k
This leads to the following general statement of the streamline diffusion
discretization:
h
Find uh ∈ SE
such that
asd (uh , vh ) = $sd (vh )
where
for all vh ∈ S0h ,
(3.40)
"
"
"
asd (u, v) := " ∇u · ∇v + (w
# · ∇u)v + δ (w
# · ∇u)(w
# · ∇v)
Ω
− δ"
$sd (v) :=
"
Ω
!"
k
fv + δ
"
Ω
#k
Ω
(∇2 u)(w
# · ∇v),
Ω
(3.41)
fw
# · ∇v,
1
. In the case of linear or
The functional $sd (·) is continuous over the space HE
0
bilinear elements, the high order term (3.39) is zero, asd (·, ·) is continuous over
1
, and (3.40) is identical to the bubble function formulation (3.35)
the space HE
0
with constant δ = δk for all +k .
The sd methodology leads naturally to a different norm, the streamline
diffusion norm
(1/2
'
# · ∇v!2
,
(3.42)
!v!sd := " !∇v!2 + δ !w
1
defined on the space of trial functions HE
. For large Peclet numbers, the
0
character of the solution u is dominated by its behavior along the streamlines.
Therefore, this norm, in which the streamline derivative plays a dominant role for
large Peclet number, is a more meaningful measure than say, !∇v!. Moreover,
in the case of linear or bilinear elements, the coercivity bound associated with
the sd formulation (3.40), namely
asd (vh , vh ) ≥ !vh !2sd
(3.43)
is stronger than the corresponding Galerkin bound in the sense that coercivity
does not degrade in the limit " → 0; cf. (3.17). The importance of (3.43) will
become apparent in Section 3.4. Ensuring that the problem (3.40) is uniformly
132
THE CONVECTION–DIFFUSION EQUATION
Peclet number is 5
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0.5
h = 1; w = 1; ε = 1/10
Peclet number is 20
1
1
0
0
1
h = 2; w = 2; ε = 1/10
2
Fig. 3.8. Comparison of exact solution (curved line) of optimal bubble problem
(3.45) with piecewise linear approximation, for two different Peclet numbers.
coercive over S0h with respect to ! ·! sd is a more delicate issue when using P2 or
Q2 approximation spaces, see Problem 3.5 for details.
To implement (3.40), we need a way to choose the parameter δ, or alternatively, to choose locally defined parameters δk∗ , typically approximating δk in
(3.34). A smart choice2 is the following:
&
%
1
hk
if Phk > 1,
1− k
# k|
Ph
(3.44)
δk∗ = 2|w
k
0
if Ph ≤ 1.
Here, |w
# k | is the $2 norm of the wind at the element centroid, hk is a measure
# k |hk /(2") is the
of the element length in the direction of the wind, and Phk := |w
element Peclet number.
There are several ways of motivating the parameter choice embodied in
(3.44). The most intuitive justification comes from looking at the one dimensional
version of the optimal bubble problem (3.30):
−"u%% + wu% = 1 in (0, h),
u(0) = u(h) = 0,
(3.45)
see Problem 3.1. If Ph := hw/(2") is larger than unity then the problem has
a downstream boundary layer of width 2"/w; see Figure 3.8. This means that
the interior bubble solution u(x) is closely approximated by a piecewise linear
function u∗ (x) which agrees with the reduced problem solution û = x/w up to
the transition point x∗ = h − h/Ph , y∗ = x∗ /w (marked with a circle) and
decreases linearly to zero in the boundary layer region [x∗ , h]. The fact that the
2 This
has been extensively tested and is embodied in our ifiss software. On a rectangle
with sides of length hx , hy in which the wind forms an angle θ = arctan(|wy /wx |) at the
centroid, hk is given by min(hx / cos θ, hy / sin θ).
APPROXIMATION BY FINITE ELEMENTS
133
parameter choice in (3.44) is obtained by substituting the approximate bubble
function solution u∗ into (3.36) is left as an exercise, see Problem 3.6.
An important feature of the choice of δk∗ is that the two limiting values are correctly defined. In particular, in the limit of Phk → ∞ we see that δk∗ → hk /(2|w#k |),
which is the optimal choice in the convective limit, see for example Eriksson
et al. [70, p. 463]. In the opposite extreme of a discretized problem where all the
layers are resolved by the mesh, we see from (3.44) that the sd discretization
reduces to the standard Galerkin method.
We conclude this section with one example demonstrating the effectiveness of
the streamline diffusion method (3.40) as realized by solving problem (3.35) using
the parameter choice (3.44). The plots in Figures 3.9 and 3.10 show the discrete
solution of the problem in Example 3.1.3 with a mesh Peclet number Ph = 6.25.
Looking closely at the sd solution in Figure 3.10 it is evident that although there
are small non-physical oscillations along the internal layer, the large amplitude
oscillations evident in the Galerkin solution have been completely eliminated. For
further insight into the relative behavior of Galerkin and sd approaches outside
of exponential layers, see Problem 3.7.
The solution in Figure 3.10 should also be compared to the reference solution
in Figure 3.4. This latter solution is also computed using the sd discretization,
but it uses a much finer 128×128 grid, so that the mesh Peclet number is of order
unity. The basic differences between these solutions are, first, that oscillations are
imperceptible on the finer grid (since the interior layer is captured), and second,
that the width of the boundary layer is significantly narrower in the finer grid
case. The latter observation reinforces the point that resolution is always limited
by the grid size; the bubble function stabilization underlying the sd method does
not magically enable the resolution of features that have a scale finer than the
1
2
1.5
0.5
y
1
0
0.5
0
–0.5
–1
–1
1
0
0
x
1
y
–1
–1
0
x
1
Fig. 3.9. Contour plot (left) and three-dimensional surface plot (right) of the
Galerkin solution of Example 3.1.3 for " = 1/200, using Q1 approximation
on a 32 × 32 square grid.
134
THE CONVECTION–DIFFUSION EQUATION
1
1
0.5
y
0.5
0
0
–0.5
1
0
–1
–1
0
x
1
y
–1
–1
0
x
1
Fig. 3.10. Contour plot (left) and three-dimensional surface plot (right) of the
streamline diffusion solution of Example 3.1.3, for " = 1/200, using Q1
approximation on a 32 × 32 square grid.
basic grid used. The sd approach limits the damage caused by poor resolution
of exponential layers and leads to a more accurate solution outside of the layers
where the solution is not varying rapidly. These points will be explored in more
detail in the next section.
3.4
Theory of errors
The tricky issue of finding tight bounds for the error associated with discretization of convection–diffusion problems is discussed in this section. We look at
the issue from several different points of view. First, we discuss conventional
a priori error bounds for the Galerkin and streamline diffusion discretizations.
Second, we discuss a posteriori analysis of the error in a computed solution. The
motivation is that associated local error bounds can readily be used to drive
adaptive mesh refinement. This is particularly useful in the context of efficiently
approximating solutions exhibiting layers.
3.4.1 A priori error bounds
The analysis of the Galerkin discretization begins with the defining equations
(3.16) for the continuous problem and (3.21) for the discrete one, which together
imply the Galerkin orthogonality property
a(u − uh , wh ) = 0
for all wh ∈ S0h .
(3.46)
h
, then both uh and vh satisfy the essential
If vh is an arbitrary function in SE
boundary condition in (3.2), and hence vh − uh ∈ S0h . It follows that
a(u − uh , u − uh ) = a(u − uh , u − vh ) + a(u − uh , vh − uh )
= a(u − uh , u − vh ).
© Copyright 2026 Paperzz