betaFeedback

WorksPhysics and Astronomy

A second-order volumetric boundary treatment for the lattice Boltzmann method

Abstract

A new volumetric-type boundary treatment is introduced for the lattice Boltzmann method. Populations are projected onto a discontinuous piecewise linear basis and streamed using an exact geometrical mapping. The method is implemented in 2D for convex, stationary geometries. Stability is verified through a novel analysis tool based on the eigenvalues of the streaming operation. A convergence rate of ≥2\geq2 is achieved, indicating improved accuracy over precursor methods. For flow around a 2D airfoil, the method yields better lift and drag predictions.

Introduction

Historically, engineering problems governed by the Navier-Stokes equations have been simulated by discretizing these in space and time directly. The lattice Boltzmann method (LBM) has recently gained popularity as an alternative. It can be shown with a perturbation analysis that the weakly compressible Navier-Stokes equations emerge from the lattice Boltzmann equation if the continuum assumption holds [1 Sec. 4.5.5]. The LBM offers several advantages: a local and explicit algorithm that gives superior parallel scaling [2], low numerical dissipation [3], and relatively straightforward treatment of complex geometries [4]. On the other hand, the LBM also has disadvantages due to its reliance on an equidistant Cartesian lattice. These include its inability to use anisotropic refinement to decrease the cost of resolving boundary layers and its need for complex algorithms to treat cells cut arbitrarily by boundaries. Proper enforcement of boundary conditions in cut cells remains problematic.

In general, the following five characteristics are desirable for an LBM boundary treatment: 1) At least second-order convergence of the error, ensuring compatibility with the typically second order accuracy of the bulk [1, p. 160][5]. 2) Exact conservation of mass and momentum, essential for “fully self-consistent and stable microdynamics”[6]. 3) Stability (implies that modes are never amplified by the boundary treatment). 4) Smooth surface forces (which is an issue for Cartesian mesh methods in general [7]). 5) Computational cost, which should not exceed that of the bulk.

Three main categories of boundary treatments in the LBM exist:

I) Broken-link-type schemes, where missing populations on lattice links intersected by the boundary are found through inter-/extrapolation [8, 9, 10, 11, 12]. These can be second-order schemes [10], but they are not necessarily conservative [13 p. 45]. Their stability can also be an issue, especially with high-order schemes at high Reynolds numbers [10, 14]. These schemes typically do not lead to smooth surface forces due to discrete sampling of the boundary [15], but their computational cost is typically low [16].

II) Schemes based on the immersed boundary method (IBM), which impose the desired boundary condition through a force applied to nearby nodes [17]. These schemes require interpolation, which can blur the boundary, leading to an incorrect apparent boundary location [18]. Furthermore, these schemes are generally only first-order accurate, and are usually not exactly conservative [1 p. 473]. However, they are normally stable [19]. Their surface forces are also not smooth [20], but their computational cost is typically low [17].

III) Volumetric-type schemes are based on a finite-volume-like approach. These geometrically compute the volume fraction of populations in a cell that will collide with a boundary segment. Incoming populations are collected for each boundary segment in the gather operation. These are then reversed and distributed back to the cells in the scatter operation. In the original scheme [21], populations were assumed to be equally distributed throughout the cell, which led to first-order accuracy [22]. To address this, Li et al. later introduced a scattering correction [23, 24]. Li observes an overall order of convergence close to two, with the exception of boundary cells with small fluid fractions, where the order is close to one [22]. Next, since the full geometry is sampled, mass and momentum are exactly conserved. The method has good numerical stability [22 p. 10]. Surface forces are more naturally computed due to the boundary-based approach [21]. However, oscillations still occur even with corrections [25]. Finally, the computational cost of this scheme has not been substantially addressed in the literature.

In this work, a new boundary treatment is introduced that is designed to satisfy all the aforementioned desired properties. We use an approach similar to volumetric-type schemes, but aim to achieve second-order accuracy by replacing the gather/scatter operation with an exact geometric mapping of populations reflecting off the boundary, and by representing populations with discontinuous piecewise polynomials within each cell. We refer to this treatment as the Continuum Field Formulation (CFF), emphasizing its use of spatial fields to represent the advection dynamics near the boundary.

We describe the performance of the CFF in terms of accuracy, stability, conservation, smoothness of surface forces, and computational cost. First, an implementation of CFF in 2D is described in § 2. Its stability is then analyzed using a novel approach based on the eigenvalues of the global streaming operation, described in § 4. Next, the order of convergence is examined for a 1D and a 2D channel in § 7. Furthermore, results for a 2D airfoil are used to investigate the smoothness of surface forces. Finally, a first estimation of computational cost is provided in § 10.

Methodology

Fundamental LBM equations

Rather than velocity and pressure, the LBM models the evolution of the particle distribution function fi(x,t)f_i(\mathbf{x},t), which represents the density of particles moving with discrete velocity ci\mathbf{c}_i at position x\mathbf{x} at time tt. This function is hereafter referred to as the populations. In this work, the D2Q9 velocity model is used with i∈{0,1,…,8}i \in\{0,1,\ldots,8\} and

ci={(0,0)i=0,(±1,0),(0,±1)i=1,2,3,4,(±1,±1)i=5,6,7,8.(1)\mathbf{c}_i = \begin{cases} (0,0) & i=0,\\ (\pm1,0),(0,\pm1) & i=1,2,3,4,\\ (\pm1,\pm1) & i=5,6,7,8. \end{cases} \tag*{(1)}

where we nondimensionalize using lattice units, setting Δx=1\Delta x=1; Δt=1\Delta t=1.

The evolution equation of the LBM is given by:

fi(x+ciΔt,t+Δt)=fi(x,t)+Ωi(x,t),(2)f_i(\mathbf{x}+\mathbf{c}_i\Delta t,t+\Delta t)=f_i(\mathbf{x},t)+\Omega_i(\mathbf{x},t), \tag*{(2)}

where Ωi\Omega_i is the collision operator. In this work, the BGK approximation is used for Ωi\Omega_i [26]:

Ωi=−1τ(fi−fieq),(3)\Omega_i=-\frac{1}{\tau}\left(f_i-f_i^{\mathrm{eq}}\right), \tag*{(3)}

where τ\tau is the nondimensional relaxation time and fieqf_i^{\mathrm{eq}} is the discrete equilibrium distribution [1]:

fieq=wiρ[1+ci⋅ucs2+(ci⋅u)22cs4−u⋅u2cs2].(4)f_i^{\mathrm{eq}}=w_i\rho\left[1+\frac{\mathbf{c}_i\cdot\mathbf{u}}{c_s^2}+\frac{(\mathbf{c}_i\cdot\mathbf{u})^2}{2c_s^4}-\frac{\mathbf{u}\cdot\mathbf{u}}{2c_s^2}\right]. \tag*{(4)}

Here, cs=1/3c_s=1/\sqrt{3} is the nondimensional speed of sound and wiw_i are the weights which are w0=4/9w_0=4/9, w1−4=1/9w_{1-4}=1/9 and w5−9=1/36w_{5-9}=1/36 for the D2Q9 model. Furthermore, ρ\rho and u\mathbf{u} are the nondimensional macroscopic fluid density and velocity, respectively. They can be found as moments of fif_i:

ρ=∑ifi,ρu=∑ifici.(5)\rho=\sum_i f_i,\qquad\rho\mathbf{u}=\sum_i f_i\mathbf{c}_i. \tag*{(5)}

Note that for some cases, we impose a gravity force g\mathbf{g}, in which case Eq. (5) and Eq. (2) are modified as per the forcing scheme of Guo et al. [27]:

ρu=∑ifici+g2,(6)\rho\mathbf{u}=\sum_i f_i\mathbf{c}_i+\frac{\mathbf{g}}{2}, \tag*{(6)}
fi(x+ciΔt,t+Δt)=fi(x,t)+Ωi(x,t)+Si(x,t),(7)f_i(\mathbf{x}+\mathbf{c}_i\Delta t,t+\Delta t)=f_i(\mathbf{x},t)+\Omega_i(\mathbf{x},t)+S_i(\mathbf{x},t), \tag*{(7)}

where SiS_i is the source term:

Si=(1−12τ)wi[ci−ucs2+(ci⋅u)cics4]⋅g.(8)S_i=\left(1-\frac{1}{2\tau}\right)w_i\left[\frac{\mathbf{c}_i-\mathbf{u}}{c_s^2}+\frac{(\mathbf{c}_i\cdot\mathbf{u})\mathbf{c}_i}{c_s^4}\right]\cdot\mathbf{g}. \tag*{(8)}

Finally, the nondimensional kinematic viscosity ν\nu can be related to the relaxation time τ\tau as:

ν=cs2(τ−12).(9)\nu=c_s^2\left(\tau-\frac{1}{2}\right). \tag*{(9)}

The evolution equation (2) is usually solved in two steps: 1) collision, where Ωi(x,t)\Omega_i(\mathbf{x},t) is added to fi(x,t)f_i(\mathbf{x},t) and 2) streaming, where populations advect from x\mathbf{x} to x+ciΔt\mathbf{x}+\mathbf{c}_i\Delta t. The boundary treatment affects only the streaming step.

Volumetric boundary treatments

The LBM uses a Cartesian equidistant lattice which is usually represented by nodes in space, as in finite difference methods. Volumetric boundary schemes slightly modify this by using a finite-volume-like approach in the vicinity of boundaries, but only for the streaming step [21]. This approach is also used here.

In volumetric boundary schemes, general solid objects in 2D are approximated by polygons, which are a collection of line segments. Following Chen et al. [21], these line segments are referred to as facets. A set of parallelograms (prams) is obtained by extruding these facets by −ciΔt-\mathbf{c}_i\Delta t for each velocity ci\mathbf{c}_i that points into the facet (i.e. ci⋅n^α<0\mathbf{c}_i\cdot\hat{\mathbf{n}}_\alpha<0) [21], as shown in Figure 1. Each pram then represents the spatial region that contains populations with velocity ci\mathbf{c}_i that will reflect off the facet α\alpha in the next time step. Populations that are not overlapped by a pram stream directly instead, without reflecting.

Image not extracted

Figure 1. Facet and pgram definition, based on [22 Fig. 3.2].

The original volumetric scheme collects all populations in a pram (known as gathering), assuming they are uniformly distributed over each cell. It then reverses their velocity (ci→−ci\mathbf{c}_i\rightarrow-\mathbf{c}_i), and evenly spreads them back over the same pram (known as scattering). This means that the populations are averaged over each pram. In reality, populations starting close to the facet will end up far from the facet at the end of the time step and vice versa. Li et al. address this discrepancy through a scatter correction based on the local velocity gradient [23, 24]. However, their scheme still has an order of convergence of less than two [22].

In this work, we represent populations fif_i using nonuniform, discontinuous piecewise polynomials. Furthermore, we remove the gather/scatter operations entirely and replace them with an exact geometric mapping. After the geometric mapping, fif_i is integrated over each cell, as in Chen et al. This is made numerically tractable using efficient quadrature routines developed for immersed methods [28]. Algorithm 1 summarizes the main steps. The geometric mapping as well as the construction of the discontinuous piecewise polynomials are detailed in the next two sections. In this study, we restrict ourselves to stationary, convex geometries, as handling concave or moving boundaries introduces additional complexities [21, 29].

Algorithm 1 Top-level LBM algorithm with proposed boundary treatment

  1. fi(x,0)=INITIALIZE⁡(u(x,0),ρ(x,0))f_i(\mathbf{x},0)=\operatorname{INITIALIZE}(\mathbf{u}(\mathbf{x},0),\rho(\mathbf{x},0))

  2. for t=0t=0 to endTime do

  3. pi(x,t,d)=GETCOEFFS⁡(fi(x,t))p_i(\mathbf{x},t,d)=\operatorname{GETCOEFFS}(f_i(\mathbf{x},t)) ▷ See Sec. II D

  4. fi(x+ciΔt,t)=STREAM⁡(pi(x,t,d))f_i(\mathbf{x}+\mathbf{c}_i\Delta t,t)=\operatorname{STREAM}(p_i(\mathbf{x},t,d)) ▷ See Sec. II C

  5. fi(x,t+1)=COLLIDE⁡(fi(x,t),τ)f_i(\mathbf{x},t+1)=\operatorname{COLLIDE}(f_i(\mathbf{x},t),\tau) ▷ Default collision

  6. end for

Geometric mapping and integration

Geometric mapping and integration in 1D

To explain the geometric mapping, we first consider the dynamics of a population that reflects off a no-slip wall. For the no-slip condition, momentum is exactly reversed at the facet. Defining i∗i^* as the population opposite to ii (i.e. ci∗≡−ci\mathbf{c}_{i^*}\equiv-\mathbf{c}_i), we can correspondingly write: fi∗out=fiinf_{i^*}^{\mathrm{out}}=f_i^{\mathrm{in}} [21]. Geometric mapping then consists of three steps for populations fi∗f_{i^*} inside the pgram: travel distance dd to the facet, reverse direction (fi∗→fif_{i^*}\to f_i), and travel distance 1−d1-d away from the facet. With the geometric mapping, we want to capture these dynamics exactly at each point in the pgrams.

The procedure will first be explained in 1D using Figure 2. First, discontinuous piecewise polynomials are used to get a representation of the populations at each point in space. The left- and right-moving populations before streaming are shown in Figure 2a and Figure 2b. Then we stream and apply the aforementioned reflection dynamics to these discontinuous piecewise polynomials. This results in the post-stream populations shown in Figure 2e and Figure 2f.

Image not extracted

Figure 2. (a) Pre-stream left-moving populations. (b) Pre-stream right-moving populations. (c) Geometric subzones over which populations are integrated before streaming. (d) Coordinates of geometric subzones in Fig. 2c. (e) Post-stream left-moving populations. (f) Post-stream right-moving populations. Illustration of the geometric mapping in 1D. Three cells are shown with the leftmost one cut by a boundary.

After the geometric mapping, the post-stream populations in Figure 2e and Figure 2f are integrated over the cells to obtain population values in lattice points. In our implementation, these integrals are realized by first integrating the pre-stream populations over subzones and then applying geometric mapping to the integrated results. The corresponding subzones are illustrated in Figure 2c, labeled A, C, E, and F. The bounds of these zones are defined such that each zone lies in only one cell and also maps to only one cell. Specifically, zone A is defined such that left-moving populations starting there reflect and exclusively flow to zone E. Similarly, left-moving populations in C reflect and exclusively flow to C and E to A. Populations outside the pgram stream normally. For example, populations in zone F will stream directly (without reflecting) to zone A or C.

The coordinates of the edges of the subzones are indicated in Figure 2d, they need to be computed to evaluate the integrals. In 1D, they are:

  • Facet location yb\mathbf{y}_b: location of the boundary.

  • End of pgram ypgram\mathbf{y}_{\mathrm{pgram}}: located one lattice distance from the facet in direction ci\mathbf{c}_i; ypgram=yb+ci\mathbf{y}_{\mathrm{pgram}}=\mathbf{y}_b+\mathbf{c}_i.

  • Cell borders yc\mathbf{y}_c: located at each integer yy-location; yc=±k\mathbf{y}_c=\pm k, k∈Zk\in\mathbb{Z}.

  • Reflected cell border ycrefl\mathbf{y}_{\mathrm{crefl}}: This border separates populations that will reflect off the facet and end up in cell 1 from those that end up in cell 0. This means that a leftmoving population starting at this border would reflect off the facet and end up exactly at the cell border between cell 0 and 1 (yc\mathbf{y}_c). It thus represents the reflection of a cell border (C refl). Its location ycrefl\mathbf{y}_{\mathrm{crefl}} is found using:

(yc−yb)+(ycrefl−yb)=ci.(10)(\mathbf{y}_c-\mathbf{y}_b)+(\mathbf{y}_{\mathrm{crefl}}-\mathbf{y}_b)=\mathbf{c}_i. \tag*{(10)}

Note that Eq. (10) implies that when the facet is in the right half of cell 0 instead of the left half, ycrefl\mathbf{y}_{\mathrm{crefl}} lies in cell 1. In this case the zones are defined slightly differently than those in Figure 2c, but the concept is the same. Nonetheless, a distinction between these two cases has to be made explicitly in the algorithm.

The final goal is to obtain integrals of the post-stream populations. Using the streaming relations between subzones, these are written as sums of pre-stream populations integrated over subzones. These sums are given in

Post-stream integralPre-stream integral(s)
fif_i over cell 0fi∗f_i^* over C + fi∗f_i^* over E
fif_i over cell 1fi∗f_i^* over A + fif_i over cell 0
fi∗f_i^* over cell 0fi∗f_i^* over F
fi∗f_i^* over cell 1fi∗f_i^* over cell 2

Table 1. Expression of post-stream integrals over cells in terms of pre-stream integrals over subzones and cells. Cell integrals are only over the fluid portion.

Tab. I. Finally, note that the integration of fif_i in space results in a number of particles, NiN_i. To convert NiN_i back to a concentration fif_i, it is divided by the cell volume, as further discussed in [21].

Note that since fi(x)f_i(\mathbf{x}) is represented with discontinuous piecewise polynomials, the integrals can be evaluated analytically. This is the method used in the present work. However, these integrals could also be calculated using advanced quadrature [28] to reduce cost in more complex cases.

Geometric mapping and integration in 2D

For 2D geometric mapping, two cases are distinguished; a straight reflection (∣ci∣=1|\mathbf{c}_i| = 1) and a diagonal reflection (∣ci∣=2|\mathbf{c}_i| = \sqrt{2}), they are shown in Figure 3. The straight reflection can be thought of as a 1D reflection in yy, extruded in the xx-direction. The same pgram subzones are used which reflect in the same way (down-moving populations in A reflect and flow to E, similarly, C to C and E to A).

Image not extracted

Figure 3. Pgram subzones for the geometric mapping of a) a 2D straight reflection (∣ci∣=1|\mathbf{c}_i| = 1) and b) a 2D diagonal reflection (∣ci∣=2|\mathbf{c}_i| = \sqrt{2}).

For the diagonal reflection, the pgram intersects three cells, leading to two Crefl lines (one from the horizontal and one from the vertical grid line), this results in five subzones. Again, the populations fi∗f_i^* in one subzone exclusively end up as populations fif_i in another subzone. Thus, down-left-moving populations in A reflect and flow to E. Similarly, B to D, C to C, D to B, and E to A.

The particular cell in which each subzone lies depends on the location of the facet within its cell. For the vertical reflection, there are two options: the facet lies in the top half of the cell or the facet lies in the bottom half of the cell. For the diagonal reflection there are eight such options, corresponding to the geometric regions within the cell shown in Figure 4. In the algorithm, facets are explicitly associated with one of these eight regions. Facets that span multiple regions are subdivided so that each only lies in one region.

Image not extracted

Figure 4. Cell regions which determine the exact configuration of the subzones of the diagonal reflection.

Finally, integrals of post-stream populations need to be calculated. These are again expressed as sums of integrals of pre-stream populations over the subzones. In our implementation, we represent the boundary using straight facets, resulting in polygonal subzones. The integrals of the discontinuous piecewise polynomials over these polygons are evaluated analytically using the expression derived by C. Steger [30]. This requires the corner coordinates of each subzone in Figure 3. The corners of the pgram and the intersection points between the pgram and cell borders are trivially found. To find the corners of the reflected cell border (Crefl), Eq. 10 is used again, where yby_b are the endpoints of the facet and ycy_c the intersection points of the pgram and the relevant cell border (horizontal/vertical).

Construction of the discontinuous piecewise linears

Following the streaming operation outlined in Figure 2, $f_i$ must be integrated over arbitrary parts of cells. To represent $f_i$, we take a finite-volume-like approach, where instead of representing it in the lattice point, we distribute it over the cell. Note that this can be interpreted as a generalization of Chen et al. [21], who distributed the populations over the cell as piecewise constant, as shown in {xref}Fig. 5, leading to a first-order accurate scheme {citep}[22]`.

In order to obtain a higher order of accuracy, we distribute fif_i using discontinuous piecewise (linear) polynomials per cell, also shown in Figure 5. In the following, the procedure to construct these is first described for 1D and subsequently for 2D.

Image not extracted

Figure 5. Piecewise constant and piecewise linear representations of fi(x,t)f_i(\mathbf{x},t).

Construction of the discontinuous piecewise linears in 1D

The input consists of the populations fif_i in the lattice points. These populations are physically located at the centroid of each cell [6]. For non-cut cells the centroid coincides with the lattice point (cell center), but for cut cells it differs. To obtain higher-degree polynomials, information from neighbours has to be used. Increasing the degree of the polynomials increases the number of neighbours needed and thus reduces the locality of the scheme (which we aim to preserve as much as possible). We observe that discontinuous piecewise linears (first-degree polynomials) already yield the desired second-order scheme, so these are used in this work. Nonetheless, generalization to higher-degree polynomials is possible. Construction of discontinuous piecewise linears of the form fi∗(y)=a+byf_i^*(y) = a + by requires two constraints. We use:

  1. Exact conservation of the populations in the cell.

  1. When the discontinuous piecewise linear is hypothetically extended to its neighbours, it should satisfy the conservation of populations in the neighbours as accurately as possible.

Construction of the discontinuous piecewise linears based on these two criteria is illustrated in Figure 6. For linear functions, the first condition is satisfied simply when it attains the input value at the centroid of the cell. For the second condition, the extended piecewise linear should be as close as possible to the input value of the direct neighbours at their respective centroids. For cell 0, which only has one direct neighbour, this results in an exact fit through this neighbour’s centroid. For cell 1, which has two direct neighbours, this results in an underdetermined system where δ1\delta_1 and δ2\delta_2 have to be minimized. We use a weighted L2 minimization of δ1\delta_1 and δ2\delta_2. Various methods are possible:

Image not extracted

Figure 6. Construction of the discontinuous piecewise linears in 1D.

  • Non-weighted: each neighbour cell has the same weight.

  • Volume-weighted: each neighbour cell is weighted by their volume.

  • Boundary-weighted: only pgram-overlapped cells are used; non-pgram-overlapped cells get a weight of zero.

In order to choose a weighting method, we first consider stability. Using the eigenvalue analysis which is further elaborated in § 4, the boundary-weighted method was found to be unstable. We expect that this is caused by effectively approximating gradients with down-wind information, considering that the populations are travelling towards the wall. On the other hand, the non-weighted and volume-weighted methods are both stable. Both have the same order of convergence, but the non-weighted method is a few percent more accurate. Nonetheless, the volume-weighted method is better supported by physical arguments. Namely, as a cell approaches zero volume, its influence on the solution should also vanish. Thus, we use the volume-weighted method in this work.

Note that the discontinuous piecewise linears need only to be constructed for populations flowing into the boundary within pgram-overlapped cells (only left-moving populations in cell 0 and 1 in Figure 6). Populations in other cells/directions exclusively stream to another cell, so their integral value does not depend on variations within the cell.

Construction of the discontinuous piecewise linears in 2D

In 2D, discontinuous piecewise linears are of the form fi∗=a+by+cxf_{i}^{*}=a+by+cx. Three constraints are thus required to obtain the coefficients. Alternative linear bases also include a xyxy component in this function. However, based on stability arguments which are further discussed in § 4, we do not employ them. The same constraints are used as for 1D, but the L2 minimization resulting from the second constraint is now solved for two unknowns. Up to eight direct neighbours can be used (four that directly border the cell and four that diagonally border the cell). An example is shown in Figure 7, where there are seven valid neighbours. For the minimization problem to be well posed, there should be at least two direct neighbours that are not colinear with the center cell (i.e. the three do not lie on one line). For convex boundaries this property is always satisfied. Finally, the same three weighting methods used in 1D can be extended to 2D. We again use volume-weighted for the results presented here.

Image not extracted

Figure 7. Construction of the discontinuous piecewise linear for the middle cell in 2D, using the surrounding source cells.

Eigenvalue analysis of the streaming operation

In this section, a novel approach for the analysis of boundary treatments is introduced. It uses the eigenvalues associated with the global streaming operation to assess whether the boundary treatment is stable and to break down the error of the boundary treatment into a dissipative and a dispersive part. The concept is first explained in § 4 A. Then, after a 2D testcase is introduced in § 4 B, the results of a 2D analysis are presented in § 4 C.

Formulation

The streaming matrix

Construction of the discontinuous piecewise linears, as detailed in Sec. II D, is a purely linear operation. Hence, it can be captured in a matrix-vector product:

p=Rfpre-stream,(11)\mathbf{p} = \mathbf{R}\mathbf{f}^{\mathrm{pre\text{-}stream}}, \tag*{(11)}

where fpre-stream\mathbf{f}^{\mathrm{pre\text{-}stream}} is a vector with the pre-stream populations, p\mathbf{p} is a vector with the piecewise linear coefficients, and R\mathbf{R} is a matrix that encodes the calculation of the piecewise linear coefficients.

The geometric mapping and subsequent cell integration, detailed in Sec. II C, is also purely linear. It can be captured in a similar matrix-vector product:

fpost-stream=Mp,(12)\mathbf{f}^{\mathrm{post\text{-}stream}} = \mathbf{M}\mathbf{p}, \tag*{(12)}

where fpost-stream\mathbf{f}^{\mathrm{post\text{-}stream}} is a vector with the post-stream populations. Furthermore, M\mathbf{M} is a matrix that encodes: 1) the streaming of the discontinuous piecewise linears (including the geometric mapping), 2) the integration to number of particles in each cell (NiN_i), and 3) the final conversion back to populations (fif_i).

Combining (11) and (12):

fpost-stream=MRfpre-stream=Sfpre-stream,(13)\mathbf{f}^{\mathrm{post\text{-}stream}} = \mathbf{M}\mathbf{R}\mathbf{f}^{\mathrm{pre\text{-}stream}} = \mathbf{S}\mathbf{f}^{\mathrm{pre\text{-}stream}}, \tag*{(13)}

where S=MR\mathbf{S} = \mathbf{M}\mathbf{R} is the streaming matrix which encodes the full streaming step, including the enforcement of the boundary condition.

Eigenvalues of the streaming matrix

Analyzing the eigenvalues and eigenvectors of S\mathbf{S} yields insights into how the boundary treatment influences the amplification of fif_i during the streaming step. The corresponding eigenvalue problem is:

λkvk=Svk,(14)\lambda_k\mathbf{v}_k = \mathbf{S}\mathbf{v}_k, \tag*{(14)}

where λk\lambda_k and vk\mathbf{v}_k are the kkth eigenvalue and eigenvector, respectively. For relatively small cases, these can be found numerically. They will generally be complex numbers of the form ak+bkja_k + b_kj with j=−1j = \sqrt{-1}. Also, note that S\mathbf{S} is a block matrix, with separable blocks for each velocity pair ci\mathbf{c}_i, ci∗≡−ci\mathbf{c}_i^* \equiv-\mathbf{c}_i. This means that all eigenvectors only have nonzero entries at indices corresponding to fif_i or fi∗f_i^*. For the current analysis, it is convenient to write the eigenvalues in polar form:

λk=rkejφk=rk[cos⁡(φk)+jsin⁡(φk)],(15)\lambda_k = r_k e^{j\varphi_k} = r_k \left[\cos(\varphi_k) + j\sin(\varphi_k)\right], \tag*{(15)}

where rk=ak2+bk2r_k = \sqrt{a_k^2 + b_k^2} and φk=arctan⁡(bk/ak)\varphi_k = \arctan(b_k/a_k).

Stability and error analysis through eigenvalues

The amplitude of the eigenvector vk\mathbf{v}_k is multiplied by rkr_k at each time step. Therefore, rkr_k indicates the growth/decay of the eigenvector over time:

  • rk<1r_k < 1 Decay

  • rk=1r_k = 1 Stable

  • rk>1r_k > 1 Growth

For a boundary treatment to be numerically stable, the modes should never grow in time, that is rk≤1r_k \le1. Furthermore, since streaming represents pure advection, rkr_k should theoretically be exactly 1. Correspondingly, the diffusive error of the kkth mode can be expressed as 1−rk1-r_k.

The eigenvector vk\mathbf{v}_k will oscillate between its real and imaginary values with a frequency fk=φk/(2π)f_k = \varphi_k/(2\pi). Given the exact frequency, the dispersive error of the kkth mode can then be found as the difference with fkf_k. For special cases, the exact frequencies can be found analytically. One such special case is discussed next.

2D inclined channel case

To assess the proposed boundary treatment, a 2D case is needed for which: 1) the exact frequencies of the eigenvalues are known, and 2) the underlying cells are cut at random locations. Both criteria are met by the inclined channel case, which we adapt from Li et al. [22 p. 43]. The setup of the case is shown in Figure 8. Periodicity is enforced in xx- and yy-direction, creating an infinitely long channel with an inclination angle θ\theta with respect to the lattice. We use the inclination angle θ=30∘\theta= 30^\circ, such that the second criterion is satisfied (cells cut at random locations). Satisfaction of the first criterion is demonstrated below.

Image not extracted

Figure 8. Case setup of the 2D inclined channel. Periodicity is enforced in xx- and yy-direction. Arrows indicate the wall separation HiH_i for each population direction ci\mathbf{c}_i.

Analytical eigenvalue frequencies in 1D

We first derive the analytical eigenvalue frequencies for a 1D domain bounded by two walls, separated by a height HH. The analytical eigenvectors comprise waves traveling between the walls with wavelengths λk\lambda_k. These live in both fif_i and fi∗f_i^*, traveling with the corresponding velocity ci\mathbf{c}_i or ci∗≡−ci\mathbf{c}_{i^*} \equiv-\mathbf{c}_i. For each wavelength, there are two eigenvectors which are complex conjugates. An example of the fif_i component of these eigenvectors is shown for k=0,1,2,3k=0,1,2,3 in Figure 9. The component in fi∗f_i^* looks similar, only phase shifted to connect smoothly at the boundaries.

Image not extracted

Figure 9. Analytical eigenvectors for k=0,1,2,3k=0,1,2,3 in a 1D domain bounded by two walls. Only their component in fif_i is shown.

The analytical equation for the wavelength λk\lambda_k follows directly from Figure 9. For the frequency fkf_k, with wave speed c=fkλkc=f_k\lambda_k:

λk=2H/k;fk=c/λk=ΔxΔt1λk,(16)\lambda_k = 2H/k; \qquad f_k = c/\lambda_k = \frac{\Delta x}{\Delta t}\frac{1}{\lambda_k}, \tag*{(16)}

where Δt\Delta t is the timestep and Δx\Delta x is the grid size. In standard streaming, populations travel one grid distance per timestep, so that c=Δx/Δtc=\Delta x/\Delta t.

Analytical eigenvalue frequencies in 2D

We now explain how to obtain the analytical eigenvalue frequencies for the 2D inclined channel (Figure 8). Consider again the distance between two walls, but now along the direction of each opposite-moving population pair ci/ci∗\mathbf{c}_i/\mathbf{c}_{i^*}. This distance is denoted by HiH_i, and is constant along the channel. The distances HiH_i are indicated in Figure 8. Along a cut in this direction, the analytical eigenvectors will again comprise waves traveling between the channel walls, living in both fif_i and fi∗f_i^*. Their wavelengths λk,i\lambda_{k,i} and frequencies fk,if_{k,i} are:

λk,i=2Hi/k;fk,i=c/λk,i=∣ci∣λk,iΔxΔt.(17)\lambda_{k,i}=2H_i/k; \qquad f_{k,i}=c/\lambda_{k,i}=\frac{|\mathbf{c}_i|}{\lambda_{k,i}}\frac{\Delta x}{\Delta t}. \tag*{(17)}

Where the wave speed is c=∣ci∣Δx/Δtc=|\mathbf{c}_i|\Delta x/\Delta t, since diagonal populations travel a distance 2Δx\sqrt{2}\Delta x during one timestep. Because the channel is infinitely long, the analytical eigenvectors will be the same irrespective of the cut location.

It should be mentioned that in following results for the discretized system, there will be multiple eigenvalues per harmonic. To explain this, consider an eigenmode of horizontal populations, representing a wave traveling in horizontal direction. This eigenmode can have any shape in the vertical direction. Thus, the number of eigenmodes with this frequency will be equal to twice the number of cells in the vertical direction, taking also the complex conjugates into account. Similarly, eigenmodes of vertical and diagonal populations have a given multiplicity depending on the domain size and channel angle. This will be visible in the results.

Eigenvalue analysis

The method to obtain the eigenvalues of the streaming matrix, explained in § 4 A, is now applied to the inclined channel laid out in § 4 B. We use the proposed boundary treatment which was explained in § 2.

Stability and diffusive error analysis

In order to assess stability, the rkr_k values are plotted against fkf_k in Figure 10, where the theoretical frequencies are indicated on the xx-axis. Specifically, the inclined channel with inclination angle θ=30∘\theta=30^\circ and a channel width of 8Δx8\Delta x is used. The stability condition rk≤1r_k \le1 is verified to hold within machine precision. Thus, it is concluded that the proposed boundary treatment is stable.

Image not extracted

Figure 10. Magnitude versus frequency, for the eigenvalues of the streaming matrix. The geometry used is the inclined channel (see § 4 B) at inclination angle θ=30∘\theta= 30^\circ and with a channel width of 8Δt8\Delta t. Theoretical harmonics are indicated on the xx-axis. The eigenmodes corresponding to the eigenvalues marked a-c are shown in Figure 11.

Note that the observed stability is not coincidental. During the design of the boundary treatment, we evaluated this stability condition for various algorithmic choices. Two were identified that make the boundary treatment unstable:

  • The boundary-weighted method resulted in rk>1r_k>1 (see § 2 D).

  • Including a bilinear contribution (xyxy term) in the 2D discontinuous piecewise linears resulted in rk>1r_k>1 (see § 2 D).

In Figure 10 it is observed that rkr_k generally decreases as fkf_k increases. However, even at lower frequencies there are some eigenvalues with a significantly lower rkr_k. To further investigate, we show the eigenmodes associated with three eigenvalues (marked a-c in Figure 10) in Figure 11. Modes a exhibits oscillations with the smallest possible wavelength in the direction perpendicular to ci\mathbf{c}_i, meaning it is not well-resolved on the grid and thus grid-dependent. The different racks in this mode mix at the boundaries in the direction perpendicular to ci\mathbf{c}_i. Modes b and c live only along the boundary and thus come purely from the boundary treatment, also making them non-physical. The mixing between adjacent voxels in the construction of the piecewise linears and geometric mapping dissipates these modes. In typical problems, these non-physical and grid-dependent modes are rarely excited. Thus, the fact that they are damped out quickly does not strongly affect accuracy, but may further enhance stability.

Image not extracted

(a)

Image not extracted

(b)

Image not extracted

(c)

Figure 11. Eigenmodes corresponding to the eigenvalues marked in Figure 10. The real component of one of the two populations is shown.

Dispersive error analysis

For the following analysis, we consider each opposite-moving population pair separately. The corresponding eigenvalues are sorted by frequency and plotted in Figure 12. The theoretical base frequency f1f_1 and its higher harmonics fkf_k (based on Eq. (17)) are indicated on the xx-axis. We observe that eigenvalues cluster near one of the theoretical harmonics fkf_k. The distance between the eigenvalue’s frequency and the theoretical one directly relates to the dispersive error. For higher frequencies, the dispersive error increases. This is especially noticeable in Figure 12d. As previously discussed, these high-frequency modes are not captured well by the grid and strongly damped, limiting their overall impact on the solution.

Image not extracted

Figure 12. Sorted eigenvalue index versus its frequency. The geometry used is the inclined channel (see § 4 B) at inclination angle θ=30∘\theta= 30^\circ and with a channel width of 8Δt8\Delta t. Theoretical harmonics are indicated on the xx-axis.

Numerical results

In order to assess the accuracy of the proposed boundary treatment, we applied it to three test cases: 1) a quasi-1D, gravity-driven channel, 2) a 2D, gravity-driven channel which is inclined relative to the grid, and 3) flow around a NACA0012 airfoil. Cases 1 and 2 were used to establish the mathematical properties of the method, such as order of convergence. Case 3 was used to demonstrate the method in a more practical setting. Cases 1 and 2 are taken from Li. [22] for which we simulated the same datapoints. In that work, Li compares two existing boundary algorithms: one proposed by Chen et al. [21] and one by Li et al. [24]. We implemented both algorithms in order to benchmark our method. Our implementation of Chen et al.’s algorithm produced results consistent with those reported in [22]. However, we were unable to reproduce the results of Li et al.’s algorithm with our own implementation. Therefore, in our plots, we included only results from our implementation of Chen et al.’s algorithm. Nevertheless, we do report convergence rates of Li et al. These were computed from the data in their published figures and reported as ‘Li et al. (digitized)’.

Finally, although we present only the L1L_1 error norms here, we also tested the L2L_2 and L∞L_\infty error norms, any differences are discussed.

Velocity convergence in a quasi-1D channel

To test convergence of the velocity in 1D, we used the quasi-1D channel presented by Li [22 p.43]. The setup is shown in Figure 13. No-slip was enforced at the left and right walls, while periodicity was enforced in yy-direction. A gravity force was applied in yy-direction. This resulted in a parabolic yy-velocity profile for which the exact solution is known [22]:

Case setup of the quasi-1D, gravity-driven channel flow

Figure 13. Case setup of the quasi-1D, gravity-driven channel flow. Periodicity is enforced in yy-direction.

U=−g2νx2+g2νHx,(18)U = -\frac{g}{2\nu}x^2 + \frac{g}{2\nu}Hx, \tag*{(18)}

where HH is the channel height and gg is the gravitational constant. The left and right walls were intentionally offset with respect to the lattice to create a cut cell at each wall. These cut cells are thus part solid and part fluid, as shown in Figure 13. The fluid fraction of these cut cells, pfluidp_{\mathrm{fluid}}, was varied in the subsequent study. The mesh convergence study was performed by refining the grid such that cell size Δ\Delta decreased. When refining, the boundaries were slightly shifted to retain the same pfluidp_{\mathrm{fluid}} value. Refinement implies an increase in the nondimensional relaxation time τ∗\tau^{*}. We made sure to keep τ∗\tau^{*} below 0.6 to limit the slip velocity error [1 p. 188]. The convergence study was performed for various pfluidp_{\mathrm{fluid}} for the volume-weighted CFF algorithm as well as the original volumetric scheme by Chen et al. [21]. The L1L_{1} error norm of the velocity is shown in Figure 14, with results from Chen et al. only shown for pfluid=1/3p_{\mathrm{fluid}} = 1/3. Also, the order of convergence values obtained from a least-squares fit to the data are reported in Table II.

Figure 14. Mesh convergence study of the quasi-1D gravity-driven channel with the volume-weighted CFF algorithm for various pfluidp_{\mathrm{fluid}} and the algorithm of Chen et al. [21] for pfluid=1/3p_{\mathrm{fluid}} = 1/3.

pfluidp_{\mathrm{fluid}}1/91/31/22/38/91/1
Chen1.161.111.111.151.332.02
Li (digitized)1.251.731.701.801.892.06
CFF2.022.062.012.252.402.02

Table II. Comparison of the order of convergence for the quasi-1D gravity-driven channel at various pfluidp_{\mathrm{fluid}}.

All methods obtain an order of convergence of ∼2\sim2 for pfluid=1/1p_{\mathrm{fluid}} = 1/1. This case corresponds to halfway bounce-back and the order of 2 is widely reported in literature [31]. Next, for small pfluidp_{\mathrm{fluid}}, CFF exhibits an order of around 2, while Chen and Li are closer to 1. For larger

pfluidp_{\mathrm{fluid}}, Li is also close to 2, while CFF is even a bit higher than 2 for coarse grids. Though CFF approaches order 2 for finer grids. In conclusion, CFF exhibits at least second-order accuracy across the full range of pfluidp_{\mathrm{fluid}}.

Population convergence in 1D

In the previous section, the convergence of the velocity was studied. The final velocity field depends on three aspects of the algorithm: streaming, collision, and the implementation of the body force. In order to test the boundary treatment in an isolated setting, this section considers a case that uses only the streaming step. This corresponds to pure advection of the populations with their own velocity. A 1D domain with two no-slip walls is used.

For this advection case, each population must be initialized as a continuous, smoothly varying field. In the bulk, this field theoretically shifts a distance ci/ci∗c_i/c_{i*} at each time step. This is exactly satisfied by the bulk streaming operation in the LBM. Thus, any observed errors can be attributed to the boundary treatment. When the field of population fif_i streams into a no-slip boundary, its velocity is reversed, such that it streams out as the opposite population fi∗f_{i*}. As a result, the field appears to cycle between two no-slip boundaries, switching to the opposite population at each one. This cycling is illustrated in Figure 15. The connection between fif_i and fi∗f_{i*} at the boundary implies that their fields must connect smoothly there at initialization.

Illustration of cycling between opposite-moving populations in the 1D pure advection case

Figure 15. Illustration of cycling between opposite-moving populations in the 1D pure advection case.

This pure advection case is now considered for a 1D channel. The following exact solution was used for both the left-moving and right-moving populations:

fi(x,t)=12−12cos⁡(2πH(x−xl−cit))(19)f_i(x,t) = \frac{1}{2} - \frac{1}{2}\cos\left(\frac{2\pi}{H}(x-x_l-c_i t)\right) \tag*{(19)}

where HH is the channel height and xlx_l is the location of the left boundary. This function ensures that at t=0t = 0, fif_i and its derivative are zero at the boundaries, satisfying the smoothness requirements. Of course, gradients will be nonzero at the boundaries in further timesteps.

The case was run at various grid refinements. The coarsest case, corresponding to ∼8Δx\sim8\Delta x separation between boundaries, was run for 501 time steps. The number of time steps was increased proportionally for refined cases, so that e.g. 1002 time steps were used with ∼16Δx\sim16\Delta x separation between boundaries. This case allows the study of the convergence of individual populations. This was not done previously, since an exact solution was only available for velocity. The error of population f1f_1 is shown for various pfluidp_{\mathrm{fluid}} in Figure 16. For all pfluidp_{\mathrm{fluid}}, CFF converges with approximately third order in L1L_1. Meanwhile, the algorithm of Chen et al. converges with approximately second order in L1L_1. Thus, both methods converge with one order higher accuracy in L1L_1 compared to the case with collision in § 7 A.

Figure 16. Mesh convergence study of pure advection in 1D. The L1L_1 error norm of the right-moving population (f1f_1) is plotted against cell size. Two algorithms are shown: volume-weighted CFF for various pfluidp_{\mathrm{fluid}} and the algorithm of Chen et al. [21] for pfluid=1/3p_{\mathrm{fluid}} = 1/3.

Interestingly, we found different convergence orders for the other norms: for the L2L_2 norm, CFF and Chen converged with order 2.5 and 1.5, respectively; for the L∞L_\infty norm with order 2 and 1, respectively. To investigate this observation, we analyze the convergence of CFF by deriving an analytical expression for the error as a function of the cell size Δ\Delta, using the symbolic manipulation package Sympy [32]. This is only done for CFF.

We find that the error in the cut cells at the edges of the domain is second order in cell size (O(Δ2)O(\Delta^2)), which explains the convergence of the L∞L_\infty norm. After an initialization effect, however, a third-order convergence (O(Δ3)O(\Delta^3)) is observed in the cells adjacent to the cut cells (cell 1 in Figure 2c), which propagates to the bulk. This property holds for all pfluidp_{\mathrm{fluid}}, explaining the observed convergence rate of 3 in the L1L_1 norm and rate 2.5 in the L2L_2 norm. We hypothesize that this is a fundamental property of mass conserving schemes since we observe the same order increase for the scheme of Chen et al.

Note that the order increase only occurs with pure advection. Thus, it does not occur for cases with collision, where populations are redistributed at each timestep. This means that the complete method with CFF boundary treatment is still a second-order method (and Chen a first-order one), which is consistent with our observations in § 7 A.

Velocity convergence in a 2D channel

To test the convergence of velocity in 2D, we used the inclined channel presented by Li et al. [22 p. 43], as described in § 4 B. To drive the flow, a gravity force was applied in the longitudinal direction of the channel, which theoretically results in a parabolic velocity profile in the transverse direction. This profile is described by Eq. (18), where xx now represents the distance to the wall.

A mesh convergence study was performed in which τ∗\tau^* was kept below 0.6.

Inclination angle θ\theta
10∘10^\circ20∘20^\circ30∘30^\circ40∘40^\circ45∘45^\circ
Chen1.191.191.211.221.17
Li (digitized)1.461.491.561.711.60
CFF2.242.252.272.262.17

Table 3. Comparison of the order of convergence for the inclined gravity-driven channel at various inclination angles θ\theta.

was kept below 0.6. The study was performed for various channel inclination angles θ\theta for CFF as well as the original volumetric scheme by Chen et al. [21]. The results are shown in Figure 17, with results from Chen et al. [21] only shown for θ=20∘\theta= 20^\circ. The order of convergence was again obtained with a least-squares fit and is reported in Table III. For the order of convergence, Chen lies around 1.15, Li around 1.6, and CFF around 2.2. In terms of the absolute error, CFF also performs better than both Chen and Li.

Figure 17. Mesh convergence study of the inclined gravity-driven channel with the volume-weighted CFF algorithm for various inclination angles θ\theta and the algorithm of Chen et al. [21] for θ=20∘\theta= 20^\circ.

Finally, we consider another measure of accuracy: the isotropy, which reflects the dependence on the orientation of the lattice. In Figure 17, the error curves for different θ\theta align closely, indicating that CFF behaves isotropically, as desired. In contrast, Li reports significant variation with θ\theta [22 p. 54]. This anisotropic behaviour is also observed by Goyal et al. [33] in the commercial solver PowerFLOW, which implements a variation of Li.

Population convergence in a 2D channel

The pure advection approach outlined in § 7 B is now applied to the 2D inclined channel geometry. The field is initialized as:

fi(x,y,t=0)=[12−12cos⁡(2πHx{x−xl(y)})]⋅[12−12cos⁡(2πhyy)],(20)f_i(x,y,t=0)=\left[\frac{1}{2}-\frac{1}{2}\cos\left(\frac{2\pi}{H_x}\{x-x_l(y)\}\right)\right]\cdot\left[\frac{1}{2}-\frac{1}{2}\cos\left(\frac{2\pi}{h_y}y\right)\right], \tag*{(20)}

where HxH_x is the channel height in xx-direction and hyh_y is the domain height (not channel height) in yy-direction. Furthermore, xlx_l is the xx-coordinate of the left boundary of the channel, which depends on the yy-coordinate (see Figure 8). Since fif_i and its derivatives are zero on the boundary at t=0t=0, the smoothness constraints described before are satisfied. Of course, gradients will be nonzero at the boundaries in further timesteps.

The case was run at various grid refinements. For the coarsest case, with ∼8Δx\sim8\Delta x separation between boundaries, 501 time steps were used. The number of timesteps was increased proportionally for refined cases. We again consider the error of the populations directly. In 2D, this results in four errors; one for each opposite-moving population pair. The results for the CFF and our implementation of Chen et al. are shown in Figure 18, for an inclination angle of θ=30∘\theta= 30^\circ. For each population pair, we observe a convergence rate of approximately 3 for CFF and approximately 2 for Chen in the L1L_1 norm. For the L2L_2 norm we observe 2.5 and 1.5, respectively and for the L∞L_\infty norm 2 and 1, respectively. This is in line with the observations for 1D.

Figure 18. Mesh convergence study for the inclined channel with pure advection. The L1L_1 error norm of each opposite-moving population pair is plotted against cell size. A channel inclination angle θ=30∘\theta= 30^\circ is used.

2D Flow around a NACA0012 airfoil

To move closer to a practical application, the 2D laminar flow around the NACA0012 airfoil was simulated, for

a 5 degree angle of attack and a chord Reynolds number Rec=U∞c/νRe_c=U_\infty c/\nu of 100. The domain height was restricted, resulting effectively in the simulation of an airfoil in a closed wind tunnel. This domain restriction allowed for a uniform mesh, to overcome complications induced by local refinements. The schematic of the case is shown in Figure 19. Boundary conditions were applied as follows: pressure and velocity at the inlet, zero gradient at the outlet, and free-slip at the top and bottom. All cases were run until a steady state was reached.

Case setup of the 2D NACA0012 airfoil case

Figure 19. Case setup of the 2D NACA0012 airfoil case (mesh not to scale).

In order to obtain a ground truth solution, the same case was also run on a fine, body-fitted mesh in the finite-volume solver OpenFOAM [34]. The simpleFOAM solver was used. Furthermore, the boundary conditions were slightly adapted to a velocity inlet and a pressure outlet. We also verified mesh independence of the OpenFOAM results.

We ran CFF as well as our implementation of Chen et al.’s algorithm for various grid refinements. The resulting lift and drag coefficients are plotted against the number of cells per chord in Figure 20a and Figure 20b, respectively. As the grid is refined, both algorithms converge to the OpenFOAM solution. For the lift coefficient, both algorithms perform similarly. However, for the drag coefficient, CFF performs significantly better. We note that with 16 cells per chord, CFF predicts both the lift and drag coefficient to within 5% accuracy. To demonstrate the order of convergence, the relative error between successive grid refinements for the lift and drag coefficient is plotted in Figure 20c and Figure 20d, respectively. Chen converges with second order for the lift coefficient, but only with order ∼1.5\sim1.5 for the drag coefficient. CFF converges with second order for both.

Figure 20. Comparison of aerodynamic coefficients for flow over a NACA0012 airfoil at 5∘5^\circ angle of attack and Re⁡=100\operatorname{Re} = 100. Results from the proposed boundary treatment are compared against Chen et al. [21], a fine OpenFOAM case is used as the ground truth.

The pressure and skin friction coefficient for the coarse case with 16 cells per chord are plotted along the chord in Figure 20e and Figure 20f, respectively. A slight discrepancy in CpC_p is observed near the trailing edge compared to OpenFOAM. This is attributed to the difference in out-flow condition. Compared to Chen, CFF produces better predictions of both surface force coefficients.

For both algorithms, oscillations in the surface forces are observed. These are especially pronounced near the leading edge. Such oscillations are typical for methods based on Cartesian grids [7]. Note that 16 cells per chord is much coarser than is typically used, so CFF results with 64 cells per chord are also presented. Indeed, with mesh refinement, the amplitude of these oscillations decreases significantly (in concert with the overall second-order rate of convergence).

To further investigate these oscillations, the front of the airfoil colorized by CpC_p is shown along with the lattice cells in Figure 21. Discontinuities in CpC_p occur exactly at the cell borders. We hypothesize that the oscillations are the result of the discontinuous bases, employed by both CFF and Chen. This is supported by Figure 22, where CFF’s discontinuous piecewise linears of the downmoving populations (f4f_4) are shown near the leading edge. Discontinuities between the piecewise linears seem to originate from large variations between neighbouring cells resulting from too little resolution.

Front of the airfoil colored by pressure coefficient and shown with respect to the lattice cells

Figure 21. Front of the airfoil colored by pressure coefficient and shown with respect to the lattice cells, 16 cells per chord.

Discontinuous piecewise linears of downmoving populations near the NACA0012 leading edge

Figure 22. Discontinuous piecewise linears of downmoving populations near the NACA0012 leading edge, 16 cells per chord.

Computational Cost Analysis

The computational cost of a boundary treatment should be sufficiently small, to allow its use in practical calculations. In the current context, we distinguish two types of cost:

  • Setup cost: due to the processing of the geometry to obtain simple streaming rules. These are encoded in a matrix similar to the streaming matrix, as introduced in Sec. III A.

  • Cost per timestep: due to the enforcement of the boundary conditions by applying the streaming rules at each timestep.

Note that if the geometry moves relative to the grid, the setup cost is incurred every timestep. We now analyze both types of cost for the present boundary treatment. Finally, we analyze the memory requirements.

Setup cost

The setup consists of three steps:

  1. Calculate the volume and the centroid of each cut cell. The associated cost depends on the number of cut cells as well as the number of facets:

    Cstep1=cαncut_cells+cβnfacets,(21)C_{\mathrm{step1}} = c_{\alpha} n_{\mathrm{cut\_cells}} + c_{\beta} n_{\mathrm{facets}}, \tag*{(21)}

    where cαc_{\alpha} and cβc_{\beta} are constants.

  1. Calculate the coefficients of the discontinuous piecewise linears. This is done for each pram-overlapped cell. Since information from step 1 can be reused, the cost at this step depends only on the number of pram-overlapped cells. This in turn depends linearly on the number of cut cells, so the cost of this step scales as:

    Cstep2=cαncut_cells,(22)C_{\mathrm{step2}} = c_{\alpha} n_{\mathrm{cut\_cells}}, \tag*{(22)}

    where cαc_{\alpha} is a constant, different from the cαc_{\alpha} before.

  1. Integrate the discontinuous piecewise linears over the subzones and collect the results in a sparse, global boundary matrix. The number of integrals that need to be calculated depends on the number of facets. Note that facets are further cut down within each cell before computing the integrals (see § 2 C). This means that the cost of this step scales as:

    Cstep3=cαncut_cells+cβnfacets,(23)C_{\mathrm{step3}} = c_{\alpha} n_{\mathrm{cut\_cells}} + c_{\beta} n_{\mathrm{facets}}, \tag*{(23)}

    where cαc_{\alpha} and cβc_{\beta} are constants, different from those before.

Combining Eq. (21)–Eq. (23), we arrive at a total setup cost of:

Csetup=cαncut_cells+cβnfacets,(24)C_{\mathrm{setup}} = c_{\alpha} n_{\mathrm{cut\_cells}} + c_{\beta} n_{\mathrm{facets}}, \tag*{(24)}

where cαc_{\alpha} and cβc_{\beta} are constants, representing the sum of those before. Note that this cost is only incurred once for stationary geometries.

Cost per timestep

In the setup, simple streaming rules were derived based on the geometry and stored in a sparse, global boundary matrix. For each timestep, the boundary condition is enforced by multiplying the boundary matrix with the global vector of populations, resulting in updated populations. This means that the timestep cost of one population in one cell depends on the number of nonzeros in the corresponding boundary matrix row.

We now derive the theoretical maximum number of nonzeros in a row of the boundary matrix. Each nonzero corresponds to either a direct stream or a reflection. Directly streamed populations can originate from only one cell. Reflected populations, on the other hand, can originate from up to seven cells (as is the case for a diagonal stream). This means that for the schemes of Chen et al. [21] and Li et al. [23], the maximum number of nonzeros per row is eight. For CFF, this maximum is larger, because populations are represented using discontinuous piecewise linears, which in turn are constructed from the eight neighbouring cells. Taking this into account gives a theoretical maximum of 33 nonzeros per row for CFF.

To verify these theoretical estimates, we report statistics of the observed number of nonzeros per row in the boundary matrix of the NACA0012 geometry, described in § 7 E. The average and maximum values are listed in Table IV. These results confirm our theoretical estimates. Moreover, the average number of nonzeros gives insights into the actual cost. The timestep cost of CFF is approximately two times larger than the boundary treatment of Chen et al. Furthermore, ∼10\sim10 nonzeros means that an average of 19 operations (10 multiplications, 9 additions) are needed per timestep to enforce the boundary condition for one population.

Theoretical maximumNACA0012 maximum (measured)NACA0012 average (measured)
CFF333110.0
Chen et al. [21]874.4

Table IV. Statistics for the number of nonzeros on a row of the boundary matrix.

Now that we have estimated the timestep cost per pgram-overlapped cell, the total timestep cost is estimated.

Using that the number of pgram-overlapped cells scales proportionally with the number of cut cells, the timestep cost scales as:

Ctimestep=cαncut cells,(25)C_{\mathrm{timestep}} = c_{\alpha} n_{\mathrm{cut\ cells}}, \tag*{(25)}

where cαc_{\alpha} is a constant, different from the cαc_{\alpha} before. In our experience, this cost is usually lower than that of the standard streaming and collision in the bulk. Specifically when refining grids, as the number of bulk voxels grows with a higher rate than the number of cut voxels.

Finally, Eq. (25) implies that the timestep cost does not depend on the number of facets. Thus, for stationary geometries, a fine surface discretization can be used to minimize the associated error, while keeping the same cost per timestep. However, the setup cost would increase.

Memory requirements

The sparse boundary matrix is expected to dominate memory usage related to boundary handling. It has a certain number of nonzeros per row (independent of grid refinement), and the number of rows scales linearly with the number of cut cells. As a result, the memory required by the boundary matrix scales as:

Mboundary matrix=cαncut cells(26)M_{\mathrm{boundary\ matrix}} = c_{\alpha} n_{\mathrm{cut\ cells}} \tag*{(26)}

where cαc_{\alpha} is an arbitrary constant, different from the cαc_{\alpha} before. In our experience, the required memory is typically smaller than that of the bulk.

Conclusion and recommendations

In this work, a higher-order volumetric-type boundary treatment for the lattice-Boltzmann method was introduced and tested in 2D. Also, we introduce a novel analysis tool for verifying the stability of boundary treatments, based on eigenvalues of the streaming step including enforcement of boundary conditions.

The accuracy of the boundary treatment was measured via mesh convergence studies on a quasi-1D channel and a 2D channel inclined with respect to the lattice. Convergence rates of ≥2\ge2 were observed for velocity, which is an improvement over previous work [22]. In order to isolate the effect of the boundary treatment, we introduced a case with pure advection (only streaming), allowing us to study the convergence rate of the populations themselves. In both 1D and 2D, we found a convergence rate of approximately 3 for each population.

Finally, we tested the implementation on a NACA0012 airfoil at 5∘5^\circ angle of attack and Reynolds number 100. The lift and drag coefficients were predicted more accurately than precursor volumetric approaches at the same resolution.

We have presented a promising boundary treatment algorithm. To apply it to industrial cases, some extensions need to be considered. Specifically: Nonconvex geometries, for which particles may advect from one facet to another within one timestep [21]; 3D geometries, where cutting the facets and obtaining integrals becomes much more involved; non-uniform meshes, which require special treatment when a pgram overlaps two refinement levels.

Acknowledgments

The authors gratefully acknowledge financial support from the Netherlands Organisation for Scientific Research (NWO) through grant VENI-20153.

Data Availability

The datasets and source code supporting the findings of this study are openly available on GitLab at: https://gitlab.tudelft.nl/knhoefnagel/convexcff2d

References

  1. [1]T. Krüger, H. Kusumaatmaja, A. Kuzmin, O. Shardt, G. Silva, and E. M. Viggen, The Lattice Boltzmann Method: Principles and Practice (Springer International Publishing, 2017).DOI
  2. [2]F. Schornbaum and U. Rüde, Massively parallel algorithms for the lattice Boltzmann method on nonuniform grids, SIAM Journal on Scientific Computing 38, C96–C126 (2016).DOI
  3. [3]A. Suss, I. Mary, T. Le Garrec, and S. Marié, Comprehensive comparison between the lattice Boltzmann and Navier–Stokes methods for aerodynamic and aeroacoustic applications, Computers & Fluids 257, 105881 (2023).DOI
  4. [4]M. F. Barad, J. G. Kocheemoolayil, and C. C. Kiris, Lattice Boltzmann and Navier-Stokes Cartesian CFD approaches for airframe noise predictions, in 23rd AIAA Computational Fluid Dynamics Conference (American Institute of Aeronautics and Astronautics, 2017).
  5. [5]J. D. Sterling and S. Chen, Stability analysis of lattice Boltzmann methods, Journal of Computational Physics 123, 196–206 (1996).arxiv.org/abs/comp-gas/9306001
  6. [6]H. Chen, Volumetric formulation of the lattice Boltzmann method for fluid dynamics: Basic concept, Physical Review E 58, 3955–3963 (1998).DOI
  7. [7]F. de Prenter, C. Lehrenfeld, and A. Massing, A note on the stability parameter in Nitsche’s method for unfitted boundary value problems, Computers & Mathematics with Applications 75, 4322–4336 (2018).
  8. [8]M. Bouzidi, M. Firdaouss, and P. Lallemand, Momentum transfer of a Boltzmann-lattice fluid with boundaries, Physics of Fluids 13, 3452–3459 (2001).DOI
  9. [9]O. Filippova and D. Hänel, Grid refinement for lattice-BGK models, Journal of Computational Physics 147, 219–228 (1998).DOI
  10. [10]R. Mei, L.-S. Luo, and W. Shyy, An accurate curved boundary treatment in the lattice Boltzmann method, Journal of Computational Physics 155, 307–330 (1999).
  11. [11]G. Zhao-Li, Z. Chu-Guang, and S. Bao-Chang, Non-equilibrium extrapolation method for velocity and pressure boundary conditions in the lattice boltzmann method, Chinese Physics 11, 366–374 (2002).
  12. [12]B. Chun and A. J. C. Ladd, Interpolated boundary condition for lattice Boltzmann simulations of flows in narrow gaps, Physical Review E 75, 10.1103/physreve.75.066705 (2007).pubmed.ncbi.nlm.nih.gov/17677387
  13. [13]F. Marson, Directional lattice Boltzmann boundary conditions, Ph.D. thesis, University of Geneva (2022).DOI
  14. [14]A. De Rosis, S. Ubertini, and F. Ubertini, A comparison between the interpolated bounce-back scheme and the immersed boundary method to treat solid boundary conditions for laminar flows in the lattice Boltzmann framework, Journal of Scientific Computing 61, 477–489 (2014).DOI
  15. [15]X.-P. Chen, Applications of lattice Boltzmann method to turbulent flow around two-dimensional airfoil, Engineering Applications of Computational Fluid Mechanics 6, 572–580 (2012).DOI
  16. [16]R. W. Nash, H. B. Carver, M. O. Bernabeu, J. Hetherington, D. Groen, T. Krüger, and P. V. Coveney, Choice of boundary condition for lattice-Boltzmann simulation of moderate-reynolds-number flow in complex domains, Physical Review E 89, 10.1103/physreve.89.023308 (2014).pubmed.ncbi.nlm.nih.gov/25353601
  17. [17]Z.-G. Feng and E. E. Michaelides, The immersed boundary-lattice boltzmann method for solving fluid-particles interaction problems, Journal of Computational Physics 195, 602–628 (2004).DOI
  18. [18]W.-P. Breugem, A second-order accurate immersed boundary method for fully resolved simulations of particle-laden flows, Journal of Computational Physics 231, 4469–4498 (2012).DOI
  19. [19]C. Peng, O. M. Ayala, and L.-P. Wang, A comparative study of immersed boundary method and interpolated bounce-back scheme for no-slip boundary treatment in the lattice Boltzmann method: Part 1, laminar flows, Computers & Fluids 192, 104233 (2019).
  20. [20]J. Wu and C. Shu, Implicit velocity correction-based immersed boundary-lattice Boltzmann method and its applications, Journal of Computational Physics 228, 1963–1979 (2009).DOI
  21. [21]H. Chen, C. Teixeira, and K. Molvig, Realization of fluid boundary conditions via discrete Boltzmann dynamics, International Journal of Modern Physics C 09, 1281–1292 (1998).DOI
  22. [22]Y. Li, An improved volumetric LBM boundary approach and its extension for sliding mesh simulation, Ph.D. thesis, Iowa State University (2012).DOI
  23. [23]Y. Li, R. Shock, R. Zhang, and H. Chen, Numerical study of flow past an impulsively started cylinder by the lattice-Boltzmann method, Journal of Fluid Mechanics 519, 273–300 (2004).DOI
  24. [24]Y. Li, R. Zhang, R. Shock, and H. Chen, Prediction of vortex shedding from a circular cylinder using a volumetric lattice-Boltzmann boundary approach, The European Physical Journal Special Topics 171, 91–97 (2009).
  25. [25]D. Casalino, W. C. van der Velden, and G. Romani, A framework for multi-fidelity wind-turbine aeroacoustic simulations, in 28th AIAA/CEAS Aeroacoustics 2022 Conference (American Institute of Aeronautics and Astronautics, 2022).DOI
  26. [26]P. L. Bhatnagar, E. P. Gross, and M. Krook, A model for collision processes in gases. I. small amplitude processes in charged and neutral one-component systems, Physical Review 94, 511–525 (1954).
  27. [27]Z. Guo, C. Zheng, and B. Shi, Discrete lattice effects on the forcing term in the lattice Boltzmann method, Physical Review E 65, 10.1103/physreve.65.046308 (2002).pubmed.ncbi.nlm.nih.gov/12006014
  28. [28]F. de Prenter, C. V. Verhoosel, E. H. van Brummelen, M. G. Larson, and S. Badia, Stability and conditioning of immersed finite element methods: Analysis and remedies, Archives of Computational Methods in Engineering 30, 3617–3656 (2023).arxiv.org/abs/2208.08538
  29. [29]M. Rohde, J. J. Derksen, and H. E. A. Van den Akker, Volumetric method for calculating the flow around moving objects in lattice-Boltzmann schemes, Physical Review E 65, 10.1103/physreve.65.056701 (2002).pubmed.ncbi.nlm.nih.gov/12059744
  30. [30]C. Steger, On the calculation of arbitrary moments of polygons, Munchen Univ., Munchen, Germany, Tech. Rep. FGBV-96-05 (1996).
  31. [31]Q. Zou and X. He, On pressure and velocity boundary conditions for the lattice Boltzmann BGK model, Physics of Fluids 9, 1591–1598 (1997).
  32. [32]A. Meurer, C. P. Smith, M. Paprocki, O. Čertík, S. B. Kirpichev, M. Rocklin, A. Kumar, S. Ivanov, J. K. Moore, S. Singh, T. Rathnayake, S. Vig, B. E. Granger, R. P. Muller, F. Bonazzi, H. Gupta, S. Vats, F. Johansson, F. Pedregosa, M. J. Curry, A. R. Terrel, V. Roučka, A. Saboo, I. Fernando, S. Kulal, R. Cimmrman, and A. Scopatz, SymPy: symbolic computing in Python, PeerJ Computer Science 3, e103 (2017).
  33. [33]J. Goyal, F. Avallone, and T. Sinnige, Isolated propeller aeroacoustics at positive and negative thrust, Aerospace Science and Technology 147, 109021 (2024).DOI
  34. [34]OpenFOAM Foundation, Openfoam v7, https://openfoam.org/version/7/ (2019), accessed: 2025-08-14.

Paper details

vlnc:W_85ys4mb7
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents