FEM for convection-dominated and hyperbolic problems

Post on 02-Jan-2022

3 views 0 download

Transcript of FEM for convection-dominated and hyperbolic problems

FEM for convection-dominated and hyperbolicproblems

Praveen. Cpraveen@math.tifrbng.res.in

Tata Institute of Fundamental ResearchCenter for Applicable Mathematics

Bangalore 560065http://math.tifrbng.res.in

April 18, 2013

1 / 35

Convection-diffusion-reaction equation

−ε∆u+ β · ∇u+ σu = f in Ω

u = 0 on Γ

Assume thatε > 0, ∇ · β = 0, σ ≥ 0

The bilinear form and linear functional are

B(u, v) =

∫Ω

(ε∇u · ∇v + (β · ∇u)v + σuv), L(v) =

∫Ω

fv

The weak formulation is:

find u ∈ H10 (Ω) such that B(u, v) = L(v) ∀ v ∈ H1

0 (Ω)

Recall the Poincare inequality:∫Ω

|v|2 ≤ CΩ

∫Ω

|∇v|2, ∀ v ∈ H10 (Ω)

2 / 35

Convection-diffusion-reaction equation

Continuity of B:

|B(u, v)| ≤ γ|u|1|v|1, γ = ε+ C12

Ω ‖β‖∞ + CΩ ‖σ‖∞

Coercivity of B:

B(u, u) ≥ ε|u|21The existence and uniqueness of the solution follows from Lax-Milgram lemmawith the stability estimate

|u|1 ≤C

12

Ω

ε‖f‖

3 / 35

Galerkin method

Choose Vh to be a finite dimensional space of continuous, piecewisepolynomials so that Vh ⊂ H1

0 (Ω). Then the Galerkin method is:

find uh ∈ Vh such that B(uh, vh) = L(vh) ∀ vh ∈ Vh

Cea’s lemma together with interpolation error estimates gives us the errorestimate for uh as

|uh − u|1 ≤γ

εinf

vh∈Vh

|vh − u|1 ≤(

1 + C12

Ω

‖β‖∞ε

+ CΩ‖σ‖∞ε

)Chk ‖u‖k+1

and guarantees convergence of the solution uh to u as h→ 0. However, ifε γ which can happen if ε ‖β‖∞ or ε ‖σ‖∞, then the Galerkinsolution can have large error for finite h. We would have to use a very finemesh (small h) in order to reduce the error to acceptable levels.

4 / 35

Model problemsLet Ω be a bounded, convex polygonal domain in R2 with boundary Γ and letβ = (β1, β2) be a constant vector with |β| = 1. Consider the followingstationary boundary value problem

−ε∆u+ uβ + u = f in Ω

u = g on Γ (1)

where ε is a positive constant and

uβ := β · ∇u

denotes derivative in the β-direction.Simplified, hyperbolic model: If ε 1 we can choose to ignore the ellipticterm

uβ + u = f in Ω

u = g on Γ− (2)

where now the boundary condition can be specified only on the inflow portion

Γ− = x ∈ Γ : n · β ≤ 05 / 35

Model problems

• If the boundary data g is discontinous on Γ−, then the diffusion modelcreates an internal layer whose width is O (

√ε).

• If ε 1 then the data g on Γ− is carried towards Γ+ along thestreamlines β. But if this solution is different from the data g|Γ+

then a

boundary layer of width O (ε) is created.

6 / 35

Norms, interpolation error

‖v‖ = ‖v‖L2(Ω) , ‖v‖s = ‖v‖Hs(Ω)

〈v, w〉 =

∫Γ

(n · β)vw, 〈v, w〉± =

∫Γ±

(n · β)vw

|v| =(∫

Γ

|n · β|v2

) 12

Greens’ formula:(vβ , w) = 〈v, w〉 − (v, wβ)

Let Th be a family of shape regular, quasi-uniform triangulations of Ω withmesh size h. For a given positive integer k we introduce the finite elementspace

Vh = v ∈ C0(Ω) : v|K ∈ Pk ∀ K ∈ Th

From the theory of interpolation error estimates we have

‖u− Ihu‖ ≤ Chk+1 ‖u‖k+1 (3)

|u− Ihu|1 ≤ Chk ‖u‖k+1 (4)

7 / 35

Norms, interpolation error

Moreover, if the derivatives of u of order k + 1 are bounded on Ω, then

|u− Ihu| ≤ Chk+1

and with less stringent regularity requirements (see Ciarlet)

|u− Ihu| ≤ Chk+ 12 ‖u‖k+1 (5)

These results imply that

‖u− Ihu‖+ |u− Ihu|1 + |u− Ihu| ≤ Chk ‖u‖k+1

In the sequel we will frequently use the following inequality: for real numbersa, b and for any γ > 0

2ab ≤ γa2 +1

γb2

8 / 35

Standard Galerkin method

For simplicity, assume the boundary data g ≡ 0. Then the weak formulationis: find u ∈ H1

0 (Ω) such that

ε(∇u,∇v) + (uβ + u, v) = (f, v) ∀ v ∈ H10 (Ω)

With the finite element space

Vh = v ∈ Vh : v|Γ = 0

the Galerkin method is: find uh ∈ Vh such that

ε(∇uh,∇vh) + (uhβ + uh, vh) = (f, vh) ∀ vh ∈ Vh

9 / 35

A 1-D ExampleConsider the boundary value problem

−εuxx + ux =0, 0 < x < 1

u(0) = 1, u(1) = 0

with 0 < ε 1. The exact solution is

u(x) =1− e−

1−xε

1− e−1ε

has boundary layer near x = 1

If we apply the Galerkin method with piecewise linear basis functions on auniform mesh of size h, then the resulting set of equations can be written as

− ε

h2(ui−1 − 2ui + ui+1) +

1

2h(ui+1 − ui−1) = 0

This is identical to applying central finite difference scheme, and we know thatthis scheme produces oscillatory solutions in the boundary layer if the cellPeclet number is large

Peh =h

ε> 2

10 / 35

Galerkin method for hyperbolic problemGalerkin method with strongly imposed boundary conditionsFind uh ∈ Vh with uh = g at the nodes on Γ− such that

(uhβ + uh, vh) = (f, vh) ∀ vh ∈ Vh with vh = 0 on Γ−

Galerkin method with weakly imposed boundary conditionsFind uh ∈ Vh such that

(uhβ + uh, vh)−⟨uh, vh

⟩− = (f, vh)−

⟨g, vh

⟩− ∀ vh ∈ Vh

Introduce the notation

a(v, w) = (vβ + v, w)− 〈v, w〉− , `(w) = (f, w)− 〈g, w〉−

The Galerkin method reads: find uh ∈ Vh such that

a(uh, vh) = `(vh) ∀ vh ∈ Vh (6)

The exact solution also satisfies the above equation, i.e.,

a(u, vh) = `(vh) ∀ vh ∈ Vh11 / 35

Galerkin method for hyperbolic problem

Subtracting the two, we get for the error e = u− uh

a(e, vh) = 0 ∀ vh ∈ Vh

To show stability, we need the following property of the bilinear form.

Lemma

For any v ∈ H1(Ω) we have

a(v, v) = ‖v‖2 +1

2|v|2

Proof: By Green’s formula

(vβ , v) = −(v, vβ) + 〈v, v〉

so that

(vβ , v) =1

2〈v, v〉 =

1

2〈v, v〉+ +

1

2〈v, v〉−

12 / 35

Galerkin method for hyperbolic problem

Hence

a(v, v) = (vβ , v) + (v, v)− 〈v, v〉−

=1

2〈v, v〉+ +

1

2〈v, v〉− + ‖v‖2 − 〈v, v〉−

= ‖v‖2 +1

2〈v, v〉+ −

1

2〈v, v〉−

= ‖v‖2 +1

2|v|2

where the last step follows because n · β ≥ 0 on Γ+ and n · β < 0 on Γ−.

Remark: We obtain the stability estimate∥∥uh∥∥2+

1

2|uh|2 = a(uh, uh) = `(uh) ≤ ‖f‖

∥∥uh∥∥ ≤ 1

2‖f‖2 +

1

2

∥∥uh∥∥2

and hence ∥∥uh∥∥2+ |uh|2 ≤ ‖f‖2

13 / 35

Galerkin method for hyperbolic problem

Theorem (Error estimate)

Let u and uh be solutions of (2) and (6). Then∥∥u− uh∥∥+ |u− uh| ≤ Chk ‖u‖k+1

Proof: Write the error

e = u− uh = (u− Ihu) + (Ihu− uh) = ρ+ θ

Using previous Lemma and noting that θ ∈ Vh

‖θ‖2 +1

2|θ|2 = a(θ, θ) = a(e− ρ, θ) = a(e, θ)− a(ρ, θ)

= −a(ρ, θ) = −(ρβ , θ)− (ρ, θ) + 〈ρ, θ〉−

≤ ‖ρβ‖2 +1

4‖θ‖2 + ‖ρ‖2 +

1

4‖θ‖2 + |ρ|2 +

1

4|θ|2

= ‖ρβ‖2 + ‖ρ‖2 + |ρ|2 +1

2

(‖θ‖2 +

1

2|θ|2)

14 / 35

Galerkin method for hyperbolic problemand hence

‖θ‖2 +1

2|θ|2 ≤ 2(‖ρβ‖2 + ‖ρ‖2 + |ρ|2) ≤ Ch2k ‖u‖k+1

where the last inequality follows using (3), (4), (5). Now

(‖θ‖+|θ|)2 = ‖θ‖2+|θ|2+2 ‖θ‖ |θ| ≤ ‖θ‖2+|θ|2+2 ‖θ‖2 +1

2|θ|2 = 3(‖θ‖2+

1

2|θ|2)

and hence‖θ‖+ |θ| ≤ Chk ‖u‖k+1

Finally, since e = θ + ρ

‖e‖+ |e| ≤ ‖θ‖+ ‖ρ‖+ |θ|+ |ρ| ≤ Chk ‖u‖k+1

where we used interpolation error estimates (3) and (5) for ‖ρ‖ and |ρ|.

Remark: This shows that if the solution u is smooth enough, then theGalerkin method converges at the rate hk, which is one order less than therate observed for elliptic equations. If the solution is not smooth, then theGalerkin method leads to large error.

15 / 35

Solution of β · ∇u = 0 using Galerkin Method

β = (y,−x), u(0, y) =

0 if |y − 1

2 | >14

1 otherwise, u(x, 1) = 0

Degree = 1

16 / 35

Classical artificial diffusion

Instead of solving the hyperbolic equation, we add an elliptic term

h(∇uh,∇vh) + (uhβ + uh, vh) = (f, vh) ∀ vh ∈ Vh

Mesh Peclet number is

Peh =h

h= 1

• This scheme leads to non-oscillating solutions even for discontinouos data,but the discontinuities are highly smeared, even in the directionperpendicular to the streamlines.

• The solutions will only be first order accurate due to the presence of theO (h) term.

• Note the the scheme is not strongly consistent, i.e., the true solution udoes not satisfy the numerical scheme.

17 / 35

Motivation for streamline diffusion method

For the equation

βdu

dx= 0

add an artificial diffusion term with µ ≥ 0

βdu

dx=

d

dxµ

du

dx

Multiply by a test function v and integrate∫β

du

dxv =

∫v

d

dxµ

du

dx= −

∫µ

du

dx

dv

dx

Choosingµ = βτβ

we can write ∫β

du

dx

(v + τβ

dv

dx

)︸ ︷︷ ︸

test function

= 0

18 / 35

Motivation for streamline diffusion method

The test function is modified with the addition of the derivative in thedirection of β. The scheme is strongly consistent since the exact solutionsatisfies the numerical scheme. It can be shown that with piecewise linearpolynomials, the solution of the above scheme is nodally exact provided wechoose

τ =h

2|β|and the resulting system of discrete equations is

β + |β|2

uj − uj−1

h+β − |β|

2

uj+1 − uhh

= 0

which is precisely the upwind scheme.

Remark: The above method has test functions which lie in a different spacecompared to trial functions. Such finite element schemes are said to bePetrov-Galerkin, and the above scheme is also called as Streamline UpwindPetrov-Galerkin (SUPG) method.

19 / 35

Streamline diffusion method: hyperbolic problem

In this method, we replace the test function vh by vh + hvhβ . The scheme is:

find uh ∈ Vh such that

(uhβ + uh, vh + hvhβ)− (1 + h)⟨uh, vh

⟩− = (f, vh + hvhβ)− (1 + h)

⟨g, vh

⟩−

where for convenience of analysis, we have introduced the factor (1 + h) whichmay be ignored in the numerical computations. We notice the presence of theterm h(uhβ , v

hβ) which adds some dissipation to the scheme in the direction of

β, the streamline direction. Defining

B(w, v) = (wβ + w, v + hvβ)− (1 + h) 〈w, v〉−

andL(v) = (f, v + hvβ)− (1 + h) 〈g, v〉−

The SUPG scheme is: find uh ∈ Vh such that

B(uh, vh) = L(vh) ∀ vh ∈ Vh (7)

20 / 35

Streamline diffusion method: hyperbolic problemNote that the true solution satisfies the above equation, i.e.,

B(u, vh) = L(vh) ∀ vh ∈ Vh

and subtracting the previous two equations, we obtain

B(e, vh) = B(u− uh, vh) = 0 ∀ vh ∈ Vh

We will prove an error estimate in the following norm

‖v‖β =

(h ‖vβ‖2 + ‖v‖2 +

1

2(1 + h)|v|2

) 12

This choice of the norm is related to the following stability property of thebilinear form

Lemma

For any v ∈ H1(Ω) we have

B(v, v) = ‖v‖2β21 / 35

Streamline diffusion method: hyperbolic problemProof: By Green’s formula

(vβ , v) =1

2〈v, v〉

and thus

B(v, v) =1 + h

2〈v, v〉 − (1 + h) 〈v, v〉− + ‖v‖2 + h ‖vβ‖2

=1 + h

2(〈v, v〉+ − 〈v, v〉−) + ‖v‖2 + h ‖vβ‖2

=1 + h

2|v|2 + ‖v‖2 + h ‖vβ‖2 = ‖v‖2β

which proves the desired equality.

Theorem

Let u and uh be solutions of (2) and (7). Then∥∥u− uh∥∥β≤ Chk+ 1

2 ‖u‖k+1

22 / 35

Streamline diffusion method: hyperbolic problemProof: Write the error

e = u− uh = (u− Ihu) + (Ihu− uh) = ρ+ θ

Then

‖e‖2β = B(e, e) = B(e, ρ+ θ) = B(e, ρ) +B(e, θ) = B(e, ρ)

= (eβ , ρ) + h(eβ , ρβ) + (e, ρ) + h(e, ρβ)− (1 + h) 〈e, ρ〉−

≤ h

4‖eβ‖2 + h−1 ‖ρ‖2 +

h

4‖eβ‖2 + h ‖ρβ‖2 +

1

4‖e‖2 + ‖ρ‖2 +

1

4‖e‖2 + h2 ‖ρβ‖2 +

1 + h

4|e|2 + (1 + h)|ρ|2

=1

2‖e‖2β + (1 + h−1) ‖ρ‖2 + h(1 + h) ‖ρβ‖2 + (1 + h)|ρ|2

so that

‖e‖2β ≤ 2[(1 + h−1) ‖ρ‖2 + h(1 + h) ‖ρβ‖2 + (1 + h)|ρ|2] ≤ Ch2k+1 ‖u‖2k+1

which proves the desired result.

23 / 35

Streamline diffusion method: hyperbolic problemRemark: The above error estimates show that∥∥u− uh∥∥ ≤ Chk+ 1

2 ‖u‖k+1 ,∥∥uβ − uhβ∥∥ ≤ Chk ‖u‖k+1

The L2 error estimate is improved by a factor of 12 as compared to Galerkin

method. Moreover we get some control on the derivative of the solution alongthe streamline uβ which is optimal. We had no such control on the derivativein the Galerkin method. However, we do not have any control on thederivative normal to the streamline, which can lead to oscillatory solutionswith the SUPG method also.

Remark: The error estimates require the solution to be smooth but theSUPG method performs reasonably well even if the solution is not veryregular. It can be shown that the effect of a source at a certain point P ∈ Ωdecays at least as rapidly as exp(−Cd/

√h) where d is distance to P in

directions perpendicular to the characteristics, and like exp(−Cd/h) indirections opposite to the characteristics (upwind direction). In particular,this means that the effect of a jump in the exact solution across a

characteristic will be limited to a width of O(√

h)

.

24 / 35

Solution of β · ∇u = 0 using SUPG Method

Degree = 1

25 / 35

Various schemes continue to be proposed to improve the SUPG method forbetter shock-capturing. Hughes, Franca, Mallet (1986) proposed a modifiedtest function

vh + δhβ · ∇vh + δhβ · ∇vh

where

β =β · ∇uh

|∇uh|2∇uh

i.e., β is the projection of β onto ∇uh. In this case the scheme is non-lineareven for a linear PDE. As usual

δh = O(h

|β|

)δh = O

(h

|β|

)Another approach is to add numerical viscosity

(εh∇uh,∇vh)

where εh = εh(uh) is non-zero only in the regions where a shock is detected orthe solution is oscillatory.

26 / 35

SUPG method for convection-diffusion problemLet us consider problem (1) with homogeneous boundary conditions g ≡ 0.For any v ∈ H1

0 (Ω) multiply by v + δhvβ

(−ε∆u+ uβ + u, v + δhvβ) = (f, v + δhvβ)

−ε(∆u, v)− (ε∆u, δhvβ) + (uβ + u, v + δhvβ) = (f, v + δhvβ)

ε(∇u,∇v)− (ε∆u, δhvβ) + (uβ + u, v + δhvβ) = (f, v + δhvβ)

The SUPG scheme is given by: find uh ∈ Vh such that

ε(∇uh,∇vh)−(ε∆uh, δhvhβ)+(uhβ+uh, vh+δhv

hβ) = (f, vh+δhv

hβ) ∀ vh ∈ Vh

We make the second term meaningful by writing it as

(ε∆uh, δhvhβ) =

∑K∈Th

(ε∆uh, δhvhβ)K

It is also useful to write the SUPG scheme in the following form

ε(∇uh,∇vh) + (uhβ + uh − f, vh) + (−ε∆uh + uhβ + uh − f, δhvhβ) = 0

27 / 35

SUPG method for convection-diffusion problem

The method is strongly consistent since if we plug in the exact solution, theadditional SUPG terms vanish. The factor δh is chosen as

δh =

Ch if ε < h

0 otherwise

If the constant C is small enough, we can show that the term −(ε∆uh, δhvhβ)

does not degrade the extra stability introduced by the term (uhβ , δhvhβ). Using

the inverse estimate for any vh ∈ Vh we get∥∥∆vh∥∥ ≤ Ch−1

∥∥∇vh∥∥and hence

|(ε∆vh, δhvhβ)| ≤ εδh∥∥∆vh

∥∥∥∥vhβ∥∥ ≤ √ε∥∥∇vh∥∥ · √εδhCh−1∥∥vhβ∥∥

≤ 1

2ε∥∥∇vh∥∥2

+1

2εδ2hC

2h−2∥∥vhβ∥∥2

28 / 35

SUPG method for convection-diffusion problemThe bilinear form of the scheme is

B(uh, vh) = ε(∇uh,∇vh)− (ε∆uh, δhvhβ) + (uhβ + uh, vh + δhv

hβ)

so that

B(vh, vh) ≥ 1

2ε∥∥∇vh∥∥+

∥∥vh∥∥2+ (1− 1

2εδhC

2h−2)δh ‖vβ‖2 , ∀ vh ∈ Vh

Thus if C is so small that

εδhC2h−2 = C2C

ε

h≤ C2C < 1

then

B(vh, vh) ≥ 1

2(ε∥∥∇vh∥∥2

+ δh∥∥vhβ∥∥2

+∥∥vh∥∥2

) ∀ vh ∈ Vh

Remark: If Th is not quasi-uniform or if β is variable, then we choose

δh|K =

ChK

|β| if ε < hK |β| i.e., PeK = hK |β|ε > 1

0 otherwise

29 / 35

Discontinous Galerkin Method for hyperbolic problemHyperbolic problems can admit discontinuous solutions. Hence it is useful toallow the approximate solutions to contain discontinuities. Let us define thespace of piecewise polynomials on a mesh Th

Vh = Y kh = v ∈ L2(Ω) : v|K ∈ Pk ∀ K ∈ Th

Note that a v ∈ Vh may not be continuous across ∂K. The basis functions forVh will be taken to be polynomials whose support is contained in someelement K.In order to derive the DG scheme, let us put the PDE in conservation form

∇ · F (u) = 0

Multiply by a function v ∈ L2(Ω) with supp(v) = K and integrate by parts∫∂K

(F · n)v −∫K

F · ∇v = 0

Since u is possibly discontinuous across ∂K it is not clear how to evaluate theflux (F · n). Here we can make use of ideas from Godunov finite volume

30 / 35

Discontinous Galerkin Method for hyperbolic problem

scheme and evaluate the flux using some Godunov or approximate Riemannsolver scheme

F · n|∂K ≈ H(u+, u−, n)

E.g., in the linear case, the upwind flux is given by

H(u+, u−, n) = (β · n)+u+ + (β · n)−u− =

(β · n)u+ if β · n ≥ 0

(β · n)u− if β · n < 0

Then the DG scheme is∫∂K

H(uh+, uh−, n)vh −

∫K

F (uh) · ∇vh = 0

An alternate version is obtained if we do integration by parts on the secondterm ∫

∂K

[H(uh+, uh−, n)− F (uh+) · n]vh +

∫K

vh∇ · F (uh) = 0

31 / 35

Discontinous Galerkin Method for hyperbolic problem

For the linear case F (u) = βu, if we take the second form the scheme becomes

(uhβ , vh)K −

∫∂K

(β · n)−uh+vh+ = −

∫∂K

(β · n)−uh−vh+

which becomes

(uhβ , vh)K −

∫∂K−

(β · n)uh+vh+ = −

∫∂K−

(β · n)uh−vh+

The above equation amounts to applying the Galerkin method on element Ktogether with weak imposition of boundary conditions at the inflowboundaries ∂K− of K.

In the remaining part we will work with the first form of the scheme. Let

ΓI = interior edges of the mesh Th

32 / 35

Discontinous Galerkin Method for hyperbolic problemWe have to account for the boundary conditions in the scheme.

−∫K

F (uh) · ∇vh+∫∂K∩ΓI

H(uh+, uh−, n)vh +

∫∂K∩Γ−

H(uh, g, n)vh +

∫∂K∩Γ+

(F (uh) · n)vh = 0

The scheme is obtained by adding the equations for all elements

−∑K∈Th

∫K

F (uh) · ∇vh +∑e∈ΓI

∫e

H(uh+, uh−, n)

qvh

y+

∫Γ−

H(uh, g, n)vh +

∫Γ+

(F (uh) · n)vh = 0

Let us specialize this scheme to the linear case with the upwind flux. Oninflow boundary Γ−∫

Γ−

H(uh, g, n)vh =

∫Γ−

(β · n)−gvh =

∫Γ

(β · n)−gvh

33 / 35

Discontinous Galerkin Method for hyperbolic problem∫Γ+

(F (uh) · n)vh =

∫Γ+

(β · n)uhvh =

∫Γ

(β · n)+uhvh

The scheme takes the form

−∑K∈Th

∫K

F (uh) · ∇vh +∑e∈ΓI

∫e

H(uh+, uh−, n)

qvh

y+

∫Γ

(β · n)+uhvh +

∫Γ

(β · n)−gvh = 0, ∀ vh ∈ Vh

The solutions are well behaved (respect maximum principle) but highlydissipated for k = 0. For k ≥ 1, the solutions develop oscillations. There arebroadly two cures to this problem. The first one is inspired by the limitersused in finite volume methods. The second approach involves addingarticificial dissipation term to the scheme

(εh∇uh,∇vh)

where εh = εh(uh) is non-zero only in the regions where a shock is detected orthe solution is oscillatory.

34 / 35

Discontinous Galerkin Method for hyperbolic problem

Degree=0 Degree=1

35 / 35