A Finite Volume Method To Solve The Navier-Stokes
A Finite Volume Method To Solve The Navier-Stokes
A Finite Volume Method To Solve The Navier-Stokes
net/publication/236236828
CITATIONS READS
64 5,106
3 authors, including:
All content following this page was uploaded by Jean-Marc Hérard on 12 October 2017.
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
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
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.
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.
814
A finite volume method to solve the Navier–Stokes equations
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).
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
8ν
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
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.
818
A finite volume method to solve the Navier–Stokes equations
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
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
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
823
S. Boivin et al.
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
(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
825