an accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a...

35
An accurate positivity preserving scheme for the Spalart-Allmaras turbulence model Emmanuel Lorin Amine Ben Haj Ali Azzeddine Soulaimani September 8, 2006 Abstract We propose an accurate numerical method preserving the positivity of the turbulent viscosity in the Spalart-Allmaras model focusing in particular on the stiffness of the source term. The goal is to apply this model for turbulent flows using an effective numerical method based on a mixed FE-FV method. A mathematical analysis of the continuous and numerical model are provided. Preliminary three-dimensional numerical simulations of turbulent flows on the flat plate using unstructured grids are presented. Keywords. Spalart-Allmaras model, turbulence, finite volumes schemes, finite elements schemes, positivity. 1 Introduction This paper is devoted to the analysis of the standard Spalart-Allmaras model [29] for turbulent flows in boundary layers. The large diversity of time and space scales existing in the Navier- Stokes equations leads to the modelling of turbulent scales. Different models exist ranging from algebraic models, for example [35] where the turbulent viscosity is a damping function near the wall, to partial differential equations based models such as mixing length models (Prandtl, Van Karman), k-ε [31], k-ω [36], large eddy simulations where large scale phenomena are modelled by small scale motions, group renormalization, statistical models, etc. From a numerical point of view, any numerical scheme solving these models has to preserve the positivity of the physical variables such as turbulent viscosity, k, ε, etc. Indeed, it is important to avoid any unphysical value and thus the instability of the solution. The requirement of positivity is studied in particular in [5], [6], [24] for the well-known k-ε model. The positivity of the continuous model has to be inherited by the corresponding discretized model. To be more precise a semi-discrete scheme : d dt u j (t)= istencil α i ( u j +i (t) u j (t) ) Centre de Recherches Math´ ematiques, Montr´ eal (Canada) epartement de G´ enie M´ ecanique, Ecole de Technologie Sup´ erieure (Universit´ e du Qu´ ebec), Montr´ eal, 1100 Notre-Dame Ouest, Montr´ eal, Quebec, Canada H3C 1K3 epartement de G´ enie M´ ecanique, Ecole de Technologie Sup´ erieure(Universit´ e du Qu´ ebec)), Montr´ eal, 1100 Notre-Dame Ouest, Montr´ eal, Quebec, Canada H3C 1K3 1

Upload: others

Post on 10-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

An accurate positivity preserving scheme for the Spalart-Allmaras

turbulence model

Emmanuel Lorin ∗ Amine Ben Haj Ali † Azzeddine Soulaimani ‡

September 8, 2006

Abstract

We propose an accurate numerical method preserving the positivity of the turbulent viscosityin the Spalart-Allmaras model focusing in particular on the stiffness of the source term. Thegoal is to apply this model for turbulent flows using an effective numerical method based ona mixed FE-FV method. A mathematical analysis of the continuous and numerical model areprovided. Preliminary three-dimensional numerical simulations of turbulent flows on the flatplate using unstructured grids are presented.

Keywords. Spalart-Allmaras model, turbulence, finite volumes schemes, finite elements schemes,positivity.

1 Introduction

This paper is devoted to the analysis of the standard Spalart-Allmaras model [29] for turbulentflows in boundary layers. The large diversity of time and space scales existing in the Navier-Stokes equations leads to the modelling of turbulent scales. Different models exist ranging fromalgebraic models, for example [35] where the turbulent viscosity is a damping function near thewall, to partial differential equations based models such as mixing length models (Prandtl, VanKarman), k-ε [31], k-ω [36], large eddy simulations where large scale phenomena are modelled bysmall scale motions, group renormalization, statistical models, etc. From a numerical point of view,any numerical scheme solving these models has to preserve the positivity of the physical variablessuch as turbulent viscosity, k, ε, etc. Indeed, it is important to avoid any unphysical value andthus the instability of the solution.The requirement of positivity is studied in particular in [5], [6], [24] for the well-known k-ε model.The positivity of the continuous model has to be inherited by the corresponding discretized model.To be more precise a semi-discrete scheme :

d

dtuj(t) =

i∈stencil

αi

(uj+i(t) − uj(t)

)

∗Centre de Recherches Mathematiques, Montreal (Canada)†Departement de Genie Mecanique, Ecole de Technologie Superieure (Universite du Quebec), Montreal, 1100

Notre-Dame Ouest, Montreal, Quebec, Canada H3C 1K3‡Departement de Genie Mecanique, Ecole de Technologie Superieure(Universite du Quebec)), Montreal, 1100

Notre-Dame Ouest, Montreal, Quebec, Canada H3C 1K3

1

Page 2: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

approaching the equation :

ut + aux = 0,u(x, 0) = u0 > 0

is said positive, if uj(t) is positive for all j and all t > 0. The extension to multidimensional scalarschemes is obvious. The notion of TVD schemes introduced by Harten [14] allows to maintain thepositivity, the stability and the accuracy of a high order numerical scheme. Several works havebeen devoted to the study of positive schemes for turbulent models. In their papers Spalart andAllmaras [29], [30] used an implicit positive structured finite difference scheme, unconditionallystable, with upwinding for the convective part and centered finite difference for the diffusive part.To ensure the positivity of their scheme they use an ADI method with subiterations. S. Deck etal. [38] propose to modify analytically the source term of the Spalart-Allmaras model in order toensure its positivity in some complex configurations. In [18], the authors proposed a TVD finitedifference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It isbased on a special limiter to maintain stability for the second order scheme. Ilinca and Pelletier[15] used a change of variables (path-bridge to logarithm variables) to maintain the positivity oftheir finite elements scheme to approximate the k-ε and k-ω models for the incompressible Navier-Stokes equations. Their technique is also valid for finite differences or finite volumes schemes. Thischange of variables then induces a new scaling for the turbulent viscosity between ]−∞, A[ in log-variables. Also in the incompressible case, Ilinca, Pelletier, and Garon [16] and Ilinca, Pelletier andArnoux-Guisse in [17] proposed adaptive finite elements methods for solving k − ε turbulent flows.Soulaimani et al. [28] introduced the EBS method inspired by SUPG [4] and by the discontinuousGalerkin methods (see for example [9]) to approach the Navier-Stokes equations combined withthe Spalart-Allmaras method model using in particular the change of variables proposed in [15].Their experiences in simulating three-dimensional flows around wings have shown that this changeof variables is sometimes insufficient to maintain the stability of the turbulent viscosity. Finally,Cardot et al. in [5] used a characteristics method for the convective part and a finite elementsmethod for the diffusive one to build a positivity preserving discretization of the k-ε model.In this paper, we focus on a new numerical method for solving the standard Spalart-Allmaras modelthat allows us to maintain the positivity. The main idea is to use a special operators splittingin which the source terms, which are stiff and responsible for numerical instabilities is carefullydiscretized using a positive finite volume scheme. The nonlinear diffusive part is discretized bya finite element scheme. The proposed approach is based on a fine mathematical analysis of thecontinuous equation. The idea of using a combined finite element and finite volume schemes isnot new and has already been presented in [25] and [11] for instance. The first series of numericalexperiments concerns the solution of the boundary layer problem on a flat plate with zero pressuregradient and with a imposed velocity field. The goal is to study more clearly the behavior of thenumerical method solving the Spalart-Allmaras model independently of the way the velocity field issolved. Thus, grid and time convergence are assessed numerically. In the second series of tests theproposed numerical method for the Spalart-Allmaras model is coupled with a finite element solverof the compressible Navier-Stokes equations. Since these solvers have different temporal stabilityconditions, the coupling process uses a certain number of time steps for solving the Spalart-Allmarasmodel during each Navier-Stokes time step. The numerical tests show a first order time convergencefor the coupled solver.The remaining of this paper is organized as follows: in section (2) an overview of the Spalart-Allmaras model is given with a discussion concerning its positivity. Section (3) deals with the

2

Page 3: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

proposed numerical approach to approximate this model. Section (4) is devoted to the stabilityand positivity analysis. Finally, section (5) is devoted to the numerical experiments.

2 Spalart-Allmaras model for the turbulent flows

The Spalart and Allmaras model is an empirical equation that models production, transport, diffu-sion and destruction of the turbulent viscosity. One of the main advantage of this model comparedto k-ε is the simplicity in imposing the free-stream and wall boundary conditions. In a near wallregion, the model depends on the distance to the wall in order to reproduce the viscous effects inthe laminar sublayer. Far from the wall, the viscosity production term becomes negligible. Let udenote the tangent component of the velocity to the wall, uτ the shear velocity, and y the distanceto the wall. We introduce the classical variables:

u+ =u

uτand y+ =

yuτ

ν, where ν is the molecular viscosity.

Recall that the experience shows that in a turbulent boundary layer in equilibrium, the turbulentviscosity is linear and there exist three zones:

• the laminar sublayer, whereu+ = y+, if y+ < 5.

• the buffer layer where:u+ = C1logy+ + C2, if 5 6 y+ < 30.

with C1 and C2 chosen in order to ensure the continuity with the viscous layer and thelog-arithmetic layer.

• the log-arithmetic layer where :

u+ =1

κlogy+ + 5.5 with κ = 0.41, if y+

> 30.

The Spalart-Allmaras model is built such that it reproduces this behavior of u+ with respect toy+. Note that the above log-lin velocity profile can be well approximated by a C1-function givenby Spalding (Figure 7)

2.1 Governing equation

The Spalart-Allmaras model [29] describes the so-called turbulent viscosity using a scalar transportequation with a diffusive term, destruction and production terms. This empirical model is builtsuch that all the following configurations can be treated: free shear flows, near-wall region withhigh or finite Reynolds numbers, and laminar regions. Introducing a working variable ν, the modelreads:

∂ν

∂t+ u · ∇ν −

1

σ

(∇ ·((ν + ν)∇ν

)+ cb2|∇ν|2

)− cb1 ω(ν)ν + cw1fw(ν)

d

)2= 0 (1)

where:

3

Page 4: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

- u represents the fluid velocity (supposed given after solving the Navier-Stokes (N-S) equa-tions).

- ν is the molecular viscosity,

- cb1ω(ν)ν is the production term of turbulent viscosity, with

ω(ν) := ω +ν

κ2d2fv2(ν/ν), fv2(x) := 1 −

x

1 + xfv1(x), fv1(x) :=

x3

x3 + c3v1

, and ω = ‖∇ × u‖2.

-1

σ

(∇ ·((ν + ν)∇ν

)+ cb2|∇ν|2

)is the diffusion term.

- cw1fw(ν)

d

)2

is a destruction term which takes into account the blocking effect of the wall.

Far from the wall this term becomes negligible.

- fw(g) := g

(1 + c6

w3

g6 + c6w3

)1/6

, g(r) := r + cw2(r6 − r), r(ν) =

ν

ωκ2d2.

- cb1 = 0.1355, cb2 = 0.622, σ = 2/3, cw1 =cb1

κ2+

1 + cb2

σ, cw2 = 0.3, cw3 = 2, cv1 = 7.1.

and finally, the turbulent viscosity νt, is given by:

νt = νfv1(ν/ν) (2)

where fv1(χ) :=χ3

χ3 + C3v1

with χ =ν

ν. Finally, at walls we impose a Dirichlet boundary condition

ν = 0.

2.2 Positivity of the continuous model

In this section, we focus on the positivity of the Spalart-Allmaras model which ensures consistentphysical results for the turbulent viscosity. First, we prove a result of positivity:

Theorem 2.1 Let ν be a C2(Ω) solution of the Spalart-Allmaras equation with the boundary con-dition ν|∂Ω > 0, with Ω a regular open set of R

3. If ν(x, 0) > 0, for all x ∈ Ω, then ν(x, t) > 0, forall x ∈ Ω and all t > 0.

Proof. Suppose that there exists a positive time t∗ such that in a point x∗ of Ω, ν is zero. At thispoint (x∗, t∗), the equation simply writes:

νt(x∗, t∗) = −u · ∇ν(x∗, t∗) +

1

σ

(νν(x∗, t∗) + cb2 |∇ν|2(x∗, t∗)

).

And then νt(x∗, t∗) > 0, as u · ∇ν(x∗, t∗) < 0 (as ν is necessarily decreasing in the direction of

the fluid motion) and the diffusion term is positive as ν(x∗, t∗) and |∇ν|2 are positive. Indeedν(x∗, t∗) < 0 would involve that x∗ would be a bifurcation point, as t∗ is the first time when ν is

4

Page 5: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

zero and ν is at least C2; then x∗ can not be a bifurcation point.Then νt(x

∗, t∗) > 0 involves that, by regularity, the solution ν is strictly increasing in an open setaround t∗ which is a contradiction with the fact ν is zero in (x∗, t∗)

We would like now to extend this result in the case where ν|∂Ω = 0. Let assess a fundamentalresult necessary for the sequel:

Conjecture 1 Let consider the Spalart-Allmaras model:

∂ν

∂t+ u · ∇ν −

1

σ

(∇ · ((ν + ν)∇ν) + cb2 |∇ν|2

)− cb1ω(ν)ν + cw1fw(ν)

d

)2

= 0 on Ω,

ν|∂Ω = 0,

ν(., 0) = ν0(.) ∈ C2(Ω, R+),

(3)

with Ω a regular open set of R3. This equation admits a unique positive solution in C2(Ω×[0, T [, R+).

That is, supposing that ν(x, 0) > 0, for all x ∈ Ω then ν(x, t) > 0, for all x ∈ Ω and all t > 0.

A similar result is established in [29] and [30], by construction.

Now, assuming, ν ∈ C2(Ω) then ν2 = ∇ ·(∇ν2

)= 2νν + 2|∇ν|2 so that:

1

2(ν + ν)2 = (ν + ν)ν + |∇ν|2 = ∇ ·

((ν + ν)∇ν

).

then (3) can be rewritten also as:

∂ν

∂t+ u∇ν −

1

σ

(cb2 |∇ν|2 +

1

2(ν + ν)2

)− cb1ων +

(cw1fw(ν) −

cb1

κ2fv2(ν)

)(ν

d

)2

= 0.

with

fv2(ν) = 1 −ν/ν

1 + νfv1(ν/ν)/ν.

We finally show two results on the existence and the positivity of the diffusive part of the equation.The first one is the following:

Proposition 2.1 Consider the following equation, called the porous media equation, on a regularopen set Ω.

∂ν

∂t−

1

2σν2 = 0 on Ω,

ν|∂Ω = c > 0,

ν(0, .) = ν0(.) > 0.

(4)

5

Page 6: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

- If ν0 ∈ L1(Ω) there exists a unique solution ν in C0(R+ × Ω) and a positive constant C suchthat

‖ν(., t)‖L∞(Ω) 6C

t, ∀t ∈ R

∗+.

- If ν20 ∈ H1

0 (Ω) ∩ L∞(Ω) there exists a unique solution ν ∈ L2(R

+, L2(Ω))∩ C0(Ω × R

+, R)and ν2 ∈ L∞

(R

+, H10 (Ω)

). In addition, this solution is non-negative in Ω and equal to zero

on ∂Ω for all t ∈ R+.

Proof. Take in [37] m = 2 and p = 1 and apply theorems 1.3 and 2.4. For the positivity, it issufficient to prove that ν0 > 0 ⇒ ν > 0 (see [37] for example)

Proposition 2.2 Consider the following equation on a regular open set Ω.

∂ν

∂t−

1

(ν2 + 2cb2 |∇ν|2

)= 0 on Ω,

ν|∂Ω = c > 0,

ν(0, .) = ν0(.) > 0 on Ω/∂Ω.

(5)

Suppose that this equation admits a unique regular solution, then this solution is non-negative.

Proof. Let denote by t∗ the first instant for which ν reaches zero, and x∗ the point where it occurs.Then in (x∗, t∗),

νt(x∗, t∗) =

1

σ(1 + cb2)|∇ν|2(x∗, t∗) > 0.

Thus, there exists an open set around (x∗, t∗) in which νt is increasing. This implies that thereexists a t < t∗ for which ν reaches zero; this is in contradiction with the assumption on t∗, then νis positive

Note that the conjecture on the regularity of the Spalart-Allmaras solution involves naturally theregularity of the solution of (2.2) (if this solution exists).

3 The numerical approach

The numerical scheme we propose has to take into account the properties of the Spalart-Allmarasequation (3), in particular the stiffness of the source term and the positivity of the turbulentviscosity. The principle of the scheme is to treat by a finite volume method the convective partwith the source term and by a finite element method its diffusive part.

6

Page 7: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

3.1 Principle of the method

Assume a turbulent viscosity field known at time tn, we look for its updated value at time tn+1.The principle of the method is the following. Equation (1) is splitted into:

∂ν

∂t+ u · ∇ν = S(ν), with S(ν) = cb1ω(ν)ν − cw1fw(ν)

d

)2. (6)

and∂ν

∂t−

1

σ

(∇ ·((ν + ν

)∇ν) + cb2 |∇ν|2

)= 0. (7)

The first equation (6) (convection with source term equation) is approximated using an upwindfinite volume solver. The second equation (7) (diffusion equation) is approximated using a P 1 finiteelement solver. Such splitting operators have been analytically studied (diffusion, stability, etc.)in the case of homogeneous transport-diffusion equations in [25] and [12]. Note also that a closetechnique (combined finite element-finite volume on dual meshes) has been used for a turbulentmodel in [11]. Our proposed technique aims first to treat the stiff source term and second to solveboth operators on the same unstructured mesh. As finite volume schemes are well adapted tohyperbolic systems and finite element schemes for parabolic systems, we expect accurate results.With ν(., tn) the given turbulent viscosity field at time step n, we solve the following two equations:First we use a finite volume scheme in order to approximate:

∂ν

∂t+ u · ∇ν = S(ν), for t ∈ [tn, tn+1/2[,

ν(., tn) = νn,

and second we use a finite element scheme to approximate:

∂ν

∂t−

1

σ

(∇ ·((ν + ν)∇ν

)+ cb2 |∇ν|2

)= 0, for t ∈ [tn+1/2, tn+1[,

ν(., tn+1/2) = νn+1/2

(8)

The path-bridge from finite element to finite volume degrees of freedom and vice-versa is doneusing some algebraic operations. Furthermore, the source term (ν/d)2 appearing in the convectionequation is stiff (ν and d tend to zero near the wall, then (ν/d)2 can be numerically unstable). Inorder to solve this difficulty, we propose to apply a variant of the NM-method [23], which is welladapted to the present problem. We also prove the positivity under stability conditions for theproposed numerical method.

3.2 Convective part

We first consider the following equation:

∂ν

∂t+ u · ∇ν = S(ν), with S(ν) = cb1 ω(ν)ν − cw1fw(ν)

d

)2

. (9)

Let us first recall what a stiff source term is, and what kind of numerical difficulties can be encoun-tered.

7

Page 8: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

A hyperbolic equation with a stiff source term exhibits at least two different physical processes withdifferent scales. Thus, it is often necessary to choose a very small time step in order to capturebooth physical phenomena. For example, to approximate ut = −u/ε a basic scheme would beun+1 = un−un∆t/ε which is a good approximation of u0 exp(−n∆t/ε) only if ∆t << ε. Typically,for the Spalart-Allmaras model the difficulties occur when d2 tends to zero.The main ideas behind the NM-method are as follows. Let us consider a one-dimensional equa-tion ut + f(u)x = S(u), with f , S : Ω ⊂ R → R being smooth enough functions. We assumethat the grid is regular with a mesh size ∆x and ∆t the time step. Integrating this equation over[xj−1/2, xj+1/2] × [tn, tn+1/2], one obtains:

∫ tn+1/2

tn

∫ xj+1/2

xj−1/2

(ut(x, τ) + f(u(x, τ))x)dτdx =

∫ tn+1/2

tn

∫ xj+1/2

xj−1/2

S(u(x, τ))dxdτ,

that is:

∫ xj+1/2

xj−1/2

(u(x, tn+1/2) − u(x, tn))dx +

∫ tn+1/2

tn(f(u(xj+1/2, τ)) − f(u(xj−1/2, τ)))dτ =

∫ tn+1/2

tn

∫ xj+1/2

xj−1/2

S(u(x, τ))dxdτ.

The idea of the NM-method is to approximate the solution of the non-homogeneous Riemann prob-lem at the interfaces in the following manner. We compute an approximation, un∗

j+1/2, of the

quantity u(xj+1/2, tn∗

) representing the solution of the homogeneous problem. Then, we integrate

the ODE: ut = S(u) with the initial condition u(xj+1/2, tn∗

) at time t = tn∗, that gives the quantity

¯u(xj+1/2, tn+1) approximated here by ¯un+1

j+1/2. This process can be summarized by the followingsteps:solve

ut + f(u)x = 0, [tn, tn∗[

u(., tn) = un,(10)

and ut = S(u), [tn

∗, tn+1/2[

u(., tn∗) = un∗

.(11)

The final step consists in evaluating the numerical fluxes: we use a weighted average of the fluxescomputed on the two states un⋆

j+1/2 and ¯un+1j+1/2. We introduce a weight θn

j+1/2 that will be determinedin the sequel. Thus,

un+1/2j = un

j −∆t

∆x

(θnj+1/2f(un⋆

j+1/2) + (1 − θnj+1/2)f(¯u

n+1/2j+1/2 )

)

−(θnj−1/2f(un⋆

j−1/2) + (1 − θnj−1/2)f(¯u

n+1/2j−1/2 )

)+ ∆tS(u

n+1/2j ).

We recall that un∗

j+1/2 is the approximate solution of the homogeneous problem (10). And ¯un+1/2j+1/2 is

the approximation of the non-homogeneous problem (11) at time tn+1/2 on the interface j + 1/2.In [23] the weight θ is chosen such that in the case of a linear flux f the numerical solution is exact

8

Page 9: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

on the nodes of the grid. Thus, the formula for optimal θ is:

θnj+1/2 =

1

−S′(unj+1/2)∆t

−eS′(un

j+1/2)∆t

1 − eS′(un

j+1/2)∆t

.

For Spalart-Allmaras equation this choice is particularly well adapted as the flux is linear.

Now we apply the NM-method for the multidimensional Spalart-Allmaras equation.

Step 1. Solve the following equations at the mesh interfaces in order to have an approximation ofthe solution of the Riemann problem with source term:

νt + div(f(ν)) = 0, [tn, tn

∗[

ν(., tn) = νn,

νt = S(ν), [tn

∗, tn+1/2[

ν(., tn∗) = νn∗

.

(12)

where

S(ν) = cb1ων +cb1

κ2d2fv2(ν) − cw1fw(ν)

d

)2

and f(ν) = νu. (13)

We denote by T (Ω) the conform mesh such that T (Ω) = ∪K∈ΩK, by νnK the approximation of∫

[tn,tn+1/2]

∫K ν(x, t)dxdt/|K|, by ∆tn = tn+1 − tn the time step and by fn

e the flux at the interface

e = K ∩L between two cells K and L at time tn. Finally |K| denotes the volume of K and |e| thesurface of e (see 2).In order to solve νt + div(f(ν)) = 0 for t ∈ [tn, tn

∗], we use the following simple upwinding approx-

imation (obviously, other upwinding techniques are possible):

νn∗

e = νne =

νnK if un

e · ne > 0,

νnKe

if une · ne < 0,

νnK |K| + νn

Ke|Ke|

|K| + |Ke|if un

e · ne = 0.

(14)

where e = K ∩ Ke and νn∗is the approximate solution of the homogeneous part of this equation.

We approximate the velocity of the fluid at the interface une by

une ∼ un

( |K| + |Ke|

2

). (15)

Step 2. Solve the equationνt = S(ν), (16)

In order to solve accurately this equation we first remark that in (16) the vorticity is very largenear the wall, so that a simple Euler scheme is not adequate (see introduction). We then propose to

9

Page 10: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

K Ke

u

e

n

K

Ke

e

e

ee

e

if a.n > 0

if a.n < 0e

ee

e

νf . n =u.n

f.. n = u.n ν

Figure 1: Upwinding

freeze some terms appearing in the function S in the following manner. We obtain at the interfaces,the following Bernoulli-like equation:

νt = cb1

(ωn +

fv2(ν)ν

κ2d2

)ν − cw1fw(ν)

d

)2. (17)

The interest of such of formulation comes naturally from the fact that such an equation can beanalytically solved. Then, in (17) we freeze fv2(ν)ν and fw(ν) at time tn

∗. Thus, we have to solve

between tn and tn+1:

νt = cb1

(ωn

e +fn

v2,eνne

κ2d2

)ν − cw1f

nw,e

d

)2. (18)

The solution of this equation is given by:

νn+1/2e =

ane νn

e

νne bn

e (e−ane ∆tn − 1) + an

e e−ane ∆tn

, with ane = cb1

(ωn

e +fn

v2,eνne

κ2d2

), and bn

e = −cw1

d2fn

w,e.(19)

This step is particularly important since in the case of a stiff source term it enables to captureaccurately the behavior of the nonhomogeneous Riemann problem solution at the mesh interfaces.

Step 3. Compute νn+1K using a centered source term:

νn+1K = νn

K −∆tn

|K|

e∈∂K

|e|(θne fn

e · ne + (1 − θne )fn+1/2

e · ne

)+ ∆tnS(νn

K , νn+1K ), (20)

with a semi-implicit source term defined as:

S(a, b) := cb1ωnK(a)a −

cw1fw(a)

d2b2, (a, b) ∈ R

2. (21)

10

Page 11: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

or using again the analytical integration:

νn+1/2K := νn

K −∆tn

|K|

∑e∈∂K |e|

(θne fn

e · ne + (1 − θne )f

n+1/2e · ne

), and

νn+1K =

an+1/2K ν

n+1/2K

νn+1/2K b

n+1/2K (e−a

n+1/2K ∆tn − 1) + a

n+1/2K e−a

n+1/2K ∆tn

,

with an+1/2K = cb1

(ωn

K +f

n+1/2v2,K νn

K

κ2d2

), and b

n+1/2K = −

cw1

d2f

n+1/2w,K .

(22)

where:

fne = f(νn

e ) ; fn+1/2e = f(νn+1/2

e ) (23)

and

θne = −

1

S′

n+1/2K |K| + ν

n+1/2Ke

|Ke|

|K| + |Ke|

)−

exp

(S′

n+1/2K |K| + ν

n+1/2Ke

|Ke|

|K| + |Ke|

)∆tn

)

1 − exp

(S′

n+1/2K |K| + ν

n+1/2Ke

|Ke|

|K| + |Ke|

)∆tn

). (24)

The stability of this scheme (consisting of the three previous steps) has been studied in [23]. Notethat for θn

e = 1 one obtains the classical upwind scheme with a semi-implicit source term. Atthis point, we recall that a heuristical ℓ2-stability condition (not optimal) for the upwind schemeapproaching a convection equation in 3D (see [3]) is given by:

∆tn||un||∞ minK∈T (Ω),e∈∂K, K∈T (Ω)

|e|

|K|

6

1

3(25)

3.3 Diffusive part

In order to approximate the diffusive part:

∂ν

∂t−

1

((ν + ν)2 + 2cb2 |∇ν|2

)= 0,

we rewrite this equation as:∂ν

∂t−

1

(ν2 + 2cb2 |∇ν|2

)= 0, (26)

where ν := ν+ν denotes the total working variable. We know from proposition 2.2 that the solutionof this equation is positive for a positive initial data, so that we look for a positive preserving finiteelement method. We denote by H(Ω) the functional space of solutions, typically functions ofH1 equal to zero on the wall, and equal to ν∞ at the infinity. If we set ν∞ = 0 (that can beconsidered as a good approximation of the turbulent viscosity in a sufficiently large domain), wehave H(Ω) = H1

0 (Ω) so that ν∂Ω = ν and the variational formulation reads: find ν ∈ H10 (Ω) such

that:

(νt, φ)L2(Ω) = −1

(∇ν2,∇φ

)L2(Ω)

+cb2

σ

(|∇ν|2, φ

)L2(Ω)

(∇ν2, φ

)L2(∂Ω)

, ∀φ ∈ H10 (Ω).

11

Page 12: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

Using a P 1(Ω) Lagrange finite element basis (φi)i leads to:

∑i∈I ν ′

i(t)(φi, φj

)L2(Ω)

= −1

(∇(∑

i∈I νi(t)φi

)2,∇φj

)L2(Ω)

− 2cb2

(|∑

i∈I νi(t)∇φi|2, φj

)L2(Ω)

−ν(∇(∑

i∈I νi(t)φi

)2, φj

)L2(∂Ω)

, ∀j ∈ I.

We set ν(t) =(ν1(t), ν2(t), ..., νI(t)

)Tthen M ν

′(t) =(G(ν(t)

)+ F

)/2σ with the positive definite

matrix

M = (φi, φj)ij ,

G(ν

)= −

((∑

i∈I νi(t)∇φi)2,∇φj

)j+ 2cb2

(|∑

i∈I νi(t)∇φi|2, φj

)j,

F = (ν(∇(∑

i∈I φi)2, φj)L2(∂Ω))j.

Then using a simple finite difference approximation in time we get:

∑i∈I νn+1

i

(φi, φj

)L2(Ω)

=∑

i∈I νni

(φi, φj

)L2(Ω)

−∆tn

(∇(∑

i∈I νn+1i φi

)2,∇φj

)L2(Ω)

−2cb2

(|∑

i∈I ν+1i n∇φi|

2, φj

)L2(Ω)

− ν(∇(∑

i∈I φi

)2, φj

)L2(∂Ω)

, ∀j ∈ I.

So that:

νn+1 = ν

n +∆tn

2σM−1

(G(νn+1) + F

). (27)

This nonlinear discrete equation is solved using a simple linearization. It is also possible to use anexplicit form of this numerical equation:

νn+1 = ν

n +∆tn

2σM−1

(G(νn) + F

). (28)

And finally ν = ν − ν.

3.4 Pathbridge from finite volume to finite element formulation and vice-versa

An important issue in this method is the path-bridge from finite element to finite volume elementformulation and reciprocally. Indeed the degrees of freedom are the nodes of the cells for the finiteelement method and their center for the cell center finite volume method. A rigorous work has beendone in order to study these path-bridges, in term of diffusion and stability [25]. In the following wedenote by NE the number of nodes of the grid, and by NV its total number of elements. As abovewe denote by (φi)i∈1,...,NE a basis of P 1. Given a finite element solution νn

h with (νnh,i)i∈1,...,NE

values at nodes i the finite volume degrees of freedom are computed by a simple averaging whichreads in the three-dimensional space as:

• FE → FV:

νnK =

νnh,aK

+ νnh,bK

+ νnh,cK

+ νnh,dK

4, (29)

12

Page 13: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

where aK , bK , cK and dK are the four nodes of the tetrahedral cell K. We denote by Πev,this linear and natural transformation from P 1 finite elements space to P 0 finite volume space(notations of [25]). Denoting by νfv = (νK)K∈elements of T the finite volume solution of ν,and νfe = (νi)i∈nodes of T its finite element solution, equation (29) can be rewritten:

νfv = Πevνfe = A(T )νfe, (30)

where A(T ) is a sparse matrix of MNV,NE(R).

• FV → FE:The inverse path-bridge from finite volume to finite element formulations is denoted by Πveand is not uniquely defined.

1. The more natural way is then to solve the normal equation, i.e. solve the minimizationproblem

minνfe∈RNE

+

∥∥A(T )νfe − νfv∥∥

ℓ2. (31)

As observed in [25], the matrix A(T )T A(T ) has the advantage to be sparse and sym-metric.

2. The principle of a second approach consists in the minimization in P 1 of:

minf∈P 1

∥∥νfv − f

∥∥ℓ2

. (32)

This minimization consists in finding the ℓ2-projection of νfv ∈ P 0 in P 1. In fact thiscomputation is straightforward. We search for an element f of P 1 (that represents in factνef) minimizing (32). So that f =

∑NEi=1 νiφi and then (32) consists in the computation

of the mass matrix(∫

Ω φiφj

)(i,j)

, denoted by M , as (32) writes:

M f = F, (33)

where F is the vector(∫

Ω νfvφi

)i∈1,...,NE

. It is then sufficient to compute the positive

definite mass-matrix M and to solve (33), in order to find the finite element formulationof the turbulent viscosity, νfe.

3. At last, a simpler approach consists in replacing the consistent mass matrix by its lumpedform: MD = diag(M11, · · · , MNE,NE). Because M−1

D is monotone, it is positive preserv-ing in solving:

MD f = F. (34)

The numerical experiment shows that the solution of (34) is diffusive. However, it canbe used as a good initial approximation in solving iteratively either (30) or (33).

Discussion. In the first approach, there is not a priori unicity of the solution using thisinverse footbridge (this inverse footbridge is not a priori injective). More precisely, the system

A(T )νfe − νfv

13

Page 14: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

FVFE (P1)

FE −−> FV

FV−−> FE

Degree of freedom

VF −−−> EF(P1)

Figure 2: Pathbridge FE to FV and FV to FE

is over-determined excepted if νfv belong to ImA(T ) as the number cells is approximatevellytwo times the number of vertices for a large enough number of cells. Then, using a least-squaremethod leads to solve

A(T )T A(T )νfe = A(T )Tνfv

that has a unique solution if Rk(A(T )) is equal to the number of vertices. This is not alwaysgaranteed in our case.As noticed and detailed in [12] a more rigorous method consists in considering P 1−discontinuouselements for the finite element part (see fig. 3). In this situation, the authors propose to ob-tain the finite elements formulation from the finite volume one by an averaging process andthe finite volume formulation from the finite element one using a least-square process as donehere. In this case, they are able to prove the unicity of the solution using in particular theinjectivity of the Πve. For an extensive study of footbrigdes the authors refer to two verycomplete papers [25] and [12].The second and third approaches garantee a unique solution. However, in the second approachthe solution is not necessarly positive so that we have to impose a constraint of positivity insolving (33). As said before the third approach delivers a positive but it might be a diffu-sive solution for a coarse mesh. In conclusion, we adopt either the second (with positivityconstraint) or the third approach if the mesh is fine.

Degree of freedom

Discontinuous EF −−−> VF

Figure 3: Pathbridge discontinuous FE to FV and FV to discontinuous FE

In the following we compare the three pathbridges for the case of the field χ. The mesh discribedin section 5 is used in this example. The nodal values for the FE mesh are initialized using a linearvariation, then the FV degrees of freedom are obtained using the operator Πev. In figure 4 wecompare the three different approaches: we consider an initial state (straight line corresponding to

14

Page 15: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

the exact viscosity) and then we apply 6000 times the operator Πve Πev, with the three proposedIP1.

0 50 100 150 2000

20

40

60

80 πev

- πve

(Consistent Mass)

πev

- πve

(Mass lamping)

πev

- πve

(Inv)

χ = K Y+

Figure 4: Error between numerical and exact solution: first IP = 8.5×10−12% - Second IP = 4.25%- Third IP = 4.96%

As the first pathbridge gives on this benchmark, the best result but as is not invertible a pri-ori for all meshes and as it is in practice ten times slower than the third one we do not retain it.In the numerical part, we will show an example (fig. 18) where the three inverse pathbrigdes givesapproximatively the same numerical solution for the coupled Navier-Stokes and Spalart-Allmarassolver.

3.5 Summary of the global method

The global scheme is then summarize in the Table 1.

4 Positivity of the scheme

The positivity of the turbulent viscosity during the numerical computation is essential in order toobtain consistent physical results for the Reynolds Averaged Navier-Stokes equations. Because ofassumption (25), the positivity can be simply proved.

Proposition 4.1 The finite volume scheme approaching the convective equation with source termνt + div(f(ν)) = S(ν) is positive under the condition:

∆tn||un||∞ minK∈T (Ω),e∈∂K, K∈T (Ω)

|e|

|K|

6

1

3α, (35)

1IP for inverse pathbridge

15

Page 16: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

Algorithm Global schemeInitialization n = 0Loop in time n → n + 1:

0. Computation of the fluid velocity, u using a finite element scheme approaching the NS eqs.1. From a finite element formulation of the working variable viscosity ν.

Computation of the diffusive part of SA using a FE solver: eq. (27) approximating eq. (26).2. Pathbridge from the cells nodes to cells centers using eq. (30).3. Computation of the convective with source term part of SA using eqs. (20) and (21)

to approach eq. (9). Eq. (20) is computed using eqs. (14), (19), (23), (24).4. Computation of the turbulent viscosity νt, from the working variable viscosity ν;

this is simply given by the algebraic formula (2).5. Pathbridge from a finite volume to finite element formulation using eq. (31)

and initialization with (34).

End of the loop

Table 1: Resolution of the coupled Reynolds Averaged Navier-Stokes and Spalart-Allmaras system

where α is a real non-negative constant.

Proof. We have to check that if νnK > 0 for all K ∈ T (Ω) then νn+1

K > 0. Rewrite the 3 steps ofthe finite volume scheme as:

νne =

νnK if un

e · ne > 0,

νnKe if un

e · ne < 0,

νnK |K| + νn

Ke|Ke|

|K| + |Ke|if un

e · ne = 0,

νn+1/2e =

ane νn

e

νne bn

e (e−ane ∆tn − 1) + an

e e−ane ∆tn

, with ane = cb1

(ωn

e +fn

v2,eνne

κ2d2

), bn

e = −cw1

d2fn

w,e,

νn+1K = νn

K −∆tn

|K|

∑e∈∂K |e|

(θne fn

e · ne + (1 − θne )f

n+1/2e · ne

)+ ∆tnS(νn

K , νn+1K ).

The two first terms of the previous system are obviously positive. In particular, the denominatorin the second one is positive, as an

e and bne (e−an

e ∆tn −1) are positive (see (1)) by construction. Now,remark that the last step of the scheme can then also be rewritten as:

νn+1K = νn

K −∆tn

|K|

∑e∈∂K |e|

(θne νn

e + (1 − θne )ν

n+1/2e

)un

e · ne1ue·ne>0

−∆tn

|K|

∑e∈∂K |e|

(θne νn

e + (1 − θne )ν

n+1/2e

)un

e · ne1ue·ne<0 + ∆tnS(νnK , νn+1

K ).

(36)

16

Page 17: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

Then the first, third and fourth terms of the right hand side of (36) are obviously positive. Becauseof the upwinding, we can rewrite (36) as:

νn+1K = νn

K −∆tn

|K|

∑e∈∂K |e|

(θne νn

K + (1 − θne )ν

n+1/2K

)un

e · ne1ue·ne>0

−∆tn

|K|

∑e∈∂Ke |e|

(θne νn

Ke + (1 − θne )ν

n+1/2Ke

)un

e · ne1ue·ne<0 + ∆tnS(νnK , νn+1

K ).

where:

νn+1/2K =

anKνn

K

νnKbn

K(e−anK∆tn − 1) + an

Ke−anK∆tn

, with anK = cb1

(ωn

K +fn

v2,KνnK

κ2d2

), bn

K = −cw1

d2fn

w,K .

We denote in the sequel ωnK the quantity ωn

K + fnv2,Kνn

K/κ2d2. The finite volume scheme is ap-proaching the convective part of the equation plus the production and destruction terms. Asnoticed in [29], near the wall the destruction is larger than the production (the complement comesfrom the diffusion) and far from the wall the opposite occurs. In order to prove the positivity,we introduce the time step ∆tCFL, associated with the maximum CFL number (largest time stepensuring numerical stability of the convective scheme). Then we need to find a real positive C such

that νn+1/2K 6 Cνn

K , for all K in T (Ω) in order to minorate νn+1K by a positive value. Denoting by

ωninf and ωn

max the minimum and maximum of ω on T (Ω), we then have the following estimate:

0 6 ωninf 6 ωn

K 6 ωnmax, ∀K ∈ T n(Ω).

Denoting by βninf and βn

sup the minimum and maximum of (−bn) on T n(Ω), we have:

0 6 βninf 6 −bn

K 6 βnmax, ∀K ∈ T n(Ω),

so that:

νn+1/2K 6

ωnmax

ωnmine−ωn

max∆tn + νnKβn

min(1 − e−ωnmax∆tn)

νnK , ∀K ∈ T n(Ω). (37)

We denote by αnK the positive constant in the RHS of the inequality. If we denote by α =

minn∈N∗,K∈T (Ω) αnK then ν

n+1/2K 6 ανn

K so that:

νn+1K > νn

K

(1 − α

∆tn

|K|

∑e∈∂K |e|un

e · ne1ue·ne>0

)+ ∆tnS(νn

K , νn+1K )

−∆tn

|K|

∑e∈∂Ke |e|

(θne νn

Ke + (1 − θne )ν

n+1/2Ke

)un

e · ne1ue·ne<0, ∀K ∈ T (Ω).

(38)

That is:

νn+1K > νn

K

(1 − α

∆tn

|K|

e∈∂K

|e|une · ne1ue·ne>0

)+ ∆tnS(νn

K , νn+1K ), ∀K ∈ T (Ω). (39)

The first term in the right hand side is then positive under the condition (35). It remains now tostudy the positivity of the Newton-method necessary to solve the nonlinear source term equation:νn+1

K = νnK + ∆tS(νn

K , νn+1) (recall that S(a, b) is defined in (21)). To this end, it is sufficient toprove the following lemma:

17

Page 18: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

Lemma 4.1 Let us denote by ζ, the function from R+ × R → R, such that

ζ(a, b) := b − a − ∆t(cb1ω

n(a)a −cw1fw(a)

d2b2).

Suppose that a > 0 and that b computed by the Newton-method is solution of ζ(a, b) = 0, then b > 0.

Proof. Let start the Newton-process with b0 = a > 0. Let denote by k the current Newton-iteration, and suppose that bk > 0. Then the Newton-process gives:

bk+1 = bk −bk − a − ∆t

(cb1ω

n(a)a − cw1fw(a)(bk)2)

1 + ∆t2cw1fw(a)

d2bk

or

bk+1 =bk(1 + ∆t

2cw1fw(a)

d2bk)− bk + a + ∆t

(cb1ω

na − cw1fw(a)bk)

1 + ∆t2cw1fw(a)

d2bk

.

We then obtain, after simplifications, that bk+1 > a > 0

The previous lemma tells us that the proposed semi-implicitation of the source term does notalterate the positivity of the turbulent viscosity. We then conclude that νn+1

K is positive under thecondition (35)

Remark. We now discuss how restrictive is the inequality established above. Let us introduceT n

+ (Ω) the cells for which the production is larger than the destruction, and by T n− (Ω) when it is

smaller. Obviously, we have T (Ω) = T n− (Ω)∪T n

+ for all positive n. The dependency on time comesfrom the fact that, a priori, the contents of these sets vary. First

νn+1/2K 6 αn

K,− :=ωnmax(T n

− )

ωnmin(T n

− )e−ωn

max(T n−

)∆tn

+ νnKβn

min(T n− )

(1 − e−ωn

max(T n−

)∆tn

)νn

K , ∀K ∈ T n− (Ω).(40)

Near the wall, the vorticity is large so αnK,− behaves as ωn

max(T n− )/νn

Kβnmin, and

νn+1/2K 6 αn

K,+ :=ωnmax(T n

+ )

ωnmin(T n

+ )e−ωn

max(T n+)

∆tn

+ νnKβn

min(T n+ )

(1 − e−ωn

max(T n+)

∆tn

)νn

K , ∀K ∈ T n+ (Ω).(41)

In this zone, the vorticity is small so that αnK,+ behaves as ωn

max(T n− )/ωn

min.

Even if the condition of positivity on α can be restrictive, it is not “exponentially” restrictive.

Now we study the positivity of the finite element method for the explicit formulation (28). We

18

Page 19: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

Y+

PRODUCTION

DESTRUCTION

Y+

VORTICITY

Y+

DIFFUSION

Figure 5: Comparison of the turbulent viscosity production and destruction. Vorticity with respectto the distance to the wall

introduce the following notations:

Hn := M−1(G(νn) + F

),

In+ := j ∈ I − ∂I, Hn

j > 0,

In− := j ∈ I − ∂I, Hn

j < 0.

Recall that I denotes the set of nodes indices of the finite elements grid and ∂I denotes the nodesof the boundary.

Proposition 4.2 For all n ∈ N, the finite elements scheme approaching the diffusive part of theSpalart-Allmaras model is positive under the time step condition:

∆tn 6 2σ minj∈In

∣∣∣νn

j

Hnj

∣∣∣. (42)

Proof. Remark, first that on boundaries the turbulent viscosity is set to zero. Consider now astep n ∈ N, we have by definition, that for all j in In

+,

νn+1j = νn

j +∆tn

2σHn

j > 0.

For j in In−, in order to conserve the positivity of νn+1

j , it is necessary to impose a condition on thetime step:

νn+1j > 0 ⇐⇒ ∆tn 6 2σ

∣∣∣νn

j

Hnj

∣∣∣.

19

Page 20: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

So that if we take a time step ∆tn defines as:

∆tn 6 2σ minj∈In

∣∣∣νn

j

Hnj

∣∣∣

the positivity of the νn+1j for all j in I is ensured. Note that this condition is not too restrictive as

the set In− (where the diffusion is destructive) corresponds to a zone where the viscosity is supposed

to be positive (see figure 5)

For the implicit finite element formulation (27), the principle is very close. However, due tothe use of a Newton-like method in order to solve the nonlinear equation, another condition,∆t 6 2σ/‖∇G‖∞ occurs.

The path-bridge process is positive as discussed above and the final step (2) that gives the turbulentviscosity from the working variable obviously conserves the positivity.

Theorem 4.1 The combined finite volume and finite element scheme approaching the Spalart-Allmaras model is positive under the conditions (35) and (42).

5 Numerical results

This section presents a selection of numerical tests that have been performed. The first series ofexperiments concerns the solution of the boundary layer problem on a flat plate with zero pressuregradient and with an imposed velocity field. The goal is to study more clearly the behavior ofthe numerical method solving the Spalart-Allmaras model independently of the way the velocityfield is solved. Thus, grid and time convergence can be assessed numerically. In the second seriesof tests, the proposed numerical method for the Spalart-Allmaras model is coupled with a finiteelement solver of the compressible Navier-Stokes equations. Since these solvers have differenttemporal stability conditions the coupling process uses a certain number of time steps for solvingthe Spalart-Allmaras model during every time step of the Navier-Stokes solver. The computationaldomain is presented in fig. 6

5.1 Case of imposed velocities

We propose to compute the turbulent viscosity field in the boundary layer over a flat plate withzero pressure gradient. We compare the numerical solution of our method with the exact physicalsolution χexact = κy+. Note that the exact solution of (43) is a continuous approximation ofχexact. For this first benchmark, the turbulent viscosity solver is not coupled with the Navier-Stokes solver. The velocity field is imposed here using the C1-Spalding curve (figure 7).

To ensure compatibility of the proposed turbulent model with the dimensionless N-S code and tosimplify their coupling, the S-A equation is rewritten using the following dimensionless variables:

u =u

U, x =

x

L, χ =

ν

ν.

20

Page 21: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

Z=0.2

X=1

KY+ (Y+= 200)

KY+

X

Y+=200

Z

Y+ 0

Figure 6: Computational domain and boundary conditions for χ.

One can rewrite equation (1) as:

∂χ

∂t+ u∇χ −

1

Re σ

(∇ ·((1 + χ)∇χ

)+ cb2(∇χ)2

)− cb1ωχ +

cw1

Refw

d

)2= 0 (43)

where ∇ = L∇ and ω =L

Uω +

1

Re

fv2

κ2d2 , with L and U are respectivelly the characteristic length

and velocity.

The computational domain is a 1.0 × 0.2 ×y+

Re u+

∣∣∣y+=200

box. As defined, the vertical axis (y+

direction) is scaled with respect to the Reynolds number to obtain y+ = 200 at y = ymax. We

approximate the friction velocity with uτ ≈

√0.0135

Re1/7and set u+ =

u

uτ. Different mesh config-

urations using tetrahedral elements (table 2) are used to study the effect of the mesh size in they+ direction. Note that the mesh tetrahedrons can be very distorted: the radius ratio betweencircumscribed circle and inscribed circle for some elements can be larger than 103. The first nodelocation in the field of a boundary layer is set to y+ = 5 for all mesh configurations. Since themeshes used are sufficiently fine, we use the simplest path-bridge (3) in all of the following tests.

# of Nodes in y+ direction total # of nodes total # of tetrahedral elements

20 5460 19600

30 5790 28560

40 10680 38480

Table 2: Mesh configurations

The boundary conditions are imposed as follows:

• On the inlet nodes, we impose χ = κy+,

• On the plate, we impose χ = 0,

21

Page 22: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

100

102

104

Y+

5

10

15

20

25

30u

+

SpaldingLog law

Figure 7: Velocity profile

• At y = ymax, we impose χ = κy+.

The initial data is given by χ = 0 inside the domain and respect the boundary conditions.

In this paragraph, we show the results obtained with the methodology presented previously forthree Reynolds numbers: 106, 107 and 5×107. Note that the distribution of the turbulent viscosityin the boundary layer is independent of x (fig. 8).

# of nodes y+ direction Total relative quadratic error

20 0.299 (29.9%)

30 0.105 (10.5%)

40 0.054 ( 5.4%)

Table 3: Total relative quadratic error, Re = 106 and dt = 10−5

Tables 3, 4 and 5 give respectively the total relative quadratic error defined as

Error =

√∑Nb.nodesi (χn+1

i − κy+i )2

√∑Nb.nodesi (κy+

i )2,

for different mesh configurations and for Re = 106, 107 and 5 × 107. Figures 9, 10, 11 show thedistribution of χ as function of y+, at the section x = 0.5, z = 0.1. As expected, χ is more

22

Page 23: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

in agreement with κy+ with a finer grid. Note also, that the results are particularly good for aReynolds number close to 107 (figure 12). The following graphs show the convergence history of

# of nodes y+ direction Total relative quadratic error

20 0.169 (16.5%)

30 0.075 ( 7.5%)

40 0.035 ( 3.5%)

Table 4: Total relative quadratic error, Re = 107 and dt = 10−5

# of nodes y+ direction Total relative quadratic error

20 0.169 (16.5%)

30 0.075 ( 7.5%)

40 0.035 ( 3.5%)

Table 5: Total relative quadratic error, Re = 5 × 107 and dt = 10−6

the method. The first one (see fig. 13) represents the total quadratic error with respect to the timestep, for a Reynolds number equal to 107. The second one (fig. 9) is computed using the followingconvergence criterium:

√∑Nb.nodesi (χn+1

i − χni )2

√∑Nb.nodesi (χn

i )26 10−6. (44)

Note that other numerical tests have shown that the numerical solution is independent with respectto the initial data, and then the stability of the method with respect to the initial data. Note alsothat it is possible to use higher time steps.

23

Page 24: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

0 50 100 150 200

y+

0

20

40

60

80

χ

x = 0.2 (Re = 107, dt = 10

-5, 40 Nodes)

x = 0.5 (Re = 107, dt = 10

-5, 40 Nodes)

x = 0.8 (Re = 107, dt = 10

-5, 40 Nodes)

χ=κy+

Figure 8: Turbulent viscosity in the field at different x−sections

0 50 100 150 200

y+

0

20

40

60

80

χ

20 Nodes, dt = 10-5

30 Nodes, dt = 10-5

40 Nodes, dt = 10-5

χ=κy+

Figure 9: Re = 106 and dt = 10−5

24

Page 25: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

0 50 100 150 200

y+

0

20

40

60

80

χ

20 Nodes, dt = 10-5

30 Nodes, dt = 10-5

40 Nodes, dt = 10-5

χ=κy+

Figure 10: Re = 107 and dt = 10−5

0 50 100 150 200

y+

0

20

40

60

80

χ

20 Nodes, dt = 10-6

30 Nodes, dt = 10-6

40 Nodes, dt = 10-6

χ=κy+

Figure 11: Re = 5 × 107 and dt = 10−6

25

Page 26: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

0 50 100 150 200

y+

0

20

40

60

80

χ

Re = 106 (dt = 10

-5, 40 Nodes)

Re = 107 (dt = 10

-5, 40 Nodes)

Re = 5x107 (dt = 10

-6, 40 Nodes)

χ=κy+

Figure 12: The 40-nodes mesh configuration at different Reynolds numbers

200 400 600 800 1000Time step

0

0.2

0.4

0.6

0.8

1

Error20 Nodes (Re = 10

6, dt = 10

-5)

30 Nodes (Re = 106, dt = 10

-5)

40 Nodes (Re = 106, dt = 10

-5)

Figure 13: History of the relative quadratic error at Re = 106

26

Page 27: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

200 400 600 800 1000Time step

1e-06

1e-05

0.0001

0.001

0.01

0.1

Error

20 Nodes (Re = 106, dt = 10

-5)

30 Nodes (Re = 106, dt = 10

-5)

40 Nodes (Re = 106, dt = 10

-5)

Figure 14: Convergence history for Re = 106 using the criterium (44)

5.2 Coupling of the Navier-Stokes and Spalart-Allmaras solvers

In this section we discuss the coupling between the Spalart-Allmaras solver with a 3D compressibleNavier-Stokes solver (for more details see [28]). The Navier-Stokes equations for unsteady viscouscompressible flows can be written in the following compact form

U,t + Fadvi,i = Fdiff

i,i + Fs (45)

with

U =(ρ, ρu, ρe

)T

Fadvi =

(ρui, ρuui, (ρe + p)ui

)T

Fdiffi =

(0, −σ, −σ · u− λ∇T

)T

where U denotes the conservative variables vector, σ is the viscous stress tensor, p is the pressure,T is the temperature, e is the total energy per unit mass, Fadv

i is the convective flux in the ’i’direction and Fdiff

i the diffusive flux which can be written

Fdiffi = KijV,j

while the convective flux can be represented by diagonalizable Jacobian matrices Ai = Fdiffi,V . For

ideal gas, the following two equations of state are added to close the system of these equations :

p = (γ − 1)ρCvT

27

Page 28: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

T = e −| u |2

2

where Cv denotes the constant volume specific heat and γ is the specific heat ratio.

The discretization is given by a finite element formulation described briefly in the following. Af-ter multiplying the Navier-Stokes equations by the weight functions W and integrating over thedomain Ω, one obtains the following Galerkin variational formulation :

∫Ω W · (U,t + Fadv

i,i − Fs)dΩ +∫Ω W,i · F

diffi dΩ −

∫Γ W · Fdiff

i nidΓ = 0 (46)

The local residual vector can be written as :

R(U) = U,t + Fadvi,i − Fdiff

i,i − Fs (47)

The fluid domain is discretized by linear tetrahedral elements. The Galerkin finite elementformulation often leads to serious numerical instability where the solutions can be corrupted byoscillations if the flow is dominated by convection. We use the SUPG formulation which introducesan integral term into this formulation, so that the stability inside elements is reinforced :

e

Ωe

AtiWiτR(U)dΩ

where τ is a matrix of time scale which depends on the element size [28] as :

τ = (∑

|A|)−1

A shock capturing Laplace-operator which depends also on the discrete residual R(u) is added.This operator depends on a parameter given by the following expression :

µc = Ck1hmin(‖τR(U)‖, ‖u‖)/2 (48)

where Ck1 is a tuning parameter and h is the element size (in practice it is computed as theminimum distance between the element nodes). More dissipation is added in the vicinity of shockwhere the residual R(u) is higher than in smooth zones. After adding the shock capturing operatorand the influence term of the far-field boundary conditions, we define the stabilized variationalformulation:

e

Ωe

[W · (U,t + Fadv

i,i − Fs)]dΩ −

Γe

W · An(U− U∞)dΓ

+∑

e

Ωe

µc∇W · ∇UdΩ +

ΩW,i · F

diffi dΩ −

ΓW · Fdiff

i nidΓ

+∑

e

Ωe

AtiW,i · τ · R(U)dΩ = 0

(49)

where Γ denotes the boundary of the fluid domain. The second integral term represents the influenceof the far-field boundary conditions. The third integral term represents the shock capturing operatorwhereas the forth term represents the SUPG contribution. After replacing U and W by theirinterpolations one obtains the following first order semi-discrete system:

28

Page 29: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

MfU + Kf (U)U = Ff

where Mf and Kf denote respectively the mass and the stiffness matrices of the fluid. The followingimplicit second order Gear scheme is chosen for the time discretization :

dU(t)

dt≃

3U(t + ∆t) − 4U(t) + U(t − ∆t)

2∆t

ConvergenceNumerical experiments have been carried out to study the convergence of the proposed algorithmwhen coupled with the Navier-Stokes solver presented previously. Again the benchmark we proposeconcerns the flow over a flat plate with a Reynold number set to 106. The grid used has 40 pointsin the y+direction and the first point is located at y+ = 5. The nondimensional for the fluid solveris set ∆tNS = 10−5. The turbulent time steps are given respectively by ∆tT = ∆tNS/2N withN ∈ 0, · · · , 8. Note that for consistency it is necessary to make 2N turbulent steps for each fluidstep. The initial turbulence viscosity is set to zero inside the domain. These initial conditions havebeen chosen so that they are far from the exact expected field, thus we can assess the robustnessof the algorithms. The initial fluid velocity is a linear function from 0 to u+

y+=200. The following

graphs represent the solutions for the χ field, the fluid velocity profile and the turbulent relativeerror in logarithmic scales.

29

Page 30: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

0 50 100 150 200Y

+

0

20

40

60

80

χ

1x10-5

0.5x10-5

2.5x10-6

1.25x10-6

6.25x10-7

3.125x10-7

1.5625x10-7

7.8125x10-08

Figure 15: Coupling NS and SA: Re = 106. Representation of χ

0 50 100 150 200

Y+

0

5

10

15

20u+

1x10-5

0.5x10-5

2.5x10-6

1.25x10-6

6.25x10-7

3.125x10-7

1.5625x10-7

7.8125x10-8

Figure 16: Coupling NS and SA: Re = 106. Fluid velocity

In practice, we observe that the turbulent solver is much faster (50 to 100 times) than the fluidsolver, so that the turbulent subcycling do not affect the global (fluid+turbulence) CPU time. Asexpected, the global convergence obtained is of order one. Indeed, the approximations in time arefirst order for the diffusion, convection parts and the operator splitting. These numerical results

30

Page 31: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

−7 −6.8 −6.6 −6.4 −6.2 −6 −5.8 −5.6 −5.4 −5.2−2.8

−2.6

−2.4

−2.2

−2

−1.8

−1.6

−1.4

−1.2

log(dt)

log(

Rel

ativ

e er

ror)

Figure 17: Coupling NS and SA: Re = 106. Relative error

show the good behavior of the numerical method despite the arbitrary initial data.To conclude this section, we propose a comparison between numerical solutions obtained with thethree different inverse pathbrigdes, described in section 3.4 with the coupled Navier-Stokes andSpalart-Allmaras solver. As we can see on figure 18 the difference between the three approaches isin fact negligible. This is explained by the fact that the mesh is sufficiently fine.

6 Conclusion

In this paper, we have proposed and studied a numerical method solving the Spalart-Allmaras tur-bulent model, focusing in particular on the positivity preserving property. This method is based ona splitting operator in order to use a finite element method for the diffusive part and a finite volumemethod for the convective one. Such process is possible using a path-bridge from one formulationto the other. An important issue is the approximation of the stiff source term appearing in theturbulence equation. The numerical method proposed allowed us to obtain positive, accurate andstable solutions for the flat plate benchmark. The accuracy of the method can be improved using ahigher order finite-volume scheme for the advection operator since the finite element scheme is, inprinciple, second order. It is worth noting that this method has been implemented in a parallel codeusing a domain decomposition approach along with a functional decomposition (see [39]). Furthertests and more complex applications will be performed in the future.

31

Page 32: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

0 50 100 150 2000

20

40

60

80 χ = Κ Y+

πev

- πve

(Mass lamping)

πev

- πve

(Inv)

πev

- πve

(Consistent Mass)

Figure 18: Solution with 3 different pathbridges, for ∆t = 10−5, 6000 iterations and the first pointlocated in y+ = 5

Figure 19: solution

Acknwoledgements The authors would like to thank Frederic Pascal, for its valuable remarkson the pathbrigdes.

32

Page 33: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

7 APPENDIX

In this appendix, we sum-up the implemented scheme.

• Numerical approximation of the diffusive part:

∑i∈I νn+1

i

(φi, φj

)L2(Ω)

=∑

i∈I νni

(φi, φj

)L2(Ω)

−∆tn

(∇(∑

i∈I νn+1i φi

)2,∇φj

)L2(Ω)

−2cb2

(|∑

i∈I νn+1i ∇φi|

2, φj

)L2(Ω)

− ν(∇(∑

i∈I φi

)2, φj

)L2(∂Ω)

, ∀j ∈ I.

• Pathbridges:

FE → FV: νfv = Πevνfe = A(T )νfe,

FV → FE: νev = Πfv.

• Convective part:

νne =

νnK if un

e · ne > 0,

νnKe if un

e · ne < 0,

νnK |K| + νn

Ke|Ke|

|K| + |Ke|if un

e · ne = 0,

νn+1/2e =

ane νn

e

νne bn

e (e−ane ∆tn − 1) + an

e e−ane ∆tn

, with ane = cb1

(ωn

e +fn

v2,eνne

κ2d2

), bn

e = −cw1

d2fn

w,e,

νn+1K = νn

K −∆tn

|K|

∑e∈∂K |e|

(θne fn

e · ne + (1 − θne )f

n+1/2e · ne

)+ ∆tnS(νn

K , νn+1K ).

with:

S(νnK , νn+1

K ) = cb1 ωnKνn

K −cw1fw(νn

K)

d2(νn+1

K )2.

References

[1] F. Alouges, F. De Vuyst, G. Le Coq and E. Lorin, C. R. Math. Acad. Sci. Paris 335 (2002),no. 7, 627–632.

[2] P. Batten, C. Lambert and D. M. Causon, Internat. J. Numer. Methods Engrg. 39 (1996),no. 11, 1821–1838.

[3] M. Boucker, PhD thesis, Ecole Normale Superieure de Cachan, (1998).

[4] A. N. Brooks and T. J. R. Hughes, Comput. Methods Appl. Mech. Engrg. 32 (1982), no. 1-3,199–259.

33

Page 34: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

[5] B. Cardot, F. Coron, B. Mohammadi, and O. Pironneau, Comp. Meth. in Applied Mech.and Eng., 87, (1991), 103–116.

[6] B. Cardot, B. Mohammadi, and O. Pironneau, Incompressible Computational Fluid Dynam-ics: Trends and Advances, Cambridge University Press, Cambridge, (1993), 1–15.

[7] G. Chavent and B. Cockburn, RAIRO Model. Math. Anal. Numer. 23 (1989), no. 4, 565–592.

[8] H.C. Chen and V.C. Patel, AIAA Journal, (1988), 6, 641–648.

[9] B. Cockburn et al., Advanced numerical approximation of nonlinear hyperbolic equations, Lec-ture Notes in Math., 1697, Springer, Berlin, (1998).

[10] B. Cockburn, S. Hou and C.-W. Shu, Math. Comp. 54 (1990), no. 190, 545–58.

[11] A. Dervieux and J.-A. Desideri, Tech. Rep. RR-1732, INRIA, (1992).

[12] J.-M. Ghidaglia and F. Pascal, C. R. Acad. Sci. Paris Ser. I Math. 328 (1999), no. 8, 711–716.

[13] S. K. Godunov, Mat. Sb. (N.S.) 47 (89) (1959), 271–306.

[14] A. Harten, J. Comput. Phys. 49 (1983), no. 3, 357–393.

[15] F. Ilinca and Pelletier, Int. J. Therm. Sci., (1999), 38, 560–571.

[16] F. Ilinca, D. Pelletier and D. Garon, Int. J. Num. Meth. Fluids, 24 (1), (1997), 101–120.

[17] F. Ilinca, D. Pelletier and F. Arnoux-Guisse, Int. J. Comput. Fluid Dyn. 8 (1997), no. 3,171–188.

[18] T. Jongen and Y. P. Marx, Comput. & Fluids 26 (1997), no. 5, 469–487.

[19] B. Koobus and C. Farhat, Comput. Methods Appl. Mech. Engrg. 170 (1999), no. 1-2, 103–129.

[20] B. Koobus and C. Farhat, Internat. J. Numer. Methods Fluids 29 (1999), no. 8, 975–996.

[21] B. Larrouturou, J. Comput. Phys. 95 (1991), no. 1, 59–84.

[22] R. J. LeVeque and J. B. Goodman, in Large-scale computations in fluid mechanics, Part 2 (LaJolla, Calif., 1983), 51–62, Amer. Math. Soc., Providence, RI.

[23] E. Lorin and V. Seignole, Math. Models Methods Appli. Sci. 13 (2003), no. 7 , 971–1018.

[24] B. Mohammadi and O. Pironneau, Analysis of the k-epsilon turbulence model, Masson, Paris,(1994).

[25] F. Pascal and J.-M. Ghidaglia, Internat. J. Numer. Methods Fluids 37 (2001), no. 8, 951–986.

[26] V. C. Patel, W. Rodi and G. Scheuerer, AIAA J. 23 (1985), no. 9, 1308–1319.

[27] P. L. Roe, J. Comput. Phys. 43 (1981), no. 2, 357–372.

[28] A. Soulaimani, M. Fortin, Comput. Methods Appl. Mech. Engrg., (1994), 118, 319-350.

34

Page 35: An accurate positivity preserving scheme for the …difference scheme for the k-ε model and for a two-layer turbulence model (see [26], [8]). It is based on a special limiter to

[29] P.R. Spalart and S.R. Allmaras, La recherche aerospatiale, (1994), no. 1, 5–21.

[30] P.R. Spalart and S.R. Allmaras, AIAA, (1992), no. 92-0439.

[31] D.B. Spalding and B.E. Launder, Int. J. Heat Mass Transfer, 1972, vol. 15, n10, p. 1905-1932.

[32] H. Tran, B. Koobus, and C. Farhat, La Revue Europenne des Elments Finis, (1998), Vol. 6,No. 5/6, pp. 611-642.

[33] J. C. Turner, Jr. and M. D. Gunzburger, Comput. Math. Appl. 15 (1988), no. 11, 945–951.

[34] G.D. Van Albada, B. Van Leer W.W. Roberts, Astron. Astrophys, (1982), 108, 76–84.

[35] R.H. Van Driest, J. of the Aero. Sci. (Nov 1956).

[36] D.C. Wilcox, La Canada, California, DCW Industries, (1993).

[37] P. E. Sacks, SIAM J. Math. Anal., (1985), 16, 233–249.

[38] Aerospace Science and Technology 6 (2002), 171–183.

[39] A. Soulaimani, and A. Ben Haj Ali, Canadian Aeronautics and Spce Journal, (2005), Vol. 4,No. 50.

35