1. Introduction
The lattice Boltzmann (LB) methods, which arise as minimally discretized numerical schemes of the Boltzmann transport equation—a cornerstone formulation in kinetic theory, have attracted much attention in recent decades [
1,
2,
3,
4,
5]. As a mesoscopic approach, these methods have enriched the variety of computational fluid dynamics (CFD) techniques that are being developed and has been applied to a wide range of fluid flows successfully [
6,
7,
8,
9]. This involves the evolution of the distribution of the particle populations by a collision step, which is then followed by lock-step advection along discrete directions—referred to as the streaming step.
The former is often modeled by a relaxation of the distributions (e.g., [
10]) or their moments (e.g., [
11]) to equilibria. The discrete particle velocity directions are referred to as the lattice, which are usually designed to obey the associated physical symmetry and isotropy of the fluid flow being simulated. The lattice is usually referred to by the notation
, where
d represents the number of spatial dimensions and
q denotes the number of discrete particle directions.
The macroscopic fields, such as the fluid velocity, are obtained from the lower order moments of the distribution functions, while the higher order kinetic moments can be constructed to evolve so as to facilitate the numerical robustness of the method. The linear advection and locally nonlinear collision of the LB method, along with its ability to naturally represent the physics of complex fluids and flows based on kinetic models, are among the important assets of this approach.
Anisotropic and inhomogeneous fluid motions involve relatively large spatial variations in the characteristic features of the fluid flow in one or more directions when compared with in the other directions. These include shear flows, flows around boundary layers, and in compacted geometrically disordered media, where the characteristic length scales or spatial gradients in the flow are dominant in certain directions relative to others. Such multidimensional flows governed by the Navier–Stokes equations can be more efficiently computed using methods that use grids that naturally conform with the direction-specific non-homogeneities inherent to the problem of interest.
The LB methods, on the other hand, are usually constructed using uniform lattice grids, such as using a square lattice in two-dimensions (2D) and a cubic lattice in three-dimensions (3D) in order to satisfy their symmetry and isotropy requirements. One approach to overcome this issue is to employ nonuniform grids with the LB method augmented using interpolations (e.g., [
12,
13]), which, however, introduce considerable additional numerical dissipation compromising the accuracy of the approach [
14].
Alternatively, conventional discretizations, such as finite difference, finite volume, or finite element approaches (e.g., [
15,
16]) could be used, which, however, entail additional complexity and overhead to the LB schemes. It is, thus, desirable to use the standard LB discretization along the particle characteristics that preserve the lock-step or perfect streaming with relatively low attendant numerical dissipation while allowing the use of different particle speeds along different directions. Such types of LB schemes are associated with the use of rectangular lattice grids in 2D and cuboid lattice grids in 3D.
Starting from the initial work of Koelman [
17] much focus has been given to the construction of the LB methods on rectangular grids during the last two decades using different collision models with some necessary modifications to the algorithm to satisfy the Navier–Stokes (NS) equations. In the simpler rectangular LB versions, the single-relaxation-time (SRT) model has been modified by including additional particle velocities and whose equilibria were constructed via solving a quadrature problem [
18], by extending the equilibrium distribution functions with additional corrections to restore the isotropy effects [
19], or by including some counteracting forcing terms [
20].
On the other hand, by exploiting the additional degrees of freedom existing in the multiple-relaxation-time (MRT) collision model based on raw moments, rectangular LB schemes were constructed in the following four different ways: (i) by coupling between various relaxation parameters and the grid aspect ratio via a linear stability analysis [
21], (ii) by keeping the matrix of the transformation between the moment space and the velocity space of the distribution functions independent of the grid aspect ratio [
22], (iii) by using an additional adjustable parameter that determines the relative orientation in the energy-normal stress subspace via an inverse design analysis based on the Chapman–Enskog expansion [
23], and (iv) by extending the equilibrium moments to include the stress components for restoring the isotropy of the recovered macroscopic equations [
19].
Zong et al. [
23] demonstrated that the emergent continuum limit equations of some of the earlier rectangular LB formulations [
17,
21,
22] were not fully consistent with the NS equations. Moreover, although the latter rectangular LB schemes [
19,
23] yielded physically correct formulations, they require cumbersome implementations involving the specification of many free parameters and complicated expressions for the transport coefficients and mapping matrices dependent on the grid aspect ratio, and, like the other consistent schemes [
18,
20], are subject to major stability issues at lower grid aspect ratios when simulating flows at relatively large characteristic flow velocities or low viscosities.
The rationale for the limitations of the prior rectangular LB schemes were clarified in our recent work [
24,
25,
26]. These include their choice of the orthogonal moment basis, construction of the discrete equilibria involving only the lower order velocity terms and without correcting for the non-Galilean invariant cubic velocity errors arising from aliasing effects, and the use of collision models based on raw moments. Moreover, it was indicated in an earlier work for standard lattices (square or cubic) [
27,
28] that the use of central moments and avoiding the orthogonalization of the moment basis leads to significant stability improvements.
The construction of the collision step in the LB formulations using central moments based on the peculiar velocity [
29,
30] naturally maintains the Galilean invariance of the moments independently supported by the lattice and its advantages have been demonstrated for a variety of fluid dynamical problems (see e.g., [
31,
32,
33,
34,
35,
36]). Based on these considerations, we proposed a 2D central moment rectangular LB scheme recently and demonstrated its superior numerical features for simulating flows at higher Reynolds numbers using relatively small grid aspect ratio when compared to the other existing LB methods based on the rectangular lattice [
24,
25,
26].
Since anisotropic and inhomogeneous flows in situations of practical interest are often 3D in nature, it would be beneficial to develop LB algorithms on cuboid lattices. There exist few prior studies in this regard. For example, Hegele et al. [
18] presented a SRT-LB scheme using a D3Q23 lattice that involves the use of two additional particle velocities in each of the two Cartesian directions embedded to the D3Q19 lattice and constructed the equilibrium distribution functions by solving a quadrature problem to ensure the desired isotropy.
They evaluated the accuracy of the resulting approach for simulating cylindrical waves by using grid sizes with only small deviations from the cubic lattice. Later, Jiang and Zhang [
37] presented a cuboid LB scheme using a D3Q19 lattice for simulations of porous media. However, due to severe numerical stability restrictions, it was able to use grid aspect ratios with minor variations from unity. More recently, Wang et al. [
38] presented a raw moment-based MRT-LB scheme on the D3Q19 cuboid lattice, which utilized an orthogonal moment basis.
The equilibria and the transport coefficients were constructed via an inverse design analysis to satisfy the Navier–Stokes equations and involved the specification of many free parameters entailing a cumbersome implementation of the method. The resulting numerical approach was validated for some benchmark flow problems at moderate grid aspect ratios. Here, it should be pointed out that the choice of the equilibria plays a crucial role in maintaining the physical isotropy of the fluid flow equations [
39]. This can be naturally constructed by matching with the continuous Maxwell distribution as done in central moment LB formulations rather than involving complicated fitting of parameters.
Moreover, as mentioned above, the use of central moments is expected to provide significant improvements to the state-of-the-art in LBM based on non-cubic grids. However, a 3D central moment LBM based on a cuboid lattice does not currently exist in the literature, which can be constructed via an extension and significant modification of our recent work on the rectangular lattice [
26] and is the main objective of this present paper.
In this study, we present a new 3D cuboid central moment LB method on a D3Q27 lattice. This is referred to as the 3DCCM-LBM in what follows, and is parameterized by two grid aspect ratios representing the ratios of the characteristic particle speeds along the two directions with respect to those in the remaining direction. The D3Q27 lattice is chosen since it provides greater possible isotropy and accuracy when compared to its D3Q15 and D3Q19 lattice subsets [
40]; however, the equilibria corrections needed for the D3Q27 cuboid lattice to satisfy the NS equations (see below for more details) are applicable for these lattice subsets as well.
In contrast to the prior approaches, our cuboid LB scheme will be constructed by using a natural moment basis that avoids orthogonalization, and the discrete central moment equilibria are specified by matching with those corresponding to the continuous Maxwell distribution function. Moreover, the prior LB algorithms on stretched lattice grids based on the various collision models discussed above, including our recent 2D rectangular central moment LB scheme [
26], prescribe the transformations between the distribution functions and raw moments before and after collision by using a moment basis that separates the trace of the second order moments (related to the bulk viscosity) from its other components (related to shear viscosity).
The use of this strategy in the context of the 3D formulations based on the cuboid lattice would result in quite complicated transformation matrices dependent on the grid aspect ratios. This is obviated in our present approach by naturally separating the bulk and shear viscosity effects associated with the viscous stress only within the collision step and not for such transformations, and the effect of the grid aspect ratios are introduced via much simpler pre- and post-collision diagonal scaling matrices in such mappings. We will show the resulting compact approach can be naturally interpreted based on special matrices.
The truncation errors resulting from the grid anisotropy associated with the cuboid lattice as well as those due to the aliasing effects will be eliminated by deriving the necessary correction terms from a Chapman–Enskog analysis, which will be augmented to the second order moment equilibria. The resulting 3DCCM-LBM is modular in construction in that the existing 3D central moment (and also its special case involving raw moment) based algorithms developed for the cubic lattices can be readily extended to cuboid lattices by using the corrections to the moment equilibria derived in this work and introducing the pre- and post-collision diagonal scaling matrices based on the grid aspect ratios.
Our cuboid LB approach will be first validated against the analytical solutions and/or numerical results for standard benchmark flow problems. The advantages of this scheme in efficiently simulating an example inhomogeneous and anisotropic flow problem with significant savings in memory storage and computational effort will then be demonstrated. Moreover, we will also show numerical stability improvements in the use of our 3D central moment scheme when compared to that based on raw moments for computation of shear flows at relatively large flow velocities and/or low viscosities.
The organization of this paper is as follows.
Section 2 presents a Chapman–Enskog multiscale analysis of a 3D LB equation based on the non-orthogonal moment basis using a D3Q27 cuboid lattice. Since the viscous stress tensor in the NS equations is based on the second order non-equilibrium raw moments that are the same as the corresponding second order non-equilibrium central moments, it suffices to present our analysis based on the simpler raw moment formulation; and as part of this, we will identify the correction terms involving velocity gradients and grid aspect ratios for eliminating the grid anisotropy and non-Galilean invariant cubic velocity related truncation errors and show consistency with the 3D NS equations.
Formulas for computing the local strain rate tensor based on non-equilibrium moments and parameterized by the grid aspect ratios will also be derived in this section. In
Section 3, we will discuss the complete details of the implementation aspects of our 3DCCM-LBM. Additional algorithmic details in this regard are given in various appendices (see
Appendix A,
Appendix B,
Appendix C and
Appendix D). Formulas for the momentum-augmented bounce-back scheme for the D3Q27 cuboid lattice that are dependent on the grid aspect ratios for simulating shear flows due to moving boundaries are derived and summarized in
Section 4.
Section 5 presents a numerical validation study of the 3DCCM-LBM using different grid aspect ratios for a variety of benchmark flow problems. This is followed by a demonstration of the computational effectiveness of using cuboid grids (via 3DCCM-LBM) in lieu of utilizing cubic grids for simulating inhomogeneous and anisotropic flows in
Section 6 and the numerical stability improvements achieved with using central moments rather than raw moments on the D3Q27 cuboid lattice at different grid aspect ratios in
Section 7. Finally, the main conclusions of this work are given in
Section 8.
2. Chapman–Enskog Analysis on a D3Q27 Cuboid Lattice: Isotropy Corrections, Macroscopic Flow Equations, and Local Formulas for the Strain Rate Tensor
2.1. Cuboid Lattice Parameters, Moment Basis, and Definitions of Central Moments and Raw Moments
The cuboid grid based on the three dimensional, twenty seven velocities (D3Q27) lattice used in deriving the formulation in what follows is shown in
Figure 1.
The components of the particle velocities in the y and z directions are related to the grid aspect ratios r and s, respectively, which is defined below. In other words, these two free parameters represent the ratios of the characteristic particle speeds along the y and z directions with respect to those in the x direction, and formalize the flexibility accorded by the cuboid lattice. Thus, if , , and are the space steps in the x, y, and z directions, respectively, for evolving over a time step that would then fix the particle speeds in the respective directions (i.e., , , and ), we can then define the grid aspect ratios as , and .
As is standard in LB formulations, we work with the usual lattice units for simplicity in the following, i.e., the reference space step in the
x direction and the time step are taken to be unity:
and
. Thus,
and
. We now clarify the notations used in
Figure 1, where the magnitude of each of the particle velocity is the distance between the head and tail of an arrow representing that direction; in lattice units, with a unit time step, the Cartesian components of the length of each lattice direction or the streaming distance are bounded by
.
Now, since in
Figure 1, for every particle velocity direction, its opposite counterpart is also depicted, the total distance for such a pair encompasses a length with components
as shown. Based on these considerations, we can then list the Cartesian components of the particle velocities for the D3Q27 cuboid lattice as follows:
where
denotes a column vector based on the standard ‘ket’ notation and † refers to taking the transpose of any array. We will also need the following 27-dimensional vector with unit elements in what follows:
We then define a linearly independent set of non-orthogonal basis vectors for the D3Q27 cuboid lattice using a combination of the monomials of the type
for integer exponents
m,
n, and
p [
30] as follows:
where [
30]
As discussed in the introduction section, we will not orthogonalize the above set of basis vectors further to maintain simplicity and robustness and retain them in their natural forms in the following derivation based on the 3D cuboid lattice analogous to our rectangular central moment LB formulation [
26].
While the above basis vectors segregate the trace of the second order components
from the other second order components in order to enable the independent specification of the bulk viscosity from shear viscosity, as mentioned earlier, in the algorithmic implementation of the central moment approach discussed in the next section (see
Section 3), these operations will be confined only within the collision step and not for performing any mappings between distribution functions and moments. These considerations are crucial in avoiding cumbersome transformations and corrections for eliminating any truncation errors in order to develop an efficient algorithm on a cuboid lattice.
Then, we list the vectors of the distribution functions
, their equilibria
and the source terms
accounting for the effect of any body force with components
experienced by the motion of the fluid with density
and velocity
for the D3Q27 cuboid lattice as
. In anticipation of the developments in
Section 3, we first define the central moments of the distribution functions
and their equilibria
, as well as the source term
of order
using the weights as the peculiar velocity components, i.e., the components of the particle velocity shifted by those of the fluid velocity, as follows:
We define the bare or raw moments of the above three quantities of order
by using just the particle velocity components as the weights, which are given by
Note that here and in the following any quantity with a prime notation (′) is used to distinguish it as a raw moment (as opposed to a central moment). For convenience, we now enumerate these raw moments as
Here, the distribution functions and raw moments are related via
, i.e., the basis vectors (Equation (
4)), as
2.2. The Lattice Boltzmann Equation
The use of a cuboid lattice would result in an anisotropic viscous tensor given in terms of the grid aspect ratios
r and
s via the second order non-equilibrium moments, and such grid-related anisotropy effects need be eliminated via carefully designed correction terms. In constructing such counteracting corrections, since the second order non-equilibrium raw components are the same as the corresponding central moments by definition, it is sufficient to perform an analysis on the following simpler lattice Boltzmann equation (LBE) on the raw moments, i.e., the MRT-LBE [
26]:
where
is the diagonal relaxation time matrix and
is a
identity matrix. Here, the right side of Equation (
8) prescribes the relaxation of different moments
to their equilibria
at a rate given by the parameter
, which is augmented by the effect of the source term via
(
), and the results are then mapped back into the velocity space via the inverse mapping
. This is followed by the perfect advection of the distribution functions
to the nearest node along the particle characteristics
(
) as implied by the left side Equation (
8). Then, the hydrodynamic fields are computed via appropriate moments as
2.3. Equilibria and Sources: Central Moments and Raw Moments
In this work, we obtain the countable discrete
central moment equilibria for the D3Q27 cuboid lattice by matching those of the continuous Maxwell distribution function [
29] and given by
where
is the speed of sound, which is an adjustable parameter of the collision model and will be related to the transport coefficients via a Chapman–Enskog analysis later.
However, the analysis in what follows that provides corrections for the second order moments as well as the algorithm devised in the next section (
Section 3) for the cuboid lattice are still applicable for other collision models. These include those based on the factorization property [
30,
41] and cumulant collision model [
28], which differ from the Maxwellian-based central moment model in the evolution of the higher order moments. Then, the corresponding discrete
raw moment equilibria are obtained from Equation (
10) via binomial transforms, which read as follows:
In addition, the central moments of the source terms for recovering the NS equations in 3D are given by [
30]
and the corresponding raw moments follow from their binomial transform as in [
30]
2.4. Chapman–Enskog Analysis: Identification of Truncation Errors Due to Grid Anisotropy and Non-Galilean Invariance from Aliasing Effects on the D3Q27 Cuboid Lattice
We will now perform an analysis based on the Chapman–Enskog (C-E) multiscale expansion [
42], written for the LBE in the matrix form by d’Humières [
43], to identify the truncation errors due to anisotropic effects arising from using the cuboid lattice grid and non-Galilean invariant (GI) cubic velocity errors resulting from the aliasing effects associated with the D3Q27 lattice. Corrections to eliminate these errors will then be derived in what follows. The analysis for a 3D LBE formulation given above follows the approach presented in Premnath and Banjeree [
44] and Hajabdollahi and Premnath [
45], which was adopted for constructing a rectangular LB algorithm recently [
26].
In this version of the C-E analysis, we expand the moments about their equilibria by including the non-equilibrium effects as higher order perturbations and the time derivative as a multiple scale expansion as follows:
where
is the perturbation parameter that serves the purpose of bookkeeping and isolating terms of the different orders. Moreover, we apply a multivariate Taylor series expansion in both space and time to the first term on the left side of Equation (
8) and then transform all the resulting terms to the moment space via
. Subsequently, substituting the C-E expansions (Equation (
14)) in the 3D LBE with the natural moment basis given in Equation (
8) and then grouping terms of the same order of
, we obtain the following set of moment equations identified by
for
, and 2:
where
and
with
. We then re-express Equations (15b,c) in the long form, which, respectively, read as
Substituting the moment equilibria
listed in Equation (
11) into the
Equation (
16), we now write explicitly all the equations up to the second order moment components that are relevant to determining the fluid dynamical behavior as follows:
Clearly, at the level, the evolution of the conserved moments (Equation (18a–c)) are unaffected by anisotropic lattice grid. In other words, the evolutions of the density and the components of the momentum at the level, respectively, given in (Equation (18a–c)) do not contain any spurious terms associated with the grid aspect ratios. On the other hand, it is evident from the underlined terms that the diagonal components of the non-equilibrium parts of second order moments (, and ) are influenced by the grid aspect ratios r and s.
Hence, it follows that such underlined terms will impact the viscous stress tensor and, hence, the hydrodynamics. Thus, in order to obtain the complete picture, we show in the following the evolution of the conserved moments at the
level, i.e., the leading four moment components of Equation (
17), which manifest the effect of the non-equilibrium parts on the evolution of density and momentum components at the slower time scale
:
Evidently, the hydrodynamical behavior given in Equation (19b–d) is influenced by the grid aspect ratios via the non-equilibrium moments
,
, and
, which needs to be eliminated. Before accomplishing this, we need the complete expressions of the second order non-equilibrium moments in order to isolate the truncation errors from terms that correspond to physics. Hence, we rewrite Equation (18e–j) after segregating the terms associated with the grid aspect ratios
r and
s (see underlined terms) from those associated with the standard cubic lattice (terms within the brackets
) as follows:
The diagonal parts of the non-equilibrium moments , , and contain contributions from the non-GI cubic velocity terms due to aliasing effects associated with the D3Q27 lattice (e.g., , where ), which appear together with the physical terms within those enclosed within the brackets ) of Equation (20d–f) in addition to the grid-dependent anisotropic errors. The grid-anisotropy related error terms will be denoted by , while the non-GI cubic velocity truncation errors will be referred to as for , and 9.
The structures of the non-equilibrium moments can then be obtained from Equation (20a–f) after substituting for the time derivatives of the conserved moments by means of terms related to the spatial derivatives using Equation (18a–d) and simplifying the resulting equations by retaining terms of
(following Hajabdollahi and Premnath [
45]). The off-diagonal second order non-equilibrium moments
,
and
, which do not contain any truncation errors, then read as
Finally, the diagonal second order non-equilibrium moments
,
and
are given as follows:
where the truncation errors due to grid-anisotropy
,
, and
and non-GI aliasing effects
,
, and
can be written as
2.5. Elimination of Errors Due to Lattice Stretching and Non-GI Cubic Velocity Terms via Extended Moment Equilibria
In order to eliminate the truncation errors identified above in Equation (23a–f) associated with Equation (22a–c), we now extend the moment equilibria
to an effective moment equilibria
as
where
are the required correction terms. Since the truncation errors appear in the diagonal parts of the second order non-equilibrium moments only, it suffices to consider non-zero correction terms only for those corresponding components identified by the indices 7, 8, and 9 in the effective equilibria. Hence, we write
The expressions in Equation (
25) are inspired by an inspection of Equation (23a–f) and involve the diagonal components of the velocity gradient tensor
and
, and the density gradients
,
and
, and their unknown coefficients
,
,
,
,
,
, and
, and
,
,
,
,
,
, and
. The formulas for these coefficients will now be established by performing a modified C-E analysis that accounts for the effective moment equilibria introduced in Equation (
24) into the expansion. That is,
Then, repeating the steps performed in
Section 2.4, the respective moment equations of
for
and 2, respectively, in Equations (15a–c) are replaced with the following:
Notice that the moment equilibria corrections appear in both
and
equations in Equation (26b,c), respectively, via the underlined terms. Following the steps in
Section 2.4, we simplify Equation (26b) for the leading set of moments up to the second order that are related to the derivation of the hydrodynamical equations. These lead to the following results for the effective non-equilibrium parts of the second order moments:
where
and
, and
are truncation error terms associated with grid anisotropy and non-GI due to aliasing, which are given in Equation (23a–f) and
,
and
are the corresponding yet to be determined corrections.
It now remains to obtain the desired expressions for the correction terms. In this regard, we combine the moment equations (Equation (26b)), in particular, those for the hydrodynamic moments (mass and momentum components) evolving at time scale with times the corresponding equations (Equation (26c)) based on the time scale variations. Then, using , we obtain the effective evolution equations for all the moments, including the macroscopic fields related to the mass and momentum components.
In particular, the momentum equations will then contain the truncation error terms and the counteracting correction terms along with those associated with the physics. We can then isolate the terms related to the truncation errors and corrections from those related to the desired NS equations and set the combined effect of the former to be zero. This would then lead to constraint relations between the errors and the required corrections as discussed in detail in Hajabdollahi and Premnath [
45]. Thus, if we define the following vector containing the truncation errors as
where
Then, it follows from Equations (26b,c) and (27a–f), the required constraint equation between the moment equilibria corrections vector
identified in Equation (
24) and the vector of truncation errors
is given by
Specifically, it reduces to
In Equation (
31), we do not assume the summation convention of repeated indices.
Now, evaluating Equation (
31) by applying Equation (
25) for
and using Equation (23a,b), we find
By comparing, we finally obtain the following required expressions for the coefficients
,
,
, and
:
Repeating these steps by applying Equations (
31) and (
25) together for
and
and invoking Equation (23c,d) and Equation (23e,f), respectively, i.e.,
and
we arrive at the required formulas for the coefficients
,
,
,
, and
,
,
,
,
, and
as follows:
and
When the extended moment equilibria (Equation (
24)) using the corrections (Equation (
25)) with these above coefficients are used in the LBE formulation based on the D3Q27 cuboid lattice, we recover the 3D NS equations given by
where
represents the pressure field, and the bulk viscosity
and shear viscosity
are related to the relaxation parameters of the second order moments as
Before concluding this section, the following important remarks related to our above derivation are in order:
The expressions for the moment equilibria corrections and the transport coefficients involve only the minimally required set of free parameters, viz., the grid aspect ratios
r and
s and the speed of sound
, and are considerably simpler than those used in a recent work [
38] that used a set of orthogonalized moment basis on the D3Q19 cuboid lattice and many additional parameters in the specification of the equilibria. Moreover, unlike the previous study [
38], the equilibria used in our approach given in Equation (
11) involve higher order velocity terms obtained from matching with the moments of the continuous Maxwell distribution, thereby, naturally eliminating the non-GI truncation errors.
This aspect along with the use of the non-orthogonal moment basis in the present derivation avoids a spurious coupling of the evolution of the higher order moments with those of the lower moments existing in approaches that use orthogonal moment basis [
27], which result in a robust LBE formulation on a cuboid lattice.
The results derived here for the D3Q27 cuboid lattice for the counteracting corrections and the transport coefficients are also equally valid for the D3Q15 and D3Q19 cuboid lattice sets when they use subsets of the same non-orthogonal moment basis.
The formulas derived in this section for the equilibria corrections necessary to eliminate the grid anisotropy and non-GI error are general and applicable for a wide variety of collision models. For example, if , , and correspond to raw moments, central moments and cumulants, respectively, of order , owing to the definitions of these quantities, it follows that their second order non-equilibrium components are identical, i.e., for . From this, it follows that the formulas obtained above can be directly incorporated into either raw moment-, central moment- or cumulant-based 3D LB algorithms extended to using a cuboid lattice.
Moreover, we point out that our derivation can be readily used to construct even an SRT-based LB scheme using a cuboid lattice by setting all the relaxation parameters equal to one another and then constructing the equilibrium distribution functions including the necessary corrections in the velocity space via using
. However, as demonstrated in our recent work on the rectangular lattice [
26], the SRT- and raw moment-based LB schemes are less stable compared to those based on central moments; hence, the present investigation will focus on further developing the derivation presented here into an efficient and robust 3D LB algorithm on the D3Q27 cuboid lattice and their numerical study in the following sections. Such an implementation for a cumulant collision kernel on a cuboid lattice is a subject for a future study.
When and , all the correction terms shown above become equal to zero, and the previous formulations applicable for the cubic lattice sets are recovered.
Finally, when interested in simulating relatively very low Mach number flows, the non-GI cubic velocity errors can become relatively small and can, thus, be neglected. Under such conditions, the formulas derived in the above for the corrections lead to further simplifications. In particular, the coefficients determined above reduce to the following:
and thus we do not require the computation of the density gradients; moreover, the local expressions for the velocity gradients derived in the next section will become more compact and can be readily re-derived when required.
2.6. Strain Rate Tensor Components Based on Non-Equilibrium Moments for the D3Q27 Cuboid Lattice
The moment equilibria corrections in Equation (
25) depend on the diagonal parts of the strain rate tensor
,
, and
. These components, along with the off-diagonal components, i.e.,
,
and
can be obtained locally from the second-order non-equilibrium moments as follows. From Equations (27d) and (
31) for
and using Equation (23a,b), and after rearranging, we find
Combining Equations (27e) and (
31) for
, applying Equation (23c,d), and after rearranging, it follows that
Finally, using Equations (27f) and (
31) together for
along with Equation (23e,f), we obtain the following:
We can use the above three equations to solve for the diagonal parts of the strain rate tensor as follows. First, we define the following variables:
Here, the density gradients
,
, and
are based on a (isotropic) second order finite-difference scheme (see the work by Kumar [
46] and Leclaire [
47] for details). The Equations (
38)–(
40) require the non-equilibrium moments
,
, and
, respectively, which can be obtained from either using raw moments or central moments as follows:
where the equilibrium central moments
,
and
are given in Equation (
10), while the corresponding raw moments are listed in Equation (
11). For example,
Based on these considerations, we can rewrite the right and left sides Equations (
38)–(
40), respectively, by means of the following variables:
and
Then, Equations (
38)–(
40) reduce to the following system of equations
which can be readily solved as follows, thus, providing the local expressions for the diagonal components of the strain rate tensor on a cuboid lattice:
For completeness, we note that the off-diagonal components of the strain rate tensor can be obtained from Equation (27a–c) as
Before concluding this section, we provide a guideline in choosing the speed of sound for the cuboid lattice-based LB formulations. The optimal value for the cubic lattice . However, in general cases for the cuboid lattice, the particle speeds in the y and z directions are, respectively, r and s times the particle speed in the x direction. With different particle speeds in different coordinate directions, based on physical considerations, the speed of sound is then chosen as . This choice maintains the physically consistent isotropy requirements, reduces the number of spurious terms to be eliminated via the corrections derived earlier, and recovers the optimal value for the cubic lattice.
3. 3D Cuboid Central Moment LBM (3DCCM-LBM) Using a Non-Orthogonal Moment Basis on the D3Q27 Lattice
Before constructing a 3D central moment LBM on the cuboid lattice grid using the derivation presented in the previous section, we first note a challenge in directly using the moment basis
given in Equations (
3) and (
4) and the resulting definition of the moments in Equation (
7), and then present its simple resolution that is more suitable for devising an efficient algorithm. In particular, the moment basis
(Equations (
3) and (
4)) involves linear combinations of moments of their second order diagonal components that are written to separate the trace of the diagonal elements from the others in order to allow an independent specification of the bulk and shear viscosities and are also accordingly parameterized by the grid aspect ratios
r and
s.
This was necessary in showing consistency of our approach to the 3D NS equations and in the derivation of the required corrections for using the cuboid lattice. Now, since the collision step needs to be performed in terms of the relaxations of either the raw moments or the central moments and whose effect need to be transformed back into the velocity space in terms of the distribution functions via
(see e.g., Equation (
8) for the raw moment representation of the LBE), a direct inversion of
would lead to cumbersome expressions involving the grid aspect ratios
r and
s.
However, we will now show that, by using a re-defined moment basis, the segregation of the evolution of the moments for independent adjustments of bulk and shear viscosities can still be achieved by confining it only within the collision step for the relaxation process and not for the mappings, which would have the same overall effect as the original moment basis. Such equivalent but considerably simpler re-formulations of the moment basis and the associated LBE given in Equation (
8) will then form the foundation for the constructions of the 3D LB scheme on the cuboid lattice based on raw moments as well as its generalization in terms of central moments.
3.1. Efficient Formulation of LBE on the Cuboid Lattice and Its Interpretation Based on Various Matrices
First, we define the following moment basis
involving just the linearly independent bare moments for the D3Q27
cuboid lattice (i.e., without any linear combinations of them as in
– see Equations (
3) and (
4)):
where the particle velocities
,
and
appearing in Equation (
50) are given in Equation (1a–c) and thus
depends on the grid aspect ratios
r and
s. We can then express a correspondence between this re-defined moment basis
and the original one, i.e,
given Equations (
3) and (
4) using
where
represents those operations that combine the various moments according to Equation (
4) and has the form of a block diagonal matrix. While an explicit specification of
is not necessary for the following discussion, Equation (
51) would be helpful in recasting the LBE in an equivalent form that leads to an efficient implementation. Moreover, let us see how this moment basis
for the cuboid lattice can be related to that for the
cubic lattice that involves the following set of particle velocities so as to construct a modular LB scheme:
Such a moment basis for the cubic lattice, referred to as
in the following obviously does not depend on the grid aspect ratios, and can be written as
It follows from the above definitions that
and
matrices are related via
where
is a simple diagonal scaling matrix, and for the D3Q27 lattice, it can be expressed as
Moreover, the inverse mapping for the cuboid lattice
can be related to that for the cubic lattice
using
where
is another diagonal matrix whose elements are the reciprocals of the corresponding elements of
. Thus,
As we will see below, these considerations would facilitate the construction of the 3D cuboid LB schemes involving both forward and inverse transformations around collisions with effort similar to that for the common cubic lattice that is augmented with some simple scalings of moments based on
r and
s rather than using lengthy formulas. Next, using the simpler moment basis
we can relate the vectors of the bare moments (i.e., without involving any linear combinations) and the distribution functions via
based on which, we now list the countable raw moments for the D3Q27 lattice as follows:
and similarly, using
and
, we can write the respective equilibria and the source terms in the moment space as
Here, the components of the raw moments, their equilibria and the source moments
,
and
, respectively, are defined in Equation (
6).
With these preliminaries, we now rewrite the LBE given in Equation (
8) and use
in terms of the following collide-and-stream steps with the goal of constructing an efficient LB algorithm on the cuboid lattice:
Note that here and in what follows, we use ‘tilde’ (
) to refer to the post-collision state of any variable. Then, we combine Equations (
7) and (
58), i.e., to relate the sets of moments
and
as
, and, similarly,
and
as
. Substituting these expressions for
and
and eliminating the use of the problematic
in favor of
via
(see Equation (
51)) in Equation (
62), the post-collision vector
then modifies to
Exploiting the fact that
and
based on their definitions, and then performing the product of
with the resulting terms inside the brackets
in the above Equation (
64) and invoking
, it follows that
As a further simplification, in order to bring this above LB formulation for the cuboid lattice (Equation (
65)) closer to that for the common cubic lattice, we replace the transformations based on
in terms
via Equation (
54), i.e.,
and
in terms
using Equation (
56), i.e.,
. Thus, using these in Equation (
65) and writing the change in moments under collision as
, the equation for the post-collision vector
reduces finally to
Evidently, the linear combinations of moments and their inverse operation to retrieve the individual bare moments via are now confined just around the steps in determining the changes due to collision in terms of moments only and not for any mappings to or from the velocity space, which are handled by operations similar to those for the cubic lattice augmented with simple scalings of moments based on the grid aspect ratios. These aspects greatly simplify the implementation of the cuboid LB algorithm.
Noting that the terms within the brackets
in Equation (
66) correspond to the post-collision raw moments, which we write as
, where the pre-collision raw moments
can be obtained from the distribution functions
via
, we can finally obtain the following equivalent but significantly more efficient cuboid LB formulation of that given in Equations (
62) and (
63) based on raw moments:
Note that when we discuss the implementation details of each of the steps involved, we will write down the explicit details of performing and related to mappings between the raw moments and distribution functions (which can be readily constructed based on the usual cubic lattice), and related to scalings of raw moments by the grid aspect ratios, and and related to combining and segregating the moments around the collision steps involving the relaxation process and augmented by the source terms.
As discussed in the introduction earlier, schemes constructed using the central moments have been shown to be more robust than those based on raw moments. Hence, a natural generalization of the above is to consider next in using the central moments in lieu of the raw moments in performing the collision step. In this regard, we first list the countable central moments
and their equilibria
as well as the source central moments
for the D3Q27 lattice as follows:
where the components of the central moment components
,
, and
, respectively, are defined in Equation (
5). We note that the mappings between the central moments and raw moments can be accomplished via the frame transformation matrix
and its inverse
as
Here, and are both lower triangular matrices dependent on the fluid velocity components and are the same for the cuboid lattice as well as the cubic lattice. The elements of can be readily obtained by listing the binomial transforms of all the linearly independent central moments for the D3Q27 lattice in terms of the raw moments and collecting them in a matrix–vector representation.
As noted in our recent work on the rectangular central moment LB scheme [
26], once
is known, its inverse follows from it by exploiting an interesting property of the generating function representation of the binomial expansion, which involves simply reversing the signs of the velocity components appearing in
, i.e.,
.
Then, as an extension of Equation (
66), the changes under collision as well as the source term in the LBE can be prescribed in terms of central moments, and the resulting post-collision central moments are then mapped back to raw moments via
, which leads to the following equation for the post-collision vector
:
In view of Equation (
72), we can write the 3D cuboid central moment LB method (3DCCM-LBM) as a generalization of the previous raw moment formulation given in Equation (
67) as follows:
The expressions associated with and in addition to the other matrices will be written explicitly when we discuss the implementation details of the central moment LB scheme for the cuboid lattice next.
3.2. Algorithmic Details of the 3DCCM-LBM
We will now discuss the implementation details of the 3DCCM-LBM based on Equation (
73). While the main steps will be identified systematically in the following, the formulas associated with each of steps will be presented in respective appendices.
The following comments regarding the algorithm given above are now in order.
(i) When compared to the central moment LB scheme for the common D3Q27 cubic lattice, we emphasize that the only extra computations incurred by the above discussed method for the D3Q27 cuboid lattice are those involving the corrections in the diagonal components of the second order moments in the collision step and the applications of scalings on the raw moments before and after the collision step (i.e., and ); these result in a minor additional overhead, but as will be demonstrated in the simulations of an inhomogeneous and anisotropic shear flow case study later, it will be offset by far due to the overall significant computational advantages of using the cuboid lattice in lieu of the cubic lattice that accommodates the nature of the flow much more efficiently.
(ii) The algorithm given above based on central moments is modular in nature. It can be readily extended to other collision models. For example, a raw moment-based cuboid scheme as a modification of the above would simply involve the elimination of the mappings between the raw moments and central moments (i.e., those involving and ) around collision and performing the collision step in terms of raw moments rather than central moments, but using the same corrections via the extended moment equilibria.
However, as will be numerically shown later, the central moment formulation is more robust than that based on raw moments for the cuboid lattice. Schemes based on other collision models, such as those based on cumulants [
28] can be readily constructed from the above algorithm by introducing additional mappings between central moments and cumulants and performing the collision step in terms of relaxations of cumulants by using the same required corrections for the cuboid lattice as in the above algorithm. Such an extension can be considered in a future study.
(iii) Finally, the present approach devised for the D3Q27 cuboid lattice readily extends to other lattice sets, such as D3Q15 and D3Q27 cuboid lattices, by using only a subset of the moment basis as necessary while incorporating the corrections to the equilibria derived in this work.
4. Boundary Conditions on Moving Walls: Momentum-Augmented Bounce Back Scheme on Cuboid Lattice Grids
Before discussing the numerical results based on the 3DCCM-LBM constructed above, we note that the use of cuboid lattice requires some modifications to the implementation of the standard link-based half-way bounce back boundary condition for moving boundaries. Since we will be investigating shear driven flows due to the motion of the walls in this work, we will now derive the necessary changes to such a boundary scheme. If
and
represent the fluid node nearest to the boundary and the wall node, respectively, and
and
denote, respectively, the outgoing and incoming particle directions, where
, then the general form of the momentum-augmented half-way bounce back scheme can be written as
Here, the equilibrium distribution functions
and
associated with
at
depend on the wall density and velocities. It can be obtained via an inverse mapping from the equilibrium moments
using
, where the components of the equilibrium moments are evaluated using Equation (
11) from those based on the imposed wall conditions. Note that since
is dependent on the grid aspect ratios, the resulting formulas will be parameterized by
r and
s. Specifically, consider a moving boundary located in the
plane, whose outward normal is along the
y direction and pointing into the plane of the paper (see
Figure 1).
Let this boundary plane be moving along the
x direction with an imposed velocity
U; thus, based on the no-slip boundary conditions for the fluid, we can then write
,
,
, and, as usual for the bounce back scheme, we approximate the wall node density to that based on the known fluid, i.e.,
. For the case under consideration, referring to
Figure 1, the unknown or incoming distribution functions are
, where
, and can be written in terms of the known directions using Equation (
74) as
Then, we determine the expressions of the known equilibrium distribution functions using
, where we evaluate the components of the moment equilibria on the wall via Equation (
11) based on the imposed wall conditions mentioned above. Using these, we then finally obtain the momentum-augmented bounce-back scheme for the cuboid lattice as
Clearly, the formulas given in Equation (
75), which will be utilized in the next section, depend on the grid aspect ratios
r and
s in addition to the specified wall velocity
U.
6. Demonstration of Computational Advantages of Using Cuboid Lattice over Cubic Lattice: 3D Anisotropic Shear Flows in a Lid-Driven Shallow Cuboid Cavity
The results from the above case studies show the ability of our 3DCCM-LBM in computing the flow fields accurately for a variety of standard benchmark flow problems. Now, we will demonstrate the advantages of using the cuboid lattice over the cubic lattice in more efficiently simulating a flow case study characterized by an anisotropic and inhomogeneous shear flow where their spatial gradients in one or more direction are larger than those in the other directions. In this regard, we consider a 3D cuboid cavity of span length
L in the
x direction, height
H in the
y direction, and width
W in the
z direction enclosing a fluid of viscosity
. A flow is set up by the shearing motion of the lid located in the
plane at
at a velocity
U (see
Figure 9).
In particular, we choose the span-to-height ratio , and width-to-height ratio so that the cavity block is relatively shallow in nature, and the flow generated by this set up is inhomogeneous and anisotropic, with the spatial gradients along the y direction that is normal to the direction of shear expected to be larger than those in the x and z directions. If represent the total number of grid nodes resolving the flow domain, the grid space steps in each of the directions are given by , , and .
In the case of using a cubic lattice, they are constrained by the uniform grid spacing requirement, i.e., , which fixes the number of grid points in each coordinate direction according to the length dimension of the cuboid cavity in that direction, i.e., . As an example, we consider a flow at a Reynolds number within this cavity block, and choose the number of grid nodes in the y direction normal to the shear as . Based on the above considerations, for the cubic lattice, we obtain and , and hence the total number of grid nodes in this case is .
On the other hand, when the cuboid lattice is used and , so that and . Taking again along the direction normal to the shearing motion of the lid, for the purpose of illustration, we consider the following three different possibilities for the grid aspect ratios along with the corresponding resolution requirements in the x and z directions: (i) with , (ii) with , and (iii) with .
Thus, the total number of grid nodes with using the cuboid lattice for the above three cases are , , and , respectively. Clearly, the resolution requirements with using the cubic lattice involving the same grid size in all the directions are significantly greater than those with using the choices made above with the flexible cuboid lattice that can more naturally conform with the flow characteristics. For performing flow simulations, we choose for the cubic lattice and for the cuboid lattice.
Figure 10 presents comparisons of the velocity profiles of the
u component along the
y direction at
and
, and
v component along the
x direction at
and
obtained using the 3DCCM-LBM with the above three sets of grid aspect ratios for the cuboid lattice and the cubic lattice with
. Moreover, the streamlines along the three mid-planes of the 3D shallow cuboid cavity using both the cubic lattice and the cuboid lattice using the grid aspect ratios for the case (i) (corresponding to that with the lowest total number of grid points among the three cuboid lattice cases) are shown in
Figure 11.
Clearly, the cuboid lattice results, while using significantly fewer total number of grid nodes, are in excellent agreement with those using the cubic lattice. In particular, to achieve practically similar accuracy for the numerical results, the flexibility accorded by the cuboid lattice yielded significant savings in the computer memory storage by a factor of , , and for cases (i), (ii), and (iii), respectively, and about similar reductions in the computational cost for the simulation turnaround time when compared to the cubic lattice.
While, for the specific flow configuration considered here, a reduction in the computational resource requirements by a factor between 5 to 7.5 was achieved for the choices made for the grid aspect ratios, if the flow geometry happens to be further skewed in the different coordinate directions, e.g., when and/or , additional improvements with using the cuboid lattice can be expected for simulating such anisotropic shear flow problems.
7. Numerical Stability Test Results of Raw Moment and Central Moment Based LB Algorithms on the D3Q27 Cuboid Lattice
The algorithmic details given in
Section 3.2 are general and readily extend to other collision models. For example, if instead of central moments, the raw moments are used in performing the relaxations under collision with the same corrections in the equilibria as before and omitting the steps involving the mappings between the central moments and raw moments (i.e., involving
and
), the algorithm reduces to a 3D cuboid raw moment LBM, which is referred to as the 3DCRM-LBM in what follows.
Such a 3DCRM-LBM would be significantly better than other prior 3D cuboid LB raw moment based formulations, as it avoids the orthogonalization of the moment basis, uses better forms of the equilibria obtained from matching with those of the continuous Maxwell distribution function and the elimination of the non-GI cubic velocity errors, and has simpler expressions for the corrections and transport coefficients. However, it would be interesting to see how the resulting 3DCRM-LBM compares with the 3DCCM-LBM based on central moments that has been used as the method of choice in this work and validated in detail earlier.
While the 3DCRM-LBM incurs a slightly lower computational cost than the 3DCCM-LBM because of the absence of the additional mappings indicated above, the 3DCCM-LBM, which executes the collision step in the local moving frame of reference, is expected to be more robust with better numerical stability characteristics in simulating shear flows at larger characteristic velocities or lower viscosities than the 3DCRM-LBM, as observed in the recent 2D studies involving square [
31] and rectangular [
26] lattice sets.
Let us verify if this is indeed observed in 3D simulations of the lid-driven cubic cavity flow using the cuboid lattice. In this regard, we first perform a stability test in which, for a chosen grid resolution (or the grid aspect ratio), and by varying the relaxation parameter controlling the shear viscosity, we determine the maximum possible lid velocity U, i.e., that maintains stable simulation for 100,000 steps in each case. We chose two different grid resolutions of and corresponding to the grid ratios of and and and , respectively.
In both cases, we use
, which is the minimum of the optimal values for the two grid aspect ratios, in order to have the same reference speed of sound in calculating the Mach number. All the relaxation parameters, other than that for the shear viscosity, are set to
for simplicity. The results are shown in
Figure 12. Clearly, the 3DCCM-LBM is able to support larger magnitudes of shear consistently than the 3DCRM-LBM for all the choices of the grid resolution used.
Moreover, it was pointed out earlier that, in our 3D cuboid LB algorithms, the trace of the diagonal components of the second order moments is evolved separately from the other moments with its own relaxation parameter after applying , and the individual components are subsequently recovered via applying , so that the bulk viscosity can be specified independently from shear viscosity.
It is known that, for the common LB schemes based on the cubic lattice sets, a higher value of the bulk viscosity (via decreasing
) enhances stability by suppressing the spurious pressure waves. We will now verify if this also holds true for the cuboid LB formulation based on central moments. Repeating the stability test mentioned above by choosing
, and
at
and
,
Figure 13 shows the resulting maximum threshold velocity of the lid
U for numerical stability. This figure clarifies that the robustness of the 3DCCM-LBM is significantly improved by choosing lower
or higher bulk viscosity.
In addition, we now perform a different type of stability study, where the grid resolution and lid velocity are fixed, and the lowest possible shear viscosity or the maximum Reynolds number that maintains stable simulations for 3DCCM-LBM and 3DCRM-LBM are determined. In this regard, we set
,
,
, and
, and three different choices of the grid resolutions,
,
, and
, are used to determine the maximum Reynolds number. As shown in
Figure 14, the central moment formulation is found to be more stable and allows larger Reynolds number than that due to the raw moment formulation, which again support the superior numerical characteristics of the 3DCCM-LBM in simulating shear flows on the cuboid lattice.