Finite Volume and Finite Element Methods in CFD (Numerical

62
Finite Volume and Finite Element Methods in CFD (Numerical Simulation of Compressible Flow) M. Feistauer Charles University Prague, Faculty of Mathematics and Physics Charles University . Prague 2007

Transcript of Finite Volume and Finite Element Methods in CFD (Numerical

Page 1: Finite Volume and Finite Element Methods in CFD (Numerical

Finite Volume and Finite ElementMethods in CFD

(Numerical Simulation of CompressibleFlow)

M. FeistauerCharles University Prague, Faculty of Mathematics and Physics

Charles University . Prague

2007

Page 2: Finite Volume and Finite Element Methods in CFD (Numerical

iv

Page 3: Finite Volume and Finite Element Methods in CFD (Numerical

PREFACE

This text should serve as a source for the course delivered in April 2007 at theUniversity of Vienna. The purpose of this course is to give a survey of recentmethods and techniques for the numerical solution of compressible flow. Thecourse follows the book

M. Feistauer, J. Felcman, I. Straskraba: Mathematical and Computational Meth-ods for Compressible Flow, Clarendon Press, Oxford, 2004, ISBN 0 19 8505884

where all details and a number of examples can be found.The author gratefully acknowledges the invitation of Professor Christian

Schmeiser to visit Univeristy of Vienna, allowing him to deliver this course.

Vienna, April 2007 Miloslav FeistauerCharles University PragueFaculty of Mathematics and PhysicsSokolovska 83, 186 75 Praha 8Czech [email protected]

v

Page 4: Finite Volume and Finite Element Methods in CFD (Numerical
Page 5: Finite Volume and Finite Element Methods in CFD (Numerical

CONTENTS

Introduction 1

1 Basic Equations 21.1 Governing equations and relations of gas dynamics 2

1.1.1 Description of the flow 21.1.2 The continuity equation 21.1.3 The equations of motion 21.1.4 The law of conservation of the moment of mo-

mentum; symmetry of the stress tensor 31.1.5 The Navier–Stokes equations 31.1.6 Properties of the viscosity coefficients 31.1.7 The energy equation 41.1.8 Thermodynamical relations 41.1.9 Entropy 51.1.10 The second law of thermodynamics 51.1.11 Adiabatic flow 51.1.12 Barotropic flow 61.1.13 Speed of sound; Mach number 6

2 Finite volume method 82.1 Basic properties of the Euler equations 82.2 The finite volume method for the multidimensional Eu-

ler equations 102.2.1 Finite volume mesh 112.2.2 Derivation of a general finite volume scheme 132.2.3 Properties of the numerical flux 152.2.4 Construction of some numerical fluxes 152.2.5 Boundary conditions 162.2.6 Stability of the finite volume schemes 202.2.7 Simplified scalar problem 202.2.8 Extension of the stability conditions to the Eu-

ler equations 23

3 Finite element methods 243.1 Combined finite volume–finite element method for vis-

cous compressible flow 243.1.1 Computational grids 273.1.2 FV and FE spaces 283.1.3 Space semidiscretization of the problem 293.1.4 Time discretization 30

vii

Page 6: Finite Volume and Finite Element Methods in CFD (Numerical

viii CONTENTS

3.1.5 Realization of boundary conditions in the con-vective form bh 30

3.2 Discontinuous Galerkin finite element method 313.2.1 DGFEM for conservation laws 313.2.2 Limiting of the order of accuracy 353.2.3 Approximation of the boundary 373.2.4 DGFEM for convection–diffusion problems and

viscous flow 383.2.5 Numerical examples 47

References 52

Index 55

Page 7: Finite Volume and Finite Element Methods in CFD (Numerical

INTRODUCTION

Fluid dynamics is an amazing field which is important in many areas: machinery,aviations, aeronautics, car industry, chemistry, food industry, hydrology, meteo-rology, environmental protection, medicine,. . . .

An image of flow can be obtained in two ways:a) With the aid of experiments (for example in wind tunnels). They are howeverexpensive, lengthy and sometimes impossible. Let us mention flow around spacevehicles at re-entry, loss-of-coolant accident in a nuclear reactor, medicine.b) With the aid of mathematical models. Mathematical and numerical modellingallows to get qualitative as well as quantitative properties of flow. Under thequalitative properties we understand existence, uniqueness, stability, asymptoticbehaviour etc. of the solution. The quantitative properties are obtained with theaid of numerical and computational methods applied on modern computers. Thedevelopment of numerical simulation of fluid dynamical problems caused that(round 1950) Computational Fluid Dynamics (CFD) was constituted.

CFD is the area which is concerned with applications of mathematical, nu-merical and computational techniques to the fluid flow simulation.

The main goal of CFD is to obtain results comparable with wind tunnel exper-iments, to avoid (at least partially) expensive and time consuming measurementsand to simulate process which cannot be realized experimentally.

CFD has several ingredients:- mathematical models = starting point,- rigorous mathematical analysis of numerical methods,- heuristic approaches = heuristic extension of theoretical results to cases,

where the pure mathematical analysis is not yet available,- experience, comparison of computational results with experiments and then

feedback leading to improvement of mathematical models and numerical meth-ods.

One can say that CFD (similarly as numerical mathematics) has two faces:it is a rigorous mathematical science on one side, and an art on the other side.

In this course, we shall be concerned with one of the most difficult parts ofCFD: numerical simulation of compressible flow. Here it is necessary to overcomeseveral important obstacles:

- mixed hyperbolic-parabolic character of governing equations,- nonlinearity of equations,- simulation of convection dominating over diffusion,- simulation of shock waves, boundary layers and wakes and their interaction,- the lack of theoretical analysis for the continuous problem.

1

Page 8: Finite Volume and Finite Element Methods in CFD (Numerical

1

BASIC EQUATIONS

In this course we shall be concerned with the motion of compressible fluids, i.e.gases.

1.1 Governing equations and relations of gas dynamics

Let (0, T ) ⊂ IR be a time interval, during which we follow the fluid motion,and let Ω ⊂ IRN , N = 1, 2, 3, denote the domain occupied by the fluid. (Forsimplicity we assume that it is independent of t).

1.1.1 Description of the flow

There are two possibilities for describing the fluid motion: Lagrangean and Eu-lerian.

We shall use here the Eulerian description based on the determination of thevelocity v(x, t) = (v1(x, t), . . . , vN (x, t)) of the fluid particle passing through thepoint x at time t. We shall also use the state variables: p - pressure, ρ - densityand θ - absolute temperature.

In what follows, we shall introduce the mathematical formulation of funda-mental physical laws: the law of conservation of mass, the law of conservationof momentum and the law of conservation of energy, called in brief conservationlaws.

1.1.2 The continuity equation

∂ρ

∂t(x, t) + div (ρ(x, t)v(x, t)) = 0, t ∈ (0, T ), x ∈ Ω (1.1.1)

is the differential form of the law of conservation of mass.

1.1.3 The equations of motion

Basic dynamical equations describing fluid motion are derived from the law ofconservation of momentum.

The equations of motion of general fluids

∂t(ρvi) + div (ρviv) = ρfi +

N∑

j=1

∂τji

∂xj, i = 1, . . . , N. (1.1.2)

This can be written as

∂t(ρv) + div (ρv ⊗ v) = ρf + divT . (1.1.3)

2

Page 9: Finite Volume and Finite Element Methods in CFD (Numerical

GOVERNING EQUATIONS AND RELATIONS 3

Here v⊗v is the tensor with components vivj , i, j = 1, . . . , N , τij are componentsof the stress tensor T and fi are components of the outer volume force f .

1.1.4 The law of conservation of the moment of momentum; symmetry of thestress tensor

Theorem 1.1 The law of conservation of the moment of momentum is valid ifand only if the stress tensor T is symmetric.

1.1.5 The Navier–Stokes equations

The relations between the stress tensor and other quantities describing fluid flow,particularly the velocity and its derivatives, represent the so-called rheologicalequations of the fluid. The simplest rheological equation

T = −p I, (1.1.4)

characterizes inviscid fluid. Here p is the pressure and I is the unit tensor:

I =

1, 0, 00, 1, 00, 0, 1

for N = 3. (1.1.5)

Besides the pressure forces, the friction shear forces also act in real fluids as aconsequence of the viscosity. Therefore, in the case of viscous fluid, we add acontribution T ′ characterizing the shear stress to the term −p I:

T = −p I + T ′. (1.1.6)

In order to identify the viscous part T ′ of the stress tensor, we shall use Stokes’postulates Then it is possible to show that the following representation holds true((Feistauer, 1993)):

Theorem 1.2 The stress tensor has the form

T = (−p + λdiv v) I + 2µD(v), (1.1.7)

where λ, µ are constants or scalar functions of thermodynamical quantities.

If the stress tensor depends linearly on the velocity deformation tensor as in(1.1.7), the fluid is called Newtonian, which is the case of gases.

We get the so-called Navier–Stokes equations

∂(ρv)

∂t+ div(ρv ⊗ v) (1.1.8)

= ρf − grad p + grad(λdiv v) + div(2µD(v)).

1.1.6 Properties of the viscosity coefficients

Here µ and λ are called the first and the second viscosity coefficients, respectively,µ is also called dynamical viscosity. In the kinetic theory of gases the conditions

µ ≥ 0, 3λ + 2µ ≥ 0, (1.1.9)

are derived. For monoatomic gases, 3λ + 2µ = 0. This condition is usually usedeven in the case of more complicated gases.

Page 10: Finite Volume and Finite Element Methods in CFD (Numerical

4 BASIC EQUATIONS

1.1.7 The energy equation

The total energy is defined as

E = ρ(e + |v|2/2), (1.1.10)

where e is the internal (specific) energy.Energy equation has the form

∂E

∂t+ div(Ev) (1.1.11)

= ρf · v + div(T v) + ρq − div q.

For a Newtonian fluid we have

∂E

∂t+ div(Ev) = ρf · v − div(pv) + div(λv div v) (1.1.12)

+ div(2µD(v)v) + ρq − div q.

Here q is the density of heat sources and q is the heat flux, which depends onthe temperature by Fourier’s law:

q = −k∇θ. (1.1.13)

Here k ≥ 0 denotes the heat conduction coefficient.

1.1.8 Thermodynamical relations

In order to complete the conservation law system, additional equations derivedin thermodynamics have to be included.

The absolute temperature θ, the density ρ and the pressure p are called thestate variables. All these quantities are positive functions. The gas is character-ized by the equation of state

p = p(ρ, θ) (1.1.14)

and the relatione = e(ρ, θ). (1.1.15)

Here we shall consider the so-called perfect gas (also called ideal gas) whosestate variables satisfy the equation of state in the form

p = R θ ρ. (1.1.16)

R > 0 is the gas constant, which can be expressed in the form

R = cp − cv, (1.1.17)

where cp and cv denote the specific heat at constant pressure and the specificheat at constant volume, respectively. From experiments we know that cp > cv,so that R > 0. We shall consider cp and cv to be constant, which is assumed for

Page 11: Finite Volume and Finite Element Methods in CFD (Numerical

GOVERNING EQUATIONS AND RELATIONS 5

perfect gases. Experiments show that this is true for a relatively large range oftemperature. The quantity

γ =cp

cv> 1 (1.1.18)

is called the Poisson adiabatic constant. For example, for air, γ = 1.4.The internal energy of a perfect gas is given by

e = cvθ. (1.1.19)

1.1.9 Entropy

One of the important thermodynamical quantities is the entropy S, defined bythe relation

θ dS = de + p dV, (1.1.20)

where V = 1/ρ is the so-called specific volume. This identity is derived in ther-modynamics under the assumption that the internal energy is a function of Sand V : e = e(S, V ), which explains the meaning of the differentials in (1.1.20).

Theorem 1.3 For a perfect gas we have

S = cv lnp/p0

(ρ/ρ0)γ+ const (1.1.21)

= cv lnθ/θ0

(ρ/ρ0)γ−1+ const,

where p0 and ρ0 are fixed (reference) values of pressure and density, respectively,and θ0 = p0/(Rρ0).

1.1.10 The second law of thermodynamics

In irreversible processes,

dS ≥δQ

θ, (1.1.22)

where δQ is the heat transmitted to the system. The mathematical formulationreads:

∂(ρS)

∂t+ div(ρSv) ≥

ρq

θ− div

(q

θ

)

. (1.1.23)

(Of course, it needs mathematical interpretation – we consider it in the sense ofdistributions.)

1.1.11 Adiabatic flow

If there is no heat transmission and heat exchange between fluid volumes, wespeak of adiabatic flow. Hence, in adiabatic flow the heat sources and heat fluxare zero, so that q = 0, q = 0 and k = 0.

It is known that heat conductivity and internal friction represent two facesof molecular transmission. Heat conductivity is related to the transmission of

Page 12: Finite Volume and Finite Element Methods in CFD (Numerical

6 BASIC EQUATIONS

molecular kinetic energy and internal friction is conditioned by the transmissionof molecular momentum. Therefore, it makes sense to speak of adiabatic flowparticularly in the case of inviscid gas.

Theorem 1.4 If the quantities describing the flow are continuously differen-tiable, then in adiabatic flow of an inviscid perfect gas we have

∂(ρS)

∂t+ div(ρSv) = 0 (1.1.24)

and

S = const along the trajectory of any fluid particle, (1.1.25)

p = κργ along the trajectory of any fluid particle, (1.1.26)

where κ is a constant dependent on the trajectory considered.

If condition (1.1.25) is satisfied, then we speak of isentropic flow. If S = constin the whole flow field, then the flow is called homoentropic.

1.1.12 Barotropic flow

We say that the flow is barotropic if the pressure can be expressed as a functionof the density:

p = p(ρ). (1.1.27)

This means that p(x, t) = p(ρ(x, t)) for all (x, t) ∈ M, or, more briefly, p = pρ.We assume that

p : (0, +∞) → (0, +∞) (1.1.28)

and there exists the continuous derivative

p′ > 0 on (0, +∞).

From (1.1.26) it follows that in adiabatic barotropic flow of an inviscid perfectgas we have the relation

p = κργ , (1.1.29)

the constant κ being common for the whole flow field. Thus, the flow is homoen-tropic.

1.1.13 Speed of sound; Mach number

A more general model than barotropic flow is obtained in thermodynamics underthe assumption that the pressure is a function of the density and entropy: p =

Page 13: Finite Volume and Finite Element Methods in CFD (Numerical

GOVERNING EQUATIONS AND RELATIONS 7

p(ρ, S), where p is a continuously differentiable function and ∂p/∂ρ > 0. Forexample, for a perfect gas, in view of Theorem 1.3, we have

p = f(ρ, S) = κργ exp(S/cv), κ = const > 0. (1.1.30)

Let us introduce the quantity

a =

∂f

∂ρ(1.1.31)

which has the dimension m s−1 of velocity and is called the speed of sound. Thisterminology is based on the fact that a represents the speed of propagation ofpressure waves of small intensity.

A further important characteristic of gas flow is the Mach number

M =|v|

a(1.1.32)

(which is obviously a dimensionless quantity). We say that the flow is subsonicor sonic or supersonic at a point x and time t, if

M(x, t) < 1 or M(x, t) = 1 or M(x, t) > 1, (1.1.33)

respectively.

Page 14: Finite Volume and Finite Element Methods in CFD (Numerical

2

FINITE VOLUME METHOD

2.1 Basic properties of the Euler equations

Let us consider adiabatic flow of an inviscid perfect gas in a bounded domainΩ ⊂ IRN and time interval (0, T ) with T > 0. Here N = 2 or 3 for 2D or 3Dflow, respectively. We neglect outer volume force and heat sources. Our goal isto solve numerically the Euler equations

∂w

∂t+

N∑

s=1

∂fs(w)

∂xs= 0 in QT = Ω × (0, T ) (2.1.1)

(QT is called a space-time cylinder), equipped with the initial condition

w(x, 0) = w0(x), x ∈ Ω, (2.1.2)

with a given vector function w0 and boundary conditions

B(w(x, t)) = 0 for (x, t) ∈ ∂Ω × (0, T ). (2.1.3)

Here B is a suitable boundary operator. The specification of the boundary con-ditions and their approximation will be given later (see Section 2.2.5). The statevector w = (ρ, ρv1, . . . , ρvN , E)T ∈ IRm, m = N + 2 (i.e. m = 4 or 5 for 2D or3D flow, respectively), the fluxes f s, s = 1, . . . , N , are m-dimensional mappingsdefined by

fs(w) = (fs1(w), . . . , fsm(w))T

(2.1.4)

= (ρvs, ρv1vs + δ1sp, . . . , ρvNvs + δNsp, (E + p)vs)T

=

(

ws+1, w2ws+1/w1 + δ1s(γ − 1)(

wm −m−1∑

i=2

w2i /(2w1)

)

, . . . ,

wm−1ws+1/w1 + δm−2,s(γ − 1)(

wm −m−1∑

i=2

w2i /(2w1)

)

,

ws+1

(

γwm − (γ − 1)

m−1∑

i=2

w2i /(2w1)

)

/w1

)T

is the flux of the quantity w in the direction xs. Often, fs, s = 1, . . . , N, are calledinviscid Euler fluxes. The domain of definition of the vector-valued functions f s is

8

Page 15: Finite Volume and Finite Element Methods in CFD (Numerical

BASIC PROPERTIES OF THE EULER EQUATIONS 9

the open set D ⊂ IRm of vectors w = (w1, . . . , wm)T such that the correspondingdensity and pressure are positive:

D =

w ∈ IRm; w1 = ρ > 0, ws = ρvs−1 ∈ IR for s = 2, . . . , m − 1, (2.1.5)

wm −m−1∑

i=2

w2i /(2w1) = p/(γ − 1) > 0

.

Let us recall that for each w ∈ D and n = (n1, . . . , nN)T ∈ IRN with |n| = 1the mapping

P(w, n) =

N∑

s=1

nsf s(w) (2.1.6)

has the Jacobi matrix

P(w, n) = DP(w, n)/Dw =

N∑

s=1

nsAs(w), (2.1.7)

with eigenvalues λi = λi(w, n):

λ1 = v · n − a, λ2 = · · · = λm−1 = v · n, λm = v · n + a, (2.1.8)

where v = (v1, . . . , vN )T is the velocity and a =√

γp/ρ is the speed of sound.The matrix P(w, n) is diagonalizable with the aid of the matrices T =

T(w, n) and T−1 = T−1(w, n):

P(w, n) = T Λ\T−1, Λ\ = diag(λ1, . . . , λm). (2.1.9)

The mapping P(w, n) is called the flux of the quantity w in the direction n.The above results imply that the Euler equations form a diagonally hyperbolicsystem.

In the sequel, for simplicity we shall consider two-dimensional flow (i.e. N =2, m = 4).

A further interesting property is the rotational invariance of the Euler equa-tions, represented by the relations

P(w, n) =

2∑

s=1

fs(w)ns = Q−1(n)f1(Q(n)w), (2.1.10)

P(w, n) =

2∑

s=1

As(w)ns = Q−1(n)A1(Q(n)w)Q(n),

n = (n1, n2) ∈ IR2, |n| = 1, w ∈ D,

where

Page 16: Finite Volume and Finite Element Methods in CFD (Numerical

10 FINITE VOLUME METHOD

Q(n) =

1 0 0 00 n1 n2 00 −n2 n1 00 0 0 1

. (2.1.11)

This allows us to transform the Euler equations to the rotated coordinate systemx1, x2 by

(

x1

x2

)

= Q0(n)

(

x1

x2

)

+ σ, (2.1.12)

where σ ∈ IR2 and

Q0(n) =

(

n1 n2

−n2 n1

)

, (2.1.13)

then the transformation of the state vector w yields the state vector

q = Q(n)w. (2.1.14)

We consider the transformed state vector q as a function of x = (x1, x2) andtime t:

q = q(x, t) = Q(n)w(Q−10 (n)(x − σ), t). (2.1.15)

Then the function q = q(x, t) satisfies the transformed system of the Eulerequations

∂q

∂t+

2∑

s=1

∂fs(q)

∂xs= 0. (2.1.16)

Finally, let us note that fluxes f s and P homogeneous mappings of order one:e.g.,

f s(αw) = αf s(w), α > 0. (2.1.17)

This implies that

fs(w) = As(w)w. (2.1.18)

Similar properties hold also for N = 3.

2.2 The finite volume method for the multidimensional Eulerequations

Now let us deal with the finite volume (FV) discretization of system (2.1.1). Thefinite volume method is very popular in computational fluid dynamics, becauseit is robust, flexible, allows the solution of flow problems in domains with acomplicated geometry and its algorithmization is simple. For a survey of varioustechniques and results from the FV method, we refer the reader to the excellentmonograph (Eymard et al., 2000). First we describe the construction of a finitevolume mesh.

Page 17: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 11

Di Dj

Γ1ij

Γ3ij

n3ij

Γ4ij

Γ2ij

*

Fig. 2.1. Neighbouring finite volumes in 2D, Γij =⋃4

α=1 Γαij

2.2.1 Finite volume mesh

Let Ω ⊂ IRN be a domain occupied by the fluid. If N = 2, then by Ωh we denotea polygonal approximation of Ω. This means that the boundary ∂Ωh of Ωh

consists of a finite number of closed simple piecewise linear curves. For N = 3,Ωh will denote a polyhedral approximation of Ω. The system Dh = Dii∈J ,where J ⊂ Z+ = 0, 1, . . . is an index set and h > 0, will be called a finitevolume mesh in Ωh, if Di, i ∈ J , are closed polygons or polyhedrons, if N = 2 or3, respectively, with mutually disjoint interiors such that

Ωh =⋃

i∈J

Di. (2.2.19)

The elements Di ∈ Dh are called finite volumes. Two finite volumes Di, Dj ∈ Dh

are either disjoint or their intersection is formed by a common part of theirboundaries ∂Di and ∂Dj. If ∂Di ∩ ∂Dj contains at least one straight segment,then we call Di and Dj neighbouring finite volumes (or simply neighbours). Fortwo neighbours Di, Dj ∈ Dh we set

Γij = ∂Di ∩ ∂Dj = Γji. (2.2.20)

Obviously, Γij is formed by a finite number βij of straight segments Γαij = Γα

ji:

Γij =

βij⋃

α=1

Γαij . (2.2.21)

See Fig. 2.1. We shall call Γαij faces of Di.

Further, we introduce the following notation:

|Di| = N -dimensional measure of Di (2.2.22)

Page 18: Finite Volume and Finite Element Methods in CFD (Numerical

12 FINITE VOLUME METHOD

= area of Di if N = 2, or volume of Di if N = 3,

|Γαij | = (N − 1)-dimensional measure of Γα

ij

= the length of Γαij if N = 2, or area of Γα

ij if N = 3,

nαij = ((nα

ij)1, . . . , (nαij)N )T = unit outer normal to ∂Di on Γα

ij ,

hi = diam(Di),

h = supi∈J hi,

|∂Di| = (N − 1)-dimensional measure of ∂Di,

s(i) = j ∈ J ; j 6= i, Dj is a neighbour of Di.

Clearly, nαij = −nα

ji.The straight segments that form the intersections of ∂Ωh with finite volumes

Di adjacent to ∂Ωh will be denoted by Sj and numbered by negative indexesj forming an index set JB ⊂ Z− = −1,−2, . . .. Hence, J ∩ JB = ∅ and∂Ωh =

j∈JBSj . For a finite volume Di adjacent to the boundary ∂Ωh, i.e. if

Sj ⊂ ∂Ωh ∩ ∂Di for some j ∈ JB, we set

γ(i) = j ∈ JB ; Sj ⊂ ∂Di ∩ ∂Ωh, (2.2.23)

Γij = Γ1ij = Sj , βij = 1 for j ∈ γ(i).

If Di is not adjacent to ∂Ωh, then we put γ(i) = ∅. By nαij we again denote the

unit outer normal to ∂Di on Γαij . Then, putting

S(i) = s(i) ∪ γ(i), (2.2.24)

we have

∂Di =⋃

j∈S(i)

βij⋃

α=1

Γαij , (2.2.25)

∂Di ∩ ∂Ωh =⋃

j∈γ(i)

βij⋃

α=1

Γαij ,

|∂Di| =∑

j∈S(i)

βij∑

α=1

|Γαij |.

2.2.1.1 Finite volumes in 2D In practical computations one uses several typesof finite volume meshes:

a) Triangular mesh In this case Dh is a triangulation of the domain Ωh withthe usual properties from the finite element method (Ciarlet, 1979): Di ∈ Dh areclosed triangles satisfying conditions (2.2.19) and

if Di, Dj ∈ Dh, Di 6= Dj, then either Di ∩ Dj = ∅ (2.2.26)

or Di ∩ Dj is a common vertex of Di and Dj

Page 19: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 13

or Di ∩ Dj is a common side of Di and Dj.

The triangulation satisfying (2.2.26) is called conforming. Then, under the abovenotation, Γij consists of only one straight segment and, thus, we have βij = 1and simply write ∂Di =

j∈S(i) Γij .

b) Quadrilateral mesh Now Dh consists of closed convex quadrilaterals Di.

c) Dual finite volume mesh over a triangular grid

d) Barycentric finite volumes over a triangular grid

2.2.2 Derivation of a general finite volume scheme

In order to derive a finite volume scheme, we can proceed in the following way.Let us assume that w : Ω×[0, T ] → IRm is a classical (i.e. C1-) solution of system(2.1.1), Dh = Dii∈J is a finite volume mesh in a polyhedral approximation Ωh

of Ω. Let us construct a partition 0 = t0 < t1 < . . . of the time interval [0, T ]and denote by τk = tk+1 − tk the time step between tk and tk+1. Integratingequation (2.1.1) over the set Di × (tk, tk+1) and using Green’s theorem on Di,we get the identity

Di

w(x, t) dx

tk+1

t=tk

+

∫ tk+1

tk

(

∂Di

N∑

s=1

fs(w)ns dS

)

dt = 0.

Moreover, taking into account (2.2.25), we can write∫

Di

(w(x, tk+1) − w(x, tk)) dx (2.2.27)

+

∫ tk+1

tk

j∈S(i)

βij∑

α=1

Γαij

N∑

s=1

f s(w)ns dS

dt = 0.

Now we shall approximate the integral averages∫

Diw(x, tk)dx/|Di| of the quan-

tity w over the finite volume Di at time instant tk by wki :

wki ≈

1

|Di|

Di

w(x, tk) dx, (2.2.28)

called the value of the approximate solution on Di at time tk. Further, we ap-proximate the flux

∑Ns=1 fs(w)(nα

ij)s of the quantity w through the face Γαij in

the direction nαij with the aid of a numerical flux H(wℓ

i , wℓj , n

αij), depending on

the value of the approximate solution wℓi on the finite volume Di, the value wℓ

j

on Dj, and on the normal nαij at suitable time instants tℓ:

N∑

s=1

fs(w)(nαij)s ≈ H(wℓ

i , wℓj , n

αij). (2.2.29)

We choose, for example, ℓ = k or ℓ = k + 1. If Γαij ⊂ ∂Ωh (i.e. the finite volume

Di is adjacent to ∂Ωh, j ∈ γ(i), α = 1 and Γ1ij = Γij), then there is no neighbour

Page 20: Finite Volume and Finite Element Methods in CFD (Numerical

14 FINITE VOLUME METHOD

a) Triangular mesh

b) Quadrilateral mesh

c) Dual mesh over a triangular grid

d) Barycentric mesh over a triangular grid

Fig. 2.2. Finite volume meshes in 2D

Dj of Di adjacent to the face Γij from the exterior of Ωh and it is necessary tospecify wℓ

j on the basis of boundary conditions – see Section 2.2.5. In such a waywe arrive at the approximation

Page 21: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 15

∫ tk+1

tk

(

Γαij

N∑

s=1

fs(w)(nαij)s dS

)

dt (2.2.30)

≈ τkH(wki , wk

j , nαij)|Γ

αij |.

Using (2.2.27), (2.2.28) and (2.2.30), we obtain the following finite volume explicitscheme: with ϑ = 0:

wk+1i = wk

i −τk

|Di|

j∈S(i)

βij∑

α=1

H(wki , wk

j , nαij)|Γ

αij |, (2.2.31)

Di ∈ Dh, tk ∈ [0, T ).

The FV method is equipped with initial conditions w0i , i ∈ J , defined by

w0i =

1

|Di|

Di

w0(x) dx, (2.2.32)

under the assumption that the function w0 from (2.1.2) is locally integrable:w0 ∈ L1

loc(Ω)m.

2.2.3 Properties of the numerical flux

In what follows, we shall assume that the numerical flux H has the followingproperties:

1. H(u, v, n) is defined and continuous on D×D×S1, where D is the domainof definition of the fluxes fs and S1 is the unit sphere in IRN : S1 = n ∈IRN ; |n| = 1.

2. H is consistent:

H(u, u, n) = P(u, n) =

N∑

s=1

fs(u)ns, u ∈ D, n ∈ S1. (2.2.33)

3. H is conservative:

H(u, v, n) = −H(v, u,−n), u, v ∈ D, n ∈ S1. (2.2.34)

If H satisfies conditions (2.2.33) and (2.2.34), the method is called consistent andconservative, respectively. (Note that the conservativity of the scheme means thatthe flux from the finite volume Di into Dj through Γα

ij has the same magnitude,but opposite sign, as the flux from Dj into Di.)

2.2.4 Construction of some numerical fluxes

One possible way to construct a numerical flux H is to use an analogy withthe 1D case, replacing the 1D flux f (w) by the N -dimensional flux P(w, n) inthe direction n ∈ S1 defined in (2.1.6). In this way we obtain the generalization

Page 22: Finite Volume and Finite Element Methods in CFD (Numerical

16 FINITE VOLUME METHOD

of the Lax–Friedrichs scheme and flux vector splitting schemes of the Godunovtype

a) The Lax–Friedrichs numerical flux is defined by

HLF(u, v, n) =1

2

(

P(u, n) + P(v, n) −1

λ(v − u)

)

, u, v ∈ D, n ∈ S1.

(2.2.35)Here λ > 0 is independent of u, v, but depends, in general, on Γα

ij in the scheme.To obtain flux vector splitting schemes, we use relations (2.1.6)–(2.1.9). On

the basis of (2.1.9) we define the matrices

Λ\± = diag(λ±

1 , . . . , λ±m), |Λ\| = diag(|λ1|, . . . , |λm|), (2.2.36)

P± = TΛ\±T−1, |P| = T|Λ\|T−1, (2.2.37)

depending on w ∈ D and n ∈ S1. Now we define the following schemes:

b) The Steger–Warming scheme has the numerical flux

HSW(u, v, n) = P+(u, n)u + P

−(v, n)v, u, v ∈ D, n ∈ S1. (2.2.38)

c) The Vijayasundaram scheme:

HV(u, v, n) = P+

(

u + v

2, n

)

u + P−

(

u + v

2, n

)

v. (2.2.39)

d) The Van Leer scheme:

HVL(u, v, n) =1

2

P(u, n) + P(v, n) −

P

(

u + v

2, n

)∣

(v − u)

. (2.2.40)

Other possibilities: Roe numerical flux, Osher-Solomon numerical flux, directRiemann solver.

2.2.5 Boundary conditions

Let Di ∈ Dh be a finite volume adjacent to the boundary ∂Ωh, i.e. ∂Di is formedby faces Γ = Γ1

ij ⊂ ∂Ωh (j ∈ γ(i)) and let n = n1ij be a unit outer normal to

∂Di on Γ. (See Section 2.2.1.) In order to be able to compute the numerical fluxH(wk

i , wkj , n), it is necessary to specify the value wk

j .

We introduce a new Cartesian coordinate system x1, . . . , xN in IRN (N =2 or 3) with origin at the centre of gravity of the face Γ, the coordinate x1

oriented in the direction of the normal n and x2, . . . , xN tangent to Γ. TheEuler equations transformed into this coordinate system have the form (2.1.16).Now we shall consider only the influence of the states wk

i , wkj , which can be

treated by neglecting the tangential derivatives ∂/∂xs, s > 1. We get the system

Page 23: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 17

with one space variable x1. Further, we linearize this system around the stateqk

i = Q(n)wki . As a result we obtain the linear system

∂q

∂t+ A1(q

ki )

∂q

∂x1= 0, (2.2.41)

which will be considered in the set (−∞, 0)×(0,∞) and equipped with the initialcondition

q(x1, 0) = qki , x1 ∈ (−∞, 0), (2.2.42)

and the boundary condition

q(0, t) = qkj , t > 0. (2.2.43)

Our goal is to choose the boundary state qkj in such a way that the initial-

boundary value problem (2.2.41)–(2.2.43) is well-posed, i.e. it has a unique solu-tion. Then we set wk

j := Q(n)−1qkj . The solution of (2.2.41) can be written in

the form

q(x1, t) =

m∑

s=1

µs(x1, t)rs, (2.2.44)

where rs = rs(qki ) are the eigenvectors of the matrix A1(q

ki ) corresponding to

its eigenvalues λs = λs(qki ) and creating a basis in IRm (m = 4 for N = 2).

Moreover,

qki =

m∑

s=1

αsrs, qkj =

m∑

s=1

βsrs. (2.2.45)

Substituting (2.2.44) into (2.2.41) and using the relation A1(qki )rs = λsrs, we

find that problem (2.2.41)–(2.2.43) is equivalent to m mutually independentlinear initial-boundary value scalar problems

∂µs

∂t+ λs

∂µs

∂x1= 0 in (−∞, 0) × (0,∞), (2.2.46)

µs(x1, 0) = αs, x1 ∈ (−∞, 0),

µs(0, t) = βs, t ∈ (0,∞),

s = 1, . . . , m,

which can be solved by the method of characteristics. The solution is

µs(x1, t) =

αs, x1 − λst < 0,

βs, x1 − λst > 0.

(2.2.47)

The possible situations are shown in Fig. 2.3. From this it is clear that

Page 24: Finite Volume and Finite Element Methods in CFD (Numerical

18 FINITE VOLUME METHOD

-

6

@@

@@

@@

@@t

x10

x1 − λst = 0

µs = αs

µs = βs

a) λs < 0

-

6

µs = αs

t

x10

b) λs ≥ 0

Fig. 2.3. Solution of problem (2.2.46)

if λs > 0, then βs = αs (βs is not prescribed, but it is ob-tained by the extrapolation of µs to the boundary x1 = 0);

if λs = 0, then βs is not prescribed (but can again be de-fined as βs = αs by the continuous extension of µs to theboundary x1 = 0);

if λs < 0, then βs must be prescribed.

(2.2.48)

We have

λs(qki ) = λs(w

ki , n), s = 1, . . . , m, (2.2.49)

where λs(wki , n) are the eigenvalues of the Jacobi matrix P(wk

i , n) (see (2.1.7)–(2.1.8)). Hence, on the basis of the above considerations, we come to the followingconclusion. On Γ = Γα

ij ⊂ ∂Ωh (i.e. i ∈ J, j ∈ γ(i), α = 1) with normal n = nαij ,

pointing from Di into Dj , we have to prescribe npr quantities characterizing thestate vector w, where npr is the number of negative eigenvalues of the matrixP(wk

i , n), whereas we extrapolate nex quantities to the boundary, where nex

is the number of nonnegative eigenvalues of P(wki , n). The extrapolation of a

quantity q to the boundary means in this case to set qkj := qk

i . On the other

hand, if we prescribe the boundary value of q, we set qkj := qk

Bj with a given

value qkBj , determined by the user on the basis of the physical character of the

flow.It is suitable to use a special treatment if Γ is a part of a solid impermeable

wall, where v · n = 0. Then the flux P(w, n) has the form

P(w, n) =

N∑

s=1

f s(w)ns (2.2.50)

= (v · n)w + p(0, n1, . . . , nN , v · n)T

Page 25: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 19

Table 2.1 Boundary conditions for 2D flow

Type of Character The sign of Quantities Quantitiesboundary of the flow eigenvalues extrapolated prescribed

npr and nex

λ1 < 0supersonic flow λ2 = λ3 < 0(−v · n > a) λ4 < 0 — ρ, v1, v2, p

INLET npr = 4, nex = 0(v · n < 0) λ1 < 0

subsonic flow λ2 = λ3 < 0(−v · n ≤ a) λ4 ≥ 0 p ρ, v1, v2

npr = 3, nex = 1

λ1 ≥ 0supersonic flow λ2 = λ3 > 0(v · n ≥ a) λ4 > 0 ρ, v1, v2, p —

OUTLET npr = 0, nex = 4(v · n > 0) λ1 < 0

subsonic flow λ2 = λ3 > 0(v · n < a) λ4 > 0 ρ, v1, v2 p

npr = 1, nex = 3

SOLID λ1 < 0IMPER- λ2 = λ3 = 0 pMEABLE v · n = 0 λ4 > 0 (ρ, vt) v · n = 0BOUNDARY npr = 1, nex = 3

= p(0, n1, . . . , nN , 0)T,

which is uniquely determined on Γ by the extrapolated value of the pressure,i.e. by pk

j := pki . Therefore, on the part Γ of the impermeable solid boundary we

define the numerical flux

H(wki , wk

j , n) = pki (0, n1, . . . , nN , 0)T. (2.2.51)

We can see that in view of (2.1.8), on an impermeable boundary, N eigenvaluesλ2, . . . , λm−1 of the matrix P(wk

i , n) are zero, the eigenvalue λ1 is negative andthe eigenvalue λm is positive. We prescribe one scalar quantity, namely v ·n = 0,and extrapolate the pressure p (and possibly the density and tangential compo-nents to Γ of the velocity, i.e. we extrapolate nex = m − 1 quantities).

There are several ways to choose what quantities should be prescribed orextrapolated. We present here one possibility, which is often used in practicalcomputations. It is suitable to distinguish several cases given in Table 2.1 (for2D flow, N = 2, m = 4).

In some technically relevant problems it is necessary to apply also boundaryconditions of other types, such as periodic boundary conditions.

Page 26: Finite Volume and Finite Element Methods in CFD (Numerical

20 FINITE VOLUME METHOD

2.2.6 Stability of the finite volume schemes

Let wk = wki i∈J be an approximate solution on the k-th time level obtained

with the aid of the finite volume method. By ‖wk‖ we denote a norm of theapproximation wk. We call the scheme stable, if there exists a constant c > 0independent of τ, h, k such that

‖wk‖ ≤ c‖w0‖, k = 0, 1, . . . . (2.2.52)

Usually an analogy to the Lp-norm (p ∈ [1,∞]) is used:

‖wk‖∞ = supi∈J

|wki |, (2.2.53)

‖wk‖p =

i∈J

|Di||wki |

p

1/p

, p ∈ [1,∞).

In what follows we shall be concerned with the stability of the explicit FVmethod (2.2.31). For simplicity we confine our considerations to the 2D case.

2.2.7 Simplified scalar problem

The analysis of the stability of finite volume schemes is rather difficult. Unfor-tunately, the von Neumann method cannot be used on irregular unstructuredmeshes. Some knowledge about the qualitative properties of some numericalmethod can be obtained, if it is applied to the scalar Cauchy problem

∂w

∂t+

N∑

s=1

∂fs(w)

∂xs= 0 in IRN × (0,∞), (2.2.54)

w(x, 0) = w0(x), x ∈ IRN .

In this case w : IRN × (0,∞) → IR, fs ∈ C1(IR). The explicit FV scheme nowhas the form

wk+1i = wk

i −τ

|Di|

j∈S(i)

βij∑

α=1

H(wki , wk

j , nij)|Γαij |, i ∈ J, (2.2.55)

w0i =

1

|Di|

Di

w0(x) dx, i ∈ J

(provided w0 ∈ L1loc(IR

N )). We assume that the numerical flux H = H(u, v, n) :IR2 × S1 → IR has the properties from Section 2.2.3. Moreover, we shall usea stronger continuity assumption: let H be locally Lipschitz-continuous. Thismeans that if M > 0, then there exists a constant c(M) > 0 such that

|H(u, v, n) − H(u∗, v∗, n)| ≤ c(M)(|u − u∗| + |v − v∗|), (2.2.56)

u, u∗, v, v∗ ∈ [−M, M ], n ∈ S1.

The concept of monotonicity plays an important role in the study of stabilityand convergence of scheme (2.2.55).

Page 27: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 21

Definition 2.1 Let M > 0. We say that the numerical flux H is monotonein the set [−M, M ], if the function ‘u, v ∈ [−M, M ], n ∈ S1 → H(u, v, n) ∈IR’ is nonincreasing with respect to the second variable v. Thus, H(u, v, n) ≤H(u, v, n), provided u, v, v ∈ [−M, M ], v ≥ v, n ∈ S1.

It is easy to see that the monotone conservative numerical flux H = H(u, v, n)is nondecreasing with respect to the first variable u. Let us recall the notationwk = wk

i i∈J for the numerical solution at time tk. We shall show that themonotonicity of the numerical flux implies the stability. Let us use the notationwk = wk

i i∈J for the numerical solution at time tk.

Theorem 2.2 Let M > 0 and

w0 ∈ MM = w = wjj∈J ; ‖w‖∞ := supj∈J

|wj | ≤ M. (2.2.57)

Let the following conditions be satisfied:

a) (2.2.56) holds,

b) H is consistent (i.e. (2.2.33) holds),

c) H is monotone in [−M, M ],

d) the stability condition

τc(M)|∂Di|/|Di| ≤ 1, i ∈ J (2.2.58)

is satisfied.

Then scheme (2.2.55) is L∞-stable:

‖wk‖∞ ≤ ‖w0‖∞ ∀k ∈ Z+. (2.2.59)

Proof By induction with respect to k we prove that

a) ‖wk‖∞ ≤ M, b) ‖wk+1‖∞ ≤ ‖wk‖∞, k ∈ Z+. (2.2.60)

This already implies (2.2.59). Inequality (2.2.60), a) holds for k = 0. Let usassume it is true for some k ≥ 0. Then we shall establish (2.2.60), b) and, thus,(2.2.60), a) for k + 1. Using the consistency (2.2.33) and Green’s theorem, wefind that for each i ∈ J ,

j∈S(i)

βij∑

α=1

H(wki , wk

i , nαij)|Γ

αij | =

j∈S(i)

βij∑

α=1

(

N∑

s=1

fs(wki )(nα

ij)s

)

|Γαij | (2.2.61)

=

N∑

s=1

fs(wki )

j∈S(i)

βij∑

α=1

(nαij)s|Γ

αij |

=

N∑

s=1

fs(wki )

∂Di

ns dS

Page 28: Finite Volume and Finite Element Methods in CFD (Numerical

22 FINITE VOLUME METHOD

=

N∑

s=1

fs(wki )

Di

∂1

∂xsdx = 0.

By virtue of (2.2.61), formula (2.2.55) can be rewritten in the form

wk+1i = wk

i −τ

|Di|

j∈S(i)

βij∑

α=1

(

H(wki , wk

j , nαij) − H(wk

i , wki , nα

ij))

|Γαij |

= wki −

τ

|Di|

j∈S(i)

βij∑

α=1

Hαij |Γ

αij |(w

ki − wk

j ),

where

Hαij =

H(wki ,wk

j ,nαij)−H(wk

i ,wki ,nα

ij)

wki−wk

j

, if wkj 6= wk

i ,

0, if wkj = wk

i .

(2.2.62)

Hence,

wk+1i =

1 −τ

|Di|

j∈S(i)

βij∑

α=1

Hαij |Γ

αij |

wki +

τ

|Di|

j∈S(i)

βij∑

α=1

Hαij |Γ

αij |w

kj . (2.2.63)

From the monotonicity of H it follows that Hαij ≥ 0. Moreover, by (2.2.62) and

the Lipschitz-continuity of H in [−M, M ], we have Hαij ≤ c(M). From this and

the stability condition (2.2.58) we get

1 −τ

|Di|

j∈S(i)

βij∑

α=1

Hαij |Γ

αij | ≥ 1 −

τc(M)

|Di|

j∈S(i)

βij∑

α=1

|Γαij | (2.2.64)

= 1 − τc(M)|∂Di|/|Di| ≥ 0.

These results now immediately imply that

|wk+1i | ≤

1 −τ

|Di|

j∈S(i)

βij∑

α=1

Hαij |Γ

αij |

|wki |

|Di|

j∈S(i)

βij∑

α=1

Hαij |Γ

αij ||w

kj | ≤ ‖wk‖∞, i ∈ J,

which we wanted to prove.

Now we come to the question of how to extend the above results to theupwind flux vector splitting schemes of the Godunov type for the solution of theEuler equations. The Vijayasundaram and Steger–Warming schemes applied to

Page 29: Finite Volume and Finite Element Methods in CFD (Numerical

THE FINITE VOLUME METHOD FOR THE EULER EQUATIONS 23

the scalar equation (2.2.54) are consistent only in the case that this equation islinear:

∂w

∂t+

N∑

s=1

as∂w

∂xs= 0, (2.2.65)

where as ∈ IR. Let us denote a = (a1, . . . , aN)T. It is easy to see that theVijayasundaram, Steger–Warming and Van Leer schemes applied to equation(2.2.65) become identical. The flux of the quantity w has the form

P(w, n) = w

N∑

s=1

asns = w(a · n), n = (n1, . . . , nN )T ∈ S1, w ∈ IR,

and the corresponding numerical flux becomes

H(u, v, n) = (a · n)+u + (a · n)−v, u, v ∈ IR, n ∈ S1. (2.2.66)

We immediately see that this flux is monotone and Lipschitz-continuous witha constant c(M) = |a| for each M > 0. Then by virtue of Theorem 2.2, theVijayasundaram, Steger–Warming and Van Leer schemes applied to equation(2.2.65) are stable under the stability condition

τ |a||∂Di|/|Di| ≤ 1, i ∈ J. (2.2.67)

2.2.8 Extension of the stability conditions to the Euler equations

In the above example, the vector a represents the characteristic speed of propaga-tion of disturbances in the quantity w. For the Euler equations, we can consider 4characteristic directions (in the 2D case) given by the eigenvectors of the matrixP(w, n) and the characteristic speeds are given by the corresponding eigenval-ues λs(w, n), s = 1, . . . , 4. We generalize the stability condition (2.2.67) to theEuler equations in such a way that the speed |a| is replaced by the magnitudesof the eigenvalues λs(w, n), s = 1, . . . , 4. In this heuristic way we arrive at theCFL-stability condition of the form

τkλi,max|∂Di|/|Di| ≤ CFL, i ∈ J, (2.2.68)

whereλk

i,max = maxr=1,...,m,j∈S(i)

α=1,...,βij

∣λr(wki , nα

ij)∣

∣ . (2.2.69)

Usually we choose CFL < 1, e.g. CFL=0.85.

Page 30: Finite Volume and Finite Element Methods in CFD (Numerical

3

FINITE ELEMENT METHODS

3.1 Combined finite volume–finite element method for viscouscompressible flow

The finite volume method (FVM) represents an efficient and robust method forthe solution of inviscid compressible flow. On the other hand, it is well-knownthat the finite element method (FEM) is suitable for the approximation of ellipticor parabolic problems. The use of advantages of both FE and FV techniques leadsus to the combined FV - FE method. It is applied in such a way that the FVM isused for the discretization of inviscid Euler fluxes, whereas the FEM is appliedto the approximation of viscous terms. This idea was proposed in (Feistaueret al., 1995) and then further developed in (Feistauer et al., 1997), (Feistaueret al., 1999a), (Feistauer et al., 1999b), (Angot et al., 1998) (Dolejsı et al., 2002).For numerical computations of viscous flow, see, e.g. (Feistauer et al., 1996),(Feistauer and Felcman, 1997), (Dolejsı et al., 2002).

For simplicity we assume that volume force and heat sources are equal tozero. Then the complete system describing viscous compressible flow in a domainΩ ⊂ IRN with Lipschitz-continuous boundary Γ = ∂Ω and in a time interval(0, T ) can be written in the form

∂w

∂t+

N∑

i=1

∂f i(w)

∂xi=

N∑

i=1

∂Ri(w,∇w)

∂xiin QT , (3.1.1)

where QT = Ω × (0, T ) and

w = (ρ, ρv1, . . . , ρvN , E)T ∈ IRm, (3.1.2)

m = N + 2, w = w(x, t), x ∈ Ω, t ∈ (0, T ),

f i(w) = (fi1, . . . , fim)T

= (ρvi, ρv1vi + δ1ip, . . . , ρvNvi + δNip, (E + p)vi)T

Ri(w,∇w) = (Ri1, . . . , Rim)T

= (0, τi1, . . . , τiN , τi1v1 + · · · + τiNvN + k∂θ/∂xi)T

,

τij = λdiv vδij + 2µdij(v), dij(v) =1

2

(

∂vi

∂xj+

∂vj

∂xi

)

.

(3.1.3)

To system (3.1.1) we add the thermodynamical relations valid for a perfect gas:

p = (γ − 1)(E − ρ|v|2/2), θ =

(

E

ρ−

1

2|v|2

)

/

cv. (3.1.4)

24

Page 31: Finite Volume and Finite Element Methods in CFD (Numerical

COMBINED FINITE VOLUME–FINITE ELEMENT METHOD 25

As usual, we use the following notation: v = (v1, . . . , vN )T – velocity vector,ρ – density, p – pressure, θ – absolute temperature, E – total energy, γ – Poissonadiabatic constant, cv – specific heat at constant volume, µ, λ – viscosity coeffi-cients, k – heat conduction coefficient. We assume µ, k > 0, 2µ+3λ ≥ 0. Usuallywe set λ = −2µ/3. By τij we denote here the of the viscous part of the stresstensor.

The system is equipped with initial conditions written in the form

w(x, 0) = w0(x), x ∈ Ω, (3.1.5)

where w0(x) is a given vector-valued function defined in Ω.

3.1.0.1 Boundary conditions The choice of appropriate boundary conditionsrepresents an important problem in CFD. Boundary conditions have to reflectphysical behaviour of the flow on the boundary of the domain occupied by thefluid on one hand, and should be in agreement with the character of partialdifferential equations on the other hand. There are several approaches to theformulation of the boundary conditions, depending on the problem and the ge-ometry of the domain Ω.

In what follows, let us assume that Ω is a bounded domain. (In the flow pastprofiles their exterior is replaced by a bounded, sufficiently large domain Ω withboundary formed by the profiles and an artificial exterior component.) We write∂Ω = ΓI ∪ ΓO ∪ ΓW , where ΓI represents the inlet through which the gas entersthe domain Ω, ΓO is the outlet through which the gas should leave Ω and ΓW

represents impermeable fixed walls.On ΓI one can prescribe the conditions

a) ρ∣

ΓI×(0,T )= ρD, b) v

ΓI×(0,T )= vD = (vD1, . . . , vDN )T, (3.1.6)

c) θ∣

ΓI×(0,T )= θD

with given functions ρD, vD, θD. The inlet ΓI is characterized, of course, by thecondition vD · n < 0 on ΓI , where n is the unit outer normal to ∂Ω.

On ΓW we use the no-slip boundary conditions. Moreover, we use here thecondition of adiabatic wall with zero heat flux. Hence,

a) v∣

ΓW ×(0,T )= 0, (3.1.7)

b)∂θ

∂n

ΓW ×(0,T )= 0.

The Dirichlet boundary conditions can be expressed in terms of the conservativevariables in the form

w1 = ρD, (w2, . . . , wm−1)T = ρDvD, wm = ED on ΓI × (0, T ), (3.1.8)

w2 = . . . = wm−1 = 0 on ΓW × (0, T ).

This is reflected in the definition of the space of test functions

V =

ϕ = (ϕ1, . . . , ϕm)T; ϕi ∈ H1(Ω), i = 1, . . . , m, (3.1.9)

Page 32: Finite Volume and Finite Element Methods in CFD (Numerical

26 FINITE ELEMENT METHODS

ϕ1, ϕ2, . . . , ϕm = 0 on ΓI , ϕ2, . . . , ϕm−1 = 0 on ΓW

.

Now, assuming that w is a classical solution of problem (CFP), we multiplyequation (3.1.1) by any ϕ ∈ V , integrate over Ω and apply Green’s theorem toviscous terms. We obtain the identity

Ω

∂w

∂t· ϕ dx +

Ω

N∑

i=1

∂f i(w)

∂xi· ϕ dx (3.1.10)

+

Ω

N∑

i=1

Ri(w,∇w) ·∂ϕ

∂xidx

∂Ω

N∑

i=1

niRi(w,∇w) · ϕ dS = 0.

From the representation of Ri in (3.1.2), boundary conditions and the definitionof the space V we find that

∂Ω

N∑

i=1

niRi(w,∇w) · ϕ dS = 0. (3.1.11)

Let us introduce the notation

(w, ϕ) =

Ω

w · ϕ dx, (3.1.12)

a(w, ϕ) =

Ω

N∑

i=1

Ri(w,∇w) ·∂ϕ

∂xidx,

b(w, ϕ) =

Ω

N∑

i=1

∂f i(w)

∂xi· ϕ dx.

Obviously, the forms given in (3.1.12). are linear with respect to ϕ and makesense for functions w with weaker regularity than that of the classical solution.We shall not specify it here. From the point of view of the FE solution, it issufficient to write the weak formulation of problem (CFP) as the conditions

a) w(t) − w∗(t) ∈ V , t ∈ (0, T ), (3.1.13)

b)

(

∂w(t)

∂t, ϕ

)

+ a(w(t), ϕ) + b(w(t), ϕ) = 0,

∀ϕ ∈ V , t ∈ (0, T ),

c) w(0) = w0.

(Let us recall that w(t) is such a function that w(t)(x) = w(x, t) for x ∈ Ω.)A function w for which the individual terms in (3.1.13), b) make sense, satisfy-ing conditions (3.1.13), a)-c) is called a weak solution of the compressible flowproblem (CFP).

Page 33: Finite Volume and Finite Element Methods in CFD (Numerical

COMBINED FINITE VOLUME–FINITE ELEMENT METHOD 27

Here w∗ : [0, T ] → H1(Ω)m is a function satisfying the Dirichlet boundaryconditions (3.1.6), i.e.

w∗1 = ρD, (w∗

2 , . . . , w∗m−1) = ρDvD, w∗

m = ED on ΓI × (0, T ), (3.1.14)

w∗2 = . . . = w∗

m−1 = 0 on ΓW × (0, T ).

3.1.1 Computational grids

By Ωh we denote a polygonal (N = 2) or polyhedral (N = 3) approximationof the domain Ω. In the combined FV–FE method we work with two meshesconstructed in the domain Ωh: a finite element mesh Th = Kii∈I and a finitevolume mesh Dh = Djj∈J . Here, I and J ⊂ Z+ are suitable index sets.

The FE mesh Th satisfies the standard properties from the FEM. It is formedby a finite number of closed triangles (N = 2) or tetrahedra (N = 3) K = Ki

covering the closure of Ωh,

Ωh =⋃

K∈Th

K. (3.1.15)

By σh we denote the set of all vertices of all elements K ∈ Th and assume thatσh ∩ ∂Ωh ⊂ ∂Ω. Moreover, let the common points of sets ΓI , ΓW and ΓO belongto the set σh. The symbol Qh will denote the set of all midpoints of sides ofall elements K ∈ T . By |K| we denote the N -dimensional measure of K ∈ Th

(i.e. |K| is the area of K, if N = 2, and |K| is the volume of K, if N = 3),hK = diam(K) and ρK is the radius of the largest ball inscribed in K. We seth = maxK∈Th

hK .We shall also work with an FV mesh Dh in Ωh, formed by a finite number of

closed polygons (N = 2) or polyhedra (N = 3) such that

Ωh =⋃

D∈Dh

D. (3.1.16)

Various types of FV meshes were introduced in Section 2.1.We use the same notation as in Section 2.2.1. The boundary ∂Di of each

finite volume Di ∈ Dh can be expressed as

∂Di =⋃

j∈S(i)

βij⋃

α=1

Γαij , (3.1.17)

where Γαij are straight segments (N = 2) or plane manifolds (N = 3), called faces

of Di, Γαij = Γα

ji, which either form the common boundary of neighbouring finitevolumes Di and Dj or are part of ∂Ωh. We denote by |Di| the N -dimensionalmeasure of Di, |Γα

ij |− the (N − 1)-dimensional measure of Γαij , nα

ij – the unitouter normal to ∂Di on Γα

ij . Clearly, nαij = −nα

ji. S(i) is a suitable index setwritten in the form

S(i) = s(i) ∪ γ(i), (3.1.18)

where s(i) contains indexes of neighbours Dj of Di and γ(i) is formed by indexesj of Γ1

ij ⊂ ∂Ωh (in this case we set βij = 1). For details see Section 2.2.1.

Page 34: Finite Volume and Finite Element Methods in CFD (Numerical

28 FINITE ELEMENT METHODS

3.1.2 FV and FE spaces

The FE approximate solution will be sought in a finite dimensional space

Xh = Xmh , (3.1.19)

called a finite element space. We shall consider two cases of the definition of Xh:

Xh =

ϕh ∈ C(Ωh); ϕh|K ∈ P 1(K) ∀K ∈ Th

(3.1.20)

(conforming piecewise linear elements) and

Xh =

ϕh ∈ L2(Ω); ϕh|K ∈ P 1(K), ϕh are continuous (3.1.21)

at midpoints Qj ∈ Q of all faces of all K ∈ Th

(nonconforming Crouzeix–Raviart piecewise linear elements – they were origi-nally proposed for the approximation of the velocity of incompressible flow, see(Crouzeix and Raviart, 1973), (Feistauer, 1993)).

The finite volume approximation is an element of the finite volume space

Zh = Zmh , (3.1.22)

whereZh =

ϕh ∈ L2(Ω); ϕh|D = const ∀D ∈ Dh

. (3.1.23)

One of the most important concepts is a relation between the spaces Xh andZh. We assume the existence of a mapping Lh : Xh → Zh, called a lumpingoperator.

In practical computations the following combinations of the FV and FEspaces are used (see, for example, (Feistauer and Felcman, 1997), (Feistaueret al., 1995), (Feistauer et al., 1996), (Dolejsı et al., 2002)).

a) Conforming finite elements combined with dual finite volumes In thiscase the FE space Xh is defined by (3.1.19) – (3.1.20). The mesh Dh is formedby dual FVs Di constructed over the mesh Th, associated with vertices Pi ∈σh = Pii∈J . In this case, the lumping operator is defined as such a mappingLh : Xh → Zh that for each ϕh ∈ Xh

Lhϕh ∈ Zh, Lhϕh|Di= ϕh(Pi) ∀i ∈ J. (3.1.24)

Obviously, Lh is a one-to-one mapping of Xh onto Zh.b) Nonconforming finite elements combined with barycentric finite volumes

Now let Qh = Qi; i ∈ J denote the set of centres of faces of all K ∈ Th.Then Dh = Dii∈J is the mesh formed by barycentric FVs constructed over Th,associated with Qi, i ∈ J , as described in Sections 2.2.1.1, d) for N = 2. Thespace Xh is given in (3.1.19) and (3.1.21) and Lh is defined by

Lhϕh ∈ Zh, Lhϕh|Di= ϕh(Qi), i ∈ J, (3.1.25)

for any ϕh ∈ Xh. Again, Lh is a one-to-one mapping of Xh onto Zh.c) Combination of conforming triangular finite elements with triangular finite

volumes is another possibility. It gives good results, but theory is still missing.We do not introduce details here.

Page 35: Finite Volume and Finite Element Methods in CFD (Numerical

COMBINED FINITE VOLUME–FINITE ELEMENT METHOD 29

3.1.3 Space semidiscretization of the problem

We use the following approximations: Ω ≈ Ωh, ΓI ≈ ΓIh ⊂ ∂Ωh, ΓW ≈ ΓWh ⊂∂Ωh, ΓO ≈ ΓOh ⊂ ∂Ωh, w(t) ≈ wh(t) ∈ Xh, ϕ ≈ ϕh ∈ V h ≈ V , where

V h =

ϕh = (ϕh1, . . . , ϕhm) ∈ Xh; ϕ(Pi) = 0 (3.1.26)

at Pi ∈ ΓIh, ϕhn(Pi) = 0 for n = 2, . . . , m − 1 at Pi ∈ ΓWh

.

Here Pi denote nodes, i.e. vertices Pi ∈ σh or midpoints of faces Pi ∈ Qh in thecase of conforming or nonconforming finite elements, respectively.

The form a(w, ϕ) defined in (3.1.12) is approximated by

a(wh, ϕh) =∑

K∈Th

K

N∑

s=1

Rs(wh,∇wh) ·∂ϕh

∂xsdx, wh, ϕh ∈ Xh. (3.1.27)

In order to approximate the nonlinear convective terms containing inviscidfluxes f s, we start from the analogy with the form b from (3.1.12) written as∫

Ω

∑Ns=1(∂f s(w)/∂xs) ·ϕ dx, where we use the approximation ϕ ≈ Lhϕh. Then

Green’s theorem is applied and the flux∑N

s=1 fs(w)ns is approximated with theaid of a numerical flux H(w, w′, n) from the FVM treated in Section 2.1:

Ω

N∑

s=1

∂fs(w)

∂xs· ϕdx ≈

i∈J

Di

N∑

s=1

∂fs(w)

∂xs· Lhϕh dx

=∑

i∈J

Lhϕh|Di·

Di

N∑

s=1

∂fs(w)

∂xsdx

=∑

i∈J

Lhϕh|Di·

∂Di

N∑

s=1

fs(w)ns dS (3.1.28)

=∑

i∈J

Lhϕh|Di·∑

j∈S(i)

βij∑

α=1

Γαij

N∑

s=1

fs(w)ns dS

≈∑

i∈J

Lhϕh|Di·∑

j∈S(i)

βij∑

α=1

H(Lhwh|Di, Lhwh|Dj , n

αij)|Γ

αij |.

Hence, we set

bh(wh, ϕh) =∑

i∈J

Lhϕh|Di·∑

j∈S(i)

βij∑

α=1

H(Lhwh|Di, Lhwh|Dj

, nαij)|Γ

αij |. (3.1.29)

If Γαij ⊂ ∂Ωh, it is necessary to give an interpretation of Lhwh|Dj

using inviscidboundary conditions – see Section 3.1.5.

Page 36: Finite Volume and Finite Element Methods in CFD (Numerical

30 FINITE ELEMENT METHODS

In practical computations, the integrals are evaluated approximately with theaid of numerical quadratures. Then the L2(Ω)-scalar product is approximatedby the form (wh, ϕh)h and the form ah approximates ah.

Definition 3.1 We define a finite volume–finite element approximate solutionof the viscous compressible flow as a vector-valued function wh = wh(x, t) definedfor (a.a) x ∈ Ωh and all t ∈ [0, T ] satisfying the following conditions:

a) wh ∈ C1([0, T ]; Xh), (3.1.30)

b) wh(t) − w∗h(t) ∈ V h,

c)

(

∂wh(t)

∂t, ϕh

)

h

+ bh(wh(t), ϕh)

+ ah(wh(t), ϕh) = 0

∀ϕh ∈ V h, ∀t ∈ (0, T ),

d) wh(0) = w0h.

3.1.4 Time discretization

Problem (3.1.30) is equivalent to a large system of ordinary differential equationswhich is solved with the aid of a suitable time discretization. It is possible to useRunge–Kutta methods.

The simpliest possibility is the Euler forward scheme. Let 0 = t0 < t1 < t2 . . .be a partition of the time interval and let τk = tk+1 − tk. Then in (3.1.30), b), c)we use the approximations wk

h ≈ wh(tk) and (∂wh/∂t)(tk) ≈ (wk+1h − wk

h)/τk

and obtain the scheme

a) wk+1h − w∗

h(tk+1) ∈ V h, (3.1.31)

b) (wk+1h , ϕh)h = (wk

h, ϕh)h − τkah(wkh, ϕh)

− τkbk(wkh, ϕh) ∀ϕh ∈ V h, k = 0, 1, . . . .

3.1.5 Realization of boundary conditions in the convective form bh

If Γαij ⊂ ∂Ωh (i.e. j ∈ γ(i), α = 1), then there is no finite volume adjacent to Γα

ij

from the opposite side to Di and it is necessary to interpret the value Lhwkh|Dj

in the definition (3.1.29) of the form bh. This means that we need to determinea boundary state wk

j which will be substituted for Lhwkh|Dj

in (3.1.29).We apply the approach used in the FVM and explained in Section 2.2.5.

This means that the individual components of the state vector wkj are either

extrapolated (with the use of Lhwkh|Di

) or prescribed, according to the signs ofeigenvalues of the matrix P(wk

h|Di, nα

ij) – cf. 2.2.5. For example, in the case ofthe subsonic outlet, the auxiliary outlet pressure pD is prescribed on ΓO.

3.1.5.1 Stability of the combined FV–FE methods Since scheme (3.1.31) isexplicit, it is necessary to apply some stability condition. Unfortunately, there isno rigorous theory for the stability of schemes applied to the complete compress-ible Navier–Stokes system. We proceed heuristically. By virtue of the explicit

Page 37: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 31

FV discretization of inviscid terms, we apply the modification of the stabilitycondition derived in Section 2.2.8 for the explicit FVM for the solution of theEuler equations:

τk

|Di|maxj∈S(i)

α=1,...,βij

maxℓ=1,...,m

|∂Di||λℓ(wki , nα

ij)| + µ ≤ CFL ≈ 0.85, i ∈ J, (3.1.32)

where λℓ(wki , nα

ij) are the eigenvalues of the matrix P(wki , nα

ij) – see (2.1.7).In the case of the implicit discretization of the viscous terms we omit µ in

the above CFL condition.

3.2 Discontinuous Galerkin finite element method

This section is concerned with the discontinuous Galerkin finite element method(DGFEM) for the numerical solution of compressible inviscid as well as viscousflow. The DGFEM is based on the use of piecewise polynomial approximationswithout any requirement on the continuity on interfaces between neighbouringelements. It uses advantages of the FVM and FEM.

3.2.1 DGFEM for conservation laws

In this section we shall discuss the discontinuous Galerkin finite element dis-cretization of multidimensional initial-boundary value problems for conservationlaw equations and, in particular, for the Euler equations. Let Ω ⊂ IRN be abounded domain with a piecewise smooth Lipschitz-continuous boundary ∂Ωand let T > 0. In the space-time cylinder QT = Ω× (0, T ) we consider a systemof m first order hyperbolic equations

∂w

∂t+

N∑

s=1

∂fs(w)

∂xs= 0. (3.2.1)

This system is equipped with the initial condition

w(x, 0) = w0(x), x ∈ Ω, (3.2.2)

where w0 is a given function, and with boundary conditions

B(w) = 0, (3.2.3)

where B is a boundary operator. The choice of the boundary conditions is carriedout similarly as in Section 2.2.5 in the framework of the discrete problem for theEuler equations describing gas flow.

3.2.1.1 Discretization Let Ω be a polygonal or polyhedral domain, if N = 2or N = 3, respectively. Let Th (h > 0) denote a partition of the closure Ω of thedomain Ω into a finite number of closed convex polygons (if N = 2) or polyhedra(if N = 3) K with mutually disjoint interiors. We call Th a triangulation of Ω, butdo not require the usual conforming properties from the FEM. In 2D problems

Page 38: Finite Volume and Finite Element Methods in CFD (Numerical

32 FINITE ELEMENT METHODS

K

K

Γ

j

ni

ij

ij

Fig. 3.1. Neighbouring elements Ki, Kj

we usually choose K ∈ Th as triangles or quadrilaterals, in 3D, K ∈ Th can be,for example, tetrahedra, pyramids or hexahedra, but we can allow even moregeneral convex elements K.

We set hK = diam(K), h = maxK∈ThhK . By |K| we denote the N -dimen-

sional Lebesgue measure of K. All elements of Th will be numbered so thatTh = Kii∈I , where I ⊂ Z+ = 0, 1, 2, . . . is a suitable index set. If twoelements Ki, Kj ∈ Th contain a nonempty open face which is a part of an(N − 1)-dimensional hyperplane (i.e. straight line in 2D or plane in 3D), we callthem neighbouring elements or neighbours. In this case we set Γij = ∂Ki ∩ ∂Kj

and assume that the whole set Γij is a part of an (N−1)-dimensional hyperplane.For i ∈ I we set s(i) = j ∈ I; Kj is a neighbour of Ki. The boundary ∂Ω isformed by a finite number of faces of elements Ki adjacent to ∂Ω. We denoteall these boundary faces by Sj , where j ∈ Ib ⊂ Z− = −1,−2, . . ., and setγ(i) = j ∈ Ib; Sj is a face of Ki, Γij = Sj for Ki ∈ Th such that Sj ⊂ ∂Ki, j ∈Ib. For Ki not containing any boundary face Sj we set γ(i) = ∅. Obviously,s(i) ∩ γ(i) = ∅ for all i ∈ I. Now, if we write S(i) = s(i) ∪ γ(i), we have

∂Ki =⋃

j∈S(i)

Γij , ∂Ki ∩ ∂Ω =⋃

j∈γ(i)

Γij . (3.2.4)

Furthermore, we use the following notation: nij = ((nij)1, . . . , (nij)N ) is theunit outer normal to ∂Ki on the face Γij (nij is a constant vector on Γij),d(Γij) = diam(Γij), and |Γij | is the (N − 1)-dimensional Lebesgue measure ofΓij . See Fig. 3.1.

Over the triangulation Th we define the broken Sobolev space

Hk(Ω, Th) = v; v|K ∈ Hk(K) ∀K ∈ Th. (3.2.5)

For v ∈ H1(Ω, Th) we introduce the following notation:

v|Γij− the trace of v|Ki

on Γij , (3.2.6)

Page 39: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 33

v|Γji− the trace of v|Kj

on Γji = Γij .

The approximate solution of problem (3.2.1)–(3.2.3) is sought in the space ofdiscontinuous piecewise polynomial vector-valued functions Sh defined by

Sh = [Sh]m, (3.2.7)

Sh = Sr,−1(Ω, Th) = v; v|K ∈ P r(K) ∀K ∈ Th,

where r ∈ Z+ and P r(K) denotes the space of all polynomials on K of degree≤ r.

Let us assume that w is a classical C1-solution of system (3.2.1). As usual,by w(t) we denote a function w(t) : Ω → IRm such that w(t)(x) = w(x, t) forx ∈ Ω. In order to derive the discrete problem, we multiply (3.2.1) by a functionϕ ∈ H1(Ω, Th)m and integrate over an element Ki, i ∈ I. With the use of Green’stheorem, we obtain the integral identity

d

dt

Ki

w(t) · ϕdx −

Ki

N∑

s=1

f s(w(t)) ·∂ϕ

∂xsdx (3.2.8)

+∑

j∈S(i)

Γij

N∑

s=1

fs(w(t)) · ϕ ns dS = 0.

Summing (3.2.8) over all Ki ∈ Th, we obtain the identity

d

dt

i∈I

Ki

w(t) · ϕdx −∑

i∈I

Ki

N∑

s=1

fs(w(t)) ·∂ϕ

∂xsdx (3.2.9)

+∑

i∈I

j∈S(i)

Γij

N∑

s=1

fs(w(t)) · ϕ ns dS = 0.

Under the notation

(w, ϕ) =∑

i∈I

Ki

w · ϕ dx =

Ω

w · ϕdx (3.2.10)

([L2]m-scalar product) and

b(w, ϕ) = −∑

i∈I

Ki

N∑

s=1

fs(w) ·∂ϕ

∂xsdx (3.2.11)

+∑

i∈I

j∈S(i)

Γij

N∑

s=1

f s(w) · ϕ ns dS,

(3.2.8) can be written in the form

Page 40: Finite Volume and Finite Element Methods in CFD (Numerical

34 FINITE ELEMENT METHODS

d

dt(w(t), ϕ) + b(w(t), ϕ) = 0. (3.2.12)

This equality represents a weak form of system (3.2.1) in the sense of the brokenSobolev space H1(Ω, Th).

3.2.1.2 Numerical solution Now we shall introduce the discrete problem ap-proximating identity (3.2.12). For t ∈ [0, T ], the exact solution w(t) will beapproximated by an element wh(t) ∈ Sh. It is not possible to replace w for-mally in the definition (3.2.11) of the form b, because wh is discontinuous on Γij

in general. Similarly as in the FVM we use here the concept of the numericalflux H = H(u, v, n) and write

Γij

N∑

s=1

fs(w(t))ns · ϕdS ≈

Γij

H(wh|Γij(t), wh|Γji

(t), nij) · ϕ|Γij dS.

(3.2.13)We assume that the numerical flux has the properties formulated in Section 2.2.3:

1) H(u, v, n) is defined and continuous on D×D×S1, where D is the domainof definition of the fluxes fs and S1 is the unit sphere in IRN : S1 = n ∈IRN ; |n| = 1.

2) H is consistent:

H(u, u, n) = P(u, n) =

N∑

s=1

fs(u)ns, u ∈ D, n ∈ S1. (3.2.14)

3) H is conservative:

H(u, v, n) = −H(v, u,−n), u, v ∈ D, n ∈ S1. (3.2.15)

The above considerations lead us to the definition of the approximation bh

of the convective form b:

bh(w, ϕ) = −∑

i∈I

Ki

N∑

s=1

fs(w) ·∂ϕ

∂xsdx (3.2.16)

+∑

i∈I

j∈S(i)

Γij

H(w|Γij, w|Γji

, nij) · ϕ|ΓijdS, w, ϕ ∈ H1(Ω, Th)m.

By w0h we denote an Sh-approximation of w0, e.g. the [L2]m-projection on

Sh.Now we come to the formulation of the discrete problem.

Definition 3.2 We say that wh is an approximate solution of (3.2.12), if itsatisfies the conditions

a) wh ∈ C1([0, T ]; Sh), (3.2.17)

Page 41: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 35

b)d

dt(wh(t), ϕh) + bh(wh(t), ϕh) = 0 ∀ϕh ∈ Sh, ∀ t ∈ (0, T ),

c) wh(0) = w0h.

The discrete problem (3.2.17) is equivalent to an initial value problem for asystem of ordinary differential equations which can be solved by a suitable timestepping numerical method.

Remark 3.3 If we set r = 0 in the DGFEM for the solution of problem (3.2.1)–(3.2.3), which means that we use a piecewise constant approximation of thesolution, then we get the finite volume method described in Section 2.1, wherewe use the notation Dh = Th, Di = Ki and J = I, Jb = Ib. A comparison of theFVM and DGFEM is discussed in (Feistauer, 2002).

3.2.1.3 Treatment of boundary conditions If Γij ⊂ ∂Ωh, then there is no neigh-bour Kj of Ki adjacent to Γij and the values of w|Γij

must be determined onthe basis of boundary conditions. We use the same approach as in the FVM,explained in Section 2.2.5.

3.2.2 Limiting of the order of accuracy

Let us return to the discrete problem (3.2.17), equivalent to a system of ordinarydifferential equations. The simplest way to obtain a fully discrete problem is touse the Euler forward method. To this end, we consider a partition 0 = t0 < t1 <t2 < . . . of the time interval (0, T ) and set τk = tk+1 − tk.

Using the approximations wkh ≈ wh(tk), d

dt (wh(t), ϕh) ≈ (wk+1h −wk

h, ϕh)/τk,

we obtain the fully discrete problem: for each k ≥ 0 find wk+1h such that

a) wk+1h ∈ Sh, (3.2.18)

b) (wk+1h , ϕh) = (wk

h, ϕh) − τkbh(wkh, ϕh) ∀ϕh ∈ Sh.

More precise time discretization is obtained with the aid of the Runge–Kuttamethods.

The disadvantage of higher order schemes is the rise of the Gibbs phenomenonmanifested by nonphysical spurious oscillations, undershoots and overshoots inthe approximate solution in the vicinity of discontinuities or steep gradients. Inorder to avoid the Gibbs phenomenon, it is necessary to use a suitable limitingof order of accuracy of the method in a vicinity of discontinuities.

Here we present a limiting proposed in (Dolejsı et al., 2003). We explain thisapproach for a 2D situation.

Let us consider a fully discrete problem (3.2.18) with N = 2, Ω ⊂ IR2, forproblem (3.2.1)–(3.2.3) discretized by piecewise linear elements (i.e. p = 1). Theuse of the Euler forward time discretization (3.2.18) yields the formal accuracyof order O(τ + h2), but the poor time approximation can be ‘overkilled’ by thechoice τ = O(h2). We assume, of course, that h → 0+ and, thus, 0 < h < 1.

Let us denote by ukh some scalar quantity characterizing the approximate

solution wkh. (For example, for the Euler equations we choose this quantity as

Page 42: Finite Volume and Finite Element Methods in CFD (Numerical

36 FINITE ELEMENT METHODS

the density ρ.) By [ukh]Γij

we denote the jump of ukh on Γij , i.e. [uk

h]Γij= uk

h|Γij−

ukh|Γji

. Further, we define [ukh]∂Ki

as a function on ∂Ki such that [ukh]∂Ki

(x) =[uk

h]Γij(x) for x ∈ ∂Ki ∩ Γij . Numerical experiments show that the interelement

jumps in the approximate solution are of the order O(1) on discontinuities, butO(h2) in the regions where the solution is regular. This leads us to the idea tomeasure the magnitude of interelement jumps in the integral form by

∂Ki

[ukh]2 dS, Ki ∈ Th. (3.2.19)

We define the discontinuity indicator

g(i) =

∂Ki

[ukh]2 dS/hα, Ki ∈ Th, (3.2.20)

where α ∈ (1, 5), e.g. α = 5/2, and introduce the following adaptive strategy foran automatic limiting of the order of accuracy of scheme (3.2.18):

a) wk+1h ∈ Sh = S

1,−1h (Ω, Th), (3.2.21)

b) (wk+1h , ϕ) = (wk

h, ϕh) − τk bh(wkh, ϕh) ∀ϕh ∈ Sh,

where wkh is the modification of wk

h defined with the aid of our limiting strategyin the following way:

a) Set wkh|Ki

:= wkh|Ki

, ∀ i ∈ I. (3.2.22)

b) If g(i) > 1 for some i ∈ I, then wkh|Ki

:= π0wkh|Ki

,

where

π0wkh|Ki

=

Ki

wkh dx/|Ki|, i ∈ I. (3.2.23)

The described procedure means that in (3.2.22) the limiting of the order ofthe scheme is applied on elements lying on the discontinuity or in the area witha very steep gradient via the piecewise constant approximation of the numericalsolution just on the chosen elements. In other areas, where the solution is regular,the numerical scheme is unchanged and the higher order of accuracy is preserved.(The extension to the case N = 3 is straightforward.)

The above approach to the adaptive limiting was developed in (Dolejsı et al.,2003) and (Dolejsı et al., 2002b). In (Dolejsı et al., 2002b), a detailed numericalinvestigation and verification of this algorithm was carried out. A theoreticaljustification is still missing.

Example 3.4 In order to demonstrate the applicability of the described limitingprocedure, let us consider the scalar 2D Burgers equation

∂u

∂t+ u

∂u

∂x1+ u

∂u

∂x2= 0 in Ω × (0, T ), (3.2.24)

Page 43: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 37

Fig. 3.2. Exact solution of the problem from Example 3.4 plotted at t = 0.45

where Ω = (−1, 1) × (−1, 1), equipped with initial condition

u0(x1, x1) = 0.25 + 0.5 sin(π(x1 + x2)), (x1, x2) ∈ Ω, (3.2.25)

and periodic boundary conditions. The exact entropy solution of this problembecomes discontinuous for t ≥ 0.3 In Fig. 3.2, the graph of the exact solutionat time t = 0.45 is plotted. If we apply scheme (3.2.18) to this problem on themesh from Fig. 3.3, with time step τ = 2.5 · 10−4, we obtain the numerical solu-tion shown in Fig. 3.4. It can be seen here that the numerical solution containsspurious overshoots and undershoots near discontinuities. The application of thedescribed limiting procedure avoids them, as shown in Fig. 3.5. In our numericalexperiments we use the numerical flux of the form

H(u1, u2, n) =

∑2s=1 fs(u1)ns, if A > 0,

∑2s=1 fs(u2)ns, if A ≤ 0,

(3.2.26)

where fs(u) = u2/2, A =∑2

s=1 f ′s((u1 + u2)/2)ns.

3.2.3 Approximation of the boundary

In the FVM applied to conservation laws or in the FEM using piecewise linearapproximations applied to elliptic or parabolic problems, it is sufficient to use apolygonal or polyhedral approximation Ωh of the 2D or 3D domain Ω, respec-tively. However, numerical experiments show that in some cases the DGFEMdoes not give a good resolution in the neighbourhood of curved parts of theboundary ∂Ω, if the mentioned approximations of Ω are used. In 1997, Bassi andRebay (Bassi and Rebay, 1997b) showed the importance of a sufficiently accurateapproximation of the boundary ∂Ω. For example, if a polygonal approximationof a plane domain is used in the case of flow past a cylinder, then each of the

Page 44: Finite Volume and Finite Element Methods in CFD (Numerical

38 FINITE ELEMENT METHODS

-1

-0.5

0

0.5

1

-1 -0.5 0 0.5 1

Fig. 3.3. Triangulation used for the numerical solution

vertices of the polygon introduces nonphysical entropy production and the ap-proximate solution presents a nonphysical wake which does not disappear byfurther refining the grid.

In order to get a good quality numerical solution, it is necessary to use asufficiently precise approximation of the boundary. For example, if we use piece-wise linear elements, then one must use a bilinear transformation of a referenceelement on a curved boundary element, see Fig. 3.6 and Fig. 3.7.

Then triangles Ki, i ∈ Ic, are replaced by the curved triangles and integralsare evaluated on the reference triangle with the aid of a substitution theorem.

3.2.4 DGFEM for convection–diffusion problems and viscous flow

3.2.4.1 Example of a scalar problem First let us consider a simple scalar non-stationary nonlinear convection-diffusion problem to find u : QT = Ω× (0, T ) →IR such that

a)∂u

∂t+

N∑

s=1

∂fs(u)

∂xs= ν∆u + g in QT , (3.2.27)

b) u∣

ΓD×(0,T )= uD, c) ν

∂u

∂n

ΓN×(0,T )= gN ,

d) u(x, 0) = u0(x), x ∈ Ω.

We assume that Ω ⊂ IRN is a bounded polygonal domain, if N = 2, or polyhedraldomain, if N = 3, with a Lipschitz boundary ∂Ω = ΓD ∪ ΓN , ΓD ∩ ΓN = ∅,

Page 45: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 39

Fig. 3.4. Numerical solution of the problem from Example 3.4 computed byDGFEM, plotted at t = 0.45

and T > 0. The diffusion coefficient ν > 0 is a given constant, g : QT → IR,uD : ΓD × (0, T ) → IR, gN : ΓN × (0, T ) → IR and u0 : Ω → IR are givenfunctions, fs ∈ C1(IR), s = 1, . . . , N , are given inviscid fluxes.

We define a classical solution of problem (3.2.27) as a sufficiently regularfunction in QT satisfying (3.2.27), a)–d) pointwise.

We leave to the reader the definition of a weak solution to problem (3.2.27)as an exercise.

3.2.4.2 Discretization The discretization of convective terms is carried out inthe same way as in Section 3.2.1.1. There are several approaches to the dis-cretization of the diffusion term. For example, in (Cockburn, 1999) the so-calledlocal discontinuous Galerkin FEM is described. It is based on a mixed formula-tion introducing first-order derivatives of unknown functions as new dependentvariables. This method is also used in (Karniadakis and Sherwin, 1999) in spec-tral methods and in (Bassi and Rebay, 1997a). Its theoretical analysis can be

Page 46: Finite Volume and Finite Element Methods in CFD (Numerical

40 FINITE ELEMENT METHODS

Fig. 3.5. Numerical solution of the problem from Example 3.4 computed byDGFEM with limiting, plotted at t = 0.45

Ki

P

P

P

i

i

Ω

i

11

2

0

iP12

Fig. 3.6. Triangle Ki lying on a curved part of ∂Ω

K

K

i

P0 P1

iP12

P2

Pi1

Pi12

Pi2

Pi0

F

Fig. 3.7. Bilinear mapping Fi : K → Ki

Page 47: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 41

found in (Cockburn and Shu, 1998) or (Castillo et al., 2001). However, the useof this approach leads to an extreme increase in the number of unknowns and,therefore, we shall apply another technique, used, for example, in (Oden et al.,1998), (Babuska et al., 1999).

We use the notation from Section 3.2.1.1. Moreover, for i ∈ I, by γD(i) andγN (i) we denote the subsets of γ(i) formed by such indexes j that the faces Γij

approximate the parts ΓD and ΓN , respectively, of ∂Ω. Thus, we suppose that

γ(i) = γD(i) ∪ γN (i), γD(i) ∩ γN (i) = ∅. (3.2.28)

For v ∈ H1(Ω, Th) we set

〈v〉Γij=

1

2

(

v∣

Γij+ v∣

Γoj

)

, (3.2.29)

[v]Γij= v

Γij− v∣

Γji,

denoting the average and jump of the traces of v on Γij = Γji defined in (3.2.6).The approximate solution as well as test functions are supposed to be elementsof the space Sh = Sp,−1(Ω, Th) introduced in (3.2.7). Obviously, 〈v〉Γij

= 〈v〉Γji,

[v]Γij= −[v]Γji

and [v]Γijnij = [v]Γji

nji.In order to derive the discrete problem, we assume that u is a classical solution

of problem (3.2.27). The regularity of u implies that u(·, t) ∈ H2(Ω) ⊂ H2(Ω, Th)and

〈u(·, t)〉Γij= u(·, t)|Γij

, [u(·, t)]Γij= 0, (3.2.30)

〈∇u(·, t)〉Γij= ∇u(·, t)|Γij

= ∇u(·, t)|Γji,

for each t ∈ (0, T ).

We multiply equation (3.2.27), a) by any ϕ ∈ H2(Ω, Th), integrate over Ki ∈ Th,apply Green’s theorem and sum over all Ki ∈ Th. After some manipulation weobtain the identity

Ω

∂u

∂tϕdx +

i∈I

j∈S(i)

Γij

N∑

s=1

fs(u) (nij)s ϕ|ΓijdS (3.2.31)

−∑

i∈I

Ki

N∑

s=1

fs(u)∂ϕ

∂xsdx +

i∈I

Ki

ν ∇u · ∇ϕdx

−∑

i∈I

j∈s(i)j<i

Γij

ν〈∇u〉 · nij [ϕ] dS

−∑

i∈I

j∈γD(i)

Γij

ν ∇u · nij ϕdS

Page 48: Finite Volume and Finite Element Methods in CFD (Numerical

42 FINITE ELEMENT METHODS

=

Ω

g ϕdx +∑

i∈I

j∈γN (i)

Γij

ν ∇u · nij ϕdS.

To the left-hand side of (3.2.31) we now add the terms

±∑

i∈I

j∈s(i)j<i

Γij

ν〈∇ϕ〉 · nij [u] dS = 0, (3.2.32)

as follows from (3.2.30). Further, to the left-hand side and the right-hand sidewe add the terms

±∑

i∈I

j∈γD(i)

Γij

ν ∇ϕ · nij u dS

and

±∑

i∈I

j∈γD(i)

Γij

ν ∇ϕ · nij uD dS,

respectively, which are identical by the Dirichlet condition (3.2.27), b). We canadd these terms equipped with the + sign (the so-called nonsymmetric DG dis-cretization of diffusion terms) or with the − sign (symmetric DG discretizationof diffusion terms). Both possibilities have their advantages and disadvantages –see, for example, (Prudhomme et al., 2000). Here we shall use the nonsymmetricdiscretization.

In view of the Neumann condition (3.2.27), c), we replace the second term onthe right-hand side of (3.2.31) by

i∈I

j∈γN (i)

Γij

gN ϕdS. (3.2.33)

Because of the stabilization of the scheme we introduce the interior penalty

i∈I

j∈s(i)j<i

Γij

σ[u] [ϕ] dS (3.2.34)

and the boundary penalty

i∈I

j∈γD(i)

Γij

σ u ϕdS =∑

i∈I

j∈γD(i)

Γij

σuDϕdS (3.2.35)

where σ is a weight defined by

σ|Γij= CW ν/d(Γij), (3.2.36)

where CW > 0 is a suitable constant. In the considered nonsymmetric formula-tion we can set CW = 1. (For the situation of the symmetric formulation, seeAppendix.)

Page 49: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 43

On the basis of the above considerations we introduce the following formsdefined for u, ϕ ∈ H2(Ω, Th):

ah(u, ϕ) =∑

i∈I

Ki

ν ∇u · ∇ϕdx (3.2.37)

−∑

i∈I

j∈s(i)j<i

Γij

ν〈∇u〉 · nij [ϕ] dS

+∑

i∈I

j∈s(i)j<i

Γij

ν〈∇ϕ〉 · nij [u] dS

−∑

i∈I

j∈γD(i)

Γij

ν ∇u · nij ϕdS

+∑

i∈I

j∈γD(i)

Γij

ν ∇ϕ · nij u dS

(nonsymmetric variant of the diffusion form - it is obvious what form would havethe symmetric variant),

Jh(u, ϕ) =∑

i∈I

j∈s(i)j<i

Γij

σ[u] [ϕ] dS (3.2.38)

+∑

i∈I

j∈γD(i)

Γij

σ u ϕdS

(interior and boundary penalty jump terms),

ℓh(ϕ)(t) =

Ω

g(t)ϕdx +∑

i∈I

j∈γN (i)

Γ

gN (t)ϕdS (3.2.39)

+∑

i∈I

j∈γD(i)

Γij

ν ∇ϕ · nij uD(t) dS +∑

i∈I

j∈γD(i)

Γij

σ uD(t)ϕdS

(right-hand side form).

Finally, the convective terms are approximated with the aid of a numericalflux H = H(u, v, n) by the form bh(u, ϕ) defined analogously as in Section 3.2.1.2:

bh(u, ϕ) = −∑

i∈I

K

N∑

s=1

fs(u)∂ϕ

∂xsdx (3.2.40)

+∑

i∈I

j∈S(i)

Γij

H(

u|Γij, u|Γji

, nij

)

ϕ|ΓijdS, u, ϕ ∈ H2(Ω, Th).

We assume that the numerical flux H is (locally) Lipschitz-continuous, consistentand conservative – see Section 3.2.1.2.

Page 50: Finite Volume and Finite Element Methods in CFD (Numerical

44 FINITE ELEMENT METHODS

Now we can introduce the discrete problem.

Definition 3.5 We say that uh is a DGFE solution of the convection-diffusionproblem (3.2.27), if

a) uh ∈ C1([0, T ]; Sh), (3.2.41)

b)d

dt(uh(t), ϕh) + bh(uh(t), ϕh) + ah(uh(t), ϕh) + Jh(uh(t), ϕh) = ℓh(ϕh) (t)

∀ϕh ∈ Sh, ∀ t ∈ (0, T ),

c) uh(0) = u0h.

By u0h we denote an Sh-approximation of the initial condition u0.

This discrete problem has been obtained with the aid of the method of lines,i.e. the space semidiscretization. In practical computations suitable time dis-cretization is applied (Euler forward or backward scheme, Runge–Kutta meth-ods or discontinuous Galerkin time discretization) and integrals are evaluatedwith the aid of numerical integration. Let us note that we do not require herethat the approximate solution satisfies the essential Dirichlet boundary conditionpointwise, e.g. at boundary nodes. In the DGFEM, this condition is representedin the framework of the ‘integral identity’ (3.2.41), b).

The above DGFE discrete problem was investigated theoretically in (Dolejsıet al., 2002a) and (Dolejsı et al., 2005), where error estimates were analysed.

3.2.4.3 DGFE discretization of the Navier–Stokes equations Similarly as above,one can proceed in the case of the compressible Navier-Stokes equations, but thesituation is much more complicated, because the diffusion, i.e. viscous terms, arenonlinear. Therefore, we shall treat the discretization of the viscous terms in aspecial way, as described in (Dolejsı, 2004) or (Feistauer et al., 2005). To thisend, we shall linearize partially the viscous terms Rs(w,∇w) in a suitable way.From (3.1.2) we obtain

R1(w,∇w) (3.2.42)

=

023

µw1

[

2(

∂w2

∂x1− w2

w1

∂w1

∂x1

)

−(

∂w3

∂x2− w3

w1

∂w1

∂x2

)]

µw1

[(

∂w3

∂x1− w3

w1

∂w1

∂x1

)

+(

∂w2

∂x2− w2

w1

∂w1

∂x2

)]

w2

w1R

(2)1 + w3

w1R

(3)1 + k

cvw1

[

∂w4

∂x1− w4

w1

∂w1

∂x1

− 1w1

(

w2∂w2

∂x1+ w3

∂w3

∂x1

)

+ 1w2

1(w2

2 + w23)

∂w1

∂x1

]

,

R2(w,∇w)

Page 51: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 45

=

w1

[(

∂w3

∂x1− w3

w1

∂w1

∂x1

)

+(

∂w2

∂x2− w2

w1

∂w1

∂x2

)]

23

µw1

[

2(

∂w3

∂x2− w3

w1

∂w1

∂x2

)

−(

∂w2

∂x1− w2

w1

∂w1

∂x1

)]

w2

w1R

(2)2 + w3

w1R

(3)2 + k

cvw1

[

∂w4

∂x1− w4

w1

∂w1

∂x2

− 1w1

(

w2∂w2

∂x2+ w3

∂w3

∂x2

)

+ 1w2

1(w2

2 + w23)

∂w1

∂x2

]

,

where R(r)s = R(r)

s (w,∇w) denotes the r-th component of Rs (s = 1, 2, r =2, 3). Now for w = (w1, . . . , w4)

T and ϕ = (ϕ1, . . . , ϕ4)T we define the vector-

valued functions

D1(w,∇w, ϕ,∇ϕ) (3.2.43)

=

023

µw1

[

2(

∂ϕ2

∂x1− ϕ2

w1

∂w1

∂x1

)

−(

∂ϕ3

∂x2− ϕ3

w1

∂w1

∂x2

)]

µw1

[(

∂ϕ3

∂x1− ϕ3

w1

∂w1

∂x1

)

+(

∂ϕ2

∂x2− ϕ2

w1

∂w1

∂x2

)]

w2

w1D

(2)1 + w3

w1D

(3)1 + k

cvw1

[

∂ϕ4

∂x1− ϕ4

w1

∂w1

∂x1

− 1w1

(

w2∂ϕ2

∂x1+ w3

∂ϕ3

∂x1

)

+ 1w2

1(w2ϕ2 + w3ϕ3)

∂w1

∂x1

]

,

D2(w,∇w, ϕ,∇ϕ)

=

w1

[(

∂ϕ3

∂x1− ϕ3

w1

∂w1

∂x1

)

+(

∂ϕ2

∂x2− ϕ2

w1

∂w1

∂x2

)]

23

µw1

[

2(

∂ϕ3

∂x2− ϕ2

w1

∂w1

∂x2

)

−(

∂ϕ2

∂x1− ϕ2

w1

∂w1

∂x1

)]

w2

w1D

(2)2 + w3

w1D

(3)2 + k

cvw1

[

∂ϕ4

∂x2− ϕ4

w1

∂w1

∂x2

− 1w1

(

w2∂ϕ2

∂x2+ w2

∂ϕ3

∂x2

)

+ 1w2

1(w2ϕ2 + w3ϕ3)

∂w1

∂x2

]

,

where D(r)s denotes the r-th component of Ds (s = 1, 2, r = 2, 3). Obviously,

D1 and D2 are linear with respect to ϕ and ∇ϕ and

Ds(w,∇w, w,∇w) = Rs(w,∇w), s = 1, 2. (3.2.44)

Now we introduce the following forms defined for functions wh, ϕh ∈ Sh:

Page 52: Finite Volume and Finite Element Methods in CFD (Numerical

46 FINITE ELEMENT METHODS

(wh, ϕh)h =

Ωh

wh · ϕh dx (3.2.45)

(L2(Ωh)-scalar product),

ah(wh, ϕh) =∑

i∈I

Ki

2∑

s=1

Rs(wh,∇wh) ·∂ϕh

∂xsdx (3.2.46)

−∑

i∈I

j∈s(i)j<i

Γij

2∑

s=1

〈Rs(wh,∇wh)〉 (nij)s · [ϕh] dS

+∑

i∈I

j∈s(i)j<i

Γij

2∑

s=1

〈Ds(wh,∇wh, ϕh,∇ϕh)〉 (nij)s · [wh] dS

−∑

i∈I

j∈γD(i)

Γij

2∑

s=1

Rs(wh,∇wh) (nij)s · ϕh dS

+∑

i∈I

j∈γD(i)

Γij

2∑

s=1

Ds(wh,∇wh, ϕh,∇ϕh) (nij)s · wh dS

(nonsymmetric version of the diffusion form). The use of the above special ap-proach does not yield some additional terms in the discrete analogy to the con-tinuity equation. This appears important for a good quality of the approximatesolution.

Further, we introduce the following forms:

Jh(wh, ϕh) =∑

i∈I

j∈s(i)j<i

Γij

σ[wh] · [ϕh] dS (3.2.47)

+∑

i∈I

j∈γD(i)

Γij

σ wh · ϕh dS

withσ|Γij

= µ/d(Γij) (3.2.48)

(interior and boundary penalty terms),

βh(wh, ϕh) =∑

i∈I

j∈γD(i)

Γij

(

σ wB · ϕh (3.2.49)

Page 53: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 47

+

2∑

s=1

Ds(wh,∇wh, ϕh,∇ϕh) (nij)s · wB

)

dS

(right-hand side form). The boundary state wB will be defined later. Finally, wedefine the form approximating viscous terms:

Ah(wh, ϕh) (3.2.50)

= ah(wh, ϕh) + Jh(wh, ϕh) − βh(wh, ϕh).

The convective terms are represented by the form bh defined by (3.2.16).Now the discrete problem reads: Find a vector-valued function wh such that

a) wh ∈ C1([0, T ]; Sh), (3.2.51)

b)d

dt(wh(t), ϕh)h + bh (wh(t), ϕh) + Ah (wh(t), ϕh)

= 0 ∀ϕh ∈ Sh, t ∈ (0, T ),

c) wh(0) = w0h,

where w0h is an Sh-approximation of w0.

3.2.4.4 Boundary conditions If Γij ⊂ ∂Ωh, i.e. j ∈ γ(i), it is necessary tospecify boundary conditions.

The boundary state wB = (wB1, . . . , wB4)T is determined with the aid of the

prescribed Dirichlet conditions and extrapolation:

wB = (ρij , 0, 0, ρijθij) on Γij approximating ΓW , (3.2.52)

wB =

(

ρDh, ρDhvDh1, ρDhvDh2, ρDhθDh +1

2ρDh|vDh|

2

)

on Γij approximating ΓI ,

where ρDh, θDh and vDh = (vDh1, vDh2) are approximations of the given density,absolute temperature and velocity from the boundary conditions and ρij , θij arethe values of the density and absolute temperature extrapolated from Ki ontoΓij .

The boundary state w|Γjiappearing in the form bh is defined in the same

way as in Section 3.2.1.3 above.

3.2.5 Numerical examples

In the DGFE solution of problems presented here, the forward Euler time dis-cretization was used.

3.2.5.1 Application of the DGFEM to the solution of inviscid compressible flowThe first numerical example deals with inviscid transonic flow through the GAMMchannel with inlet Mach number = 0.67. In order to obtain a steady-state solu-tion, the time stabilization method for t → ∞ is applied.

Page 54: Finite Volume and Finite Element Methods in CFD (Numerical

48 FINITE ELEMENT METHODS

Fig. 3.8. Coarse triangular mesh (784 triangles) in the GAMM channel

We demonstrate the influence of the use of superparametric elements at thecurved part of ∂Ω, explained in Section 3.2.3. The computations were performedon a coarse grid shown in Fig. 3.8 having 784 triangles. Figures 3.9 and 3.10 showthe density distribution along the lower wall obtained by scheme (3.2.21) withoutand with the use of a bilinear mapping, respectively. One can see a difference inthe quality of the approximate solutions.

Figure 3.11 shows the computational grid constructed with the aid of theanisotropic mesh adaptation (AMA) technique ((Dolejsı, 1998), (Dolejsı, 2001)).Figure 3.12 shows the density distribution along the lower wall obtained withthe aid of the bilinear mapping on a refined mesh. As we can see, a very sharpshock wave and the so-called Zierep (small local maximum behind the shockwave) singularity were obtained.

3.2.5.2 Application of the DGFEM to the solution of viscous compressible flowWe present here results of the numerical solution of the viscous supersonic flowpast the airfoil NACA 0012 by the DGFEM with far field Mach number M∞ = 2and Reynolds number Re = 1000. In Fig. 3.13 we see the mesh obtained bythe with the aid of the anisotropic mesh adaptation (AMA) technique. Fig. 3.14shows the Mach number isolines. Here we see a shock wave in front of the profile,wake and a shock wave leaving the profile.

In the above examples, the forward Euler time stepping and limiting of theorder of accuracy from Section 3.2.2 were used. This method requires to satisfythe CFL stability condition representing a severe restriction of the time step.In (Dolejsı and Feistauer, 2003), an efficient semi-implicit time stepping schemewas developed for the numerical solution of the Euler equations, allowing to usea long time step in the DGFEM. This method even allows the solution of flowswith very low Mach numbers. The extension to viscous flow is in progress.

Page 55: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 49

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

-1 -0.5 0 0.5 1

Fig. 3.9. Density distribution along the lower wall in the GAMM channel with-out the use of a bilinear mapping at ∂Ω

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

-1 -0.5 0 0.5 1

Fig. 3.10. Density distribution along the lower wall in the GAMM channel withthe use of a bilinear mapping at ∂Ω

Page 56: Finite Volume and Finite Element Methods in CFD (Numerical

50 FINITE ELEMENT METHODS

Fig. 3.11. Adapted triangular mesh (2131 triangles) in the GAMM channel

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

-1 -0.5 0 0.5 1

Fig. 3.12. Density distribution along the lower wall in the GAMM channel withthe use of a bilinear mapping on an adapted mesh

Page 57: Finite Volume and Finite Element Methods in CFD (Numerical

DISCONTINUOUS GALERKIN FINITE ELEMENT METHOD 51

-1 0 1 2 3 4

Fig. 3.13. Viscous supersonic flow past the profile NACA 0012: triangulation

-1 0 1 2 3 4

Fig. 3.14. Viscous supersonic flow past the profile NACA 0012: Mach numberisolines

Page 58: Finite Volume and Finite Element Methods in CFD (Numerical

REFERENCES

Angot, Ph., Dolejsı, V., Feistauer, M., and Felcman, J. (1998). Analysis of acombined barycentric finite volume – nonconforming finite element method fornonlinear convection–diffusion problems. Appl. Math., 43(4), 263–310.

Babuska, I., Oden, J. T., and Baumann, C. E. (1999). A discontinuous hpfinite element method for diffusion problems: 1-D analysis. Comput. Math.Appl., 37, 103–122.

Bassi, F. and Rebay, S. (1997a). A high-order accurate discontinuous finiteelement method for the numerical solution of the compressible Navier–Stokesequations. J. Comput. Phys , 131, 267–279.

Bassi, F. and Rebay, S. (1997b). High-order accurate discontinuous finite ele-ment solution of the 2D Euler equations. J. Comput. Phys., 138, 251–285.

Castillo, P., Cockburn, B., Schotzau, D., and Schwab, C. (2001). Optimal apriori error estimates for the hp-version of the local discontinuous Galerkinmethod for convection–diffusion problems. Math. Comput., 71, 455–478.

Ciarlet, P. G. (1979). The Finite Element Method for Elliptic Problems. North-Holland, Amsterdam.

Cockburn, B. (1999). Discontinuous Galerkin methods for convection domi-nated problems. In High-Order Methods for Computational Physics (ed. T. J.Barth and H. Deconinck), Number 9 in Lecture Notes in Computational Sci-ence and Engineering, pp. 69–224. Springer, Berlin.

Cockburn, B. and Shu, C. W. (1998). The local discontinuous Galerkin finiteelement method for convection–diffusion systems. SIAM J. Numer. Anal., 35,2440–2463.

Crouzeix, M. and Raviart, P. A. (1973). Conforming and nonconforming finiteelement methods for solving the stationary Stokes equations. RAIRO, Anal.Numer., 7, 33–76.

Dolejsı, V. (1998). Anisotropic mesh adaptation for finite volume and finiteelement methods on triangular meshes. Comput. Visualization Sci., 1(3),165–178.

Dolejsı, V. (2001). Anisotropic mesh adaptation technique for viscous flowsimulation. East–West J. Numer. Math., 9(1), 1–24.

Dolejsı, V. (2004). On the discontinuous Galerkin method for the numericalsolution of the Euler and Navier–Stokes equations. Int. J. Numer. Meth.Fluids .

Dolejsı, V. and Feistauer, M. (2003). A semiimplicit discontinuous Galerkinfinite element method for the numerical solution of inviscid compressibleflows. The Preprint Series of the School of Mathematics MATH-KNM-2003/2,Charles University, Prague.

Dolejsı, V., Feistauer, M., Felcman, J., and Klikova, A. (2002). Error estimates

52

Page 59: Finite Volume and Finite Element Methods in CFD (Numerical

REFERENCES 53

for barycentric finite volumes combined with nonconforming finite elementsapplied to nonlinear convection–diffusion problems. Appl. Math., 47(4), 301–340.

Dolejsı, V., Feistauer, M., and Schwab, C. (2002a). A finite volume discontinu-ous Galerkin scheme for nonlinear convection–diffusion problems. Calcolo, 39,1–40.

Dolejsı, V., Feistauer, M., and Schwab, C. (2002b). On discontinuous Galerkinmethods for nonlinear convection–diffusion problems and compressible flow.Math. Bohemica, 127(2), 163–179.

Dolejsı, V., Feistauer, M., and Schwab, C. (2003). On some aspects of thediscontinuous Galerkin finite element method for conservation laws. Math.Comput. Simul., 61, 333–346.

Dolejsı, V., Feistauer, M., and Sobotıkova, V. (2005). Analysis of the discontin-uous Galerkin method for nonlinear convection–diffusion problems. Comput.Methods. Appl. Mech. Engrg., 194, 2709–2733.

Eymard, R., Gallouet, T., and Herbin, R. (2000). Handbook of Numerical Anal-ysis, Volume VII, Chapter Finite Volume Methods, pp. 717–1020. North-Holland-Elsevier, Amsterdam.

Feistauer, M. (1993). Mathematical Methods in Fluid Dynamics. LongmanScientific & Technical, Harlow.

Feistauer, M. (2002). Discontinuous Galerkin method: Compromise betweenFV and FE schemes. In Finite Volumes for Complex Applications III (ed.R. Herbin and D. Kroner), pp. 81–96. Hermes Penton Science, London.

Feistauer, M., Dolejsı, V., and Kucera, V. (2005). On the discontinuous Galerkinmethod for the simulation of compressible flow with wide range of Mach num-bers. The Preprint Series of the School of Mathematics MATH-KNM-2005/5,Charles University, Prague.

Feistauer, M. and Felcman, J. (1997). Theory and applications of numericalschemes for nonlinear convection–diffusion problems and compressible viscousflow. In The Mathematics of Finite Elements and Applications, Highlights1996 (ed. J. Whiteman), pp. 175–194. Wiley, Chichester.

Feistauer, M., Felcman, J., and Dolejsı, V. (1996). Numerical simulation ofcompresssible viscous flow through cascades of profiles. ZAMM , 76, 297–300.

Feistauer, M., Felcman, J., and Lukacova-Medvid’ova, M. (1995). Combinedfinite element–finite volume solution of compressible flow. J. Comput. Appl.Math., 63, 179–199.

Feistauer, M., Felcman, J., and Lukacova-Medvid’ova, M. (1997). On the con-vergence of a combined finite volume–finite element method for nonlinearconvection–diffusion problems. Numer. Methods Partial Differ. Equations, 13,163–190.

Feistauer, M., Felcman, J., Lukacova-Medvid’ova, M., and Warnecke, G.(1999a). Error estimates of a combined finite volume–finite element methodfor nonlinear convection–diffusion problems. SIAM J. Numer. Anal., 36(5),1528–1548.

Page 60: Finite Volume and Finite Element Methods in CFD (Numerical

54 REFERENCES

Feistauer, M., Slavık, J., and Stupka, P. (1999b). On the convergence of a com-bined finite volume–finite element method for nonlinear convection–diffusionproblems. Explicit schemes. Numer. Methods Partial Differ. Equations, 15,215–235.

Karniadakis, G. E. and Sherwin, S. J. (1999). Spectral/hp Element Methods forCFD. Oxford University Press, Oxford.

Oden, J. T., Babuska, I., and Baumann, C. E. (1998). A discontinuous hp finiteelement method for diffusion problems. J. Comput. Phys , 146, 491–519.

Prudhomme, S., Pascal, F., Oden, J. T., and Romkes, A. (2000). Review of apriori error estimation for discontinuous Galerkin methods. Technical report,TICAM.

Page 61: Finite Volume and Finite Element Methods in CFD (Numerical

INDEX

absolute temperature, 4adaptive limiting, 36adaptive strategy, 36adiabatic flow, 5anisotropic mesh adaptation, 48approximate solution, 13, 34automatic limiting, 36average of traces, 41

barotropic flow, 6barycentric finite volume, 28boundary condition, 16, 25boundary penalty, 42broken Sobolev space, 32

computational grid, 27condition of adiabatic wall, 25conforming finite elements, 28conforming piecewise linear elements, 28conforming triangulation, 13conservation laws, 2conservation of momentum, 2conservative method, 15conservative numerical flux, 15, 34consistent method, 15consistent numerical flux, 15, 34continuity equation, 2Crouzeix–Raviart elements, 28

density, 4derivation of a finite volume scheme, 13discrete problem, 34discretization, 31dual finite volume, 13, 28dynamical viscosity, 3

entropy, 5equation of state, 4error estimate of the DGFEM, 44Euler forward method, 35Euler forward scheme, 30Eulerian description, 2explicit scheme, 15extrapolation, 18

faces, 11finite element mesh, 27finite element method, 24finite element space, 28finite volume, 11

finite volume mesh, 11, 27finite volume method, 24, 35finite volume scheme, 15finite volume space, 28finite volume–finite element approximate

solution, 30flux, 13friction shear forces, 3fully discrete problem, 35FVM, 24

gas constant, 4

homoentropic flow, 6

ideal gas, 4impermeable wall, 25initial conditions, 15inlet, 25integral average, 13interior penalty, 42inviscid fluxes, 8irreversible process, 5isentropic flow, 6

jump of traces, 41

Lax–Friedrichs numerical flux, 16limiting, 36limiting of order of accuracy, 35local discontinuous Galerkin method, 39locally Lipschitz-continuous numerical

flux, 20lumping operator, 28

Mach number, 7monoatomic gases, 3monotone numerical flux, 21monotonicity, 20

Navier–Stokes equations, 3, 44neighbouring elements, 32neighbouring finite volumes, 11neighbours, 32Newtonian fluid, 3, 4nonconforming finite elements, 28nonsymmetric DG discretization, 42numerical flux, 13, 15, 34numerical quadratures, 30

55

Page 62: Finite Volume and Finite Element Methods in CFD (Numerical

56 INDEX

outlet, 25

perfect gas, 4, 24Poisson adiabatic constant, 5pressure, 3, 4

quadrilateral mesh, 13

rheological equations, 3Runge–Kutta method, 30

sonic flow, 7space of test functions, 25space semidiscretization, 29specific heat, 4specific volume, 5speed of sound, 7stability condition, 23, 31stability for a scalar problem, 20stability of schemes for the Euler

equations, 23stability of Steger–Warming scheme, 23stability of Van Leer scheme, 23stability of Vijayasundaram scheme, 23stable scheme, 20state variables, 4Steger–Warming numerical flux, 16subsonic flow, 7supersonic flow, 7symmetric DG discretization, 42system describing viscous compressible

flow, 24

time discretization, 30time step, 13triangular finite volumes, 28triangular mesh, 12

Van Leer numerical flux, 16velocity, 2Vijayasundaram numerical flux, 16viscosity, 3viscosity coefficient, 3

weak formulation of compressible flow, 26weak solution of problem (CFP), 26weight, 42

Zierep singularity, 48