1. INTRODUCTION

The lattice Boltzmann method (LBM) [13] is a numerical scheme for solving fluid dynamics problems. It is based on quadrature formulas for calculating the velocity moments of a kinetic distribution function: density, flow velocity, and temperature. The moments are expressed in terms of a set of populations—discrete values of the distribution function. The evolution of the populations is described by a system of discrete Boltzmann kinetic equations: each of these corresponds to a fixed velocity, \(\mathbf{c}_i\). The set of velocities \(\{ \mathbf{c}_i \}\) at which the populations move along a spatial grid is called an LBM stencil.

An important and fast developing area of LBM is the construction of this scheme on nonuniform spatial grids [49]. Grid refinement only in the required limited area can significantly decrease the total number of calculations, thereby increasing the efficiency of the method. The construction of an LBM scheme at the interface of grids with different spatial steps makes it necessary to interpolate the data in space and/or time [415]. This may decrease the approximation order of the LBM and cause a violation of the conservation laws.

The present paper describes, for the first time, a method for constructing an athermal node-based LBM without interpolation on nonuniform grids with the same time step for these different grids. In this method, the streaming of LBM populations at the boundary of the grids is performed by using three different LBM stencils such that all stencils are on the grid and no interpolation is needed. However, this causes the need for a transformation: a local transition from the set of populations corresponding to one of the stencils to the set of populations of another stencil. This is due to the fact that the sets of populations corresponding to different stencils are solutions to different systems of discrete Boltzmann equations. We have developed a two-step method for a local transformation of the populations for arbitrary stencils, which includes scaling of the nonequilibrium parts of the populations [10] and moment matching developed for PonD [16, 17].

The method developed in the present paper has been tested by modeling a Poiseuille flow and a damping harmonic wave on a nonuniform spatial grid.

2. DESCRIPTION OF THE METHOD

2.1. Construction of the LBM. Free and Fixed Parameters

The Boltzmann kinetic equation has the form

$$\frac{\partial f}{\partial t} + \boldsymbol\xi \frac{\partial f}{\partial \boldsymbol{r}} = \hat{\Omega}, $$
(1)

where \(f \left(t, \boldsymbol{r}, \boldsymbol\xi\right)\) is a one-particle distribution function depending on time \(t\), a spatial coordinate \(\boldsymbol{r}\) and a velocity \(\boldsymbol\xi\), and \(\hat\Omega\) is a collision term.

The macroscopic flow parameters (density \(\rho(t, \boldsymbol{r})\), flow velocity \(\mathbf{u}(t, \boldsymbol{r})\), and temperature \(T(t, \boldsymbol{r})\)) are defined by the distribution function moments:

$$\rho = \int\limits_{\mathbb{R}^D} f d^D \xi , \qquad \rho \mathbf{u} = \int\limits_{\mathbb{R}^D} \boldsymbol\xi f d^D \xi, \qquad \rho (u^2 + D T) = \int\limits_{\mathbb{R}^D} \xi^2 fd^D \xi. $$
(2)

Here \(D\) is the dimension of the space under consideration.

If the collision term is absent, a solution to (1) satisfying the relations (2) is the equilibrium distribution function

$$f^{\text{eq}} \left(\boldsymbol\xi \right) = \frac{\rho}{(\sqrt{2\pi} \xi_0)^{D}}\, e^{-\left(\boldsymbol\xi - \mathbf{u} \right)^2 \big / 2\xi_0^2}, \qquad T = \xi_0^2. $$
(3)

Let us use numerical quadrature integration to calculate the moments (2). Taking into account the particular solution (3), consider the weight factor

$$\omega \left( \xi \right) = \frac{1}{(\sqrt{2\pi} \xi_0)^{D}} e^{-\xi^2 / 2\xi_0^2}. $$
(4)

Suppose that we have constructed a quadrature formula that is an approximation of order \(n\):

$$\int\limits_{\mathbb{R}^D} g\left(\boldsymbol\xi \right) d^D \xi = \int\limits_{\mathbb{R}^D} \frac{g\left(\boldsymbol\xi \right)} {\omega \left( \xi \right)} \omega \left( \xi \right) d^D \xi = \left/ \substack{\boldsymbol\xi = \xi_0 \boldsymbol{v} \\ \\ d^D \xi = \xi_0^D d^D v} \right/$$
$$= \frac{1}{(2\pi)^{D/2}} \int\limits_{\mathbb{R}^D} \frac{g(\xi_0 \boldsymbol{v})} {\omega (\xi_0 v)} e^{-v^2/2} d^Dv \simeq \sum\limits_i \frac{w_i g(\mathbf{c}_i)}{\omega(c_i)}, $$
(5)

where \(\mathbf{c}_i = \xi_0 \boldsymbol{v}_i\), \(\boldsymbol{v}_i\) is a quadrature node, and \(w_i\) is the weight corresponding to this node.

The set of velocities \(\{ \mathbf{c}_i \}\) is an LBM stencil. Thus, a stencil is defined by the quadrature being used and the parameter \(\xi_0\).

With (2) and (5), we find

$$\rho = \sum\limits_i \frac{w_i f(t, \boldsymbol{r}, \mathbf{c}_i)}{\omega(c_i)} = \sum\limits_i f_i, $$
(6)

where we have a discrete set of populations

$$f_i(t, \boldsymbol{r}) \equiv \frac{w_i f(t, \boldsymbol{r}, \mathbf{c}_i)}{\omega(c_i)} = \Big(\sqrt{2 \pi} \xi_0\Big)^D w_i f(t, \boldsymbol{r}, \mathbf{c}_i) e^{c_i^2 / 2\xi_0^2}. $$
(7)

Similarly, for the other moments

$$\rho \mathbf{u} = \sum\limits_i f_i \mathbf{c}_i, \qquad \rho (u^2 + DT) = \sum\limits_i f_i c_i^2. $$
(8)

For the populations (7) of the equilibrium distribution function (3) we obtain

$$f_i^\text{eq} = \rho w_i e^{(2\mathbf{c}_i \mathbf{u} - u^2) / 2 \xi_0^2}. $$
(9)

Assuming the flow velocity \(\mathbf{u}\) to be small, we can expand (9) and obtain the well-known representation of equilibrium populations:

$$f_i^\text{eq} = \rho w_i \left( 1 - \frac{u^2}{2\xi_0^2} + \frac{\mathbf{c}_i \mathbf{u}}{\xi_0^2} + \frac{(\mathbf{c}_i \mathbf{u})^2}{2\xi_0^4} \right), $$
(10)

which exactly satisfies the relations (6), (8) if we use a quadrature of at least the fourth order of approximation (in this case, we again have \({T = \xi_0^2}\)). Note that the expression (10) depends both on the choice of the quadrature points \(\boldsymbol{v}_i\) and on the choice of the parameter \(\xi_0\).

Let us discuss what \(\xi_0\) means. In the above, \(\xi_0\) is a free parameter, which, in particular, allows scaling the set of discrete velocities \(\mathbf{c}_i\), thereby acting as an additional variable when constructing stencils. Thus, \(\xi_0\) can be considered a parameter relating an abstract mathematical quadrature with a real space and time/LBM stencil. In addition, based on (3), \(\xi_0^2\) can be considered as a temperature or squared sound speed. However, here we are not interested in these quantities and consider an athermal LBM for which fifth-order quadratures are sufficient [1].

Thus, owing to the relations (6), (8), the macroscopic parameters of the system are expressed in terms of the discrete populations \(f_i\). Their evolution in time is determined by a set of Boltzmann kinetic equations discretized with respect to the velocity \(\boldsymbol\xi\). This can be obtained from (1) by setting \(\boldsymbol\xi = \mathbf{c}_i\) and multiplying, according to (7), by \(w_i / \omega(c_i)\):

$$\frac{\partial f_i}{\partial t} + \mathbf{c}_i \frac{\partial f_i}{\partial \boldsymbol{r}} = \hat{\Omega}_i, \qquad \hat{\Omega}_i \equiv \frac{w_i}{\omega(c_i)} \left. \hat{\Omega}\, \right|_{\boldsymbol\xi = \mathbf{c}_i}. $$
(11)

Next, in the following discussion we will use the BGK collision operator [18]. In this case

$$\hat{\Omega} = \frac{f^\text{eq} - f}{\tau}, \qquad \hat{\Omega}_i = \frac{f^\text{eq}_i - f_i}{\tau}, $$
(12)

where \(\tau\) is another free parameter, which is the characteristic time of relaxation of the distribution function to equilibrium.

To numerically solve equations (11), we introduce a uniform spatial grid with step size \(\Delta x\). We discretize (11) by dividing the evolution of populations corresponding to discrete time step \(\Delta t\) into two successive stages:

\(\bullet\) streaming stage:

$$\frac{\partial f_i}{\partial t} + \mathbf{c}_i \frac{\partial f_i}{\partial \boldsymbol{r}} = 0 \Rightarrow f_i(\boldsymbol{r} + \Delta \boldsymbol{r}, t + \Delta t) - f_i(\boldsymbol{r}, t) = 0, \quad \Delta \boldsymbol{r} \equiv \mathbf{c}_i \Delta t, $$
(13)

\(\bullet\) collision stage:

$$\frac{\partial f_i}{\partial t} = \frac{f_i^{\text{eq}} - f_i}{\tau} \Rightarrow f_i(\boldsymbol{r}, t + \Delta t) - f_i(\boldsymbol{r}, t) = \frac{\Delta t}{\tau} \Big( f_i^{\text{eq}}(\boldsymbol{r}, t) - f_i(\boldsymbol{r}, t) \Big). $$
(14)

To satisfy the last condition in (13), which allows the populations \(f_i\) to propagate strictly over the chosen spatial grid, the stencil \(\{ \mathbf{c}_i \}\) must be normalized according to the chosen steps \(\Delta x\) and \(\Delta t\). This can be done by an appropriate choice of the scaling parameter \(\xi_0\). For instance, for the D2Q9 stencil, which corresponds to a quadrature with points

$$\left\{ \boldsymbol{v}_i^{\text{D2Q9}}\right\} = \left\{ (0, 0), \, (0, \pm \sqrt{3}), \, (\pm \sqrt{3}, 0), \, (\pm \sqrt{3}, \pm \sqrt{3}) \right \}, $$
(15)

we need to set \(\xi_0 =\tfrac{\Delta x}{\sqrt{3} \Delta t}\).

Taking into account the above, the LBM numerical scheme takes the following simple form: at the streaming stage the populations \(f_i\) propagate strictly over the discrete spatial grid with their velocities \(\mathbf{c}_i\), and at the collision stage they locally get increments according to (14).

Finally, let us define one of the most important characteristics of a macroscopic flow, namely, viscosity \(\nu\). Based on the Chapman–Enskog expansion, in terms of LBM [1] we have

$$\nu = \xi_0^2 \left( \tau - \frac{\Delta t}{2} \right). $$
(16)

Let us again list the main parameters used in the construction of a classical LBM and the relations these parameters must satisfy. Suppose we wish to simulate a flow with viscosity \(\nu\) on a uniform spatial grid with a given spatial step \(\Delta x\). In this case, the relations

$$n \Delta x = \xi_0 v_{i, k} \Delta t, \quad n \in \mathbb{N}_0, \qquad \nu = \xi_0^2 \left( \tau - \frac{\Delta t}{2} \right), $$
(17)

where \(\xi_0\)\(\Delta t\), and \(\tau\) may be considered free parameters, must be satisfied.

We may also choose a quadrature, that is, its points \(\boldsymbol{v}_i\). However, first, the less nodes are in the quadrature, the easier it is to solve the scheme numerically. Second, to satisfy the first condition in (17) for any components of any quadrature points, these points must, up to a common scaling factor, be strictly on the chosen spatial grid. In addition, to simulate the Navier–Stokes equations with the viscosity (16), a quadrature of at least fifth-order approximation is required [1]. These conditions limit the choice of quadratures considerably (but not completely).

2.2. Nonuniform Grids

Let us construct an LBM scheme without interpolation at the interface between two-dimensional grids of different scales. Assume that we have a uniform “coarse” grid with \(\Delta x_c = 1\) on the left, and a uniform “fine” grid with \(\Delta x_f = 1/2\) on the right (Fig. 1).

First note that there are two equivalent paradigms for the streaming stage of the LBM: Push and Pull. In the case of paradigm Push, the new set of populations (after the streaming stage) at a grid node is determined by the stencils of other nodes. That is, we need to take those populations of the other nodes that propagate according to their stencils into that being considered. In the case of paradigm Pull, the new set of populations at a grid node is determined by the stencil of this node. That is, populations are “requested” from other nodes according to the stencil of the node being considered. If we have a uniform spatial grid, these paradigms are indistinguishable. However, this is not the case for nonuniform grids. In what follows, we will employ with paradigm Pull.

Now let us construct LBM schemes individually for coarse and fine uniform grids. We will use a two-dimensional Gauss–Hermite quadrature and, accordingly, the set of nodes (15). The first condition in (17) for both grids can be satisfied in different ways: similarly to spatial scaling, we can introduce time step scaling for the fine grid, that is, set \(\Delta t_c = 2 \Delta t_f = 1\) (\({\xi_{0, c} = \xi_{0, f} = 1 / \sqrt{3}}\)) (as, for example, in [10]). The problem with this approach is that data interpolation at the interface between the grids is inevitable, since this is the only way to obtain information at the interface for the fine grid at the half-integer time steps. We will use another method: stencil scaling by changing the parameter \(\xi_0\). Set

$$\xi_{0, c} = 2 \xi_{0, f} = \frac{1}{\sqrt{3}}, \qquad \Delta t_c = \Delta t_f = \Delta t $$
(18)

and define the stencils for points on the coarse and fine grids as

$$\{ \mathbf{c}_{i, c} \} = \xi_{0, c} \left\{ \boldsymbol{v}_i^{\text{D2Q9}} \right\}, \qquad \{ \mathbf{c}_{i, f} \} = \xi_{0, f} \left\{ \boldsymbol{v}_i^{\text{D2Q9}} \right\}. $$
(19)
Fig. 1
figure 1

Scheme of the streaming stage at the interface between grids of different scales for three different stencils. Large and small round nodes correspond to quadrature D2Q9 with parameters \(\xi_0\) equal to \(1\big /\sqrt{3}\) and \(1 \big / 2\sqrt{3}\), respectively. Square nodes correspond to quadrature D2Q15 with \(\xi_0 = 5 \big / \sqrt{38}\) (Appendix A).

Thus, in the case of paradigm Pull for large round nodes in Fig. 1 we will use stencil \(\{ \mathbf{c}_{i, c} \}\), and for small round nodes \(\{ \mathbf{c}_{i, f} \}\). For square nodes, a new stencil is needed. It is easy to see from the location of these points at the interface that such a stencil cannot be constructed by scaling the quadrature (15). One of the simplest stencils for square nodes in Fig. 1, which is a fifth-order approximation, is constructed in Appendix A.

Now we have defined a stencil for each node of our nonuniform grid. Note that at the streaming stage near the interface between grids of different scales the nodes corresponding to one of the stencils being used will request populations from the nodes corresponding to another stencil. Thus, we see that a local transformation of the populations of one stencil into the populations of another stencil is necessary.

2.3. Transformation Method

Let us present a method for a local (in time and space) transformation of populations between two arbitrary stencils.

A discretized Boltzmann kinetic equation (13), (14) has the form

$$f_i(t + \Delta t, \boldsymbol{r} + \mathbf{c}_i \Delta t) = f_i(t, \boldsymbol{r}) + \frac{\Delta t}{\tau} \big( f_i^\text{eq}(t, \boldsymbol{r}) - f_i(t, \boldsymbol{r}) \big). $$
(20)

In terms of the LBM cycle, (20) can be understood as follows: according to the right-hand side of the equality, the populations going from point \((t, \boldsymbol{r})\) (after the collision stage!) are determined by populations at the same point.

To find a relation between the sets of populations outgoing from a node corresponding to different stencils, let us consider the Chapman–Enskog expansion [1, 19]. Taking into account only the linear correction with respect to the Knudsen number \(\epsilon\), we have

$$f_i \simeq f_i^\text{eq} + \epsilon f^{(1)}_i, \quad f^{(1)}_i = - \tau \left( \partial_t^{(1)} f_i^\text{eq} + \mathbf{c}_i \partial_{\boldsymbol{r}}^{(1)} f_i^\text{eq} \right), \quad \partial^{(1)} = \frac{\partial}{\epsilon}, $$
(21)

or in explicit form

$$f_i \simeq f_i^\text{eq} - \tau \left( \partial_t f_i^\text{eq} + \mathbf{c}_i \partial_{\boldsymbol{r}} f_i^\text{eq} \right) = f_i^\text{eq} - \tau D f_i^\text{eq}, \quad D \equiv \partial_t + \mathbf{c}_i \partial_{\boldsymbol{r}}. $$
(22)

Let us consider first an existing method of transformation between the sets of populations corresponding to similar stencils \(\{ \mathbf{c}_i \}\) but different parameters \(\Delta t\) and \(\tau\)in (20). Assume that we have a coarse grid with parameters \(\Delta t_c\) and \(\tau_c\). Substituting (22) into (20), we obtain

$$f_{i, c}(t + \Delta t_c, \boldsymbol{r} + \mathbf{c}_i \Delta t_c) - f_i^\text{eq}(t, \boldsymbol{r}) = (\Delta t_c - \tau_c) D f_i^\text{eq}(t, \boldsymbol{r}). $$
(23)

Similarly, for a grid with \(\Delta t_f = \Delta t_c / n\)\(\tau_f\) we have

$$f_{i, f}(t + \Delta t_f, \boldsymbol{r} + \mathbf{c}_i \Delta t_f) - f_i^\text{eq}(t, \boldsymbol{r}) = (\Delta t_f - \tau_f) D f_i^\text{eq}(t, \boldsymbol{r}). $$
(24)

Dividing (23) by (24), we obtain the formula [10]

$$\frac{f_{i, c}(t + \Delta t_c, \boldsymbol{r} + \mathbf{c}_i \Delta t_c) - f_i^\text{eq}(t, \boldsymbol{r})} {f_{i, f}(t + \Delta t_f, \boldsymbol{r} + \mathbf{c}_i \Delta t_f) - f_i^\text{eq}(t, \boldsymbol{r})} = \frac{n (1 - \tau_c / \Delta t_c)}{1 - \tau_f / \Delta t_f}, $$
(25)

in which a relation between \(\tau_c\) and \(\tau_f\) is given by the fact that the viscosity (17) is the same on the different grids:

$$\nu = \xi_0^2 \left( \tau_c - \frac{\Delta t_c}{2} \right) = \xi_0^2 \left( \tau_f - \frac{\Delta t_f}{2} \right) \quad \Rightarrow \quad \frac{\tau_c / \Delta t_c - 1/2}{\tau_f / \Delta t_f - 1/2} = \frac{1}{n}. $$
(26)

Now we obtain an expression, which is similar to (25), for the case of interest to us: \(\Delta t_c = \Delta t_f = \Delta t\). Let us first consider two stencils corresponding to the same quadrature \(\{ \boldsymbol{v}_i \}\) but different parameters \(\xi_0\) to obtain the necessary grid scaling. Set

$$\xi_{0, f} = \frac{\xi_{0, c}}{ n}, \qquad \{ \mathbf{c}_{i, f} \} =\frac{ \{ \mathbf{c}_{i, c} \}}{ n}, $$
(27)

and

$$D_f \ne D_c, \qquad f_{i, f}^{\text{eq}} \ne f_{i, c}^{\text{eq}}, $$
(28)

and instead of the relation (26) we have

$$\frac{\tau_c / \Delta t - 1/2}{\tau_f / \Delta t - 1/2} = \frac{1}{n^2}. $$
(29)

With (27), (28), instead of (25) we have the following relation between the post-collision populations:

$$\frac{f_{i, c}(t + \Delta t, \boldsymbol{r} + \mathbf{c}_{i, c} \Delta t) - f_{i, c}^\text{eq}(t, \boldsymbol{r})} {f_{i, f}(t + \Delta t, \boldsymbol{r} + \boldsymbol{c}_{i, f} \Delta t) - f_{i, f}^\text{eq}(t, \boldsymbol{r})} = \frac{(1 - \tau_c / \Delta t) D_c f_{i, c}^\text{eq}}{(1 - \tau_f / \Delta t) D_f f_{i, f}^\text{eq}}. $$
(30)

Let us find out how \(D f_i^\text{eq}\) depends on the grid. For this, let the derivatives in the operator \(D\) explicitly act on the moments \(\rho, \mathbf{u}\). From (10), (22) we find

$$D f_i^\text{eq} = w_i \epsilon \left( \partial^{(1)}_t \rho - \frac{1}{2\xi_0^2} \partial^{(1)}_t \rho u^2 + \frac{c_{i, \beta}}{\xi_0^2} \partial^{(1)}_t \rho u_\beta + \frac{c_{i, \beta} c_{i, \gamma}}{2\xi_0^4} \partial^{(1)}_t \rho u_\beta u_\gamma \right.$$
$$+ \left. c_{i, \alpha} \partial^{(1)}_\alpha \rho - \frac{c_{i, \alpha}}{2\xi_0^2} \partial^{(1)}_\alpha \rho u^2 + \frac{c_{i, \alpha} c_{i, \beta} c_{i, \gamma}}{2\xi_0^4} \partial^{(1)}_\alpha \rho u_\beta u_\gamma + \frac{c_{i, \alpha} c_{i, \beta}}{\xi_0^2} \partial^{(1)}_\alpha \rho u_\beta \right). $$
(31)

Let us eliminate the time derivatives in (31) by using the equations for the first-order moments in \(\epsilon\):

$$\partial_t^{(1)} \rho + \partial_\alpha^{(1)} (\rho u_\alpha) = 0, \qquad \partial_t^{(1)} (\rho u_\alpha) + \partial_\gamma^{(1)} \Pi_{\alpha\gamma}^\text{eq} = 0, $$
(32)

where

$$\Pi_{\alpha\gamma}^\text{eq} = \rho u_\alpha u_\gamma + \rho \xi_0^2 \delta_{\alpha\gamma}. $$
(33)

Taking the derivative

$$\partial_t^{(1)} \rho u_\beta u_\gamma = u_\beta \partial_t^{(1)} \rho u_\gamma + u_\gamma \partial_t^{(1)} \rho u_\beta - u_\beta u_\gamma \partial_t^{(1)} \rho $$
(34)

and, using (32), (33), rewrite the expression (31) as follows:

$$D f_i^\text{eq} = w_i \epsilon \left( - \rho \partial_\alpha^{(1)} u_\alpha + \frac{c_{i, \alpha} c_{i, \beta}}{\xi_0^2} \rho \partial_\alpha^{(1)} u_\beta \right.$$
$$\left. - \frac{c_{i, \beta}}{\xi_0^2} \partial_\gamma^{(1)} \rho u_\beta u_\gamma - \frac{c_{i, \alpha}}{2\xi_0^2} \partial_\alpha^{(1)} \rho u^2 + \frac{c_{i, \alpha} c_{i, \beta} c_{i, \gamma}}{2\xi_0^4} \partial_\alpha^{(1)} \rho u_\beta u_\gamma + \mathcal{O}\big(u^3\big) \right). $$
(35)

Let us return to the standard derivatives in (35) (according to (21)), and express the velocities of the stencil in terms of the quadrature points (\(\mathbf{c}_i = \xi_0 \boldsymbol{v}_i\)) to obtain an explicit dependence on the parameter \(\xi_0\):

$$D f_i^\text{eq} = w_i \left({ - \rho \partial_\alpha u_\alpha + v_{i, \alpha} v_{i, \beta} \, \rho \partial_\alpha u_\beta} \right.$$
$$\left. - \frac{v_{i, \beta}}{\xi_0} \partial_\gamma \rho u_\beta u_\gamma - \frac{v_{i, \alpha}}{2\xi_0} \partial_\alpha \rho u^2 + \frac{v_{i, \alpha} v_{i, \beta} v_{i, \gamma}}{2\xi_0} \partial_\alpha \rho u_\beta u_\gamma + \mathcal{O}\big(u^3\big) \right). $$
(36)

One can see from (36) that the underlined terms, which are linear in velocity, coincide for the stencils on different scales. This is not the case for the quadratic and cubic terms. If we neglect them, for the first-order terms in \(u\) the transformation formula (30) takes the form

$$\frac{f_{i, c}(t + \Delta t, \boldsymbol{r} + \mathbf{c}_{i, c} \Delta t) - f_{i, c}^\text{eq}(t, \boldsymbol{r})} {f_{i, f}(t + \Delta t, \boldsymbol{r} + \mathbf{c}_{i, f} \Delta t) - f_{i, f}^\text{eq}(t, \boldsymbol{r})} = \frac{1 - \tau_c / \Delta t}{1 - \tau_f / \Delta t}. $$
(37)

Finally, let us discuss the general case of transformation between stencils corresponding to different quadratures \(\{ \boldsymbol{v}_i \}\) and different values of \(\xi_0\) (and, hence, based on (27), (29), to different values of \(\tau\)). The transformations (25) and (37) of populations corresponding to the same quadrature \(\{ \boldsymbol{v}_i \}\) are necessary, because these populations correspond to different values of \(\tau\). Therefore, they are used to solve Eq. (20) with different collision terms. Thus, these transformations “align” the parameter \(\tau\). In the case that is of interest to us (\(\Delta t_c = \Delta t_f = \Delta t\)), to change between the sets of populations corresponding to the same value of \(\xi_0\) (to the same value of \(\tau\)) but to different quadratures, we can use moment matching [16, 17, 20, 21]. In this case, a relation between the populations is obtained by equating moments of the distribution function, for example,

$$\left. \left( \sum\limits_i c_{i, x}^{\,p} c_{i, y}^q f_i \right) \right|_\text{D2Q9}= \left. \left( \sum\limits_i c_{i, x}^{\,p} c_{i, y}^q f_i \right) \right|_\text{D2Q15}, $$
(38)

where the total number of equalities is determined by the approximation order of the quadratures being used. In our case, we demand that Eq. (38) hold up to

$$p + q \leq 5, \quad p, q \in \mathbb{N}_0. $$
(39)

Note that, in addition to the equalities (38), we can write an explicit relation between the populations corresponding to the same velocity \(\mathbf{c}_i\). In our case, these are populations \(f_0\) corresponding to zero velocity. It follows from (7) that

$$\left. \frac{f_0}{w_0 \xi_0^2} \right|_\text{D2Q9} = \left. \frac{f_0}{w_0 \xi_0^2} \right|_\text{D2Q15}. $$
(40)

The relations (38) and (40) are a system of linear equations with respect to the populations of the stencil which we wish to obtain. This system may be underdetermined, and the number of independent equations in it may be less than the number of the required populations. For instance, this is the case when we change from the populations of stencil D2Q9 to those of stencil D2Q15. In this case, Eqs. (38) are used for higher approximation order, but the initial moments are calculated using the equilibrium distribution function corresponding to the node.

Let us summarize the results of Subsection 2.2: In the general case, the transformation of populations from an LBM stencil to another one takes place in two steps:

(1) Transfer to the populations of a stencil having the value of \(\tau\) that is the same as that of the final stencil (since, according to (16), the parameter \(\xi_0\) also changes, this step can be called scale alignment).

(2) Transfer to the populations of a stencil with the same quadrature as that of the final stencil (form alignment).

These two steps can be performed in any order.

3. TESTS

Let us perform a series of tests using our LBM scheme for nonuniform grids. We set

$$\rho = 1, \qquad \Delta t = 1. $$
(41)

As the simulation domain, we take a rectangular grid refined along both axes at the lateral boundaries with a spatial grid refinement ratio of 2 (Fig. 2). The domain sizes, taking into account the half-cells at the lateral boundaries, are as follows:

$$L_x = (n_{x, c} - 1) \Delta x_c + (2 n_{x, f} + 1) \Delta x_f, \qquad L_y = n_{y, c} \Delta x_c. $$
(42)
Fig. 2
figure 2

Typical form of the simulation domain for checking the LBM scheme without interpolation on nonuniform grids.

We will compare the results of numerical calculations using the LBM with an analytical solution of the Navier–Stokes equations for an incompressible fluid (\(\boldsymbol{\nabla}\) is the nabla operator):

$$\frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u} \boldsymbol{\nabla}) \mathbf{u} = -\frac{1}{\rho} \boldsymbol{\nabla} p + \nu \Delta \mathbf{u} $$
(43)

with the corresponding initial and boundary conditions.

3.1. The Algorithm

Let us describe the algorithm of the LBM numerical scheme used in the tests. Taking into account the transformation method described in the previous section, the algorithm in large part corresponds to the classical LBM in paradigm Pull: at each time step, each node requests populations according to its stencil. If a request is sent to a node that corresponds to another stencil, the local transformation process (in one or two steps) takes place before the streaming stage. The transformation of populations at the domain boundary is determined by the boundary conditions of the tests.

The following four stencils are used in the simulations: \(\{\mathbf{c}_{i, c}\}\)\(\{\mathbf{c}_{i, f}\}\) (19) for the large round nodes of the coarse grid and the small round nodes of the fine grid, respectively, stencil \(\{\mathbf{c}_{i, b}\}\) with a parameter \(\xi_{0, b} = 5\big / \sqrt{38}\) (Appendix A) for the square nodes at the boundaries of the coarse and fine grids, as well as a phantom stencil

$$\{ \mathbf{c}_{i, p} \} = \xi_{0, b} \left\{ \boldsymbol{v}_i^{\text{D2Q9}} \right\}, $$
(44)

not associated with any node, but necessary as an intermediate one in the transformation process.

In the simulation we use Aiwlib library [22].

Algorithm:

  • Streaming stage for the large round nodes. For the nodes at the boundaries of nonuniform grids, when requesting three populations from small round nodes, the transformation \(\{ \mathbf{c}_{i, f} \} \rightarrow \{ \mathbf{c}_{i, c} \}\) is performed by formula (37).

  • Streaming stage for the small round nodes. For the nodes at the boundaries of nonuniform grids, when requesting populations from large round nodes, the transformation \(\{ \mathbf{c}_{i, c} \} \rightarrow \{ \mathbf{c}_{i, f} \}\) is performed by formula (37), and when requesting populations from square nodes, the two-step transformation \(\{ \mathbf{c}_{i, b} \} \rightarrow \{ \mathbf{c}_{i, p} \} \rightarrow \{ \mathbf{c}_{i, f} \}\) (first (38), (40) for convert to \(\{ \mathbf{c}_{i, p} \}\), and then (37) for convert to \(\{ \mathbf{c}_{i, f} \}\)).

  • Streaming stage for the square nodes. When requesting populations from large round nodes, the two-step transformation \(\{ \mathbf{c}_{i, c} \} \rightarrow \{ \mathbf{c}_{i, p} \} \rightarrow \{ \mathbf{c}_{i, b} \}\) (first (37) for convert to \(\{ \mathbf{c}_{i, p} \}\), and then (38), (40) for convert to \(\{ \mathbf{c}_{i, b} \}\)). When requesting populations from small round nodes, the two-step transformation \(\{ \mathbf{c}_{i, f} \} \rightarrow \{ \mathbf{c}_{i, p} \} \rightarrow \{ \mathbf{c}_{i, b} \}\) (first (37) for convert to \(\{ \mathbf{c}_{i, p} \}\), and then (38), (40) for convert to \(\{ \mathbf{c}_{i, b} \}\)).

  • Local collision stage for all nodes with BGK parameters \(\tau = \Delta t / 2 + \nu / \xi_0^2\) (for the large round nodes \(\xi_{0, c} = 1\big/\sqrt{3}\), for the small round nodes \(\xi_{0, f} = 1\big/(2\sqrt{3})\), for the square nodes \(\xi_{0, b} = 5\big/\sqrt{38}\)).

3.2. Poiseuille Flow

Consider a steady Poiseuille flow \(\mathbf{u} = \mathbf{u}(x, y)\) which corresponds to the following conditions:

$$\mathbf{u} \left(-\frac{L_x}{2}, y \right) = \mathbf{u} \left(\frac{L_x}{2}, y \right) = \mathbf{0}, \qquad \mathbf{u} (x, y + L_y) = \mathbf{u} (x, y), \qquad \boldsymbol{\nabla} p = (0, -g). $$
(45)

The solution of (43) takes the form

$$u_x = 0, \qquad u_y (x) = \frac{g L_x^2}{8 \rho \nu} \left(1 - \frac{4 x^2}{L_x^2} \right). $$
(46)

To simulate the Poiseuille flow with the LBM, we use “bounce-back” boundary conditions at the \(x\) axis [1] and zero initial conditions. To take into account the pressure gradient \(g\) at the collision stage, we add a correction \(\Delta u_y = g \tau / \rho\) to the velocity in equilibrium populations [23]. With time, the system will come to a steady state. The simulation results are shown in Fig. 3.

Fig. 3
figure 3

Errors of flow velocity components \(\mathbf{u}\) versus coordinate \(x\) in simulation of Poiseuille flow for parameters \(n_{x, f} = 10\)\(n_{x, c} = 21\)\(n_{y, c} = 21\), \({\nu = 0.036}\)\(\Delta u_y = 10^{-8}\) at \(30000\, \Delta t\).

Let us compare the results of simulation with our code with the results of [5], which also considers two methods for constructing an LBM on nonuniform grids (namely, IVP and BVP) and provides simulation results for the Poiseuille flow. For this we constructed curves (see Fig. 4), which are similar to those in [5, Fig. 7]. Note, however, that to decrease the error caused by the simulation domain boundaries, [5] uses a TRT-operator of collision. For the same purpose, we choose a value of the parameter \(\tau =\big (\sqrt{3} + 2\big)\big/4\) at which this error does not exceed the error of the classical LBM [1]. To simulate the same velocity field, we keep the ratio \(g / \nu\) as in [5]. For the same \(N\), the resolution of the uniform grid is the same as that of the “fine” part of the nonuniform grid.

Figure 4 shows that our scheme converges stably to the exact solution in both norms. However, whereas the classical LBM on the uniform grid is a second-order approximation in both norms, our scheme is a first-order one both in the \(L_\infty\) and \(L_1\) norms. Our new method is comparable to the IVP method from [5], since it has similar convergence in the \(L_{\infty}\) norm.

Fig. 4
figure 4

Absolute error in Poiseuille flow simulation on uniform (\(\bullet\)) and nonuniform (\(\blacktriangle\)) grids in \(L_1\)- (dashed lines) and \(L_\infty\)-norms (solid lines) versus the number of nodes in the simulation domain along the \(x\) axis in logarithmic scale, \(p\) is the modulus of the curve slope coefficient, approximation order. Simulation parameters: \(\tau = \big(\sqrt{3} + 2\big) \big/ 4\)\(g = 7.05 \times 10^{-6}\), for nonuniform grid \(n_{x, f} = n_{x, c}\)\(n_{y, c} = 4\).

3.3. Two-Dimensional Damping Harmonic Wave

Now consider a damping harmonic wave given by the conditions

$$\mathbf{u}(0, \boldsymbol{r}) = \mathbf{u}_0 \cos (\mathbf{k} \boldsymbol{r}), \qquad \mathbf{u} (t, x + L_x, y + L_y) = \mathbf{u} (t, x, y), \qquad \boldsymbol{\nabla} p = \mathbf{0}, $$
(47)

and parameters \(\mathbf{u}_0\) and \(\mathbf{k}\) that satisfy the relations

$$\mathbf{u}_0 \mathbf{k} = 0, \qquad k_x = \frac{2 \pi N_x}{L_x}, \quad k_y = \frac{2 \pi N_y}{L_y}, \quad N_x, N_y \in \mathbb{Z}. $$
(48)

The function

$$\mathbf{u} = \mathbf{u}_0 \cos (\mathbf{k}\boldsymbol{r}) e^{-\nu k^2 t / \rho}, \quad \mathbf{u}_0 = u_0 \left( \frac{1}{\sqrt{1 + k_x^2 / k_y^2}}\,,\, -\frac{1}{\sqrt{1 + k_y^2 / k_x^2}} \right) $$
(49)

is a solution to (43), (47), (48).

Figure 5 shows the results of simulation of the damping harmonic wave by using the LBM scheme on nonuniform grids.

Fig. 5
figure 5

Velocity components of flow \(\mathbf{u}\) at node with coordinate \((0, 0)\) versus time (left) and their relative errors (right) in damping harmonic wave simulation for parameters \({n_{x, f} = 40}\)\({n_{x, c} = 61}\)\({n_{y, c} = 81}\)\({\nu = 0.0625}\)\({u_0 = 5 \times 10^{-3}}\)\({N_x = 3}\)\({N_y = 2}\).

4. CONCLUSIONS

A scheme of constructing an athermal node-based LBM without interpolation on two-dimensional nonuniform grids, with the same time step for the grids of different scales, has been developed. The scheme employs different stencils for different types of nodes on a nonuniform grid, in particular, a stencil D2Q9 scaled by varying the free parameter \(\xi_0\). Data interpolation at the grid interface can be avoided by using a new population transformation method that makes it possible to change from the set of populations of one stencil to the set of populations of another one. The standard methods with interpolation are often first-order approximations (see [10, 12, 14, and 24]), less often second-order ones [5, 7, 25]. It has been shown that at the moment our scheme is a first-order approximation. Nevertheless, it can be increased by using different transformations of other stencils for velocities, etc. Our approach is a novel method for constructing relations between nonuniform grids, which has not been tested by other authors and can be further developed. This method can be used to construct new, similar, and more complex schemes and improve the existing ones.

APPENDIX

A. Stencil for Separate Boundary Nodes

Let us construct a stencil for the square interface nodes shown in Fig. 1. For a two-dimensional (\(D = 2\)) stencil to be a fifth-order approximation (\(n = 5\)), according to (4), (5) its points \(\{ \mathbf{c}_i \}\) and their weights \(\{ w_i \}\) must satisfy the following relations:

$$\frac{1}{2\pi \xi_0^2} \int\limits_{\mathbb{R}^2} \xi_x^p \xi_y^q e^{-(\xi_x^2 + \xi_y^2)/2\xi_0^2} d^2 \xi= \sum_i w_i c_{i, x}^{\,p} c_{i, y}^q, \quad p + q \leq 5, \ \ p, q \in \mathbb{N}_0. $$
(50)

In the general case, their number is \((n+1)(n+2)/2 = 21\).

At fixed points of the stencil \(\{ \mathbf{c}_i \}\), (50) is a system of linear algebraic equations for the coefficients \(0 < w_i < 1\) with a parameter \(\xi_0\). If this system is solvable, the stencil can be constructed.

Fig. 6
figure 6

Stencil for separate nodes at the interface between grids of different scales, which is a fifth-order approximation.

To simplify the system (50), assume that the stencil is symmetric about both axes, \(x\) and \(y\). All equations containing odd values of \(p\) or \(q\) will be satisfied automatically, and the number of nontrivial equations will be reduced to six. Thus, we need five coefficients \(w_i\) (taking into account the stencil symmetries) in addition to the free parameter \(\xi_0\).

Consider the stencil

$$\left\{ \mathbf{c}_{i, b}\right\} = \left\{ (0, 0), \, \left( 0, \pm \frac{3}{2} \right), \, \left( \pm 1, \pm \frac{3}{2} \right), \, \left( \pm 1, \pm \frac{1}{2} \right), \, \left( \pm 2, \pm \frac{1}{2} \right) \right \}, $$
(51)

shown in Fig. 6. The nontrivial equations to be satisfied are

$$p = 0, \ q = 0: \qquad 1 = w_0 + 2w_1 + 4w_2 + 4w_3 + 4w_4, $$
(52)
$$p = 2, \ q = 0: \qquad \xi_0^2 = 4w_2 + 4w_3 + 16w_4, $$
(53)
$$p = 0, \ q = 2: \qquad \xi_0^2 = \frac{9w_1}{2} + 9w_2 + w_3 + w_4, $$
(54)
$$p = 4, \ q = 0: \qquad 3\xi_0^4 = 4w_2 + 4w_3 + 64w_4, $$
(55)
$$p = 2, \ q = 2: \qquad \xi_0^4 = 9w_2 + w_3 + 4w_4, $$
(56)
$$p = 0, \ q = 4: \qquad 3\xi_0^4 = \frac{81w_1}{8} + \frac{81w_2}{4} + \frac{w_3}{4} + \frac{w_4}{4}. $$
(57)

The system (52)–(57) has a solution with

$$w_0 = \frac{1249}{3249}, \quad w_1 = \frac{6125}{103968}, \quad w_2 = \frac{775}{23104}, \quad w_3 = \frac{5375}{69312}, \quad w_4 = \frac{925}{69312} $$
(58)

at a parameter \(\xi_{0, b} = 5 \big / \sqrt{38}\). Hence, the required stencil has been constructed.

FUNDING

This work was supported by the Russian Science Foundation (project no. 18-71-10004).