1. Introduction
Since the seminal works of Chorin [
1] and Temam [
2], different variants of the fractional-step method have been proposed and used for the integration of the incompressible form of the unsteady Navier–Stokes Equations (NSE). Over the years, different algorithms have been developed using multistep time advancement techniques, conceived to be used with generalized grid topologies and different locations of the flow variables (co-located or staggered). Algorithms developed for the analysis of unsteady laminar flows have been successfully employed for the Direct Numerical Simulations (DNS) and for the Large Eddy Simulation (LES) of turbulent flows. The latter, by requiring some forms of parametrization for the smallest scales of turbulence, is computationally less demanding. In principle, even non-conservative or dissipative numerical algorithms may give reasonable results when used for DNS, provided that the time step of the simulation and the cell size are smaller than the Kolmogorov scales, so that the truncation error remains confined in the insignificant part of the power spectrum. This is not true for LES though, where a low-pass filter is applied to the NSE to separate the large energy-carrying scales of motion from the small and more isotropic ones; here the truncation error necessarily affects both the resolved and the modeled part of the spectrum, hence the importance of using energy-conserving and non-dissipative algorithms for LES of turbulent flow.
In a sequence of papers [
3,
4] numerical algorithms for the solution of the NSE in conservative form have been proposed, using Cartesian staggered grids. There, 2nd-order accurate central difference schemes were used for the discrete spatial operators, second-order time accurate schemes for the diffusive terms, and, at least second-order accurate schemes for time integration of the non-linear term (i.e., Adams–Bashforth or Runge–Kutta). The need to move toward complex grid topologies has pushed the development of algorithms using curvilinear coordinate transformations or unstructured grids. A very popular curvilinear-grid fractional-step algorithm is that of Zang et al. [
5]: they used a semi-implicit time advancement scheme in conjunction with a second-order accurate explicit Adams–Bashforth scheme for the time integration of the non-linear term. Since the algorithm co-locates the flow variables on the cell centroids it requires a non-conservative formulation of the NSE [
6] thus, high-order upwind flux schemes were used for the spatial discretization of the advective term of momentum and scalar transport. The algorithm was successfully employed for the study of LES of turbulent flows over curvilinear geometries. Later, the algorithm was modified using central differences for the calculation of non-linear momentum and scalar fluxes in several papers (see [
7] for a general discussion). On the other side, energy-conserving, second-order fractional-step algorithms for finite-differences/volumes have been proposed and used for the LES of turbulent flows in unstructured grids [
8].
Given the
Courant-Friedrich-Lewis (CFL) restrictions imposed by the semi-explicit methods mentioned earlier, implicit multistep methods for the solution of the NSE were sought. In its incompressible version, the NSE present some difficulties in enforcing mass conservation and in writing the discrete non-linear operator of velocities when numerically integrated using implicit multistep methods. The most widely used algorithm for the implicit integration of the incompressible NSE is the PISO algorithm, proposed by Issa [
9], which is first-order accurate in time. As it is a non-iterative predictor-corrector method, the momentum equation (predictor) is solved once and, afterward, the non-solenoidal velocities obtained are ‘corrected’ (at least twice) in order to enforce conservation of mass, by solving the pressure equation and an explicit algebraic corrector equation. It is important to note that for the algorithm to be implicit, the advective term must be linearized. Details on such linearization will be revisited in later sections.
OpenFOAM [
10,
11,
12] is a numerical library based on the idea of offering an unified mathematical framework for the description of systems of hyperbolic Partial Differential Equations (PDE) in a natural way, where the finite-volume (FV) approach is used for the ‘discretization’ of spatial derivative operators and where multistep time integration techniques are present. In particular, the PISO algorithm present in
OpenFOAM, referred also as
pisoFoam, has become a tool of widespread use in industry as well as in academia for the solution of the incompressible NSE. In academia, the code has been largely used for unsteady simulations using Detached Large Eddy, wall-resolving Large Eddy (A simulation where the near-wall turbulent structures are fully resolved and a no-slip boundary condition is applied at the wall), implicit Large Eddy (ILES) (a simulation where the SGS model is replaced by the truncation error of the numerical algorithm) models and more recently for DNS. There, it has proven to be the
go-to code in many groups for the simulation of a wide class of flows of interest for industrial and environmental applications.
Special attention has been given to ILES in the early years of the code for use in compressible and incompressible flows, given that low-order FV methods are amenable to use within the Monotone Implicit LES, or MILES, framework (for a review, see [
13]). In general, the use of
pisoFoam along with MILES for the numerical simulation of high-Reynolds number flows has proven to be accurate in a wide range of scenarios [
13,
14]. However, it is difficult to determine
a-priori whether for a given grid resolution (and type of grid elements) MILES would resolve accurately the backscattering effects of turbulence or, more importantly, whether the numerical diffusion may be considered representative of the unresolved scales of turbulence: a finite-scale analysis proves the existence of a ‘scale-similar term’ for
structured grids, but not so for more general, unstructured, grids composed of non-hexahedral elements. In other words, if special care is not taken, solutions obtained using MILES may tend to be
over-dissipative particularly in cases where non-linear effects are predominant or needed to be accurately modeled.
More recently wall-resolving and Wall-Modeled LES models (WMLES) (a LES where the near-wall dynamics is not resolved and the wall shear stress is parametrized using a model), although present since the early stages of
OpenFOAM, have begun to be used for the simulation of turbulent flows. However, most studies have focused on high-Reynolds external, or wall-bounded, flows with massive separation, i.e., airfoils, wind turbines, flows over complex topography, where over-dissipation may not be noticeable. A more recent account on low-Reynolds LES on channel flows using
pisoFoam was made by Vuorinen et al. [
15]. There, it was shown that DNS results for a wall-bounded channel flow obtained using
pisoFoam are over-dissipative with respect to the results obtained for the same case using a Runge–Kutta Navier–Stokes Equation solver, implemented within the
OpenFOAM framework. In an attempt to remedy the over-dissipative properties of
pisoFoam, various authors [
15,
16] have implemented non-incremental projection methods for the solution of the incompressible NSE in
OpenFOAM. All such works consider the Rhie–Chow interpolation for the momentum fluxes projected onto the faces, in order to guarantee velocity-pressure coupling on the discrete PDE system. However, note that by not considering the pressure gradient in the predictor step (non-incremental), the pressure obtained is only first-order accurate in time, depending on the Reynolds number. The latter term is often referred to as
computational pressure since it differs from the physical one by a term proportional to the computational parameters. Furthermore, boundary conditions for the pressure equation are not trivial: an accurate definition of the pressure gradient in the no-slip boundaries require the projection of the momentum equations onto the boundary which, at the corrector step, are unknown. A
deferred-correction approach can be used for determining the projection of the NSE onto the no-slip boundaries. However, the cited works fail to mention how the boundary conditions for the pressure equation are treated.
A more accurate account on the over-dissipative properties of
pisoFoam and other commercial codes was made by Komen et al. [
17]. An analysis of the turbulent kinetic energy budget shows that for the resolved and
residual dissipation rates there is only an
difference, for quasi-DNS turbulent channel flows. Furthermore, explicit LES calculations on channel flows show that subgrid scale contributions are
at least 3.5 times lower compared to residual contributions due to numerical dissipation, and such ratio varies little with
. The authors argue that no clear improvement is gained when using an explicit LES model compared to just running an under-resolved DNS when using
pisoFoam. This issue will be exploited in a successive Section.
Incidentally, the work of Tuković et al. [
18] has revisited the PISO implementation present in
pisoFoam and shown that the time integration order of pressure and velocity is time-dependent, passing from first-order accuracy for small time-steps to second-order accuracy for bigger time-steps, and errors on pressure tend to accumulate in time for very low CFL numbers. There, the authors propose to project in time the face fluxes of momentum, in an attempt to mitigate the error caused by the splitting of the non-linear term in PISO. Please note that the former remark is not new: the original work of Issa [
9] shows that the operator-splitting in time is only first-order accurate.
The present work focuses on the analysis of the overall performance of the standard implementations of
pisoFoam compared to those of an incremental-pressure correction version of the Runge–Kutta algorithm proposed by Le and Moin [
4] (hereinafter RK4). Specifically, first, two benchmark cases are run to test energy-conservation properties of the two algorithms: (1) a 2-D Taylor vortex, in which boundary condition consistency can be verified; (2) the calculation of the energy decay rate of a 2D Tollmien–Schlichting wave in a channel, to determine the time integration order of the algorithm.
Successively, the algorithms are validated for LES of neutral and buoyant flows. In this context, filter consistency and associated boundary conditions are also tested and compared with the standard solvers available in
OpenFOAM. In particular,
pisoFoam is used in conjunction with the
Dynamic Smagorinsky model for turbulent neutral and buoyancy flows available in the framework. To be noted that in
OpenFOAM the subgrid-scale (SGS) scalar fluxes are parametrized using the Reynolds Analogy, namely assuming a constant value for the SGS Prandtl number. Our implementation of RK4 is used with a
Dynamic Mixed Lagrangian Smagorinsky model [
19,
20] implemented in the present work. Also, a new model for the calculation of the turbulent SGS scalar fluxes, in the spirit of the one proposed by Armenio and Sarkar [
21], is implemented and compared with results obtained using the Reynolds Analogy for the SGS scalar fluxes present in
OpenFOAM for simulations where buoyancy is active.
The verification of the LES models along with the fluid flow solver for turbulence flows uses two cases: (1) a turbulent neutral Poiseuille flow, where the consistency of the filters and of the SGS model can be evaluated; and (2) Rayleigh–Benard convection between infinite plates, which may serve as a test of the overall performance in the presence of active scalars.
The paper is organized as follows:
Section 2 reports the mathematical formulation of the different algorithms just discussed, including the description of the SGS model for the momentum and scalar transport equations;
Section 3 reports a description of the two algorithms tested in this paper, namely PISO and RK4;
Section 4 reports results of tests aimed at verifying the energy-conservation properties of the two algorithms;
Section 5 reports verification tests of the two algorithms for LES of turbulent flows and, finally, concluding remarks and a discussion are given in
Section 6.
2. Mathematical Formulation
In this section, a description of the Boussinesq form of the unsteady NSE for the filtered flow variables is presented. We recall that the Boussinesq form allows the study of systems with variable density, only when the density variations are much smaller than the bulk density of the flow. Spatial filtering over the NSE produces unresolved terms (SGS fluxes) which need to be modeled.
The filtered Boussinesq form of the Navier–Stokes equations read as:
where
is the velocity component in the
i-direction,
is the density perturbation with respect to the bulk density
,
p is the hydrodynamic pressure,
g is gravity,
is the kinematic viscosity, and
the scalar diffusivity. The quantities
are the SGS, or residual, fluxes of momentum and density.
The frame of reference has and over the streamwise and spanwise horizontal directions, and vertical upward. The streamwise, spanwise, and vertical directions may be also referred to as ; similarly, for the velocity components we also use , depending on the context.
2.1. Turbulence Modeling: LES
This apart will provide a description of the LES models used in this work. The Dynamic Lagrangian Mixed Smagorinsky Model (DLMM) for scalar and momentum turbulence will be described first, along with the filter used. Afterwards, a brief description of the Dynamic ‘Mean’ Smagorinsky Model (DMM) for momentum turbulence and the Reynolds Analogy (RA) for modeling the scalar SGS fluxes will be made. Notice that the latter methodologies (DMM and RA) are also available in foam-extend, a fork of OpenFOAM.
2.1.1. Dynamic Lagrangian Mixed Smagorinsky for Scalar and Momentum Turbulence
By applying a second filter,
of size
on Equation (
4) and after some algebraic manipulations, a relation for the residual stresses, referred to as the Germano Identity, is obtained:
The same holds for the residual scalar fluxes, just by replacing with .
The SGS fluxes of momentum can be expressed as the sum of a scale-similar part and a Smagorinsky eddy-viscosity term:
where
is the contraction of the strain rate tensor of the filtered field, and
is a measure of the mixing length for the unresolved eddies. By using identity (
6), one can obtain an expression for
. By writing the mixed Smagorinsky model for the NSE using the filter
, one obtains
which, once substituted in Germano’s identity Equation (
6), gives:
where
is assumed constant at the filter level.
The system (
10) is overdetermined. A least-square approach for finding
leads to the following final expression:
Please note that the brackets
indicate some form of averaging. By time-averaging along Lagrangian trajectories (i.e., pathlines), one obtains a
mixed version of the
Dynamic Lagrangian Model [
19] where
For the unresolved SGS fluxes of density, one can define the
subgrid buoyancy flux in a similar way to the subgrid stress tensor, as follows:
By analogy, the same procedure for the derivation of the LES model for the momentum equation follows, thus one can determine the constant
in a least-square sense:
where
Notice that the averaging procedure proposed in Equation (
18) can be made also along Lagrangian trajectories, therefore:
where
is the standard deviation of the scalar concentration. Notice that the particular choice of scalar turbulence timescale goes in correspondence with the timescale proposed for the residual momentum fluxes; that is,
T is reduced in regions where the scalar gradients or velocity-scalar correlations are large, and vice-versa. The dynamic evaluation of the SGS fluxes for the scalar equation, instead of using the Reynolds Analogy for the SGS Prandtl number (
), is particularly advantageous when studying stable stratified turbulence (see [
21] for a discussion).
Here we use the non-uniform Laplacian filter [
22], i.e., a Laplace filter where the filter width is non-constant. It is a generalization of the Laplacian filter proposed by Germano [
23]. Such filter is a Reynolds operator in space, i.e., it commutes with derivatives, it preserves constants, and is self-adjoint. For structured grid one has the following:
where
f is the field being filtered, and
is the filter width along the
i-direction. In structured grids, the filter width is just a multiple of the width, height, or length of the volume cell where the field is being filtered. The filtered field does not necessarily ‘inherit’ the boundary conditions of the unfiltered field: here we will assume that they do, under the assumption that
as one approaches the boundaries.
Finally, please note that for the family of Gaussian filters the following identity
is valid. Previous works [
5,
6] using finite-difference codes have considered the filter width at the test level as
which is only valid for spectral cutoff filters. Such inconsistency in finite-volume and finite-difference algorithms is noted by Vreman et al. [
20]. The standard implementation of the Smagorinsky models in
OpenFOAM has said inconsistency.
2.1.2. Dynamic ‘Mean’ Smagorinsky for Momentum and Reynolds Analogy for Scalar Turbulence
A difference in the implementation of the Dynamic Smagorinsky Model is present in
OpenFOAM, where the parameter
is volume-averaged across the domain instead of being averaged along homogeneous directions as proposed by Germano et al. [
24], i.e., starting from Equation (
9), the calculation of the dynamic coefficient for the
sgs mixing length is as follows:
where
means volume-averaging (hence the term ‘Mean’). Notice that the calculation of
does not consider the
term, since is not a mixed formulation (
). The terms
and
are calculated directly from Equations (11) and (7), respectively. As noted previously, the test filter width in this formulation is taken as
.
The Reynolds Analogy for the scalar SGS fluxes simply considers that the turbulent mixing length for scalars
scales linearly with that of momentum
, where such scaling factor
(the ratio between turbulent mixing lengths) remains constant. This assumption leads to the expression:
6. Conclusions
In the present paper, we compare two different solution methods for the time integration of the Boussinesq form of the NSE, namely the RK4 and PISO. The PISO along with the DMM algorithms are present within the OpenFOAM library, whereas the RK4 and the DLMM models shown in this work are not.
We first consider the standard implementation of the algorithms in the framework and study the conservation properties using literature test cases, namely the two-dimensional unsteady Taylor vortex and the growth of the linear disturbance in a plane Pouseuille flow under critical conditions. Results of these tests reveal the superiority of the RK4 algorithm over pisoFoam, since the former predicts better the time evolution of the non-linear term in both cases, whereas the latter exhibits dissipative features which may have negative consequences in the study of transitional flows.
Successively, we test the two algorithms within the Smagorinsky LES philosophy: the Dynamic Lagrangian Mixed Model (DLMM), on the other hand the Dynamic ‘Mean’ Model present in OpenFOAM/foam-extend. Also, in case of buoyant flows, the SGS Prandtl number is either evaluated dynamically by the DLMM, or just by setting constant. The studies involving the DLMM and DMM use the anisotropic Laplace filter.
The use of the RK4 algorithm in conjunction with the DLMM for momentum turbulence show better results compared to those obtained using pisoFoam along with DMM. RK4 together with the DLMM provides good first- and second-order statistics for the neutral wall-bounded flow whereas the results obtained with pisoFoam, although reasonable, are less accurate. This has been attributed both the dissipative character of pisoFoam and to the particularities in the SGS models present in the distributions of OpenFOAM. Interestingly, the use of the SGS model substantially improves the performance of pisoFoam, compared to corresponding coarse DNS (or equivalently ILES) solutions, regardless the LES model. This means that although PISO being more dissipative than RK4, numerical dissipation is not able to overwhelm the effect of the SGS model, and this is probably the feature which has made the algorithm successful in the scientific and engineering communities.
In case of buoyant flows, the Nusselt number predicted using RK4 behaves somewhat better than pisoFoam, although it exhibits some deviations when calculated using different methods. Such deviation is the result of taking into account quantities for which no SGS model is implemented (i.e., the temperature variance.) The analysis of the behavior of the SGS Prandtl number, calculated dynamically within the RK4 LES methodology shows that it tends to 1 in the core region. This clearly shows that the assumption of constant SGS Pr number may produce higher inaccuracies as the number increases, as the cases studied here have shown.
Overall, although pisoFoam exhibits some dissipative features, our tests show that a consistent SGS model is able to improve the results when compared to under-resolved DNS and, as such, it can be still considered a reasonable good algorithm for LES studies. It is robust and provides good results even in the presence of unstructured non-hexahedral meshes, needed when studying very complex geometrical configuration. The RK4 algorithm appears more accurate because of its energy-conserving properties, but its own efficiency in the presence of very stable stratification or in the presence of non-hexahedral meshes has still to be verified. Also, an accurate and robust filter function to be used for non-hexahedral meshes is needed. These issues will be analyzed in upcoming research.