A Finite Volume Method To Solve The Navier-Stokes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

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

net/publication/236236828

A Finite Volume method to solve the Navier-Stokes equations for


incompressible flows on unstructured meshes

Article in International Journal of Thermal Sciences · September 2000


DOI: 10.1016/S1290-0729(00)00276-3

CITATIONS READS

64 5,106

3 authors, including:

Sylvain Boivin Jean-Marc Hérard


University of Québec in Chicoutimi Électricité de France (EDF)
19 PUBLICATIONS 210 CITATIONS 229 PUBLICATIONS 2,890 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Jean-Marc Hérard on 12 October 2017.

The user has requested enhancement of the downloaded file.


Int. J. Therm. Sci. (2000) 39, 806–825
 2000 Éditions scientifiques et médicales Elsevier SAS. All rights reserved
S1290-0729(00)00276-3/FLA

A finite volume method to solve the Navier–Stokes


equations for incompressible flows on unstructured
meshes

Sylvain Boivin a *, Florent Cayré b , c , Jean-Marc Hérard c


a
Université du Québec à Chicoutimi, 555, Boulevard de l’Université, Chicoutimi, Québec, Canada G7H 2B1
b
Groupe Interdisciplinaire de Recherche en Éléments Finis, Université Laval – Pavillon Adrien Pouliot, Québec, Canada G1K 7P4
c
Département Laboratoire National d’Hydraulique, Groupe Recherches et Études en Thermohydraulique,
6, Quai Watier, BP 49, 78401 Chatou cedex, France

(Received 11 May 1999, accepted 22 December 1999)

Abstract — A method to solve the Navier–Stokes equations for incompressible viscous flows and the convection and diffusion of a
scalar is proposed in the present paper. This method is based upon a fractional time step scheme and the finite volume method
on unstructured meshes. A recently proposed diffusion scheme with interesting theoretical and numerical properties is tested and
integrated into the Navier–Stokes solver. Predictions of Poiseuille flows, backward-facing step flows and lid-driven cavity flows are
then performed to validate the method. We finally demonstrate the versatility of the method by predicting buoyancy force driven flows
of a Boussinesq fluid (natural convection of air in a square cavity with Rayleigh numbers of 103 and 106 ).  2000 Éditions scientifiques
et médicales Elsevier SAS
Navier–Stokes / finite volume method / unstructured mesh / fractional time step / diffusion scheme / lid-driven cavity flow /
Boussinesq fluid / natural convection / buoyancy force

Résumé — Une méthode des volumes finis pour la résolution des équations de Navier–Stokes pour des écoulements
incompressibles à maillages non structurés. Cet article propose une méthode de résolution des équations de Navier–Stokes pour
les écoulements visqueux incompressibles et la convection et diffusion d’un scalaire. Celle-ci est basée sur un schéma à pas de temps
fractionnaire et la méthode des volumes finis sur maillages non structurés. Un schéma pour la diffusion, proposé récemment, dont
les propriétés théoriques et numériques sont intéressantes, est testé puis intégré dans un solveur des équations de Navier–Stokes.
Des simulations d’écoulement de Poiseuille, de marche descendante et de cavité carrée entraînée, ont permis de valider la méthode.
Enfin, la polyvalence de la méthode est illustrée par des simulations d’écoulement d’un fluide de Boussinesq soumis à la poussée
d’Archimède (convection naturelle d’air dans une cavité carrée, pour des nombres de Rayleigh de 103 et 106 ).  2000 Éditions
scientifiques et médicales Elsevier SAS
Navier–Stokes / méthode des volumes finis / maillage non structuré / pas de temps fractionnaire / schéma pour la
diffusion / cavité carrée entraînée / fluide de Boussinesq / convection naturelle / poussée d’Archimède

1. INTRODUCTION. MATHEMATICAL of a scalar quantity such as temperature, pollutant con-


MODEL centration or turbulent kinetic energy. Among the exist-
ing methods dedicated to these problems, just a few fulfill
Although many stable, convergent and globally con- the following physical principles:
servative numerical schemes are already available to • local conservation of the mass and the scalar quanti-
solve the Stokes equations, most industrial problems are ties,
governed by the more general Navier–Stokes equations. • numerical preservation of the maximum principle for
Moreover, they are often coupled with an additional the scalar quantities.
equation, in order to model the convection and diffusion
Some numerical schemes using the finite volume
method on structured meshes can deal with these re-
* Correspondence and reprints. quirements. However, only a few results are available on
[email protected] unstructured meshes (see [1–3] for hyperbolic systems,

806
A finite volume method to solve the Navier–Stokes equations

[1, 2, 4–8] for elliptic systems, and [1, 2, 14] for par- velocity and pressure fields in an implicit way, so that
abolic systems). the divergence-free constraint for the velocity field is en-
The scheme presented hereafter fulfills the two previ- sured. The projection step is based on the use of a spe-
ous requirements on unstructured triangular meshes. It is cial property of triangles (or its counterpart, say tetrahe-
based on a fractional time-step method initially proposed dra in the three-dimensional case) to reconstruct the ve-
in [9], but integrates a recent interesting diffusion scheme locity field within each cell in such a way that normal
proposed in [2], which was first separately tested. components of velocities are continuous on each cell in-
terface. The projection step requires solving an elliptic
The method does not require to assemble any matrix,
and the number of arithmetical operations to perform is equation and thus investigating the real rate of conver-
small. Following is a short recall of the mathematical gence of a recently analyzed diffusion scheme nicknamed
model. VF4, which in fact is the straightforward counterpart of
the well-known VF5 scheme which is widely used when
The flow of an incompressible fluid in a domain Ω × using rectangle Finite Volume methods. This eventually
[0, T ] is governed by the Navier–Stokes equations: enables presenting the whole algorithm proposed to solve
∇ ·u=0 (1) incompressible Navier–Stokes equations on unstructured
∂u triangular meshes which do not necessarily agree with
+ ∇ · (u ⊗ u) + ∇p − ∇ · (ν∇u) = f (2) the Delaunay condition. Above mentioned requirements
∂t are shown to be fulfilled on any kind of mesh, provided
where that one uses some adequate reconstruction method when
• p stands for P /ρ0 , with ρ0 being the density and P some IOB commute in the mesh, and obviously some
being the pressure of the incompressible fluid, suitable way to compute local source terms.
• ν is the constant kinematic viscosity of the fluid: ν = Intensive validation of the diffusive scheme is then
µ0 /ρ0 , with µ0 being the constant dynamic viscosity. provided. Convergence rates will be shown to be one
A model of the convection and diffusion of a passive order greater than the theoretical one, considering regular
scalar quantity in the flow is then enough analytical solutions of the Poisson equation,
with different boundary conditions. The scheme is also
∂C proved to converge (with reduced convergence rate) when
+ ∇ · (Cu) − ∇ · (κ∇C) = s (3)
∂t computing Green functions with some singular point
with κ being the constant diffusivity of the scalar quan- inside the computational domain. This study clearly
tity C. shows that the discrete unknowns represent optimal
approximations of the unknown function at the IOB, and
Note that these equations must come with suitable thus also at the cell center—but in that case the measured
boundary conditions, so that the problem has a unique convergence rate is reduced by one. This of course
solution. The field of industrial applications of this has motivated the need to reconstruct better (namely,
model extends to the prediction of pollutant transport
second-order) approximations of the unknowns at the cell
and heat transfer, by adjusting the source terms to the
center of control volumes, using some linear fitting which
corresponding problem.
fortunately is proved in practice to permit retrieving the
The present paper is organized as follows. First of discrete maximum principle on triangular meshes which
all, the time discretization of the Navier–Stokes equa- do not satisfy Delaunay condition.
tions coupled with some governing equation for a pol-
Following numerical results aim at showing the capa-
lutant is recalled. Afterwards, spatial schemes used to
account for convective terms, viscous terms, mean pres- bilities of the present scheme to solve full Navier–Stokes
sure gradient effects and source terms associated with equations. These include Poiseuille flow, the computa-
momentum or scalar equations are recalled, focusing on tion of the lid-driven cavity flow and the backward fac-
triangular meshes. Theoretical rates of convergence ob- ing step. Eventually, an example of the versatility of the
tained recently by other authors are recalled in this sec- scheme is illustrated in Section 5.5 by the computation of
tion. Suitable ways to implement boundary conditions are natural convection of air in a square cavity. Convergence
also discussed. The whole allows to introduce some way history towards steady states is illustrated.
to compute some unsteady convection–diffusion equation Appendix A provides some way to get accurate enough
involving source terms. Hence one may propose a frac- approximations of unknowns on cell centers, on the basis
tional step method which first provides some approxi- of approximations at the intersection of orthogonal bisec-
mation of the velocity field, and then updates both the tors of triangle interfaces. Particular emphasis is given in

807
S. Boivin et al.

Appendix B on the numerical treatment of source terms applications. The main results of this study are presented
pertaining to scalar equations when some maximum prin- in Section 5.1.
ciple is involved. Any kind of source term may thus be Properties concerning the combination of both fol-
implemented provided that its form is such that the max- lowing schemes into a convection–diffusion equation are
imum principle is ensured at the continuous level. pointed out at the end of this section, and Appendix B is
dedicated to the preservation of the maximum principle
with source terms.
2. TIME DISCRETIZATION

The time discretization used here is based upon a 3.1. The convection scheme
variation of the projection scheme originally proposed by
Chorin (see [10]): The convection scheme used in the following is an
• Prediction: upwind scheme. The term to be approximated is
un+1/2 − un  Z Z
+ ∇ un+1/2 ⊗ un u · ∇φ dΩ = ∇ · (uφ) dΩ (10)
δt

− ∇ · ν∇un+1/2 + ∇pn = f n (4)
with φ being the convected variable and u the velocity, in
• Projection: agreement with ∇ · u = 0.
un+1 − un+1/2  A discretization of (10) can be obtained by integration
+ ∇ pn+1 − pn = 0 (5) on each triangle T , followed by the application of the
δt
Stokes theorem:
∇ · un+1 = 0 (6) Z I
• Convection–diffusion of the passive scalar C: ∇ · (uφ) dΩ = φu · n dΓ
T ∂T
C n+1 − C n  
+ ∇ · un+1 C n+1 − ∇ · κ∇C n+1 = s n with n being the outward normal unit vector and ∂T the
δt boundary of the triangle.
(7)
where s n is supposed to be regular enough (s n ∈ L2 (Ω),
Ω being the computational domain). Note that the equa- 3.1.1. Definition inside the domain
tions (5) and (6) are used below under the following form:
Assuming φh (Ti ) and φh (Tj ) denote the approxima-

∇ · un+1/2 − δt1 pn+1 − pn = 0 (8) tions 1 of the variable φ in the adjacent triangles Ti
 and Tj , the convective term on their common edge σij
un+1 = un+1/2 − δt∇ pn+1 − pn (9) is given by
Z
φu · n dΓ
3. SPACE DISCRETIZATION σij
 
' lσij (uh · n)σij αij φh (Ti ) + (1 − αij )φh (Tj )
The convection and diffusion schemes are presented where lσij denotes the length of the edge σij , n denotes
thereafter. The convection scheme is simple and robust. the normal unit vector directed from Ti to Tj , and
Its accuracy could easily be improved using a reconstruc-
tion method such as MUSCL. n
αij = 1 if (uh · n)σij > 0
We insist here particularly on the diffusion scheme, 0 otherwise
which is an essential part of the global solver. It was
proposed in [2], which is not published at the time
1 Note that φ(T ) and φ(T ) are not necessarily the chosen discrete
we write this paper. A numerical study was performed i j
in the report [11], where the scheme was proved to unknowns for the variable φ, but are good approximations of the
variable inside the triangles Ti and Tj . As will be seen later, the discrete
be accurate and preserve the maximum principle, even unknown associated to a triangle can indeed be the best approximation
on poor quality meshes, which is crucial for industrial of φ outside this triangle.

808
A finite volume method to solve the Navier–Stokes equations

Consider the elliptic problem:



−1u = f
(11)
boundary conditions

where the set of boundary conditions is assumed to be


such that the problem is well posed.
Let (Ti )i∈{1,2,...,N} be a triangulation of the domain Ω.
For each triangle Ti , let Si be its surface, Ei the set of its
edges, and ui its associated discrete unknown.
Integrating (11) on Ti and using the Stokes theorem
σb an edge on the boundary of the domain Ω yields
nσ the outward normal unit vector of the edge σb X
φhb the value of the variable φ on the edge σb − FσD (uh ) = Si fi (12)
σ ∈Ei
φh (T ) the value of the variable φ in the triangle T
R
where fi stands for (1/Si ) Ti f (x) dx, FσD (uh ) is an
Figure 1. Boundary conditions for the convection operator. R
approximation of σ ∇u · nσ,Ti ds, where nσ,Ti is the
outward normal unit vector of the edge σ of Ti .
3.1.2. Boundary conditions The expression of FσD (uh ) must be determined both
for edges inside the domain and on the boundary.
For a given boundary edge σb (see figure 1):
• if the fluid is incoming (i.e. (u · n)σb < 0): 3.2.1. Definition inside the domain
Z
φu · n dΓ ' lσb (u · n)σb φhb For each triangle Ti , let x i be the intersection of the
σb orthogonal bisectors (IOB) of the edges (see figure 2).
This point is outside Ti in the case of a triangle that has
where (u · n)σb and φhb stand for the prescribed values one angle strictly larger than π/2. It is on an edge if Ti is
of φ and u · n on the inlet boundary, a right-angled triangle.
• if the fluid is outcoming (i.e. (u · n)σb > 0): We assume here that the edge σij is common to the
Z two triangles Ti and Tj and that x i 6= x j . The case of
equality will be discussed in Section 5.1.
φu · n dΓ ' lσb (u · n)σb φh (T )
σb The expression of the associated numerical flux
FσDij (uh ) is
where T denotes the triangle including the boundary
edge σb . uj − ui
FσDij (uh ) = lij (13)
(x j − x i ) · nij
3.1.3. Theoretical results
where nij = nσij ,Ti is the outward normal unit vector of
The convergence of this upwind scheme is ana- the edge σij of Ti .
lyzed [3] with an explicit Euler time discretization. It is The following coefficient called transmittivity is intro-
proved that under a CFL condition, the scheme converges duced in [2] for each internal edge σij under the assump-
and the rate of convergence is 1/2. tion x i 6= x j :

lij
3.2. The diffusion scheme τσij =
(x j − x i ) · nij

Following is a short summary of the properties estab- With this definition, (13) can be reformulated as
lished in the still unpublished book [2], and that interest
FσDij (uh ) = τσij (uj − ui )
us directly.

809
S. Boivin et al.

Figure 2. Intersection of the orthogonal bisectors of the edges of a triangle.

Figure 3. Different categories of meshes.

3.2.2. Boundary conditions The transmittivity can be defined for the boundary edge σ
as well (under the assumption x σ 6= x i ):
If the boundary condition applied to the edge σ is a lσ
Neumann boundary condition, the numerical flux Fσ is τσ =
(x σ − x i ) · nσ,Ti
equal to the exact flux.
and then
Where a Dirichlet boundary condition applies, the
FσD (uh ) = τσ (uσ − ui )
value uσ is given at the middle point xσ of the boundary
edge σ . Let Ti be the triangle of the mesh including σ ,
and x i its IOB. Assuming that x σ 6= x i , the numerical 3.2.3. Theoretical results
flux is then The properties shown in [2] depend of the quality
of the triangulation (Ti ){i∈1,2,...,N} . Three different cat-
uσ − ui egories of meshes are introduced in the following (see
FσD (uh ) = lσ (14)
(x σ − x i ) · nσ,Ti figure 3):

810
A finite volume method to solve the Navier–Stokes equations

• The category “M1 ” contains the so-called “admissible but its accuracy is also crucial in the projection step, as
meshes” introduced in [2], which are triangulations such will be emphasized in Section 4.1.3.
that For a convection and diffusion equation such as (3),
the theoretical rate of convergence obtained with the
x i ∈ Ti , ∀i ∈ {1, 2, . . . , N} (15)
schemes of the Sections 3.1 and 3.2 is 1/2, due to the
xi 6= xj , ∀(i, j ) ∈ {1, 2, . . . , N}2 /Ti ∩ Tj 6= ∅ (16) rate of convergence of the convection scheme (see Sec-
tion 3.1.3 and [1, 2, 12]). In Appendix B it is proved that
xi 6= xσ , ∀i ∈ {1, 2, . . . , N}/Ti ∩ ∂Ω = σ (17)
the discrete maximum principle is preserved when solv-
Conditions (16) and (17) are necessary for the transmit- ing a convection–diffusion equation with source terms,
tivity τσ to exist for each edge σ of the mesh. Equa- under the assumptions that the mesh belongs to cate-
tion (16) ensures that two adjacent triangles have distinct gory M1 or M2 , and the source terms preserve the con-
IOB (they might be both on the common edge of the tri- tinuous maximum principle and are properly discretized.
angle). Equation (15) implies that τσ is positive.
• The category “M2 ” is the subset of the non-admissible
meshes which satisfy the conditions (16), (17) and 4. GLOBAL SCHEME OF THE
NAVIER–STOKES SOLVER
τσ > 0, ∀i ∈ {1, 2, . . . , N}, ∀σ ∈ Ei (18)

The only difference with the previous category of meshes Some operators are defined below, which will be
is that the IOB of a triangle can be outside of this triangle. used in the presentation of the complete Navier–Stokes
• The meshes that are not included in the two previous scheme.
categories form the category “M3 ”. A particular case of
this category is a mesh for which the transmittivity is not
defined for all the edges. This case will be discussed in 4.1. Definition of the operators
Section 5.1. The usual case corresponds with permutation
of two IOB connected with two adjacent triangles.
4.1.1. Convection and diffusion
The following properties were shown in [2]: operator CDs
1. Convergence. If the mesh belongs to the cate-
gories M1 , the previous scheme converges to the unique In this section, we discretize the following equation on
solution of the problem (11). the domain Ω:
2. Error estimate. If the mesh τ belongs to the cate- w∗ − wn  
gory M1 and the unique solution u of the problem (11) is + ∇ · un w∗ − ∇ · ν∇w∗ = s n (20)
δt
regular enough (u ∈ C 2 (Ω)), we have the following error
estimate: where
keτ kL2 (Ω) ≤ Ch (19) • s n is a source term (see Appendix B for details on its
discretization),
where • the variable w can be either ux , uy (the two coordi-
• eτ (x) = u(xi ) − ui , ∀x ∈ Ti , ∀i ∈ {1, 2, . . ., N}, nates of the speed u) or C (a passive scalar): see equa-
• C is a positive real number, tions (4) and (7),
• h is the mesh size (for example, the length of the • un is such that ∇ · un = 0.
longest edge).
The discrete form is obtained by integrating (20) on
3. Maximum principle. If the mesh belongs to one each triangle Ti :
of the categories M1 and M2 , the discrete maximum Z  ∗ 
principle is preserved (cf. [2] for details). wh − whn  
+ ∇h · unh wh∗ − ∇ · ν∇h wh∗ dΩ
Numerical convergence of the diffusion scheme is Ti δt
Z
studied in Section 5.1. The very interesting properties
demonstrated therein are essential for the quality of the = shn dΩ
Ti
global solver: the scheme is not only used within the
prediction step (diffusion of the velocity components), where unh is supposed to fulfill the following conditions:

811
S. Boivin et al.

• for each edge σ common to the triangles Ti and Tj ∗ if σ is a boundary edge where the fluid is outcoming
(continuity of the normal value on each edge) (i.e. unh · nσ,Ti > 0), then
 
unh · nσ,Ti = −unh · nσ,Tj = unh · n σ (21) Gσ wh∗ = wi∗

• unh is a divergence-free velocity field in the following • FσD (wh∗ ) is the diffusion flux computed as in Sec-
sense: tion 3.2.
X  The system (23) is linear but not symmetric. The
∀i ∈ {1, 2, . . . , N}, lσ unh · n σ = 0 (22) associated matrix is a diagonal dominant M-matrix. The
σ ∈Ei system can be solved using an iterative method such as
Newton–GMRES. This method uses only residuals of
The convective and diffusive terms are computed as
the system, so that the matrix does not need to be built.
presented in Sections 3.1 and 3.2, respectively. The nu-
Moreover, this method handles nonlinear source terms,
merical properties of the diffusion scheme (see Sec-
which is often useful in industrial applications.
tion 5.1), and the discrete form of the source terms (see
Appendix B), are of particular importance in the case The solution wh∗ of the system will be denoted
where a maximum principle has to be preserved. CDs (whn ). The convection and diffusion of the approxi-
mate velocity unh itself can be considered as the convec-
Given the results of Section 3.2 and Appendix A, tion and diffusion of its two coordinates independently.
the discrete unknowns are chosen to be approximations Therefore, we can also use the notation u∗h = CDs (unh ).
of their respective variable at the IOB of the triangles. Note that unh fulfills conditions (21) and (22), but u∗h
However, as noticed in Section 3.1, an approximation of does not. Therefore, the two following operators correct
the convected variable w inside the triangle should be the velocity field so that it fulfills first (21), then (21)
used for the convective term. Therefore, the value chosen and (22).
for the convection is the approximation of w at the center
of gravity of the triangle, computed as in Appendix A.2.4.
This value, denoted Gi (wh ), can also be used within the 4.1.2. Extension operator E
term of the time derivation in order to increase accuracy, This operator is applied on an approximation of the
but concerning the convection scheme, this value is of velocity denoted u∗h , which normal value on the edge of
particular importance as the stability of the scheme may the triangles is not continuous. Its result, denoted u∗∗h =
depend on it (see Appendix A). E(u∗h ), is defined by a unique value of u∗∗h · n σ on each
The discrete form of the equation (20) for a triangle Ti given edge σ of the mesh, as follows.
is • If σ is an internal edge, common to the triangles Ti
Gi (wh∗ ) − Gi (whn ) X  and Tj , then
Si + lσ unh · nσ,Ti Gσ wh∗
δt
σ ∈Ei
u∗∗
h · nσ,Ti
X  
 = tij × u∗i · nσ,Ti + (1 − tij ) × u∗j · nσ,Ti
−ν FσD wh∗ = Si sin (23)
σ ∈Ei The coefficient tij was introduced in Appendix A.2.1.
The expression above is an interpolation on the edge of
where
the projections on nσ,Ti of the speed in the triangles Ti
• Si is the surface of the triangle Ti , and Tj .
• Gσ (wh∗ ) depends on the type of edge: • If σ is a boundary edge where the value gσ of the
∗ if σ is an internal edge, common to Ti and Tj , then normal speed is given, then
  
Gσ wh∗ = αij Gi wh∗ + (1 − αij )Gj wh∗ where u∗∗
h · nσ,Ti = gσ
n
αij = 1 if (uh · n)σij > 0 This case corresponds to a wall, or a boundary where the
0 otherwise
fluid is incoming.
∗ if σ is a boundary edge where the fluid is incoming
(i.e. unh · nσ,Ti < 0), then • If σ is a boundary edge where the value of the normal
speed is not given, then

Gσ wh∗ = whb u∗∗ ∗
h · nσ,Ti = ui · nσ,Ti

812
A finite volume method to solve the Navier–Stokes equations

X X
This case corresponds to a boundary where the fluid is 0 = un+1
i · lσ nσ = lσ un+1
i · nσ
outcoming. σ ∈Ei σ ∈Ei
X 
= lσ un+1
i ·n
4.1.3. Projection operator P σ
σ ∈Ei
This operator applies to both the pressure and the
velocity:
 4.2. Solving the complete set of
n+1 n+1 
P : phn , u∗∗
h 7−→ ph , uh equations
This operation is carried out in two steps, corresponding
4.2.1. Source term for the convection and
to the discretization of the equations (8) and (9). Denot-
diffusion of the velocity
ing δp = pn+1 − pn :
The source term for the convection and diffusion of
∇ · u∗∗ − δt1(δp) = 0 (24) the velocity is
un+1 = u∗∗ − δt∇(δp) (25) s n = f n − ∇pn
The equation (24) is a diffusion problem for the pressure Given a triangle Ti of the mesh, an integration of this
increment δp with a source term. It is solved as in expression on Ti yields
Section 3.2. The second-order accuracy obtained in the Z Z I
numerical tests of the diffusion scheme (see Section 5.1)
is particularly interesting, as it makes it possible to get s dS =
n
f dS −
n
pn n dΓ
Ti Ti ∂Ti
the first-order accuracy for the velocity field correction in
this step. A discrete form of the source term can eventually be
Integrating on a triangle Ti , which set of edges is Ei , obtained by computing approximations of pn at the
yields middle of the edges (see remark in Section 4.2.2). This
is performed with the method exposed in Appendix A.
X 1 X Denoting pσn the value computed that way, the discrete
− FσD (δp) = − lσ u∗∗
h · nσ,Ti
δt form of the source term is
σ ∈Ei σ ∈Ei
X
Si s i = Si f − lσ pσn n (26)
which has the same form as equation (12), and can
σ ∈Ei
therefore be solved the same way. Since the matrix of
the corresponding system is symmetric and positive, an
iterative conjugate gradient algorithm can be used, so that 4.2.2. Discretization of the source terms
we do not need to build the matrix. in the general case
The equation (25) is then discretized as A differentiation should be done between the source
  terms of the convection–diffusion equations, of the ve-
δt
un+1 · n σ = u∗∗ · n σ − FσD (δp) locity components on the one hand, and of the passive
lσ scalar on the second hand.
for each edge σ of the mesh. Note that un+1 fulfills In the second case indeed, if a physical property
conditions (21) and also (22) thanks to equation (6). In imposes a maximum principle for the concerned variable
order to compute un+1 given a triangle Ti and the three in the continuous equation itself, particular attention
i
should be paid to preserve it in the discrete form. As
values (un+1
i · n) σ , ∀σ ∈ Ei , we solve the following set
shown in Appendix B, this can always be performed
of three equations for the two variables ai and bi :
on meshes of the categories M1 and M2 , by using a
  
 good discretization of the source terms (with the obvious
 un+1 = ai preliminary condition that the maximum principle is
i bi
 ∀σ ∈ E , un+1 · n = un+1 · n
 preserved in the continuous system).
i i σ i σ

This problem is, however, well posed, since we have 4.2.3. The complete algorithm
also the following linear combination, based upon a • Given an initial solution u−1
h which satisfies (21)
geometrical property of triangles: and (22), and Ch0 ,

813
S. Boivin et al.

• assuming ph−1 = 0, TABLE I


Expression of the solutions tested in the numerical
• apply the projection operator:
predictions of the diffusion problem of Section 3.2.
 
ph0 , u0h = P ph−1 , u−1
h u1 (x, y) = xy + y 1u1 = 0
u2 (x, y) = x 2 + y 2 1u2 = 4
• Given (unh , phn ), we obtain (un+1 n+1
h , ph ) by u3 (x, y) = sin(x + y) 1u3 = −2 sin(x + y)

– prediction of the velocity field uh : u4 (x, y) = 12 ln((x − 1)2 + (y − 1)2 ) 1u4 = δ(1,1)
∗ compute the source term of CDs thanks to equa- u5 (x, y) = 1
ln((x − 1/7)2 + (y − 10/7)2 ) 1u5 = δ(1/7,10/7)
2
tion (26),
∗ apply the convection and diffusion operator: u∗h =
showing that the type of boundary condition has no
CDs (unh ),
influence on the results.
– apply the extension operator: u∗∗ ∗
h = E(uh ), The measured rates of convergence obtained with
– apply the projection operator: (phn+1 , un+1 h ) = meshes of the categories M2 and M3 are the same as with
P (phn , u∗∗
h ). meshes of the category M1 . Moreover, the maximum
• Given Chn , apply the convection and diffusion opera- principle is still fulfilled with meshes of the category M2 ,
tor: Chn+1 = CD0 (un+1 which is in agreement with the theoretical results recalled
h ), where CD0 denotes the con- in Section 3.2.3. Even more, the most amazing point
vection and diffusion operator with a null source term.
is that using proposed extrapolation in the case of the
category M3 enables preserving this maximum principle.
A problem of definition of the transmittivity may
5. NUMERICAL EXPERIMENTS
appear as soon as two adjacent triangles have the same
IOB. However, using a low threshold for the distance
5.1. Numerical rate of convergence of between two IOB (to avoid divisions by zero) solves this
the diffusion scheme problem, as our computations performed on meshes with
rectangles cut into two triangles show.
Our main goal was to verify the theoretical results pre-
sented in Section 3.2.3, and to analyze the convergence 5.1.2. Conclusions
on meshes of the categories M2 and M3 . This study was
The results of numerical experiments are much better
first presented in the unpublished report [11], and follow-
than the theoretical results obtained in [2]. There is, how-
ing is a short summary of the results.
ever, no contradiction; it simply means that, according to
numerical results, the error estimate (19) obtained in [2]
5.1.1. Numerical results is probably not optimal.
On meshes of the category M1 , the measured rate Another interesting point is that the computed approx-
of convergence for the tested regular solutions (see the imation is closer to the value of the exact solution at the
expressions of u1 , u2 , u3 and u4 in table I) is 2. For an IOB than at the center of gravity of the triangles, as we
irregular solution (such as u5 with a Dirac source point can see in figure 4, where two curves have been plotted.
inside the domain), the measured rate of convergence • The first one is the convergence curve defined by the
is 1. following quantity as a function of the mesh size h:
Note that u5 is a Green function centered inside the v !
u n
domain. This solution is not regular enough for the proof uX 2
of the error estimate (19) proposed in [2]. However, log t Si ui − u(xi ) (27)
u4 , which has the same form, is regular enough since i=1
its source point is located outside the computational
domain. • The second one provides a comparison between the
approximation computed in each triangle Ti and the value
No violation of the maximum principle has been of the exact solution at the centroid xiG of Ti :
observed, which matches with the third property stated
v !
in Section 3.2.3. u n
uX 
log t
2
Tests have been performed on both types of boundary Si ui − u xiG (28)
conditions (Dirichlet or Neumann boundary conditions) i=1

814
A finite volume method to solve the Navier–Stokes equations

Figure 6. Geometrical description of the channel for Poiseuille


flows computations.

of the edges) are also second-order accurate in respect


to the mesh size h for regular solutions (and first-order
accurate for irregular solution, such as u5 ). In this figure,
the following errors were plotted as functions of the mesh
size h:
sP !
σ ∈E lσ (uσ − u(xσ ))
2
log P (29)
σ ∈E lσ
Figure 4. Convergence of u3 (x, y) = sin(x + y) on meshes of v !
type M3 . u n
uX 
log t Si u − u x
G G 2
(30)
i i
i=1

with
• E being the set of all the edges of the mesh,
• xσ being the middle of the edge σ ,
• uσ being the value at the middle of the edge σ ,
computed as in Appendix A.2.2,
• uGi being the value at the center of gravity of the
triangle Ti , computed as in Appendix A.2.4.
Note that the error (30) is different from both (27)
and (28).

5.2. Poiseuille flow

5.2.1. Description of the numerical


Figure 5. Convergence of u1 (x, y) = xy + y on meshes of
type M3 . experiment
We study here the two-dimensional flow of an incom-
In the case of meshes of the category M3 , the maxi- pressible viscous fluid in a channel (see figure 6). The
mum principle is apparently not fulfilled anymore if we length and height of the channel are L = 1 and H = 0.2,
associate the value of each IOB with its triangle itself, respectively.
which is not adapted to the case where the IOB is outside The necessary boundary conditions are:
the latter. However, using the method presented in Ap-
• inlet: parabolic velocity profile
pendix A, an approximation of the variable at the center
of gravity of each triangle can be computed. With these y(H − y)
values, no violation of the discrete maximum principle ux (0, y) = Umax and uy (0, y) = 0
(H /2)2
could be detected in our tests. As can be seen in figure 5,
the different interpolated values in these tests (not only • outlet: uniform value for the pressure pOutlet = 0,
the values at the center of gravity, but also at the middle • walls: null velocity uWall = 0.

815
S. Boivin et al.

Figure 7. Convergence of the computation for Re = 100: Figure 8. Unstructured mesh for computations of lid-driven
kun+1
h − unh kL2 as a function of the number of time steps (semi- cavity flows (1 872 elements).
structured mesh of 2 400 triangles).

The analytic solution of this problem is known all over 5.3. Lid-driven cavity flow
the computational domain:
y(H − y) 5.3.1. Description of the numerical
ux (x, y) = Umax
(H /2)2 experiment
uy (x, y) = 0
The geometry of this problem is a squared cavity

p(x, y) = − 2 Umax (x − L) of size L = 1. The boundaries of the cavity are walls,
H except the upper boundary for which a uniform tangential
with ν being the kinematic viscosity of the fluid. velocity is prescribed (ux = 1 and uy = 0). Numerical
The Reynolds number is defined by results of this problem can be found in [13] and [14].
Two computations were performed in the present study,
Umax L for Reynolds numbers of 400 and 1 000, respectively.
Re =
ν
with Umax being the maximum velocity. The computa- 5.3.2. Results
tions were performed with Reynolds number 100.
In this case, an unstructured mesh of 1 872 elements
has been used (see figure 8).
5.2.2. Results
Both computations were performed with the same
Many computations were performed with meshes of time step number τ = 1. A converged solution is obtained
different types, from 600 to 11 045 triangles. after 100 time steps (see figure 9).
In every case, the convergence of the computation is Figures 10 and 11 show streamlines and isobars for
good, as shown in figure 7. Most of the computations Re = 400 and 1 000, respectively. The results are in good
were performed on completely unstructured meshes, agreement with the solutions presented in [14], in which
which are obviously not adapted to the flow structure. the authors also use first order spatial approximation
Poiseuille flows are so critical tests for the global scheme. schemes.
Even with semi-structured meshes (that is, obtained by The local characteristics are in good agreement with
dividing rectangles into two triangles), the convergence [14] as well, as can be seen on figures 12 and 13, where
is fast and the results accurate, although the diffusion the velocity profiles along the vertical and horizontal
scheme is theoretically undefined in this case. centerlines of the cavity are represented.

816
A finite volume method to solve the Navier–Stokes equations

Figure 10. Streamlines (a) and isobars (b) for Re = 400.

Figure 11. Streamlines (a) and isobars (b) for Re = 1 000.

• outlet: uniform value for the pressure pOutlet = 0,


• walls: null velocity uWall = 0.
The Reynolds number is defined by
2
Figure 9. Convergence of the computations: kun+1 − unh kL2 as a Umax 2h
Re = 3
h
function of the number of time steps performed.
ν

5.4. Backward-facing step The computations were performed for the following
Reynolds numbers, for comparison with the results ob-
tained in [15] (an experimental study), [9, 16] (numerical
5.4.1. Description of the numerical studies): 50, 100, 200, 300, 400, 500, 600.
experiment
We consider here an incompressible two-dimensional 5.4.2. Results
viscous flow in a channel with a backward-facing step, as
shown in figure 14. The mesh we used for all the following computations
is a semi-structured grid of 1 720 triangles. The solutions
Denoting h the dimension of the inlet of the channel, have rapidly converged with high time step numbers,
and H the height of the step, the value of the ratio H / h thanks to the implicit scheme (see figure 15).
is 0.94.
The lower reattachment length is plotted as a func-
The boundary conditions used in the computations tion of the Reynolds number in figure 16. A comparison
are: with the results of [9, 15, 16] shows that the reattach-
• inlet: parabolic velocity profile ment length is slightly underestimated. For high values
(y − H )(H + h − y) of the Reynolds number, a secondary recirculation region
ux (0, y) = Umax and appears near the upper wall of the channel, downstream
(h/2)2
from the previous one. In the present study, this recircu-
uy (0, y) = 0 lation region appears only for a Reynolds number of 600.

817
S. Boivin et al.

Figure 12. Velocity profiles along the centerlines of the cavity for Re = 400.

Figure 13. Velocity profiles along the centerlines of the cavity for Re = 1 000.

Figure 14. Geometrical description of the backward-facing step.

818
A finite volume method to solve the Navier–Stokes equations

Figure 17. Streamlines for Re = 300.

The quantities L, L2 /κ (with κ being the constant


thermal diffusivity) and ρκ 2 /L2 are used as scale factors
for length, time and pressure, respectively. We denote
θ = (T − Tc )/1T with 1T = Th − Tc and T being
the local dimensional temperature of the fluid. The
nondimensional equations are then

Figure 15. Convergence of the computation for Re = 300 and ∇ ∗ · v∗ = 0


τ = 20: kwhn+1 − whn kL2 as a function of the number of time ∂v ∗ ∗

∗ ∗
+ v · ∇ v + ∇ ∗ p∗ − Pr 1∗ v ∗ = Ra Pr θ k (31)
steps, for both the velocity and the pressure.
∂t ∗
∂θ 

+ v ∗ · ∇ ∗ θ − 1∗ θ = 0
∂t
with
• Ra = βg1T L3 /(κν) being the Rayleigh number,
β being the coefficient of volumetric expansion, g being
the gravity and ν being the kinematic viscosity;
• Pr = ν/κ being the Prandtl number (Pr = 0.71 in our
case);
• k being the vertical descending unit vector.
As we can see, the set of equations (31) is formally
identical to (1), (2), (3).
The source term s = Ra Pr θ k of the second equation
is approximated, for a given triangle Ti at the date t n+1 ,
Figure 16. Lower reattachment length L/H as a function of the by
Reynolds number Re.
s n+1
i = Si Ra Pr θin k
Obviously, the grid is too coarse for this problem. How- with Si being the surface of Ti .
ever, these results show the ability of the method to pre- The computations were performed with Rayleigh num-
dict such channel flows. bers of 103 and 106 on uniform unstructured meshes of
1 872 elements and 11 434 elements, respectively.

5.5. Natural convection in a square


cavity 5.5.2. Results
Following are results compared with the bench mark
5.5.1. Problem and equations solutions obtained in [18]. For a qualitative comparison,
contour plots of the velocity components, the pressure
The problem being considered here was extensively and the temperature are given (see figures 18–21).
studied in [17, 18]. It is the problem of a two-dimensional
Moreover, some characteristic numerical values are
flow of a Boussinesq fluid of Prandtl number 0.71
supplied for a quantitative comparison (see tables II
in an upright square cavity of side L. Both velocity
and III):
components are zero on the boundaries. The horizontal
walls are insulated, and the left and right vertical sides • the maximum vertical velocity on the horizontal mid-
x=1/2
are at temperatures Th and Tc , respectively. plane (umax ) and its location (ymax ),

819
S. Boivin et al.

Figure 18. Contours of the velocity components of our solution Figure 21. Contours of the pressure (a) and temperature (b)
at Ra = 103 . (a) Contours at −3.558 (0.7125) 3.567. (b) Con- of the solution at Ra = 106 . (a) Contours at −18 742 (39 032.6)
tours at −3.612 (0.7211) 3.599. 371 584. (b) Contours at 0 (0.1) 1.

TABLE II
Comparison between our solution and the bench mark
solution at Ra = 103 .

x=1/2 y=1/2
umax (ymax ) vmax (xmax ) Nu1/2
Bench mark solution 3.649 (0.813) 3.697 (0.178) 1.118
Our solution 3.603 (0.814) 3.646 (0.174) 1.106

TABLE III
Comparison between our solution and the bench mark
solution at Ra = 106 .
Figure 19. Contours of the pressure (a) and temperature (b) x=1/2 y=1/2
of the solution at Ra = 103 . (a) Contours at −67 (45.8) 391. umax (ymax ) vmax (xmax ) Nu1/2
(b) Contours at 0 (0.1) 1. Bench mark solution 64.63 (0.850) 219.36 (0.0379) 8.799
Our solution 67.96 (0.854) 219.20 (0.0405) 9.467

These results are in good agreement with the bench


mark solutions. Note that the lack of accuracy of the
convection scheme used for these computations may be
responsible for small differences (especially in the case
where Ra = 106 ). This could easily be improved using a
method such as MUSCL.

6. CONCLUSION
Figure 20. Contours of the velocity components of our solution
at Ra = 106 . (a) Contours at −125.74 (25.08) 125.07. (b) Con- A solver for the Navier–Stokes equations has been
tours at −215.27 (43.19) 216.61. proposed to simulate incompressible viscous flows and
a convection and diffusion problem for a passive scalar
• the maximum horizontal velocity on the vertical mid- quantity. This solver is based upon a fractional time step
y=1/2 scheme and the finite volume method on unstructured
plane (vmax ) and its location (xmax ), triangular meshes. We emphasize that the accuracy of
• the average Nusselt number on the vertical mid-plane the diffusion scheme is of prime importance to get a
Z 1  reliable pressure–velocity correction step, and also, of
∂T course, to compute diffusive terms in scalar equations
Nu1/2 = u(y)T (y) − (y) dy
0 ∂x x=1/2 and in momentum governing equation. Up to the authors,
measured second-order accuracy of the diffusion scheme

820
A finite volume method to solve the Navier–Stokes equations

based on the IOB, which differs from the theoretical [6] Baranger J., Maître J.F., Oudin F., Application de la
one which is proved to be one, is worth being known. théorie des éléments finis mixtes à l’étude d’une classe de
schémas aux volumes différences finis pour les problèmes
It nevertheless requires that one works with both cell elliptiques, C.R. Acad. Sci. Paris Série I 319 (1994) 401–
averaged values and approximations at the IOB. 404.
The numerical method is simple and is a good com- [7] Baranger J., Maître J.F., Oudin F., Connection be-
tween finite volume and mixed finite element methods,
promise between computation time and accuracy, es- Math. Mod. Numer. Anal. 30 (4) (1996) 445–465.
pecially due to the diffusion scheme. The convection [8] Cai Z., Mandel J., McCormick S., The finite volume
scheme’s accuracy may be improved using currently pro- element method for diffusion equations on general trian-
posed interpolation and a reconstruction method such as gulations, SIAM J. Numer. Anal. 28 (2) (1991) 392–402.
MUSCL. [9] Boivin S., Hérard J.M., Résolution des équations
de Navier–Stokes par la méthode des volumes finis sur
The three-dimensional extension of the method is maillage non structuré, Rapport EDF HE-41/96/004/B,
feasible using tetrahedra. Moreover, an extension to 1996.
flows of variable viscosity fluids and to turbulent models [10] Chorin A.J., Numerical solution of the Navier–
Stokes equations, Math. Comput. 22 (1968).
such as k–ε can be performed. However, this requires
[11] Cayré F., Schémas volumes finis pour un problème
providing an accurate approximation of the gradient of a elliptique sur maillage triangulaire — Etude numérique de
scalar variable on each interface, and not only the normal convergence, Rapport EDF HE-41/97/057/A, 1997.
derivative. Indeed, in the general case ∇ · (µeff (∇u + [12] Herbin R., An error estimate for a finite volume
∇ t u)) 6= ∇ · (µeff ∇u), although the equality is true in the scheme for a diffusion–convection problem on a triangular
present paper since ∇u = 0 and µeff = µ0 is constant. mesh, Numer. Methods Part. Diff. Eq. 11 (1995) 165–173.
[13] Ghia U., Ghia K.N., Shin C.T., High-Re solutions for
A first proposition for such an approximation is provided incompressible flow using the Navier–Stokes equations and
and analyzed in [11]. However, it is not clear whether this a multigrid method, J. Comput. Phys. 48 (1982) 387–411.
one is good enough, and it anyway requires much more [14] Churbanov A.G., Pavlov A.N., Vabishchevich P.N.,
numerical and theoretical investigation. We thus believe Operator-splitting methods for the incompressible Navier–
that the implementation of turbulent models is far beyond Stokes equations on non-staggered grids, Int. J. Numer.
Methods Fluids 21 (1995) 617–640.
the purpose of the present work, since no theoretical
[15] Armaly B.F., Durst F., Pereira J.C.F., Schönung B.,
proof of convergence is available in this area by now. Experimental and theoretical investigation of backward-
facing step flow, J. Fluid Mech. 127 (1983) 473–496.
Acknowledgements [16] Barton I.E., A numerical study of flow over a
confined backward-facing step, Int. J. Numer. Methods
Part of this work has benefited from fruitful dis- Fluids 21 (1995) 653–665.
cussions with Prof. Thierry Gallouët. Financial support [17] De Vahl Davis G., Jones I.P., Natural convection
has been provided by Électricité de France under EDF in a square cavity: a comparison exercise, Int. J. Numer.
Methods Fluids 3 (1983) 227–248.
contract AEE256/B02501. Computational facilities were [18] De Vahl Davis G., Natural convection of air in
provided by Université Laval, Québec. a square cavity: a bench mark solution, Int. J. Numer.
Methods Fluids 3 (1983) 249–264.

REFERENCES

[1] Gallouët T., An introduction to finite volume meth- APPENDIX A


ods, in: Problèmes non linéaires appliqués : Méthodes de
volumes finis, Écoles CEA-EDF-INRIA, 1992. Local interpolation method on triangular
[2] Eymard R., Gallouët T., Herbin R., Finite volume meshes
methods, in: Ciarlet P.G., Lions J.L. (Eds.), Handbook of
Numerical Analysis, North-Holland, to appear.
[3] Champier S., Gallouët T., Convergence d’un A.1. Problem
schéma décentré amont sur un maillage triangulaire pour
un problème hyperbolique linéaire, Math. Mod. Numer.
Anal. 26 (1992) 835–853. The upwind convection scheme presented previously
[4] Faille I., Modélisation bidimensionnelle de la (see Section 3.1) requires that a value of the convected
genèse et de la migration des hydrocarbures dans un variable inside the cell is provided, in order to compute a
bassin sédimentaire, Thèse de doctorat de l’Université correct flux through the edges. Otherwise, the upwinding
Joseph Fourier, Grenoble I, 1992.
becomes a “downwinding” for each edge with negative
[5] Faille I., A control volume method to solve an
elliptic equation on a two-dimensional irregular mesh, transmittivity, which might result in a local lack of
Comput. Methods Appl. Mech. Engrg. 100 (1992) 275–290. stability of the convection scheme.

821
S. Boivin et al.

Moreover, in order to compute good approximations needed for the value of the exact solution at the middle
of integrals on a cell, such as of σ , since this value is given. If a Neumann condition
Z applies, the given value is the exact flux Fσ , and the
∂wh natural choice for the approximation at the middle of σ
dΩ
Ti ∂t is uσ such that
values of the discrete variable wh inside the triangles are Fσ
necessary. Fσ = τσ (ui − uσ ), i.e. uσ = ui −
τσ
If ui is a second-order approximation of the exact
A.2. Method solution at the IOB of Ti , then uσ is also a second-order
approximation of the exact solution at the middle of σ .
The method described below is based on the following
observation. Let ui be the approximation obtained for the A.2.3. Case of a boundary edge without any
triangle Ti with the diffusion scheme presented above. boundary condition
Let xi and xiG be the IOB and the centroid of Ti ,
respectively. As will be seen in Section 5.1, ui is a
Let σ be a boundary edge where no boundary condi-
second-order approximation of u(xi ) and, consequently,
tion applies, xσ its middle, Ti the triangle including σ .
a first-order approximation of u(xiG ). This leads to use ui
Even in this case, a good approximation uσ of the solu-
as a good enough representation of the exact solution at
tion at xσ can generally be computed.
the IOB, in order to get a new approximation of u at the
centroid, denoted later on Gi (uh ). In order to compute However, if Ti has only one adjacent triangle (i.e.
this value, we first need to compute approximations of u it has two edges on the boundary), the approximation
at the middle of all the edges of the mesh. we choose is simply uσ = ui , which is a first-order
approximation.
In the opposite case, the values uj and uk of the
A.2.1. Interpolation at the middle of the two triangles Tj and Tk adjacent with Ti can be used to
internal edges compute a more accurate approximation:

Let be given an internal edge σij , common to the τσij (ui − uj ) + τσik (ui − uk )
u σ = ui +
triangles Ti and Tj whose IOB are xi and xj , respectively τσ
(see figure 3). Denoting xij as the middle of σij , the three
points xi , xj and xij are aligned. Therefore, xij can be Note that if ui , uj and uk are second-order approxima-
considered as the center of gravity of the system: tions of the exact solution at the IOB of Ti , Tj and Tk ,
 respectively, then uσ is a second-order approximation of
(xi , tij ); (xj , 1 − tij ) , where the exact solution at the middle of σ .
(xj − xij )(xj − xi )
tij =
(xj − xi )2 A.2.4. Interpolation at every point of the
Assume that the computation leads to first- or second- domain
order approximations of the exact solution at the IOB
of Ti and Tj , denoted ui and uj , respectively. Then Let M be a point of a triangle Ti of the mesh. Let xσ1 ,
this level of accuracy is preserved for the middle of the xσ2 , xσ3 be the middles of the edges σ1 , σ2 , σ3 of Ti ,
edge σij , with the following choice: and let uσ1 , uσ2 , uσ3 be second-order approximations of
the exact solution at these points. Denoting α and β two
uij = tij ui + (1 − tij )uj (A.1)
real numbers such that M is the center of gravity of the
system 2
A.2.2. Interpolation at the middle of the 
boundary edges (xσ1 , α); (xσ2 , β); (xσ3 , 1 − α − β)

Let σ be a boundary edge included in the triangle Ti . 2 That is, such that α(x − x ) + β(x − x ) + (1 − α − β)(x −
M σ1 M σ2 M
If a Dirichlet condition applies to σ , no approximation is xσ3 ) = 0.

822
A finite volume method to solve the Navier–Stokes equations

a second-order approximation of the exact solution at the with


point M is • ∀i ∈ {1, 2, . . . , N}, ∀j ∈ {1, 2, . . . , N}, j 6= i,
uM = αuσ1 + βuσ2 + (1 − α − β)uσ3 Ωi
Dii = , Dij = 0
An important case for M is when it is the centroid Gi δt
of Ti (i.e. α = β = 1/3): • ∀i ∈ {1, 2, . . . , N}, ∀k ∈ V (i),
uσ + uσ 2 + uσ 3 
uG = 1 (A.2) X
i
3 
 Aconv = lij (u · n)ij αij
ii
The combination of the equations (A.1) and (A.2) give us j ∈v(i)

 Aconv = l (u · n) (1 − α )
a discrete operator G of second-order accuracy locally. ik ik ik
ik
From a field defined at the IOB, the application of this
operator yields a field defined at the centroid of the (other coefficients = 0);
triangles of the mesh. The value of this last field for a
• ∀i ∈ {1, 2, . . . , N}, ∀k ∈ V (i),
discrete variable wh , at the centroid of the triangle Ti
(i ∈ {1, 2, . . ., N}), is denoted Gi (wh ).  X

 Aii =
diff
τij
j ∈v(i)


APPENDIX B Adiff = −τik
ik
Convection–diffusion equation: source
term discretization and preservation of (other coefficients = 0);
the maximum principle • s n being a discrete form of the continuous source
term s, such that the discrete maximum principle is
In this appendix, we examine how the source term preserved.
should be discretized to preserve the maximum principle
when solving a convection–diffusion equation on meshes
of the categories M1 and M2 . B.1.2. Properties of the matrices

P ROPOSITION. – On meshes of the categories M1


B.1. Equation. Properties of the matrix
and M2 , D is a diagonal matrix and B is a matrix with
of the system
strictly dominant diagonal, such that

B.1.1. Matrix form of the system


• ∀i ∈ {1, 2, . . . , N}, Dii > 0;
• ∀i ∈ {1, 2, . . ., N}, Bii > 0 and ∀i ∈ {1, 2, . . . , N},
We discretize here the following equation, given some ∀j ∈ {1, 2, . . . , N}, j 6= i, Bij ≤ 0.
initial conditions for φ:
Proof. –
∂φ • ∀i ∈ {1, 2, . . . , N}, Dii = Ωi /δt > 0.
+ ∇ · (φu) − ∇ · (κ∇φ) = s (B.1)
∂t • As
with φ being the scalar unknown, u being the divergence – ∀i ∈ {1, 2, . . . , N}, ∀j ∈ {1, 2, . . . , N}, j 6= i,
free velocity field, and s being the source term. Aconv
ii ≥ 0 and Aconv ij ≤ 0, according to the definition
As a seek for simplicity of the matrix form that of αij , and
follows, we assume homogeneous Neumann boundary – ∀i ∈ {1, 2, . . . , N}, ∀j ∈ {1, 2, . . . , N}, j 6= i,
conditions for φ ((∂φ/∂n)|Γ = 0), and a tangent velocity ii ≥ 0 and Aij ≤ 0 because for meshes of the
Adiff diff
field on the boundary (u · n|Γ = 0). categories M1 and M2 , τij > 0,
The matrix form of the scheme described in Sec- then ∀i ∈ {1, 2, . . . , N}, ∀j ∈ {1, 2, . . . , N}, j 6= i,
tions 3.1 and 3.2 writes:
Bii = Dii + Aconv
ii + Adiff
ii > 0 and
(D + A +A
conv diff
)φ n+1
= Dφ + δtDs
n n
| {z } Bij = Aconv
ij + Adiff
ij ≤ 0
B

823
S. Boivin et al.

• And finally, as B.2.2. Proof of the preservation of the discrete


– ∀i ∈ {1, 2, . . . , N}, maximum principle
X X
Aconv
ij = lij (u · n)ij = 0 With the previous notations, the discrete system writes
j ∈{1,2,...,N} j ∈v(i)
Bφ n+1 = Dφ n + 1tDShn
(u is divergence-free), 
= Df n (n + 1)1t (B.4)
– ∀i ∈ {1, 2, . . . , N},
X where
ij = 0
Adiff • f n = (f1n , f2n , . . . , fNn )T , fin is the solution of prob-
j ∈{1,2,...,N} lem (B.3) with the initial condition fin (n1t) = φin ;
then • Shn = (sh,1
n n
, sh,2 n
, . . . , sh,N )T with
X
∀i ∈ {1, 2, . . ., N}, Bii + Bij = Dii > 0 fin ((n + 1)1t) − fin (n1t)
n
sh,i =
j ∈{1,2,...,N}−{i} 1t
Denote ψ = 1 − φ, and suppose ∀i ∈ {1, 2, . . . , N},
As a consequence, the matrix B has an inverse B −1
0 ≤ φin ≤ 1 (denoted 0 ≤ φ n ≤ 1 in the following), then
which coefficients are positive numbers. In the following,
this property will be denoted • 0 ≤ φ n+1 = B −1 Df n ((n+1)1t) as B −1 ≥ O, D ≥ O
and f n ((n + 1)1t) ≥ 0;
B −1 ≥ O (B.2) • ψ n ≥ 0, and as Aconv 1 = Adiff 1 = 0:

Bψ n+1 = B1 − Bφ n+1

B.2. Discrete form of the source term to = B1 − Df n (n + 1)1t
preserve the principle of maximum 
= D 1 − f n (n + 1)1t

B.2.1. Definition of the discrete form of the


As a result, ψ n+1 = 1 − φ n+1 ≥ 0.
source term This ends the demonstration by proving that

(0 ≤ φ n ≤ 1) ⇒ (0 ≤ φ n+1 ≤ 1)
We suppose here that the variable φ of problem (B.1)
is such that 0 ≤ φ ≤ 1. The continuous principle of
maximum is supposed to be preserved (thanks to a
convenient physical model), and so the source term is B.3. Conclusion
such that
• considering the following (possibly nonlinear) system With a correct discrete form of the source term (de-
with initial condition fined in Appendix B.2.1), the properties of the global
 n scheme produced in Appendix B.1, for meshes of the cat-
 df  egories M1 and M2 , enable proving that the discrete max-
(t) = s f n (t)
(B.3) imum principle is preserved. This is a crucial character-
 dt
f n (n1t) = φ n , 0 ≤ φ n ≤ 1 istic of the scheme, which ensures that problems encoun-
tered in classical industrial applications, such as natural
• this problem has a unique solution such that 0 ≤ convection near a wall, will never lead to nonphysical val-
f n ((n + 1)1t) ≤ 1. ues of the variables (under the assumption that the physi-
Given this property and the analytical solution f n (t) cal model is convenient, in the sense of Appendix B.2.1).
of the problem, we build the following time-consistent Concerning meshes of the category M3 , the extra-
approximation of the source term: polation method presented in Appendix A should ensure
that the maximum principle is also preserved: although
f n ((n + 1)1t) − f n (n1t) we did not prove that theoretically, we could not exhibit
shn =
1t any violation during our numerical tests.

824
A finite volume method to solve the Navier–Stokes equations

B.4. Example • if φin = 1 then fin ((n + 1)1t) = 1;


• if 0 ≤ φin < 1, let
In the following example, we consider the problem
∂φ φin
+ ∇ · (φu) − ∇ · (κ∇φ) = s = λφ(1 − φ), λ ∈ < G= eλi 1t
∂t 1 − φin
The analytical resolution of problem (B.3) yields Then
f n ((n + 1)1t) − fin (n1t)  G
n
sh,i = i fin (n + 1)1t =
1t 1+G
φin (1 − φin )(eλi 1t − 1 and so
= 
1t[φin (eλi 1t − 1) + 1] 0 ≤ fin (n + 1)1t < 1
Now we can check that
  
0 ≤ φin ≤ 1 ⇒ 0 ≤ fin (n + 1)1t ≤ 1

825

View publication stats

You might also like