You are on page 1of 9

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/226045321

Discretization of the viscous dissipation term with the MAC scheme

Chapter · January 2011


DOI: 10.1007/978-3-642-20671-9_60

CITATIONS READS
6 210

4 authors, including:

Raphaèle Herbin Walid Kheriji


Aix-Marseille Université Energy transition institut Vedecom, Versailles, France
283 PUBLICATIONS 9,511 CITATIONS 22 PUBLICATIONS 354 CITATIONS

SEE PROFILE SEE PROFILE

Jean-Claude Latché
Institut de Radioprotection et de Sûreté Nucléaire (IRSN)
77 PUBLICATIONS 1,576 CITATIONS

SEE PROFILE

All content following this page was uploaded by Raphaèle Herbin on 16 May 2014.

The user has requested enhancement of the downloaded file.


Discretization of the viscous dissipation term
with the MAC scheme

F. Babik⋆ , R. Herbin† , W. Kheriji⋆ , J.-C. Latché⋆



Institut de Radioprotection et de Sûreté Nucléaire (IRSN)

Université de Provence
[fabrice.babik, walid.kheriji, jean-claude.latche]@irsn.fr, herbin@cmi.univ-mrs.fr

Abstract
We propose a discretization for the MAC scheme of the viscous dissipation term
τ (u) : ∇u (where τ (u) stands for the shear stress tensor associated to the velocity
hal-00576268, version 1 - 13 Aug 2011

field u), which is suitable for the approximation of this term in a conservation
equation for a scalar variable. This discretization enjoys the property that the
integral over the computational domain Ω of the (discrete) dissipation term is equal
to what is obtained when taking the inner product of the (discrete) momentum
balance equation by u and integrating over Ω. As a consequence, it may be used
as an ingredient to obtain an unconditionally stable scheme for the compressible
Navier-Stokes equations. It is also shown, in some model cases, to ensure the strong
convergence in L1 of the dissipation term.

Key words : MAC scheme, compressible Navier-Stokes equations, RANS turbu-


lence models.

1 Introduction
Let us consider the compressible Navier-Stokes equations, which may be written as:

∂t ρ + div(ρu) = 0, (1a)
∂t (ρu) + div(ρu ⊗ u) + ∇p − div(τ (u)) = 0, (1b)
∂t (ρe) + div(ρeu) + pdivu + div(q) = τ (u) : ∇u, (1c)
ρ = ℘(p, e), (1d)

where t stands for the time, ρ, u, p and e are the density, velocity, pressure and internal energy
in the flow, τ (u) stands for the shear stress tensor, q for the energy diffusion flux, and the
function ℘ is the equation of state. This system of equations is posed over Ω × (0, T ), where Ω
is a domain of Rd , d ≤ 3. It must be supplemented by a closure relation for τ (u) and for q,
assumed to be:

τ (u) = µ(∇u + ∇t u) − divu I, q = −λ∇e, (2)
3
Viscous dissipation term discretization with the MAC scheme

where µ and λ stand for two (possibly depending on x) positive parameters.


Let us suppose, for the sake of simplicity, that u is prescribed to zero on the whole boundary,
and that the system is adiabatic, i.e. q ·n = 0 on ∂Ω. Then, formally, taking the inner product of
(1b) with u and integrating over Ω, integrating (1c) over Ω, and, finally, summing both relations
yields the stability estimate:
1
Z
d
ρ |u|2 + ρe dx ≤ 0.

(3)
dt Ω 2
If we suppose that the equation of state may be set under the form p = f (ρ, e) with f (·, 0) = 0
and f (0, ·) = 0, Equation (1c) implies that e remains positive (still at least formally), and so (3)
yields a control on the unknown. Mimicking this computation at the discrete level necessitates
to check some arguments, among them:
(i) to have available a discrete counterpart to the relation:
1
Z Z
d
ρ |u|2 dx.
 
∂t (ρu) + div(ρu ⊗ u) · u dx =
Ω dt Ω 2

(ii) to identify the integral of the dissipation term at the right-hand side of the discrete
counterpart of (1c) with the (discrete) L2 inner product between the velocity and the
hal-00576268, version 1 - 13 Aug 2011

diffusion term in the discrete momentum balance equation (1b).


(iii) to be able to prove that the right-hand side of (1c) is non-negative, in order to preserve
the positivity of the internal energy.
The point (i) is extensively discussed in [6] (see also [7]), and is not treated here. Indeed, we
focus here on a discretization technique which allows to obtain (ii) and (iii) with the usual
Marker and Cell (MAC) discretization [4, 5], and which is implemented in the ISIS free software
developed at IRSN [9] on the basis of the software component library PELICANS [11]. We
complete the presentation by showing how (ii) may also be used, in some model problems, to
prove the convergence in L1 of the dissipation term.

2 Discretization of the dissipation term


2.1 The two-dimensional case
Let us begin with a two-dimensional case. The first step is to propose a discretization for the
diffusion term in the momentum equation. We begin with the x-component of the velocity, for
x
which we write a balance equation on Ki− = (xi−1 , xi )× (yj− 1 , yj+ 1 ) (see Figures 1 and 2 for
1
,j 2 2 2
x
the notations). Integrating the x component of the momentum balance equation over Ki− 1 ,
,j 2
we get for the diffusion term:
hZ i h Z i
dif
div τ (u)] dx · e(x) = − τ (u) n dγ · e(x) ,

T̄i− 1
,j
= − (4)
2 Kx 1 ,j ∂K x
i− 2 i− 1
2 ,j

where e(x) stands for the first vector of the canonical basis of R2 . We denote by σi,j x the right
x x
face of Ki− 1 ,j , i.e. σi,j = {xi } × (yj− 1 , yj+ 1 ). Splitting the boundary integral in (4), the part
2 2 2
dif
of T̄i− x , also referred to as the viscous flux through σ x , reads:
associated to σi,j
1
,j i,j
2

hZ 2
i Z Z
(x) x
− τ (u) n dγ · e = −2 µ ∂x u dγ + µ (∂x ux + ∂y uy ) dγ,
x
σi,j x
σi,j 3 x
σi,j

2
Viscous dissipation term discretization with the MAC scheme

hxi− 1
2
hxi
yj+ 3
2

uxi− 1 ,j+1
2
hyj+ 1 x
: Ki− 1
,j
yj+ 1 2 2
2
x
yj uxi− 3 ,j uxi− 1 ,j uxi+ 1 ,j hyj : σi,j
2 2 2
yj− 1 x
: σi− 1
2 ,j+ 1
2 2
uxi− 1 ,j−1
yj− 3 2
2x xi− 1 xi+ 1
i− 3 2
xi−1 2
xi 2

Figure 1: Dual cell for the x-component of the velocity


hal-00576268, version 1 - 13 Aug 2011

and the usual finite difference technique yields the following approximation for this term:

4 2
Z Z
x
− µ ∂x u dγ + µ ∂y uy dγ
3 σi,j
x 3 σi,j
x

4 hyj 2 hyj
≈ − µi,j x (ui+ 1 ,j − ui− 1 ,j ) + µi,j y (uyi,j+ 1 − uyi,j− 1 ), (5)
x x
3 hi 2 2 3 hj 2 2

x . Similarly, let σ x
where µi,j is an approximation of the viscosity at the face σi,j =
i− 1 ,j+ 1 2 2
(xi−1 , xi ) × {yj+ 1 } be the top edge of the cell. Then:
2

hZ i Z
− τ (u) n dγ · e(x) = − µ (∂y ux + ∂x uy ) dγ
σx 1 1 σx 1 1
i− 2 ,j+ 2 i− 2 ,j+ 2

h hxi− 1 hxi− 1 i
≈ −µi− 1 ,j+ 1 2
(uxi− 1 ,j+1 − uxi− 1 ,j ) + 2
(uyi,j+ 1 − uyi−1,j+ 1 ) ,
2 2 hyj+ 1 2 2 hxi− 1 2 2
2 2

x
where µi− 1 ,j+ 1 stands for an approximation of the viscosity at the edge σi− .
1
2 2 ,j+ 1 2 2

Let us now multiply each discrete equation for ux


by the corresponding degree of freedom of
x
a velocity field v (i.e. the balance over Ki− by v x ) and sum over i and j. The viscous
1
,j i− 1 ,j 2 2
x appears twice in the sum, once multiplied by v x
flux at the face σi,j and the second one by
i− 1 ,j 2
−v xi+ 1 ,j , and the corresponding term reads:
2

h 4 hy y
2 hj i
dis j x x y y
Ti,j (u, v) = µi,j − (u − u ) + (u − u ) (v xi− 1 ,j − v xi+ 1 ,j )
3 hxi i+ 21 ,j i− 12 ,j 3 hyj i,j+ 21 i,j− 21 2 2

y y
h 4 uxi+ 1 ,j − uxi− 1 ,j x x
2 ui,j+ 21 − ui,j− 21 i v i+ 12 ,j − v i− 12 ,j
= µi,j hyj hxi 2 2
− . (6)
3 hxi 3 hyj hxi

3
Viscous dissipation term discretization with the MAC scheme

x
Similarly, the term associated to σi− appears multiplied by v xi− 1 ,j and by −v xi− 1 ,j+1 , and
1
2
,j+ 21 2 2
we get:
dis
Ti− 1
,j+ 1
(u, v) = µi− 1 ,j+ 1 hxi− 1 hyj+ 1
2 2 2 2 2 2

h uxi− 1 ,j+1 − uxi− 1 ,j uyi,j+ 1 − uyi−1,j+ 1 i v xi− 1 ,j+1 − v xi− 1 ,j


2 2
+ 2 2 2 2
. (7)
hyj+ 1 hxi− 1 hyj+ 1
2 2 2

Let us now define the discrete gradient of the velocity as follows:


– The derivatives involved in the divergence, ∂xM ux and ∂yM uy , are defined over the primal
cells by:
uxi+ 1 ,j − uxi− 1 ,j uyi,j+ 1 − uyi,j− 1
∂xM ux (x) = 2 2
, ∂yM uy (x) = 2 2
, ∀x ∈ Ki,j . (8)
hxi hyj

– For the other derivatives, we introduce another mesh which is vertex-centred, and we
xy
denote by K xy the generic cell of this new mesh, with Ki+ 1
,j+ 1
= (xi , xi+1 ) × (yj , yj+1 ).
hal-00576268, version 1 - 13 Aug 2011

2 2
xy
Then, ∀x ∈ Ki+ 1
,j+ 1
:
2 2

uxi+ 1 ,j+1 − uxi+ 1 ,j uyi+1,j+ 1 − uyi,j+ 1


∂yM ux (x) = 2 2
, ∂xM uy (x) = 2 2
. (9)
hyj+ 1 hxi+ 1
2 2

With this definition, we get:


Z h4 2 i
dis
Ti,j (u, v) = µi,j ∂xM ux − ∂yM uy ∂xM v x dx,
Ki,j 3 3

and: Z
dis
Ti− 1
,j+ 1
(u, v) = µi− 1 ,j+ 1 (∂yM ux + ∂xM uy ) ∂yM v x dx.
2 2 2 2
K xy 1 1
i− 2 ,j+ 2

Let us now perform the same operations for the y-component of the velocity. Doing so, we are
y
lead to introduce an approximation of the viscosity at the edge σi− 1
,j+ 1
= {xi− 1 } × (yj , yj+1 )
2 2 2
x
(see Figure 2). Let us suppose that we take the same approximation as on σi− . Then,
1
,j+ 1 2 2
the same argument yields that multiplying each discrete equation for ux and for uy by the
corresponding degree of freedom of a velocity field v, we obtain a dissipation term which reads:
Z
T dis (u, v) = τ M (u) : ∇M v dx, (10)

where ∇M is the discrete gradient defined by (8)-(9) and τ M the discrete tensor:
 
2µ ∂xM ux µxy (∂yM ux + ∂xM uy )
τ M (u) =   − 2 µ (∂xM ux + ∂yM uy ) I, (11)
µxy (∂yM ux + ∂xM uy ) 2µ ∂yM uy 3

where µ is the viscosity defined on the primal mesh by µ(x) = µi,j , ∀x ∈ Ki,j and µxy is the
xy
viscosity defined on the vertex-centred mesh, by µ(x) = µi+ 1 ,j+ 1 , ∀x ∈ Ki+ 1
,j+ 1
.
2 2 2 2

4
Viscous dissipation term discretization with the MAC scheme

y x y
: Ki,j− 1 : σi− 1
,j+ 1
: σi− 1
,j+ 1
2 2 2 2 2

uyi,j+ 3
yj+ 3 2
2

uyi−1,j+ 1 uyi,j+ 1 uyi+1,j+ 1


yj+ 1 2 2 2
2

uyi,j− 1
yj− 1 2
2
xi− 3 xi− 1 xi+ 1 xi+ 3
2 2 2 2

Figure 2: Dual cell for the y-component of the velocity


hal-00576268, version 1 - 13 Aug 2011

Now the form (10) suggests a natural to discretize the viscous dissipation term in the internal
energy balance in order for the consistency property (ii) to hold. Indeed, if we simply set on
each primal cell Ki,j :

1
Z
(τ (u) : ∇u)i,j = τ M (u) : ∇M u dx, (12)
|Ki,j | Ki,j

then, thanks to (10), the property (ii) which reads:


X
T dis (u, u) = |Ki,j | (τ (u) : ∇u)i,j .
i,j

holds. Furthermore, we get from Definition (11) that τ M (u)(x) is a symmetrical tensor, for any
i, j and x ∈ Ki,j , and therefore an elementary algebraic argument yields:

1
Z
(τ (u) : ∇u)i,j = τ M (u) : ∇M u dx
|Ki,j | Ki,j
1
Z
τ M (u) : ∇M u + (∇M u)t dx ≥ 0.
 
=
2 |Ki,j | Ki,j

Remark 1 (Approximation of the viscosity) Note that, for the symmetry of τ M (u) to hold, the
x y
choice of the same viscosity at the edges σi− 1
,j+ 1
and σi− 1
,j+ 1
is crucial even though other
2 2 2 2
choices may appear natural. Assuming for instance the viscosity to be a function of an additional
variable defined on the primal mesh, the following construction seems reasonable:
1. define a constant value for µ on each primal cell,
2. associate a value of µ to the primal edges, by taking the average between the value at the
adjacent cells,
3. x
finally, split the integral of the shear stress over σi− in two parts, one for the part
1
,j+ 1 2 2
included in the (top) boundary of Ki−1,j and the second one in the boundary of Ki,j .

5
Viscous dissipation term discretization with the MAC scheme

zk+ 1
2

zk− 1
2

yj+ 1
2
xy
: Ki+ 1
,j+ 1 ,k
2 2

xi+ 1
2

xy
Figure 3: The xy-staggered cell Ki+ 1
,j+ 1 ,k
, used in the definition of ∂yM ux , ∂xM uy , and
2 2
τ M (u)x,y = τ M (u)y,x .
hal-00576268, version 1 - 13 Aug 2011

x y
Then the viscosities on σi− 1
,j+ 1
and σi− 1
,j+ 1
coincide only for uniform meshes, and, in the
2 2 2 2
general case, the symmetry of τ M (u) is lost.

2.2 Extension to the three-dimensional case


Extending the computations of the preceding section to three space dimensions yields the fol-
lowing construction.
xy
– First, define three new meshes, which are ”edge-centred”: Ki+ 1
,j+ 1 ,k
= (xi , xi+1 ) ×
2 2
(yi , yj+1 ) × (zk− 1 , zk+ 1 ) is staggered from the primal mesh Ki,j,k in the x and y direction
2 2
xz yz
(see Figure 3), Ki+ 1
,j,k+ 1
in the x and z direction, and Ki,j+ 1
,k+ 1
in the y and z direction.
2 2 2 2

– The partial derivatives of the velocity components are then defined as piecewise constant
functions, the value of which is obtained by natural finite differences:

- for ∂xM ux , ∂yM uy and ∂zM uz , on the primal mesh,


xy
- for ∂yM ux and ∂xM uy on the cells (Ki+ 1
,j+ 1 ,k
),
2 2

- for ∂zM ux and ∂xM uz on the cells xz


(Ki+ 1
,j,k+ 21
),
2
yz
- for ∂yM uz and ∂zM uy on the cells (Ki,j+ 1
,k+ 1
).
2 2

– Then, define four families of values for the viscosity field, µ, µxy , µxz and µyz , associated
to the primal and the three edge-centred meshes respectively.
– The shear stress tensor is obtained by the extension of (11) to d = 3.
– And, finally, the dissipation term is given by (12).

6
Viscous dissipation term discretization with the MAC scheme

3 A strong convergence result


We conclude this paper by showing how the consistency property (ii) may be used, in some
particular cases, to obtain the strong convergence of the dissipation term, and then pass to the
limit in a coupled equation having the dissipation term as right-hand side. To this purpose, let
us just address the model problem:

−∆u = f in Ω = (0, 1) × (0, 1), u = 0 on ∂Ω, (13)

with u and f two scalar functions, f ∈ L2 (Ω). Let us suppose that this problem is discretized by
the usual finite volume technique, with the uniform MAC mesh associated to the x-component
of the velocity. We define a discrete function as a piecewise constant function, vanishing on the
left and right sides of the domain (so on the left and right stripes of staggered (half-)meshes
adjacent to these boundaries), and we define the discrete H1 -norm of a discrete function v by:
Z
||v||1 = (∂xM v)2 + (∂yM v)2 dx.
2

Let (M(n) )n∈N be a sequence of such meshes, with a step hn tending to zero, and let (u(n) )n∈N be
hal-00576268, version 1 - 13 Aug 2011

the corresponding sequence of discrete solutions. Then, with the variational technique employed
in the preceding section (i.e. multiplying each discrete equation by the corresponding unknown
and summing), we get, with the usual discretization of the right-hand side:
Z Z
(n) 2 M (n) 2 M (n) 2
||u ||1 = (∂x u ) + (∂y u ) dx = f u(n) dx. (14)
Ω Ω

Since the discrete H1 -norm controls the L2 -norm (i.e. a discrete Poincaré inequality holds [2]),
this yields a uniform bound for the sequence (u(n) )n∈N in discrete H1 -norm. Hence the sequence
(u(n) )n∈N converges in L2 (Ω) to a function ū ∈ H10 (Ω), possibly up to the extraction of a subse-
quence [2], and he discrete derivatives (∂xM u(n) )n∈N and (∂yM u(n) )n∈N weakly converge in L2 (Ω)
to ∂x ū and ∂y ū respectively. This allows to pass to the limit in the scheme, and we obtain
that ū satisfies the continuous equation (13) (so, since the solution to (13) is unique, the whole
sequence converges). Thus, taking ū as a test function in the variational form of (13):
Z Z
2 2
(∂x ū) + (∂y ū) dx = f ū dx.
Ω Ω

But, passing to the limit in (14), we get:


Z Z Z
M (n) 2 M (n) 2 (n)
lim (∂x u ) + (∂y u ) dx = lim f u dx = f ū dx,
n7→∞ Ω n7→∞ Ω Ω

which, comparing to the preceding relation, yields:


Z Z
lim (∂x u ) + (∂y u ) dx = (∂x ū)2 + (∂y ū)2 dx.
M (n) 2 M (n) 2
n→∞ Ω Ω

Since the discrete gradient weakly converges and its norm converges to the norm of the limit,
the discrete gradient strongly converges in L2 (Ω)2 to the gradient of the solution. Let us now
imagine that Equation (13) is coupled to a balance equation for another variable, the right-hand
side of which is |∇u|2 ; this situation occurs in several physical situations, as the modelling of

7
Viscous dissipation term discretization with the MAC scheme

Joule effect [1], or RANS turbulence models [10, 3]. The discretization (12) of the dissipation
term in the cell K, which reads here:
1
Z
|∇u(n) |2 K = (∂ M u(n) )2 + (∂yM u(n) )2 dx,

|K| K x

thus yields a convergent right-hand side, in the sense that, for any regular function ϕ ∈ C∞
c (Ω),
we have:
XZ Z
|∇u(n) |2 K ϕ dx = |∇u|2 ϕ dx.

lim
n→∞ K Ω
K

(A declination of) this argument has been used to prove the convergence of numerical schemes
in [1, 10, 3].

References
[1] A. Bradji, R. Herbin: Discretization of the coupled heat and electrical diffusion problems
by the finite element and the finite volume methods. IMA Journal of Numerical Analysis,
28, 469–495 (2008).
hal-00576268, version 1 - 13 Aug 2011

[2] R. Eymard, T. Gallouët, R. Herbin, Finite Volume Methods. Handbook of Numerical


Analysis, Volume VII, 713–1020, North Holland (2000)

[3] T. Gallouët, J.-C. Latché: Compactness of discrete approximate solutions to parabolic


PDEs. Submitted (2011).

[4] F.H. Harlow, J.E. Welsh: Numerical calculation of time-dependent viscous incompressible
flow of fluid with free surface. Physics of Fluids, 8, 2182–2189 (1965).

[5] F.H. Harlow, A.A. Amsden: A numerical fluid dynamics calculation method for all flow
speeds. Journal of Computational Physics, 8, 197–213 (1971).

[6] L. Gastaldo, R. Herbin, W. Kheriji, C. Lapuerta, J.-C. Latché: Staggered discretizations,


pressure correction schemes and all speed barotropic flows. Finite Volumes for Complex
Applications VI (FVCA VI), Prague, Czech Republic, June 2011.

[7] R. Herbin, J.-C. Latché: A kinetic energy control in the MAC discretization of compressible
Navier-Stokes equations. International Journal of Finite Volumes 2 (2010).

[8] R. Herbin, W. Kheriji, J.-C. Latché: An unconditionally stable Finite Element-Finite Vol-
ume pressure correction scheme for compressible Navier-Stokes equations. In preparation
(2011).

[9] ISIS: a CFD computer code for the simulation of reactive turbulent flows,
https://gforge.irsn.fr/gf/project/isis.

[10] A. Larcher, J.-C. Latché: Convergence analysis of a finite element-finite volume scheme for
a RANS turbulence model. Submitted (2011).

[11] PELICANS: Collaborative Development Environment.


https://gforge.irsn.fr/gf/project/pelicans.

View publication stats

You might also like