## Abstract

In this paper, a rectangular lattice Boltzmann model is proposed for nonlinear convection–diffusion equations (NCDEs). The model can be used to solve NCDEs with very general form by using a real/complex-valued quadric equilibrium distribution function and relaxation time. Detailed simulations on several examples are performed to validate the model. The numerical results show good agreement with the analytical solutions, and the numerical accuracy is much better than that of the models with a linear equilibrium distribution function.

## 1. Introduction

The lattice Boltzmann method (LBM) has been proved to be an efficient tool not only in fluid flow modelling but also in solving other partial differential equations such as convection–diffusion equations (CDEs) since the 1990s. Many lattice Boltzmann (LB) models have been proposed successively in the past decades for solving such equations with more and more general forms including different characteristics such as nonlinearity, anisotropy and complex-valued types other than the real-valued ones. As for the complex-valued type equations, two main methods are used in the literature. The first are the quantum LB models that are based on quantum computing ideas [1–4]. However, the models are not in the classical LBM framework and the multi-dimensional version of these models needs to be designed carefully [4]. To overcome these shortcomings, the second kind of models that are based on a complex-valued distribution function and relaxation time were proposed [4–9]. However, all the models above are restricted to solving isotropic convection or diffusion equations. To deal with the anisotropic cases, LB models based on irregular lattices were proposed [10–14]. Also, Van der Sman & Ernst [15] studied the LBM for CDEs deeply, and presented several LB schemes (see [15,16] and references therein). Among them, the schemes on rectangular or irregular lattices seem to be promising. However, certain appropriate assumptions are usually needed in the existing LB models to recover the right macroscopic CDE.

In summary, many LB models have been developed to solve nonlinear convection–diffusion equations (NCDEs). However, no satisfactory models are found to include all the characteristics mentioned above. The aim of this paper is to construct such a rectangular lattice Boltzmann (RLB) model for NCDEs. With this model, *n*-dimensional, nonlinear, anisotropic CDEs with a source term can be solved. The numerical accuracy of order two can be proved.

## 2. Rectangular lattice Boltzmann model

The *n*-dimensional NCDE with anisotropic diffusion considered in this paper can be written as
2.1where **B**(*ϕ*) and *D*_{α}(*ϕ*) are known differential functions of *ϕ*, *ϕ* is an unknown real/complex-valued function and *F*(**x**,*t*) is the source term.

Our RLB model is based on the D*n*Q*b* lattice with *b* velocity directions in *n*-dimensional space [17], and the source term is treated by using one of the lattice Bhatnagar–Gross–Krook (LBGK) schemes in Shi *et al*. [18]. The evolution equation of the distribution function in the model reads
2.2for *j*=0,…,*b*−1, where *f*_{j} is the local distribution function, is the equilibrium distribution function, *F*_{j}(**x**,*t*) is the distribution function for the source term, Δ*t* is the time step, *c*_{α}=Δ*x*_{α}/Δ*t* is the particle speed along the *x*_{α}-axis, *τ* is the dimensionless relaxation time, and {**c**_{j},*j*=0,…,*b*−1} is the set of discrete velocity directions such that . Here, , and *d*_{α} is a tunable parameter, with 0<*d*_{α}<1. For instance, the {**c**_{j},*j*=0,…,*b*−1} for the case of D2Q9 can be written as **c**_{0}=(0,0), **c**_{1}=−**c**_{3}=(*c*_{1},0), **c**_{2}=−**c**_{4}=(0,*c*_{2}), **c**_{5}=−**c**_{7}=(*c*_{1},*c*_{2}), and **c**_{6}=−**c**_{8}=(−*c*_{1},*c*_{2}).

To solve equation (2.1) using the LB evolution equation (2.2) without additional assumptions, appropriate and *F*_{j}(**x**,*t*) must be given. As pointed out in Shi & Guo [9], reasonable constraints on the moments of the equilibrium distribution and *F*_{j}(**x**,*t*) should be satisfied:
2.3Keeping this in mind and following the common LBGK model, the equilibrium distribution function can be taken as
2.4where , , and . Assuming that **C** satisfies **C**′_{αβ}(*ϕ*)=**B**′_{α}(*ϕ*)**B**′_{β}(*ϕ*) or , we can recover equation (2.1) exactly from equation (2.2) with Chapman–Enskog expansion to order *O*(*ϵ*^{2}). Here *κ*_{α} can be found as .

### Remark 2.1

The RLB model is developed for arbitrary dimensions. In fact, most equations appear in two dimensions and three dimensions. For convenience, some models in two and three dimensions are given below. For the two-dimensional case, a D2Q9 model is presented. In the model, *c*_{1}=Δ*x*/Δ*t* and *c*_{2}=Δ*y*/Δ*t*. The equilibrium functions here are
The discrete velocity set satisfies and or *c*_{1}*c*_{2}*d*_{α}, with 0<*d*_{α}<1. From the equation, we have and , and then we have
For the three-dimensional case, a D3Q27 model is given. In the model, the discrete velocities are **c**_{0}=(0,0,0), **c**_{1}=−**c**_{4}=(*c*_{1},0,0), **c**_{2}=−**c**_{5}=(0,*c*_{2},0), **c**_{3}=−**c**_{6}=(0,0,*c*_{3}), **c**_{7}=−**c**_{9}=(*c*_{1},*c*_{2},0), **c**_{8}=−**c**_{10}=(*c*_{1},−*c*_{2},0), **c**_{11}=−**c**_{13}=(*c*_{1},0,*c*_{3}), **c**_{12}=−**c**_{14}=(*c*_{1},0,−*c*_{3}), **c**_{15}=−**c**_{17}=(0,*c*_{2},*c*_{3}), **c**_{16}=−**c**_{18}=(0,*c*_{2},−*c*_{3}), **c**_{19}=−**c**_{23}=(*c*_{1},*c*_{2},*c*_{3}), **c**_{20}=−**c**_{24}=(*c*_{1},*c*_{2},−*c*_{3}), **c**_{21}=−**c**_{25}=(*c*_{1},−*c*_{2},*c*_{3}) and **c**_{22}=−**c**_{26}=(−*c*_{1},*c*_{2},*c*_{3}). The weights here are
If we set *ω*_{19}=0, then the model reduces to a D3Q19 model; if we continue to set *ω*_{7}=*ω*_{11}=*ω*_{15}=0, the model reduces to a D3Q15 model. For both two-dimensional and three-dimensional cases, .

### Remark 2.2

The model is proposed to include NCDEs with form as general as possible. For example, equation (2.1) reduces to an *n*-dimensional diffusion equation with a source term when **B**=**0**. If we set **D**=**0**, the equation becomes an *n*-dimensional convection equation with a source term. In the equation, both **B** and **D** are tensor functions of *ϕ*. The functions can be real/complex-valued, nonlinear ones, and the functions can describe the anisotropic convection and diffusion phenomena.

### Remark 2.3

In previous works on the RLB model for CDE, only linear equilibrium functions (Lfeq) are used [16,19]. Through the Chapman–Enskog expansion, we find that the macroscopic equation cannot be recovered exactly without additional assumptions on the equation. In the present model, the quadric equilibrium function (Qfeq) is used for *ϕ*, and the macroscopic equation can be recovered to order *O*(*ϵ*^{2}) without any assumptions in the model.

## 3. Numerical validation and discussion

To test the validation of the model proposed, numerical simulations for two kinds of CDE are carried out. For the boundary condition implementation, the non-equilibrium extrapolation scheme proposed by Guo *et al.* [20] is used for all cases. For the initial and boundary conditions, the analytical solutions of the test problems are used.

The first test problem is a two-dimensional Burgers–Fisher equation (BFE) with isotropic diffusion (can also be seen in Shi & Guo [9])
3.1The analytical solution here is , where *A*=−*aδ*/(4*b*(*δ*+1)) and *ω*=*a*^{2}+2*bk*(*δ*+1)^{2}/(*a*(*δ*+1)), *a*,*b*,*k* and *δ* are real constants. The parameters here are set as *δ*=1.5, *k*=1,*a*=4,*b*=0.1, Δ*y*=1/20 to 1/60, *c*_{2}=5 to 40. For comparison, both the square lattice and the rectangular lattice are used. The models with both Lfeq and Qfeq are employed. In the simulation, Δ*t*_{S}=Δ*t*_{R}, Δ*x*_{S}=Δ*y*_{S}=Δ*x*_{R}/2=Δ*y*_{R}, where S and R represent the cases for the square and rectangular models. The global relative error has the form and the maximum error has the form , where *ϕ* and *ϕ** are the numerical solution and the analytical one, respectively, and the summation is taken over all grid points. Figure 1 shows the numerical accuracy of different models with different grid values Δ*y* at *t*=1.0. As can be seen, all errors decrease with the decrease of the lattice size. The numerical accuracy of the model with Qfeq is found to be always better than that of the model with Lfeq for *ϕ*. At the same time, the numerical accuracy of the RLB model seems always better than that of the square lattice Boltzmann (SLB) model. The results show that the present rectangular model for this problem not only can reduce the computational cost but also can keep the high numerical accuracy.

In the first example, the diffusion term is assumed to be isotropic. As shown in §1, one of the aims to develop the rectangular model is to treat equations with anisotropic diffusion or convection terms. By the second example, a two-dimensional NCDE with an anisotropic diffusion term
3.2is solved to test the capability of the present model. Here, the exact solution is *u*(*x*,*y*,*t*)=sech[2(*x*+*y*−*t*)] and the source term is *F*=2*ϕ*(*u*−*αu*−*βu*)−4*u*(*D*_{x}+*D*_{y})(2*ϕ*^{2}−1), where . Here *α* and *β* are set as 1, *D*_{x}=*D*_{y}=0.01,0.02 for the isotropic case and *D*_{x}=0.02, *D*_{y}=0.01 for the anisotropic case.

Table 1 shows the numerical accuracy comparisons of the models with Qfeq and Lfeq for this problem. As can be seen, the models with Qfeq always have better accuracy than those with Lfeq for both the isotropic and anisotropic cases. The finer the lattice size is, the more remarkable the difference becomes. However, also from the table, almost no difference is shown between the SLB and RLB models in numerical accuracy. Unlike the result for the first example, the RLB models here always show lower accuracy compared with the corresponding SLB models because a coarser lattice is used. Even so, it is worth while to use the rectangular models with much less computational cost if the numerical accuracy is acceptable. To see the results more clearly, the numerical accuracy under more lattice sizes is investigated. Figure 2 shows us the comparison results for both the isotropic and anisotropic cases. As can be seen, both the SLB and RLB models with Qfeq show much better accuracy than the corresponding models with Lfeq whether the diffusion term is isotropic or not. Figure 3 shows us the comparison results for the SLB and RLB. As shown, the numerical accuracy of the models with Qfeq is also much better than for those with Lfeq. With the decrease of the lattice size, the numerical accuracy of the rectangular model seems closer to that of the corresponding square model. That is, the rectangular model may be preferable to the square model if the numerical accuracy is acceptable. In the above simulations, the relaxation time *τ* is taken as a fixed value such as 0.8 or 1.0. However, from our numerical experiments, we can see that the numerical accuracy of the model seems to show a certain dependence on the choice of *τ*. As can be seen in figure 4*a*, the numerical accuracy of the rectangular models with both the Lfeq and Qfeq shows a certain dependence on the relaxation time *τ*. The difference is that the models with the Qfeq always seem to give better results. The range of the relaxation time is recommended as 0.7≤*τ*≤1.0 as shown in the figure. For the present rectangular models, the choice of the ratio *c*_{1}/*c*_{2} is another important issue. Figure 4*b* shows us the dependence of the numerical accuracy on the ratio for *D*_{x}/2=*D*_{y}=0.01. As shown, the effect of the ratio is apparent for the models with both the Lfeq and Qfeq. Similarly, the model with the Qfeq shows better results than that with the Lfeq. However, when the ratio is outside of the range 1/4≤*c*_{1}/*c*_{2}≤4, both models become unstable. For example, both models fail when the ratio *c*_{1}/*c*_{2} is 1/8 or 8 if *c*_{1}<40. In addition, the best range of the ratio shows some dependence on *D*_{x}/*D*_{y}. From figure 4*b*, we can also see that better numerical accuracy can be obtained when *c*_{1}/*c*_{2}<1 than when *c*_{1}/*c*_{2}>1 for both models. The reason may contribute to the anisotropic diffusion characteristics of the present equation. Because the *D*_{x}/*D*_{y} values tested here are larger than 1, a finer computational grid seems to be needed in the *x*-direction than in the *y*-direction, thus the cases when *c*_{1}/*c*_{2}<1 should show better accuracy. In summary, the ratio is recommended as 1/4≤*c*_{1}/*c*_{2}≤4 generally as shown in figure 4*b*. The different anisotropic diffusion characteristics of the problem considered seem to determine whether *c*_{1}/*c*_{2} should be chosen to be greater or less than 1.

## 4. Summary

In this paper, an RLB model for *n*-dimensional NCDEs with anisotropic diffusion is given. To test the numerical accuracy of the present model, some NCDEs including the BFE and NCDEs with anisotropic diffusion are solved by it. Some conclusions can be drawn as follows: (i) The theoretical analysis and numerical results both show that the present model with Qfeq has better accuracy than those with Lfeq. (ii) With less computational cost, the RLB can achieve similar accuracy to the SLB. Furthermore, the RLB is even better than the SLB for the BFE. (iii) For the present RLB, the range of the relaxation time *τ* and the ratio *c*_{1}/*c*_{2} are recommended as 0.7≤*τ*≤1.0 and 1/4≤*c*_{1}/*c*_{2}≤4 generally. In addition, the anisotropic diffusion characteristics of the problem investigated should be considered when the ratio is chosen.

## Acknowledgements

This work is supported by the National Natural Science Foundation of China (51006039, 51006040) and the National Basic Research Programme of China (2011CB707305).

## Footnotes

One contribution of 26 to a Theme Issue ‘Discrete simulation of fluid dynamics: methods’.

- This journal is © 2011 The Royal Society