1 Introduction

In the past decades, the lattice Boltzmann (LB) method, as a numerical approach originated from the lattice gas automata or developed from the simplified kinetic models, has gained great success in the simulation of the complex flows [13], and has also been extended to solve some partial differential equations, including the diffusion equation [4, 5], wave equation [6], Burgers equation [7], Fisher equation [8], Poisson equation [9], isotropic and anisotropic convection–diffusion equations (CDEs) [1041]. However, most of these available works related to CDEs mainly focused on the linear CDE for its important role in the study of the heat and mass transfer [1034]. Recently, through constructing a proper equilibrium distribution function, Shi and Guo [35] proposed a single-relaxation-time (SRT) LB model or the Bhatnagar–Gross–Krook (BGK) model for nonlinear convection–diffusion equations (NCDEs) where the nonlinear convection and diffusion terms are included. Although the model has a second-order convergence rate in space [35, 36], and can also be considered as an extension to some available works, it still has some limitations. The first is that when the BGK model is used to solve the NCDEs where the diffusion coefficient is very small, the relaxation parameter would be close to its limit value, thus the model may suffer from the stability or accuracy problem [22, 31]. Secondly, the BGK model is usually limited to solve the nonlinear isotropic CDEs since it does not have sufficient relaxation parameters to describe the anisotropic diffusion process, while the multiple-relaxation-time (MRT) LB model with more relaxation parameters seems more suitable and more reasonable in solving NCDE with anisotropic diffusion process. And finally, it is also well known that in the BGK model, only a single relaxation process is used to characterize the collision effects, which means all modes relax to their equilibria with the same rate, while from a physical point of view, these rates corresponding to different modes should be different from each other during the collision process [2, 42]. To overcome these deficiencies inherent in the BGK model, Ginzburg [3741] developed two-relaxation-time (TRT) and MRT models for nonlinear anisotropic CDEs (NACDEs), while to recover the correct NACDEs, some assumptions on the convection and related terms have been made [37, 38], and these assumptions may be not satisfied for some special NACDEs, as pointed out in Ref. [35]. In this work we will present a MRT LB model for more general NACDEs, and show that, through the Chapman–Enskog analysis, the NACDE with a source term can be recovered without any additional assumptions. Besides, it is also found that, similar to our previous BGK model [35, 36], the present MRT model also has a second-order convergence rate in space, while it could be more stable and more accurate than the BGK model through tuning the relaxation parameters properly.

The rest of the paper is organized as follows. In Sect. 2, the MRT model for the general NACDE with a source term is first presented, and then some special cases and distinct characteristics of the present model are also discussed. In Sect. 3, the accuracy and convergence rate of the MRT model are tested through some classic CDEs, followed by a comparison between the present MRT model and BGK model, and finally, some conclusions are given in Sect. 4.

2 Multiple-Relaxation-Time Lattice Boltzmann Model for General Nonlinear Anisotropic Convection–Diffusion Equations

2.1 Nonlinear Anisotropic Convection–Diffusion Equation

The general n-dimensional (n-D) nonlinear anisotropic convection–diffusion equation with a source term can be written as

$$\begin{aligned} \partial _{t} \phi +\nabla \cdot \mathbf {B}(\phi )=\nabla \cdot [\mathbf {K}\cdot (\nabla \cdot \mathbf {D}(\phi , \mathbf {x}, t))]+R(\phi , \mathbf {x}, t), \end{aligned}$$
(1)

where \(\phi \) is a scalar variable and is a function of time and space, \(\nabla \) is the gradient operator, \(\mathbf {K}=\mathbf {K}(\phi , \mathbf {x}, t)\) is the diffusion tensor. \(\mathbf {B}(\phi )\) and \(\mathbf {D}(\phi , \mathbf {x}, t)\) are two differential tensor functions, \(R(\phi , \mathbf {x}, t)\) is the source term. It should be noted that Eq. (1) can be viewed as a general form of some important partial differential equations [31, 35, 36], such as the (anisotropic) diffusion equation, Burgers equation, Burgers–Fisher equation, Buckley–Leverett equation, nonlinear heat conduction equation, (anisotropic) convection–diffusion equation, and so on.

2.2 Multiple-Relaxation-Time Lattice Boltzmann Model

Generally, the models in the LB method can be classified into three kinds based on collision operator, i.e., the lattice BGK model [43, 44], the two relaxation-time model [40, 45], and the MRT model [42, 46]. In this work, we will focus on the MRT model for its superiority on the stability and accuracy both in the study of fluid flows [42, 47] and solving CDEs [22, 31].

The MRT model with DnQq lattice (q is the number of discrete directions) [43] for the NACDE [Eq. (1)] is considered here, and the evolution equation of the model can be written as

$$\begin{aligned} \phi _{k}(\mathbf {x} + \mathbf {c}_{k}\delta t,\;t + \delta t)= & {} \phi _{k}(\mathbf {x},\;t )-(\mathbf {M}^{-1}\mathbf {S M})_{kj}\left[ \phi _{j}(\mathbf {x},\;t) - \phi _{j}^{(eq)}(\mathbf {x},\;t)\right] \nonumber \\&+\, \left( \delta t+\frac{\delta t^{2}}{2}\bar{D}_{k}\right) R_{k}(\mathbf {x}, t), \end{aligned}$$
(2)

where \(\delta t\) is time step, \(\bar{D}_{k}=\theta \partial _{t}+\gamma \mathbf {c}_{k}\cdot \nabla \) with \(\theta \) and \(\gamma \) being two parameters to be determined in the following part. \(\phi _{k}(\mathbf {x},\;t)\) is the distribution function associated with the discrete velocity \(\mathbf {c}_{k}\) at position \(\mathbf {x}\) and time t, \(\phi _{k}^{(eq)}(\mathbf {x},\;t)\) is the equilibrium distribution function, and is defined as [35]

$$\begin{aligned} \phi _{k}^{(eq)}(\mathbf {x},\;t)=\omega _{k}\left[ \phi +\frac{\mathbf {c}_{k}\cdot \mathbf {B}}{c_{s}^{2}}+\frac{(\mathbf {C}+d c_{s}^{2}\mathbf {D}-c_{s}^{2}\phi \mathbf {I}):(\mathbf {c}_{k}\mathbf {c}_{k}-c_{s}^{2}\mathbf {I})}{2c_{s}^{4}}\right] , \end{aligned}$$
(3)

where \(\mathbf {I}\) is the unit matrix, d is a positive parameter related to the diffusion tensor \(\mathbf {K}\) [see Eq. (29)], \(\mathbf {c}_{k}\) and \(\omega _{k}\) are discrete velocity and weight coefficient, and in different lattice models, they can be defined as

D1Q3:

$$\begin{aligned} \mathbf {c}= & {} (0, 1, -1)c, \end{aligned}$$
(4a)
$$\begin{aligned} \omega _{0}= & {} 2/3, \; \omega _{1}=\omega _{2}=1/6, \end{aligned}$$
(4b)

D2Q9:

$$\begin{aligned} \mathbf {c}= & {} \left( \begin{array}{ccccccccc} 0 &{}\quad 1 &{}\quad 0 &{}\quad -1 &{}\quad 0 &{}\quad 1 &{}\quad -1 &{}\quad -1 &{}\quad 1 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad -1 &{}\quad 1 &{}\quad 1 &{}\quad -1 &{}\quad -1 \end{array} \right) c \end{aligned}$$
(5a)
$$\begin{aligned} \omega _{0}= & {} 4/9, \; \omega _{k=1-4}=1/9, \; \omega _{k=5-8}=1/36, \end{aligned}$$
(5b)

D3Q19:

$$\begin{aligned} \mathbf {c}= & {} \left( \begin{array}{ccccccccccccccccccc} 0 &{} 1 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} -1 &{} 1 &{} -1 &{} 1 &{} -1 &{} -1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0\\ 0 &{} 0 &{} 0 &{} 1 &{} -1 &{} 0 &{} 0 &{} 1 &{} -1 &{} -1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} -1 &{} 1 &{} -1\\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} -1 &{} 1 &{} -1 &{} 1 &{} -1 &{} -1 &{} 1 \end{array} \right) c \end{aligned}$$
(6a)
$$\begin{aligned} \omega _{0}= & {} 1/3, \; \omega _{k=1-6}=1/18, \; \omega _{k=7-18}=1/36, \end{aligned}$$
(6b)

where \(c=\delta x/\delta t\) with \(\delta x\) representing lattice spacing, usually it is not equal to 1 and can be adjusted based on different lattice spacing and time step, which would be more convenient in the study of the convergence rate of MRT model (see the following results shown in Sect. 3), \(c_{s}^{2}=c^{2}/3\). To recover the correct NACDE from present MRT model, the second-order differential tensor \(\mathbf {C}\) in Eq. (3) should satisfy

$$\begin{aligned} C'_{\alpha \beta }(\phi )=B'_{\alpha }(\phi )B'_{\beta }(\phi )\; \text {or}\; C_{\alpha \beta }(\phi )=\int B'_{\alpha }(\phi )B'_{\beta }(\phi ) d\phi . \end{aligned}$$
(7)

\(\mathbf {M}\) in Eq. (2) is a transformation matrix, and can be used to project the distribution function \(\phi _{k}\) and equilibrium distribution function \(\phi _{k}^{(eq)}\) in the discrete velocity space onto macroscopic variables in the moment space through following relations [42, 48],

$$\begin{aligned} \mathbf {m}:=\mathbf {M}\varvec{\Phi },\ \ \ \mathbf {m}^{(eq)}:=\mathbf {M}\varvec{\Phi }^{(eq)}, \end{aligned}$$
(8)

where \(\varvec{\Phi }=(\phi _{0},\ldots , \phi _{q-1})^{\top }\), \(\varvec{\Phi }^{(eq)}=(\phi _{0}^{(eq)},\ldots , \phi _{q-1}^{(eq)})^{\top }\). \(\mathbf {S}\) is the relaxation matrix, \(R_{k}(\mathbf {x}, t)\) is the discrete source term, and is defined by

$$\begin{aligned} R_{k}(\mathbf {x}, t)=\omega _{k}\left( 1+\frac{\mathbf {c}_{k}\cdot \tilde{\mathbf {B}}}{c_{s}^{2}}\right) R(\mathbf {x}, t), \end{aligned}$$
(9)

where \(\tilde{\mathbf {B}}\) is a differential tensor to be determined below. To derive correct NACDE, i.e., Eq. (1), the following conditions also need to be satisfied,

$$\begin{aligned}&\sum \limits _k\phi _{k} = \sum \limits _{k} \phi _{k}^{(eq)}=\phi , \ \ \sum \limits _{k}R_{k} = R, \end{aligned}$$
(10a)
$$\begin{aligned}&\sum \limits _{k}\mathbf {c}_{k}\phi _{k}^{(eq)} = \mathbf {B}(\phi ), \ \ \sum \limits _{k}\mathbf {c}_{k}\mathbf {c}_{k}\phi _{k}^{(eq)} = \mathbf {C}+d c_{s}^{2}\mathbf {D}(\phi ), \ \ \sum \limits _{k}\mathbf {c}_{k}R_{k} = \tilde{\mathbf {B}}(\phi )R. \end{aligned}$$
(10b)

In addition, we would also like to point out that the weight coefficient \(\omega _{k}\) and discrete velocity \(\mathbf {c}_{k}\) defined by Eqs. (4), (5) and (6) can be generalized by the following equation,

$$\begin{aligned}&\sum \limits _{k}\omega _{k} = 1, \ \ \sum \limits _{k}\omega _{k}\mathbf {c}_{k\alpha }= 0, \ \ \sum \limits _{k}\omega _{k}\mathbf {c}_{k\alpha }\mathbf {c}_{k\beta }=\delta _{\alpha \beta }c_{s}^{2}, \end{aligned}$$
(11a)
$$\begin{aligned}&\sum \limits _{k}\omega _{k}\mathbf {c}_{k\alpha }\mathbf {c}_{k\beta }\mathbf {c}_{k\gamma } = 0, \ \ \sum \limits _{k}\omega _{k}\mathbf {c}_{k\alpha }\mathbf {c}_{k\beta }\mathbf {c}_{k\gamma }\mathbf {c}_{k\theta } = \varDelta _{\alpha \beta \gamma \theta }c_{s}^{4}, \end{aligned}$$
(11b)

where \(\delta _{\alpha \beta }\) and \(\varDelta _{\alpha \beta \gamma \theta }=\delta _{\alpha \beta }\delta _{\gamma \theta }+\delta _{\alpha \gamma }\delta _{\beta \theta }+\delta _{\alpha \theta }\delta _{\beta \gamma }\) are the Kronecker tensors.

2.3 The Chapman–Enskog Analysis

In this part, we will present the Chapman–Enskog analysis on how to derive the NACDE from the present MRT model. In the Chapman–Enskog analysis, the distribution function, the time and space derivatives, and the source term can be expressed as [22]

$$\begin{aligned} \phi _{k}= & {} \phi _{k}^{(0)} + \epsilon \phi _{k}^{(1)} + \epsilon ^{2}\phi _{k}^{(2)} + \cdots , \end{aligned}$$
(12a)
$$\begin{aligned} \partial _{t}= & {} \epsilon \partial _{t_{1}} + \epsilon ^{2}\partial _{t_{2}}, \ \ \nabla = \epsilon \nabla _{1}, \ \ R = \epsilon R_{1}, \end{aligned}$$
(12b)

where \(\epsilon \) is a small parameter. Substituting Eqs. (12) into Eq. (2) and using the Taylor expansion, we can obtain zero, first and second-order equations in \(\epsilon \),

$$\begin{aligned}&\epsilon ^{0}:\ \ \phi _{k}^{(0)} = \phi _{k}^{({eq})}, \end{aligned}$$
(13a)
$$\begin{aligned}&\epsilon ^{1}:\ \ D_{1k}\phi _{k}^{(0)} = -\frac{1}{\delta t}(\mathbf {{M}^{-1}\mathbf {S M}})_{kj}\phi _{j}^{(1)} + R_{k}^{(1)}, \end{aligned}$$
(13b)
$$\begin{aligned}&\epsilon ^{2}:\ \ \partial _{t_2}\phi _{k}^{(0)} + D_{1i}\phi _{k}^{(1)}+\frac{\delta t}{2}D_{1k}^{2}\phi _{k}^{(0)} = -\frac{1}{\delta t}(\mathbf {{M}^{-1}\mathbf {S M}})_{kj}\phi _{j}^{(2)} + \frac{\delta t}{2}\bar{D}_{1k}R_{k}^{(1)},\quad \end{aligned}$$
(13c)

where \(D_{1k}=\partial _{t_1} + \mathbf {c}_{k}\cdot \nabla _{1}\), \(\bar{D}_{1k}=\theta \partial _{t_1} + \gamma \mathbf {c}_{k}\cdot \nabla _{1}\), and to derive Eq. (13a), we have made an assumption that \(\mathbf {M}^{-1}\mathbf {SM}\) is non-singular. If we rewrite Eqs. (13) in a vector form, and multiply \(\mathbf {M}\) on both sides of them, we can obtain the corresponding equations in moment space, x

$$\begin{aligned}&\epsilon ^{0}:\ \ \mathbf {m}^{(0)} = \mathbf {m}^{({eq})}, \end{aligned}$$
(14a)
$$\begin{aligned}&\epsilon ^{1}:\ \ \mathbf {D}_{1}\mathbf {m}^{(0)} = -\frac{1}{\delta t}\mathbf {S}\mathbf {m}^{(1)} + \mathbf {M R}^{(1)}, \end{aligned}$$
(14b)
$$\begin{aligned}&\epsilon ^{2}:\ \ \partial _{t_2}\mathbf {m}^{(0)} + \mathbf {D}_{1}(\mathbf {I}-\frac{\mathbf {S}}{2})\mathbf {m}^{(1)} = -\frac{1}{\delta t}\mathbf {S}\mathbf {m}^{(2)} + \frac{\delta t}{2}\mathbf {M}\bar{\bar{\mathbf {D}}}_{1}\mathbf {M}\mathbf {R}^{(1)}, \end{aligned}$$
(14c)

where \(\mathbf {D}_{1}=\mathbf {I}\ \partial _{t_1}+\mathbf {M}\ \text {diag}(c_{0\alpha }\nabla _{1\alpha }, \ldots , c_{(q-1)\alpha }\nabla _{1\alpha })\mathbf {M}^{-1}\), \(\bar{\bar{\mathbf {D}}}_{1}=(\theta -1)\mathbf {I}\ \partial _{t_1}+(\gamma -1)\mathbf {M}\ \text {diag}(c_{0\alpha }\nabla _{1\alpha }, \ldots , c_{(q-1)\alpha }\nabla _{1\alpha })\mathbf {M}^{-1}\), \(\mathbf {R}^{(1)}=(R_{0}^{(1)}, \ldots , R_{q-1}^{(1)})^{\top }\), \(\mathbf {m}^{(1)}=\mathbf {M}\varvec{\Phi }^{(1)}\) and \(\mathbf {m}^{(2)}=\mathbf {M}\varvec{\Phi }^{(2)}\) with \(\varvec{\Phi }^{(k)}=(\phi _{0}^{(k)}, \ldots , \phi _{q-1}^{(k)})^{\top }\). It should be noted that to obtain Eqs. (14c), (13b) has bee adopted. Actually, if we multiply \(D_{1k}\) on both sides of Eq. (13b), one can rewrite Eq. (13b) with the following form,

$$\begin{aligned} D_{1k}^{2}\phi _{k}^{(0)} = -\frac{1}{\delta t}D_{1k}(\mathbf {{M}^{-1}\mathbf {S M}})_{kj}\phi _{j}^{(1)} + D_{1k}R_{k}^{(1)}, \end{aligned}$$
(15)

then substituting Eq. (15) into Eq. (13c), we can rewrite Eq. (13c) as

$$\begin{aligned} \partial _{t_2}\phi _{k}^{(0)} + D_{1k}(\mathbf {I}-\frac{\mathbf {{M}}^{-1}\mathbf {S M}}{2})_{kj}\phi _{j}^{(1)} = -\frac{1}{\delta t}(\mathbf {{M}^{-1}\mathbf {S M}})_{kj}\phi _{j}^{(2)} + \frac{\delta t}{2}(\bar{D}_{1k}-D_{1k})R_{k}^{(1)}. \end{aligned}$$
(16)

Rewriting Eq. (16) in a vector form, and multiplying \(\mathbf {M}\) on both sides of it, one can finally obtain Eq. (14c).

If we take the D2Q9 lattice model as an example, the transportation matrix \(\mathbf {M}\) can be written as

$$\begin{aligned} \mathbf {M}=\mathbf {C}_{d}\mathbf {M}_{0}, \end{aligned}$$
(17)

where \({\mathbf {C}}_{d}=\text {diag}(c^{0}, c^{2}, c^{4}, c^{1}, c^{3}, c^{1}, c^{3}, c^{2}, c^{2})\) is a diagonal matrix and \(\mathbf {M}_{0}\) is given by [42]

$$\begin{aligned} \mathbf {M}_{0} = \left( {\begin{array}{*{20}{c}} 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ { - 4} &{}\quad { - 1} &{}\quad { - 1} &{}\quad { - 1} &{}\quad { - 1} &{}\quad 2 &{}\quad 2 &{}\quad 2 &{}\quad 2 \\ 4 &{}\quad { - 2} &{}\quad { - 2} &{}\quad { - 2} &{}\quad { - 2} &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ 0 &{}\quad 1 &{}\quad 0 &{}\quad { - 1} &{}\quad 0 &{}\quad 1 &{}\quad { - 1} &{}\quad { - 1} &{}\quad 1 \\ 0 &{}\quad { - 2} &{}\quad 0 &{}\quad 2 &{}\quad 0 &{}\quad 1 &{}\quad { - 1} &{}\quad { - 1} &{}\quad 1 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad { - 1} &{}\quad 1 &{}\quad 1 &{}\quad { - 1} &{}\quad { - 1} \\ 0 &{}\quad 0 &{}\quad { - 2} &{}\quad 0 &{}\quad 2 &{}\quad 1 &{}\quad 1 &{}\quad { - 1} &{}\quad { - 1} \\ 0 &{}\quad 1 &{}\quad { - 1} &{}\quad 1 &{}\quad { - 1} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad { - 1} &{}\quad 1 &{}\quad { - 1} \\ \end{array}} \right) . \end{aligned}$$
(18)

Consequently, one can also obtain \(\mathbf {m}^{(eq)}\) from Eq. (8),

$$\begin{aligned} \mathbf {m}^{({eq})} = (\phi , -4\phi c^{2}+3C_{2}, 3\phi c^{4}-3C_{2}c^{2}, B_{x}, -B_{x}c^{2}, B_{y}, -B_{y}c^{2}, \bar{C}_{xx}-\bar{C}_{yy}, \bar{C}_{xy})^{\top }, \end{aligned}$$
(19)

where \(C_{2}=\bar{C}_{xx}+\bar{C}_{yy}\), \(\bar{C}_{\alpha \beta }=\sum _{k}c_{k\alpha }c_{k\beta }\phi _{k}^{(eq)}=C_{\alpha \beta }+dc_{s}^{2}D_{\alpha \beta }(\phi )\). For this lattice model, the relaxation matrix \(\mathbf {S}\) can be defined as

$$\begin{aligned} \mathbf {S}=\left( {\begin{array}{*{20}{c}} s_{0} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad s_{1} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad s_{2} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad s_{3} &{}\quad 0 &{}\quad s_{35} &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad s_{4} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad s_{53} &{}\quad 0 &{}\quad s_{5} &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad s_{6} &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad s_{7} &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad s_{8} \\ \end{array}} \right) , \end{aligned}$$
(20)

where the diagonal element \(s_{k}\) is the relaxation parameter corresponding to kth moment \(m_{k}=\sum _{j}\mathbf {M}_{kj}\phi _{j}\), and the off-diagonal components (\(s_{35}\) and \(s_{53}\)) correspond to the rotation of the principal axis of anisotropic diffusion [31]. Besides, based on Eq. (17), one can easily obtain the following equation,

$$\begin{aligned} \mathbf {M}^{-1}\mathbf {S M}=\mathbf {M}_{0}^{-1}\mathbf {S M}_{0}, \end{aligned}$$
(21)

and simultaneously, the evolution Eq. (2) can be rewritten as

$$\begin{aligned} \phi _{k}(\mathbf {x} + \mathbf {c}_{k}\delta t,\;t + \delta t)= & {} \phi _{k}(\mathbf {x},\;t )-(\mathbf {M}_{0}^{-1}\mathbf {S M}_{0})_{kj}[\phi _{j}(\mathbf {x},\;t) - \phi _{j}^{(eq)}(\mathbf {x},\;t)] \nonumber \\&+\, \left( \delta t+\frac{\delta t^{2}}{2}\bar{D}_{k}\right) R_{k}(\mathbf {x}, t). \end{aligned}$$
(22)

Based on Eq. (14b), we can rewrite the first-order equations in \(\epsilon \), but here we present the first, fourth, and sixth ones since only these three equations are useful in the following process of obtaining NACDE,

$$\begin{aligned}&\partial _{t_1}\phi +\partial _{1x}B_{x}+\partial _{1y}B_{y}= R^{(1)}, \end{aligned}$$
(23a)
$$\begin{aligned}&\partial _{t_1}B_{x}+\partial _{1x}\bar{C}_{xx}+\partial _{1y}\bar{C}_{xy}=\tilde{B}_{x}R^{(1)}-\frac{s_{3}m_{3}^{(1)}+s_{35}m_{5}^{(1)}}{\delta t}, \end{aligned}$$
(23b)
$$\begin{aligned}&\partial _{t_1}B_{y}+\partial _{1x}\bar{C}_{xy}+\partial _{1y}\bar{C}_{yy}=\tilde{B}_{y}R^{(1)}-\frac{s_{53}m_{3}^{(1)}+s_{5}m_{5}^{(1)}}{\delta t}. \end{aligned}$$
(23c)

If we introduce a matrix \(\mathbf {A}\) and a vector \(\mathbf {m}_{35}^{(1)}\), which are defined as

$$\begin{aligned} \mathbf {A}=\left( {\begin{array}{*{20}{l}} s_{3} &{}\quad s_{35} \\ s_{53} &{}\quad s_{5} \end{array}} \right) ,\ \ \ \ \mathbf {m}_{35}^{(1)}=\left( {\begin{array}{*{20}{l}} m_{3}^{(1)} \\ m_{5}^{(1)} \end{array}} \right) , \end{aligned}$$
(24)

then Eqs. (23b) and (23c) can be rewritten in a vector form,

$$\begin{aligned} \partial _{t_1}\mathbf {B}+\nabla _{1}\cdot \bar{\mathbf {C}}=\tilde{\mathbf {B}}R^{(1)}-\frac{1}{\delta t}\mathbf {A}\mathbf {m}_{35}^{(1)}. \end{aligned}$$
(25)

Similarly, we can also use Eq. (14c) to derive the second-order equations in \(\epsilon \), but only the first one corresponding to the conservative variable \(\phi \) is presented,

$$\begin{aligned} \partial _{t_2}\phi + \nabla _{1}\cdot \left[ \left( \mathbf {I}-\frac{\mathbf {A}}{2}\right) \mathbf {m}_{35}^{(1)}\right] = \frac{\delta t}{2}(\theta -1)\partial _{t_1}R^{(1)} + \frac{\delta t}{2}\left[ (\gamma -1)\nabla _{1}\cdot (\tilde{\mathbf {B}}R^{(1)})\right] . \end{aligned}$$
(26)

Substituting Eq. (25) into Eq. (26), we have

$$\begin{aligned}&\partial _{t_2}\phi + \delta t\nabla _{1}\cdot \left[ -\left( \mathbf {I}-\frac{\mathbf {A}}{2}\right) \mathbf {A}^{-1}(\partial _{t_1}\mathbf {B}+\nabla _{1}\cdot \bar{\mathbf {C}}-\tilde{\mathbf {B}}R^{(1)})\right] \nonumber \\&\quad = \frac{\delta t}{2}(\theta -1)\partial _{t_1}R^{(1)} + \frac{\delta t}{2}\left[ (\gamma -1)\nabla _{1}\cdot (\tilde{\mathbf {B}}R^{(1)})\right] , \end{aligned}$$
(27)

with the aid of Eqs. (7) and (23a), we can rewrite Eq. (27) as

$$\begin{aligned} \partial _{t_2}\phi= & {} \nabla _{1}\cdot \left[ \left( \mathbf {A}^{-1}-\frac{1}{2}\mathbf {I}\right) dc_{s}^{2}\delta t\nabla _{1}\cdot \mathbf {D}\right] +\frac{\delta t}{2}(\theta -1)\partial _{t_1}R^{(1)}\nonumber \\&+ \delta t\nabla _{1}\cdot \left\{ \left[ \left( \frac{\gamma }{2}\mathbf {I}-\mathbf {A}^{-1}\right) \tilde{\mathbf {B}}-(\frac{1}{2}\mathbf {I}- \mathbf {A}^{-1})\mathbf {B}^{'}\right] R^{(1)}\right\} , \end{aligned}$$
(28)

where the diffusion tensor \(\mathbf {K}\) is given by

$$\begin{aligned} \mathbf {K}=d c_{s}^{2}\left( \mathbf {A}^{-1}-\frac{1}{2}\mathbf {I}\right) \delta t. \end{aligned}$$
(29)

From above equation, it is clear that, for a fixed diffusion tensor, the parameter d can be used to adjust the relaxation parameters.

Through combining the results at \(t_{1}\) and \(t_{2}\) scales, i.e., Eqs. (23a) and (28), we can recover the following NACDE,

$$\begin{aligned} \partial _{t} \phi + \nabla \cdot \mathbf {B}= & {} \nabla \cdot [\mathbf {K}\cdot (\nabla \cdot \mathbf {D})]+R \nonumber \\&+\, \frac{\delta t}{2}(\theta -1)\partial _{t}R + \delta t\nabla \cdot \left\{ \left[ \left( \frac{\gamma }{2}\mathbf {I}-\mathbf {A}^{-1}\right) \tilde{\mathbf {B}}-(\frac{1}{2}\mathbf {I}- \mathbf {A}^{-1})\mathbf {B}^{'}\right] R\right\} .\nonumber \\ \end{aligned}$$
(30)

To derive correct NACDE, the parameter \(\theta \) and the tensor \(\tilde{\mathbf {B}}\) should be set as

$$\begin{aligned} \theta =1, \ \ \tilde{\mathbf {B}}=\left( \frac{\gamma }{2}\mathbf {I}- \mathbf {A}^{-1}\right) ^{-1} \left( \frac{1}{2}\mathbf {I}-\mathbf {A}^{-1}\right) \mathbf {B}^{'}. \end{aligned}$$
(31)

We noted that although above analysis is only carried out for the two-dimensional MRT model with D2Q9 lattice, it can be extended to three-dimensional model without any substantial difficulties.

Now we give some remarks on the present model.

Remark I

We first want to present some discussion on the diffusion tensor \(\mathbf {K}\). Actually, if the diffusion tensor \(\mathbf {K}\) is taken by \(\mathbf {K}=\kappa \mathbf {I}\) with \(\kappa \) being a constant or variable, the NACDE [Eq. (1)] would be reduced to the NCDE considered in the previous work [35], and can still be solved in the framework of the BGK model. However, if \(\mathbf {K}\) is a diagonal matrix or full matrix where the element \(\kappa _{ij}\) is a function of space, the MRT model rather than BGK model should be adopted. We would also like to point out that for the special case where \(\mathbf {K}\) is a diagonal matrix,

$$\begin{aligned} \mathbf {K}=\left( {\begin{array}{ll} \kappa _{xx} &{}\quad 0 \\ 0 &{}\quad \kappa _{yy} \end{array}} \right) , \end{aligned}$$
(32)

the relaxation matrix \(\mathbf {S}\) and the matrix \(\mathbf {A}\) are also diagonal matrices (\(s_{35}=s_{53}=0\)), then the tensor \(\tilde{\mathbf {B}}\) and the relation between the nonzero elements of \(\mathbf {K}\) and relaxation parameters can be written in simple forms,

$$\begin{aligned}&\tilde{\mathbf {B}}=\left( {\begin{array}{*{20}{l}} \lambda _{1} &{}\quad 0 \\ 0 &{}\quad \lambda _{2} \end{array}} \right) \mathbf {B}^{'}, \ \ \ \lambda _{1}=\frac{s_{3}-2}{\gamma s_{3}-2}, \lambda _{2}=\frac{s_{5}-2}{\gamma s_{5}-2}, \end{aligned}$$
(33a)
$$\begin{aligned}&\kappa _{xx}=d c_{s}^{2}\left( \frac{1}{s_{3}}-\frac{1}{2}\right) \delta t,\ \ \ \kappa _{yy}=d c_{s}^{2}\left( \frac{1}{s_{5}}-\frac{1}{2}\right) \delta t. \end{aligned}$$
(33b)

Remark II

Based on the choice of the parameter \(\gamma \), two special schemes of the present model can be obtained.

Scheme A

(\(\gamma =0\)): \(\tilde{\mathbf {B}}=(\mathbf {I}-\frac{1}{2}\mathbf {A})\mathbf {B}^{'}\). For this special case, a time derivative is included in second term of the right hand side of the evolution equation [see Eq. (2)], and thus we need to use the finite-difference method to compute the time derivative term \(\partial _{t}R_{k}(\mathbf {x}, t)\). Here for simplicity an explicit finite-difference scheme, i.e., \(\partial _{t}R_{k}(\mathbf {x}, t)=[R_{k}(\mathbf {x}, t)-R_{k}(\mathbf {x}, t-\delta t)]/\delta t\), is adopted. Although a little larger memory cost would be needed for this scheme, the collision process can still be conducted locally.

Scheme B

(\(\gamma =1\)): \(\tilde{\mathbf {B}}=\mathbf {B}^{'}\). Under the present choice of the parameter \(\gamma \), \(\bar{D}_{k}=D_{k}=\partial _{t} + \mathbf {c}_{k}\cdot \nabla \), both the time derivative and the space derivative are contained in the evolution equation. Although we can still use explicit finite-difference schemes to calculate time and the space derivatives \((\partial _{t}+\mathbf {c}_{k}\cdot \nabla )R_{k}\), which is similar to the approach used in Scheme A, the collision process cannot be performed locally. To solve the problem, an implicit finite-difference scheme can be applied to compute \(D_{k}R_{k}(\mathbf {x}, t)\),

$$\begin{aligned} D_{k}R_{k}(\mathbf {x}, t)=\frac{R_{k}(\mathbf {x}+\mathbf {c}_{k}\delta t, t+\delta t)-R_{k}(\mathbf {x}, t)}{\delta t}, \end{aligned}$$
(34)

which not only can result in that the collision process can be implemented locally, but also cause the implementation of present model to be explicit. Substituting Eq. (34) into the evolution equation, we can obtain

$$\begin{aligned} \phi _{k}(\mathbf {x}+\mathbf {c}_{k}\delta t, \;t + \delta t)-\phi _{k}(\mathbf {x},\;t )= & {} -(\mathbf {M}^{-1}\mathbf {S M})_{kj}[\phi _{j}(\mathbf {x},\;t) - \phi _{j}^{(eq)}(\mathbf {x},\;t)]\nonumber \\&+\, \frac{\delta t}{2}\left[ R_{k}(\mathbf {x}+\mathbf {c}_{k}\delta t, t+\delta t)+R_{k}(\mathbf {x}, t)\right] . \end{aligned}$$
(35)

To avoid the implicitness, a new variable is introduced [49],

$$\begin{aligned} \bar{\phi }_{k}=\phi _{k}-\delta t R_{k}/2, \end{aligned}$$
(36)

then one can rewrite evolution equation as

$$\begin{aligned} \bar{\phi }_{k}(\mathbf {x} + \mathbf {c}_{k}\delta t,\;t + \delta t)= & {} \bar{\phi }_{k}(\mathbf {x},\;t ) -(\mathbf {M}^{-1}\mathbf {S M})_{kj}[\bar{\phi }_{j}(\mathbf {x},\;t) - \phi _{j}^{(eq)}(\mathbf {x},\;t)]\nonumber \\&+\, \delta t\left[ \mathbf {M}^{-1}(\mathbf {I}-\frac{\mathbf {S}}{2})\mathbf {M}\right] _{kj}R_{j}(\mathbf {x}, t). \end{aligned}$$
(37)

which is the same as the evolution appeared in Ref. [22]. Based on the Eqs. (10a) and (36), the variable \(\phi \) in Scheme B can be calculated by

$$\begin{aligned} \phi =\sum \limits _k\phi _{k} = \sum \limits _k\bar{\phi }_{k}+\frac{\delta t}{2}R. \end{aligned}$$
(38)

Here it should be noted that if the source term R is a function of \(\phi \), usually one needs to use some other methods to solve the algebraic equation (38).

Remark III

We noted that there is still a limitation in the applications of above MRT model since it may be difficult or impossible to derive the function \(\mathbf {C}\) analytically [see Eq. (7)]. Following the idea presented in the work [17], however, one can solve the problem through adding a new source term \(G_{k}\) in the evolution equation, i.e.,

$$\begin{aligned} \phi _{k}(\mathbf {x} + \mathbf {c}_{k}\delta t,\;t + \delta t)= & {} \phi _{k}(\mathbf {x},\;t )-(\mathbf {M}^{-1}\mathbf {S M})_{kj}[\phi _{j}(\mathbf {x},\;t) - \phi _{j}^{(eq)}(\mathbf {x},\;t)] \nonumber \\&+\, \left( \delta t+\frac{\delta t^{2}}{2}\bar{D}_{k}\right) R_{k}(\mathbf {x},\;t )+\delta t G_{k}(\mathbf {x},\;t ), \end{aligned}$$
(39)

where \(G_{k}\) is defined as

$$\begin{aligned} G_{k}=\omega _{k}\frac{\mathbf {c}_{k}\cdot (\mathbf {I}-\frac{1}{2}\mathbf {A})\partial _{t}\mathbf {B}}{c_{s}^{2}}, \end{aligned}$$
(40)

and meanwhile, the equilibrium distribution function \(\phi _{k}^{(eq)}(\mathbf {x},\;t)\) can be simplified as

$$\begin{aligned} \phi _{k}^{(eq)}(\mathbf {x},\;t)=\omega _{k}\left[ \phi +\frac{\mathbf {c}_{k}\cdot \mathbf {B}}{c_{s}^{2}}+\frac{(d \mathbf {D}-\phi \mathbf {I}):(\mathbf {c}_{k}\mathbf {c}_{k}-c_{s}^{2}\mathbf {I})}{2c_{s}^{2}}\right] , \end{aligned}$$
(41)

which can be derived from Eq. (3) through setting \(\mathbf {C}=\mathbf {0}\). Through the Chapman–Enskog analysis, one can also find that Eq. (1) with a more general \(\mathbf {B}(\phi , \mathbf {x}, t)\) can be recovered correctly from Eq. (39). In addition, we would also like to point out that if \(\mathbf {D}=\phi \mathbf {I}\) and \(d=1\), the DnQ(2n) and DnQ\((2n+1)\) lattice models can also be used, and Eq. (11) can be simplified by

$$\begin{aligned} \sum _{k}\omega _{k}=1,\ \sum _{k}\omega _{k}\mathbf {c}_{k}=0, \ \sum _{k}\omega _{k}\mathbf {c}_{k\alpha }\mathbf {c}_{k\beta }=c_{s}^{2}\delta _{\alpha \beta }. \end{aligned}$$
(42)

Remark VI

Although there are many LB models for CDEs [1041, 51], most of them are limited to the linear CDEs with isotropic diffusion [1029, 35, 36, 51], and what is more, some of them cannot give correct CDE [10, 13, 20, 27, 28, 37, 51]. Actually in the past decade, some LB models for anisotropic CDEs have also been developed [27, 3034, 37, 41], but usually they can only be used to solve anisotropic CDEs where the convection term \(\mathbf {B}\) or diffusion term \(\mathbf {D}\) is a linear function of \(\phi \) [27, 3034]. We also note that the LB model proposed by Ginzburg [37] can be used to solve the CDEs with nonlinear convection and diffusion terms, but some additional assumptions have been adopted to recover the correct CDE, as stated previously. Recently, Shi and Guo proposed a new BGK model for NCDE [35], but the model is usually used to solve the isotropic NCDE, and cannot be directly applied to solve the NACDE. From above discussion, it is clear that the present MRT model can be viewed as a general LB model for the NACDE.

3 Numerical Results and Discussion

To test the accuracy and stability of present MRT model for NACDEs, some classic examples, including the isotropic CDE with a constant velocity, Burgers–Fisher equation, Buckley–Leverett equation, the isotropic CDE with nonlinear convection and diffusion terms, and anisotropic CDEs, will be considered in this section. In our simulations, the following global relative error (GRE) defined by Eq. (43) is used to test the accuracy of the present MRT model,

$$\begin{aligned} {\textit{GRE}}=\frac{\sum _\mathbf {x}|\phi _{a}(\mathbf {x}, t)-\phi _{n}(\mathbf {x}, t)|}{\sum _\mathbf {x}|\phi _{a}(\mathbf {x}, t)|}, \end{aligned}$$
(43)

where the subscripts a and n denote the analytical and numerical solutions. The distribution function \(\phi _{k}\) is initialized by its equilibrium distribution function \(\phi _{k}^{(eq)}\), i.e.,

$$\begin{aligned} \phi _{k}(\mathbf {x}, t = 0) = \phi _{k}^{(eq)}|_{t = 0}. \end{aligned}$$
(44)

Unless otherwise stated, the parameter d appeared in the equilibrium distribution function is set to be 1.0, the Scheme B is adopted since the computation of the time derivative in Scheme A can be avoided, and meanwhile, the non-equilibrium extrapolation scheme [50] is adopted since it can be used to treat different boundary conditions and also has a second-order convergence rate in space. In addition, it should be noted that, besides the relaxation parameters (\(s_{3}\), \(s_{35}\), \(s_{5}\) and \(s_{53}\)) related to diffusion tensor, the other relaxation parameters are simply taken as [22]

$$\begin{aligned} s_{0}=0,\ s_{1}=s_{2}=s_{4}=s_{6}=s_{7}=s_{8}=1.0. \end{aligned}$$
(45)

3.1 Isotropic Convection–Diffusion Equation with a Constant Velocity

We first consider a simple two-dimensional isotropic CDE with a constant velocity, which can be expressed as

$$\begin{aligned} \partial _{t}\phi +u_{x}\partial _{x}\phi +u_{y}\partial _{y}\phi =\kappa (\partial _{xx}\phi +\partial _{yy}\phi )+R, \end{aligned}$$
(46)

where \(u_{x}\) and \(u_{y}\) are constants, and are set to be 0.1, \(\kappa \) is the diffusion coefficient. R is the source term, and is given by

$$\begin{aligned} R=\exp [(1-2\pi ^{2}\kappa )t]\{\sin [\pi (x+y)]+\pi (u_{x}+u_{y})\cos [\pi (x+y)]\}. \end{aligned}$$
(47)

Under the periodic boundary conditions adopted on the domain \([0, 2]\times [0, 2]\) and the following initial condition,

$$\begin{aligned} \phi (x, y, t=0)=\sin [\pi (x+y)], \end{aligned}$$
(48)

we can derive the analytical solution of the problem,

$$\begin{aligned} \phi (x, y, t)=\exp [(1-2\pi ^{2}\kappa )t]\sin [\pi (x+y)]. \end{aligned}$$
(49)

When the present MRT model is used to study this problem, the function \(\mathbf {B}\), \(\mathbf {C}\), \(\mathbf {D}\) and the diffusion tensor \(\mathbf {K}\) should be given by \(\mathbf {B}=\phi \mathbf {u}\) with \(\mathbf {u}=(u_{x}, u_{y})^{\top }\), \(\mathbf {C}=\phi \mathbf {u}\mathbf {u}\), \(\mathbf {D}=\phi \mathbf {I}\) and \(\mathbf {K}=\kappa \mathbf {I}\).

Fig. 1
figure 1

Profiles of scalar variable \(\phi \) at different time and Péclet numbers (a \({Pe}=100\), b \(Pe=1000\); solid lines analytical solutions, symbols numerical results)

Fig. 2
figure 2

Profiles of the scalar variable \(\phi \) at different time and different Péclet numbers (a \(Pe=10^{7}\), b \(Pe=10^{9}\); solid lines analytical solutions, symbols numerical results)

We now performed some simulations under different time and different Péclet numbers (\(Pe=Lu_{x}/\kappa \), \(L=2.0\) is characteristic length, \(u_{x}=u_{y}=0.1\) is characteristic velocity), and presented the results in Fig. 1 where \(c=1.0\), the lattice size is \(201\times 201\), \(\kappa \) or relaxation parameters \(s_{3}\) and \(s_{5}\) can be determined by the specified Pe. As seen from the figure, the numerical results are in good agreement with analytical solutions. We also measured the deviation between the numerical results and analytical solutions, and found that the values of GRE at time \(T=3.0\) are \(3.265\times 10^{-4}\) for \(Pe=100\) and \(1.709\times 10^{-4}\) for \(Pe=1000\). In addition, to test capacity of present MRT model for the problem with a large Pe, we also conducted some simulations, and presented the results of \(Pe=10^{7}\) and \(10^{9}\) in Fig. 2. From this figure, one can clearly observe that the numerical results are still very close to the analytical solutions. To quantitatively measure the deviation between the analytical solutions and numerical results, we also calculated GREs at time \(T=3.0\), and found that they are less than \(2.0\times 10^{-4}\), which indicates that the present MRT model is also accurate even for the case with a much larger \(Pe=10^{9}\).

Finally, this problem is also applied to test the convergence rate of the present model since the boundary effect can be eliminated by the periodic boundary conditions adopted. To this end, we conducted a number of simulations with the same parameters (Pe, \(\kappa \) and all relaxation parameters) used for the results in Fig. 1, and computed the GREs under different lattice resolutions. As shown in Fig. 3 where numerical simulations are suspended at time \(T=3.0\), and the lattice spacing is varied from L / 500 to L / 100 with a fixed \(\delta x^{2}/\delta t=1.0\times 10^{-2}\), it is clear that present MRT model has a second-order convergence rate in space.

Fig. 3
figure 3

The global relative errors at different lattice sizes (\(\delta x=L/500\), L / 400, L / 300, L / 200 and L / 100), the slope of the inserted line is 2.0, which indicates the present MRT model has a second-order convergence rate in space

3.2 The Two-Dimensional Burgers–Fisher Equation

The two-dimensional Burgers–Fisher equation, as a special case of the NACDEs, can be written as [35, 52]

$$\begin{aligned} \partial _{t}\phi +a\phi ^{\delta }\partial _{x}\phi =\kappa (\partial _{xx}\phi +\partial _{yy}\phi )+R, \end{aligned}$$
(50)

where \(R=b\phi (1-\phi ^{\delta })\) is the source term, \(\delta \), a, b and diffusion coefficient \(\kappa \) are constants. Compared to the first problem considered above, the present problem is more complicated since it is nonperiodic and nonlinear, but we can still obtain its analytical solution under the proper initial and boundary conditions,

$$\begin{aligned} \phi (x, y, t)=\left\{ \frac{1}{2}+\frac{1}{2}\tanh [A(x+y-\omega t)]\right\} ^{\frac{1}{\delta }}, \end{aligned}$$
(51)

where A and \(\omega \) are two parameters, and are defined by

$$\begin{aligned} A=-\frac{a\delta }{4\kappa (\delta +1)}, \ \ \omega =\frac{a^{2}+2b\kappa (\delta +1)}{a(\delta +1)}. \end{aligned}$$
(52)

Compared with the NACDE defined by Eq. (1), the function \(\mathbf {B}(\phi )\) should be given by

$$\begin{aligned} \mathbf {B}(\phi )=\phi ^{\delta +1}\left( \frac{a}{\delta +1}, 0\right) ^{\top }. \end{aligned}$$
(53)

Based on Eq. (7), one can further derive the tensor \(\mathbf {C}\) in Eq. (3),

$$\begin{aligned} \mathbf {C}=\left( {\begin{array}{*{20}{l}} \frac{a^{2}}{2\delta +1}\phi ^{2\delta +1} &{}\quad 0 \\ 0 &{}\quad 0 \\ \end{array}} \right) . \end{aligned}$$
(54)

The diffusion tensor \(\mathbf {K}\) and tensor \(\mathbf {D}\) can be simply determined as

$$\begin{aligned} \mathbf {K}=\kappa \mathbf {I},\ \ \mathbf {D}=\phi \mathbf {I}. \end{aligned}$$
(55)

We now consider how to use present MRT model to solve the Burgers–Fisher equation. If the Scheme B is adopted to solve Eq. (50), one needs to use some other methods to solve nonlinear equation (36) since the source term R is a nonlinear function of \(\phi \). To avoid such process, the Scheme A is applied to solve the Burgers–Fisher equation with \(a=4.0\), \(b=1.0\), \(\delta =1.5\) and a computational domain \([-1, 2]\times [-1, 2]\). We first performed some simulations at \(Pe=100\) and 1000, and presented numerical results and corresponding analytical solutions under different time and different modified Péclet numbers (\(Pe=La/\kappa \) with \(L=3.0\) being the characteristic length) in Fig. 4 where \(c=1.0\), the lattice size is \(301\times 301\), and \(\kappa \) or relaxation parameters \(s_{3}\) and \(s_{5}\) can be obtained from the specified Pe. As seen from the figure, the numerical results agree well with corresponding analytical solutions, and the values of GRE at time \(T=1.0\) are about \(5.044\times 10^{-4}\) for \(Pe=100\) and \(9.830\times 10^{-4}\) for \(Pe=1000\).

Fig. 4
figure 4

Profiles of the scalar variable \(\phi \) at different time and modified Péclet numbers (a \(Pe=100\), b \(Pe=1000\); solid lines analytical solutions, symbols numerical results)

We note that this problem is nonperiodic and the boundary effect cannot be excluded, thus it can be used to test the convergence rate of the MRT model coupling with the non-equilibrium extrapolation scheme. To this end, we also carried out some simulations with different lattice resolutions (the lattice spacing is changed from L / 900 to L / 300 with a constant \(\delta x^{2}/\delta t=1.0\times 10^{-2}\)), and presented the GREs in Fig. 5 where the simulations are suspended at time \(T=1.0\). As shown in this figure, the present MRT model coupling with non-equilibrium extrapolation scheme also has a second-order convergence rate in space.

Fig. 5
figure 5

The global relative errors at different lattice sizes (\(\delta x=L/900\), L / 750, L / 600, L / 450 and L / 300), the slope of the inserted line is 2.0, indicating that the present MRT model has a second-order convergence rate in space

3.3 The Two-Dimensional Buckley–Leverett Equation

We also consider the two-dimensional Buckley–Leverett equation [36, 53, 54]

$$\begin{aligned} \partial _{t}\phi +\partial _{x}f(\phi )+\partial _{y}g(\phi )=\kappa (\partial _{xx}\phi +\partial _{yy}\phi ), \end{aligned}$$
(56)

with the following initial condition,

$$\begin{aligned} \phi (x, y, 0)=\left\{ \begin{array}{ll} 1, &{}\quad x^2+y^2<0.5, \\ 0, &{}\quad x^2+y^2\ge 0.5, \end{array}\right. \end{aligned}$$
(57)

where \(\kappa \) is the diffusion coefficient. \(f(\phi )\) and \(g(\phi )\) are a function of \(\phi \), and are defined as

$$\begin{aligned} f(\phi )=\frac{\phi ^{2}}{\phi ^{2}+(1-\phi )^2},\ \ \ g(\phi )=f(\phi )[1-5(1-\phi )^2]. \end{aligned}$$
(58)

We note that, similar to the Burgers–Fisher equation considered previously, the Buckley–Leverett equation is also a special NACDE, but there is no analytical solution to this problem.

When the present MRT model is used to solve the problem, the evolution equation [Eq. (2)] can be written more simply since there is no source term included in the the Buckley–Leverett equation,

$$\begin{aligned} \phi _{k}(\mathbf {x} + \mathbf {c}_{k}\delta t,\;t + \delta t) = \phi _{k}(\mathbf {x},\;t )-(\mathbf {M}^{-1}\mathbf {S M})_{kj}[\phi _{j}(\mathbf {x},\;t) - \phi _{j}^{(eq)}(\mathbf {x},\;t)], \end{aligned}$$
(59)

then from Eqs. (1) and (7), one can further determine the functions \(\mathbf {B}\), \(\mathbf {C}\), \(\mathbf {D}\) and diffusion tensor \(\mathbf {K}\),

$$\begin{aligned} \mathbf {B}=[f(\phi ), g(\phi )]^{\top },\ \ \mathbf {C}=\left( {\begin{array}{*{20}{l}} C_{xx} &{}\quad C_{xy} \\ C_{yx} &{}\quad C_{yy} \\ \end{array}} \right) , \ \ \mathbf {D}=\phi \mathbf {I},\ \ \mathbf {K}=\kappa \mathbf {I}, \end{aligned}$$
(60)

where the elements of the matrix \(\mathbf {C}\) are given as

$$\begin{aligned} C_{xx}= & {} \frac{1}{2}\arctan (2\phi -1)+\frac{1}{6A^3}\left( 2-A+3A^2)(\phi -\frac{1}{2}\right) , \end{aligned}$$
(61a)
$$\begin{aligned} C_{xy}= & {} C_{yx} =\frac{1}{2}\arctan (2\phi -1)+\frac{5}{4}\ln (\frac{A}{2})\nonumber \\&+\,\frac{1}{2A}(2+\phi )+\frac{1}{12A^2}(\frac{17-4\phi }{2}+\frac{-7+4\phi }{A}), \end{aligned}$$
(61b)
$$\begin{aligned} C_{yy}= & {} -\frac{17}{8}\arctan (2\phi -1)+\frac{5}{2}\ln (\frac{A}{2})+25\phi \left[ \frac{1}{4}-\frac{\phi }{2}+\frac{\phi ^2}{3}\right] \nonumber \\&+\, \frac{1}{16A}(-89+258\phi )+\frac{1}{16A^2}(13+14\phi )+\frac{1}{24A^3}(1-42\phi ). \end{aligned}$$
(61c)
Fig. 6
figure 6

Contours (a) and distribution (b) of the scalar variable \(\phi \) at the time \(T=0.5\) and \(Pe=30\)

In our simulations, the computational domain of the problem and the lattice size are set to be \([-1.5, 1.5]\times [-1.5, 1.5]\) and \(301\times 301\). We performed simulations at two different diffusion coefficients (\(\kappa =0.1\) and 0.01) or equivalently two different Péclet numbers (\(Pe=LU/\kappa =30\) and 300, \(L=3.0\) is the characteristic length, \(U=1.0\) is the characteristic velocity), and presented the results at time \(T=0.5\) in Figs. 6 and 7 where \(c=10\). As expected, when the Pe is smaller or the diffusion coefficient is larger, the role of the diffusion becomes dominant, and thus the distribution of scalar variable \(\phi \) is more smooth (see Fig. 6a). Besides, to show more details on the distributions of scalar variable \(\phi \) at different time, we also conducted some simulations, and presented the results of \(\phi \) along the vertical centreline in Fig. 8. As seen from the figure, with the increase of time, the distribution of the scalar variable with a small Pe becomes more smooth.

Fig. 7
figure 7

Contours (a) and distribution (b) of the scalar variable \(\phi \) at the time \(T=0.5\) and \(Pe=300\), c, d are the results reported in Ref. [54]

Fig. 8
figure 8

Profiles of the scalar variable \(\phi \) at different time and Péclet numbers (a \(Pe=30\), b \(Pe=300\))

We note that although the problem has no analytical solution, the present results (see Fig. 7a, b where \(\kappa =0.01\)) agree well with those reported in some previous studies [36, 53, 54], which can also be used to conclude that the present MRT model is also accurate in solving the Buckley–Leverett equation.

3.4 Anisotropic Convection–Diffusion Equation with Constant Velocity and Diffusion Tensor

We now consider the problem of the Gaussian hill with constant velocity and diffusion tensor, which is also a classic benchmark example and has also been used to validate LB models for anisotropic CDEs [29, 31, 34, 37]. The CDE for this problem can be written as

$$\begin{aligned} \partial _{t}\phi +\nabla \cdot (\phi \mathbf {u})=\nabla \cdot (\mathbf {K}\cdot \nabla \phi ), \end{aligned}$$
(62)

where \(\mathbf {u}=(u_{x}, u_{y})^{\top }\) is a constant velocity, \(\mathbf {K}\) is the constant diffusion tensor, and can be defined as

$$\begin{aligned} \mathbf {K}=\left( {\begin{array}{*{20}{l}} \kappa _{xx} &{}\quad \kappa _{xy} \\ \kappa _{yx} &{}\quad \kappa _{yy} \\ \end{array}} \right) . \end{aligned}$$
(63)

Under the proper initial and boundary conditions, one can also derive the analytical solution of the problem,

$$\begin{aligned} \phi (x, y, t)=\frac{\phi _{0}}{2\pi |\det (\sigma )|^{1/2}}\exp \left\{ -\frac{\sigma ^{-1}:[(\mathbf {x}-\mathbf {u}t)(\mathbf {x}-\mathbf {u}t)]}{2}\right\} , \end{aligned}$$
(64)

where \(\mathbf {x}=(x, y)^{\top }\), \(\sigma =\sigma _{0}^{2}\mathbf {I}+2\mathbf {K}t\), \(\sigma ^{-1}\) is inverse matrix of \(\sigma \), \(|\det (\sigma )|\) is the absolute value of the determinant of \(\sigma \).

Actually, there are two approaches that can be adopted to study the Gaussian hill problem. The first is that we directly use the MRT model to solve Eq. (62) with an anisotropic form, and set the functions \(\mathbf {B}\), \(\mathbf {C}\), and \(\mathbf {D}\) as

$$\begin{aligned} \mathbf {B}=(\phi u_{x}, \phi u_{y})^{\top },\ \ \mathbf {C}=\left( {\begin{array}{*{20}{l}} \phi u_{x}^{2} &{}\quad \phi u_{x}u_{y} \\ \phi u_{x}u_{y} &{}\quad \phi u_{y}^{2} \\ \end{array}} \right) , \ \ \mathbf {D}=\phi \mathbf {I}. \end{aligned}$$
(65)

While in the second approach, we first need to write Eq. (62) in an isotropic form,

$$\begin{aligned} \partial _{t}\phi +\nabla \cdot (\phi \mathbf {u})=\nabla \cdot [\kappa (\nabla \cdot \mathbf {D})]. \end{aligned}$$
(66)

which is then solved by the MRT model. In addition, it should be noted that Eq. (66) can also be solved by the previous BGK model [35]. Based on Eq. (66), one can also find that the functions \(\mathbf {B}\) and \(\mathbf {C}\) should be the same as those appeared in Eq. (79), but the tensor \(\mathbf {D}\) should be given by \(\mathbf {D}=\mathbf {K}\phi /\kappa \) with \(\kappa \) being a positive constant.

Similar to some previous works [31, 34], we also considered the Gaussian hill problem in a bounded domain \([-1, 1]\times [-1, 1]\), and adopted the periodic boundary condition on all boundaries. In our simulations, \(\sigma _{0}=0.01\) which is small enough to ensure that the periodic boundary condition adopted is reasonable and accurate at a finite time T, \(\phi _{0}=2\pi \sigma _{0}^{2}\), \(u_{x}=u_{y}=0.01\), and the lattice size is \(401\times 401\). To test the capacity of the present MRT model in solving the anisotropic CDEs, the following three types of diffusion tensor are considered,

$$\begin{aligned} \mathbf {K}=\left[ \left( {\begin{array}{*{20}{l}} 1 &{}\quad 0 \\ 0 &{}\quad 1 \\ \end{array}} \right) ,\ \ \left( {\begin{array}{*{20}{l}} 1 &{}\quad 0 \\ 0 &{}\quad 2 \\ \end{array}} \right) , \ \ \left( {\begin{array}{*{20}{l}} 1 &{}\quad 1 \\ 1 &{}\quad 2 \\ \end{array}} \right) \right] \times 10^{-3}, \end{aligned}$$
(67)

which are usually denoted as isotropic, diagonally anisotropic and fully anisotropic diffusion problems.

We conducted some simulations by using above two approaches, and presented numerical results at the time \(T=10\) in Figs. 9, 10 and 11 where \(c=1.0\) and \(\kappa =10^{-3}\) is used in the second approach. As seen from these figures, the numerical results qualitatively agree with analytical solutions. To quantitatively measure the deviations between numerical results and analytical solutions, the GREs of isotropic, diagonally anisotropic and fully anisotropic diffusion problems are computed, and the values of them are \(1.199\times 10^{-4}\), \(3.853\times 10^{-4}\) and \(6.531\times 10^{-4}\) for the first approach, while they are \(1.199\times 10^{-4}\), \(2.118\times 10^{-4}\) and \(4.572\times 10^{-4}\) for the second approach, which illustrate that the present MRT model is accurate in studying these problems. Besides, the convergence rate of the MRT model for anisotropic CDEs is also investigated, and the results are shown in Fig. 12 where the lattice size is varied from \(201\times 201\) to \(801\times 801\) with \(\delta x^{2}/\delta t=5.0\times 10^{-3}\). From this figure, one can find that, similar to some available MRT models for anisotropic diffusion problems [31, 34], the present MRT model also has a second-order convergence rate in space.

Fig. 9
figure 9

Distributions of the scalar variable \(\phi \) at the time \(T=10\) [isotropic diffusion problem: numerical solution (a), analytical solution (b)]

Fig. 10
figure 10

Distributions of the scalar variable \(\phi \) at the time \(T=10\) [diagonally anisotropic diffusion problem: first approach (a), second approach (b), analytical solution (c)]

Fig. 11
figure 11

Distributions of the scalar variable \(\phi \) at the time \(T=10\) [fully anisotropic diffusion problem: first approach (a), second approach (b), analytical solution (c)]

Fig. 12
figure 12

The global relative errors at different lattice sizes (\(\delta x=L/800\), L / 600, L / 500, L / 400, L / 300 and L / 200, \(L=2.0\) is the characteristic length), the slope of the inserted line is 2.0, which indicates that the present MRT model has a second-order convergence rate in space

3.5 Anisotropic Convection–Diffusion Equation with Constant Velocity and Variable Diffusion Tensor

In this part, we will consider the following anisotropic CDE with a constant velocity \(\mathbf {u}=(u_{x}, u_{y})^{\top }\) and a variable diffusion tensor \(\mathbf {K}\),

$$\begin{aligned} \partial _{t}\phi +\nabla \cdot (\phi \mathbf {u})=\nabla \cdot (\mathbf {K}\cdot \nabla \phi )+R. \end{aligned}$$
(68)

where R is the source term. We note that the problem is more complicated since the diffusion tensor \(\mathbf {K}\) can be a function of space \(\mathbf {x}\) and scalar variable \(\phi \). For this reason, it is difficult or impossible to write Eq. (68) in an isotropic form, and thus the problem could not be solved directly by the previous BGK model [35].

In this example, the diffusion tensor \(\mathbf {K}\) is simply given by a diagonal matrix,

$$\begin{aligned} \mathbf {K}=\kappa \left( {\begin{array}{*{20}{l}} 2-\sin (2\pi x)\sin (2\pi y) &{}\quad 0 \\ 0 &{}\quad 1 \\ \end{array}} \right) , \end{aligned}$$
(69)

where \(\kappa \) is a constant, and is fixed to be \(1.0\times 10^{-3}\). The source term R is defined as

$$\begin{aligned} R= & {} \exp [(1-12\pi ^{2}\kappa )t]\{\sin (2\pi x)\sin (2\pi y)+4\kappa \pi ^{2}\cos (4\pi x)\sin ^{2}(2\pi y)\nonumber \\&+\, 2\pi [u_{x}\cos (2\pi x)\sin (2\pi y)+u_{y}\sin (2\pi x)\cos (2\pi y)]\}. \end{aligned}$$
(70)

Under the periodic boundary conditions on the physical region \([0, 1]\times [0, 1]\) and the following initial condition,

$$\begin{aligned} \phi (x, y, t=0)=\sin (2\pi x)\sin (2\pi y), \end{aligned}$$
(71)

one can derive the exact solution of the problem,

$$\begin{aligned} \phi (x, y, t)=\exp [(1-12\pi ^{2}\kappa )t]\sin (2\pi x)\sin (2\pi y). \end{aligned}$$
(72)

Based on Eq. (68), one can determine the functions \(\mathbf {B}\), \(\mathbf {C}\) and \(\mathbf {D}\), which are the same as those appeared in Eq. (79). We now performed some simulations with a fixed lattice size \(401\times 401\), and presented the results at the time \(T=3.0\) and different Péclet numbers (\(Pe=Lu_{x}/\kappa \), \(L=1.0\) is the characteristic length, \(u_{x}=u_{y}=0.1\) is the characteristic velocity) in Figs. 13 and 14 where \(c=1.0\), \(Pe=100\) and 1000. As seen from these figures, the numerical results are very close to the analytical solutions. To quantitatively measure the deviations between numerical results and corresponding analytical solutions, we also computed the GREs of these two cases, and found that the values of them are \(6.207\times 10^{-4}\) and \(9.831\times 10^{-5}\), which are small enough and can be used to demonstrate that the present MRT model is accurate in the study of the anisotropic CDE with a variable diffusion tensor.

Fig. 13
figure 13

Distributions of the scalar variable \(\phi \) at the time \(T=3\) and \(Pe=100\) (a numerical solution, b analytical solution)

Fig. 14
figure 14

Distributions of the scalar variable \(\phi \) at the time \(T=3\) and \(Pe=1000\) (a numerical solution, b analytical solution)

To show the convergence rate of the present MRT for such complicated problem, we also carried out a number of simulations under different lattice resolutions, and presented the results in Fig. 15 where the lattice size is varied from \(201\times 201\) to \(801\times 801\) with \(\delta x^{2}/\delta t=2.5\times 10^{-4}\). As shown in this figure, the present MRT model also has a second-order convergence rate for this special problem.

Fig. 15
figure 15

The global relative errors at different lattice sizes (\(\delta x=L/800\), L / 600, L / 500, L / 400, L / 300 and L / 200), the slope of the inserted line is 2.0, indicating that the present MRT model has a second-order convergence rate in space

3.6 Convection–diffusion Equation with Nonlinear Convection and Diffusion Terms

We would like to point out that all of above nonlinear CDEs are only limited to the cases with a nonlinear convection term. In this part, we will consider a more general NACDE with nonlinear convection and diffusion terms, which can be given by the following equation,

$$\begin{aligned} \partial _{t}\phi +\nabla \cdot (\phi ^{m}\mathbf {u})=\nabla \cdot [\kappa (\nabla \cdot \mathbf {D}(\phi ))]+R, \end{aligned}$$
(73)

where m is a constant, \(\kappa \) is the diffusion coefficient. \(\mathbf {D}(\phi )\) is and nonlinear diffusion term, and is given by

$$\begin{aligned} \mathbf {D}(\phi )=\left( {\begin{array}{*{20}{l}} \phi ^{n_{x}} &{}\quad 0 \\ 0 &{}\quad \phi ^{n_{y}} \\ \end{array}} \right) , \end{aligned}$$
(74)

where \(n_{x}\) and \(n_{y}\) are two constants. R is the source term, and is defined by

$$\begin{aligned} R= & {} \exp {(-At)}\{A\cos (2\pi x)\cos (2\pi y)\nonumber \\&+\, 4n_{x}\pi ^{2}\kappa \phi ^{n_{x}-2}[(n_{x}-1)\exp (-At)\sin ^{2}(2\pi x)\cos ^{2}(2\pi y)+\phi \cos (2\pi x)\cos (2\pi y)]\nonumber \\&+\, 4n_{y}\pi ^{2}\kappa \phi ^{n_{y}-2}[(n_{y}-1)\exp (-At)\sin ^{2}(2\pi y)\cos ^{2}(2\pi x)+\phi \cos (2\pi x)\cos (2\pi y)]\nonumber \\&+\, 2\pi m\phi ^{m-1}[u_{x}\sin (2\pi x)\cos (2\pi y)+u_{y}\cos (2\pi x)\sin (2\pi y)]\}. \end{aligned}$$
(75)

Actually, Eq. (73) can be rewritten as

$$\begin{aligned} \partial _{t}\phi +\nabla \cdot (\phi ^{m}\mathbf {u})=\nabla \cdot [\mathbf {K}\cdot (\nabla \phi )]+R, \end{aligned}$$
(76)

where \(\mathbf {K}\) is the diffusion tensor,

$$\begin{aligned} \mathbf {K}=\kappa \left( {\begin{array}{*{20}{l}} n_{x}\phi ^{n_{x}-1} &{}\quad 0 \\ 0 &{}\quad n_{y}\phi ^{n_{y}-1} \\ \end{array}} \right) . \end{aligned}$$
(77)

Under the proper initial and periodic conditions, we can derive the exact solution of this problem,

$$\begin{aligned} \phi (x, y, t)=\alpha -\exp {(-At)}\cos (2\pi x)\cos (2\pi y). \end{aligned}$$
(78)

Where \(\alpha \) is a constant. When the present MRT model is applied to solve equation (76), the functions \(\mathbf {B}\), \(\mathbf {C}\) and \(\mathbf {D}\) can be determined by

$$\begin{aligned} \mathbf {B}=(\phi ^{m} u_{x}, \phi ^{m} u_{y})^{\top },\ \ \mathbf {C}=\frac{m^{2}\phi ^{2m-1}}{2m-1}\left( {\begin{array}{*{20}{l}} u_{x}^{2} &{}\quad u_{x}u_{y} \\ u_{x}u_{y} &{}\quad u_{y}^{2} \\ \end{array}} \right) , \ \ \mathbf {D}=\phi \mathbf {I}. \end{aligned}$$
(79)

We carried out several simulations with a fixed lattice size \(401\times 401\), and presented the results at time \(T=3.0\) and different Péclet numbers (\(Pe=Lu_{x}/\kappa \), \(L=1.0\) is the characteristic length, \(u_{x}=u_{y}=0.1\) is the characteristic velocity) in Figs. 16 and 17 where \(\alpha =1.1\), \(A=1.0\), \(m=2.0\), \(n_{x}=2.0\), \(n_{y}=3.0\), \(c=1.0\), \(Pe=100\) and 1000. From these figures, one can observe that the numerical results agree with exact solutions, and the GREs are about \(2.865\times 10^{-3}\) and \(7.162\times 10^{-4}\).

Fig. 16
figure 16

Distributions of the scalar variable \(\phi \) at the time \(T=3\) and \(Pe=100\) (a numerical solution, b analytical solution)

Fig. 17
figure 17

Distributions of the scalar variable \(\phi \) at the time \(T=3\) and \(Pe=1000\) (a numerical solution, b analytical solution)

Then the convergence rate of the MRT model for this problem is also considered, and the GREs under different lattice spacings are shown in Fig. 18 where \(\delta x^{2}/\delta t\) is fixed to be \(2.5\times 10^{-4}\). As seen from this figure, the present MRT model also has a second-order convergence rate for this nonlinear CDE.

Fig. 18
figure 18

The global relative errors at different lattice sizes (\(\delta x=L/800\), L / 600, L / 500, L / 400, L / 300 and L / 200), the slope of the inserted line is 2.0, which indicates that the present MRT model has a second-order convergence rate in space

3.7 A Comparison Between the MRT Model and BGK Model

As reported in some available works [2, 22, 29, 31, 34], through tuning the relaxation parameters properly, the MRT model could be more accurate and more stable than the BGK model. To show the superiority of the MRT model over the BGK model, a comparison between two models is also conducted.

We first performed a comparison of accuracy between the BGK model and MRT model through adopting a simple problem defined in a physical region \([0, L]\times [0, L]\), which can be described by the following CDE and boundary conditions,

$$\begin{aligned}&\partial _{t}\phi +\nabla \cdot (\phi \mathbf {u})=\nabla \cdot (\kappa \nabla \phi )+R, \end{aligned}$$
(80a)
$$\begin{aligned}&\phi (t, x, 0)=\phi _{0}, \phi (t, x, L)=\phi _{L}, \end{aligned}$$
(80b)

where \(\kappa \) is a constant diffusion coefficient, \(\mathbf {u}=(u_{x}, u_{y})^{\top }\) is a constant velocity with \(u_{y}=0\), \(\phi _{0}\) and \(\phi _{L}\) are two constants, \(R=2\kappa \varDelta \phi /L^{2}\) is the source term with \(\varDelta \phi =\phi _{L}-\phi _{0}\). Under an assumption that the problem is steady and unidirectional, i.e., \(\phi \) is only a function of y, we can derive analytical solution of the problem,

$$\begin{aligned} \phi (y)=\phi _{0}+\varDelta \phi \frac{y}{L}\left( 2-\frac{y}{L}\right) . \end{aligned}$$
(81)

The reason for choosing this problem is that, following a similar procedure reported in Ref. [55], one can readily derive the analytical solutions of the BGK model and MRT model (Scheme B with \(s_{1}=s_{2}=s_{4}=s_{6}=s_{7}=s_{8}\)) with adopting the anti-bounce back boundary condition [22, 26, 38, 51],

$$\begin{aligned} \phi _{j}=\phi _{0}-\varDelta \phi \bar{y}_{j}(2.0-\bar{y}_{j})+\phi _{s}, \end{aligned}$$
(82)

where \(\bar{y}_{j}=(j-1/2)/N\) with N representing the grid number used in y direction, \(\phi _{s}\) is numerical slip caused by the model adopted, and can be given by

$$\begin{aligned} \phi _{s, BGK}= & {} \frac{\varDelta \phi }{12N^{2}}\left[ 4(\frac{2}{s_{BGK}}-1)^{2}-3\right] , \end{aligned}$$
(83a)
$$\begin{aligned} \phi _{s, MRT}= & {} \frac{\varDelta \phi }{12N^{2}s_{1}s_{3}}\left[ s_{1}s_{3}-8(s_{1}+s_{3})+16\right] . \end{aligned}$$
(83b)

Based on Eq. (83a), one can find that although the BGK model has a second-order convergence rate for this simple problem, the numerical slip of the scalar variable \(\phi \) cannot be eliminated unless \(s_{BGK}=4(2-\sqrt{3})\). While for the MRT model, we can make the solution of MRT model [Eq. (83b)] consistent with that of the physical problem [Eq. (81)] through setting \(\phi _{s}\) to be zero, which means that the relaxation parameters \(s_{1}\) and \(s_{3}\) should satisfy the following relation,

$$\begin{aligned} s_{1}=\frac{8(s_{3}-2)}{s_{3}-8}. \end{aligned}$$
(84)

We noted that above relation is not only consistent with the result of the MRT or TRT model coupling with halfway bounce-back for Poiseuille flow [39, 56], but also can be viewed as the limiting result of the TRT model for anisotropic CDEs [39].

From above analysis, it is clear that the MRT model can be more accurate than the BGK model through tuning the free relaxation parameter \(s_{1}\). In addition, similar to the procedure used in above examples, the functions \(\mathbf {B}\), \(\mathbf {C}\) and \(\mathbf {D}\), the diffusion tensor \(\mathbf {K}\), and the source term \(R_{i}\) used in our model can also be determined,

$$\begin{aligned} \mathbf {B}=\phi \mathbf {u},\ \ \mathbf {C}=\phi \mathbf {u}\mathbf {u}, \ \ \mathbf {D}=\phi \mathbf {I},\ \ \mathbf {K}=\kappa \mathbf {I},\ \ R_{i}=\omega _{i}\left( 1+\frac{\mathbf {c}_{i}\cdot \mathbf {u}}{c_{s}^{2}}\right) R. \end{aligned}$$
(85)

To validate above analysis and confirm our statement, we also performed some simulations with different lattice resolutions and relaxation parameters (\(s_{3}\)), and presented the results in Fig. 19 where \(L=1.0\), \(u_{x}=0.1\), \(\phi _{0}=0\), \(\phi _{L}=1.0\), and the diffusion coefficient \(\kappa \) is set to be 0.1. As seen from Fig. 19, the numerical results obtained by the MRT model are in good agreement with the analytical solution (Eq. 81) even with a coarse grid (e.g., \(N=4\)), while the results given by the BGK model deviate from the analytical solution unless the relaxation parameter \(s_{BGK}\) is fixed to be \(s_{3}=4(2-\sqrt{3})\), which is consistent with above analysis.

Fig. 19
figure 19

Comparisons between the BGK model and MRT model under different lattice sizes and relaxation parameters (a \(s_{3}=0.1\), b \(s_{3}=0.6\), c \(s_{3}=4(2-\sqrt{3})\), d \(s_{3}=1.9\))

Fig. 20
figure 20

A comparison between the BGK model and MRT model for fully anisotropic diffusion problem (\(\kappa =10^{-3}\)) (a BGK model, b MRT model, c analytical solution]

Fig. 21
figure 21

A comparison between the numerical result of MRT model and analytical solution of fully anisotropic diffusion problem (\(\kappa =10^{-4}\)) (a MRT model, b analytical solution)

Then we would also like to point out that there are some available works on the stability of LB models for CDEs [28, 29, 40], and it may be a tremendous work for us to perform such a stability analysis on present MRT model for NACDEs. For simplicity, here we only conducted a simple comparison of stability between the BGK model and MRT model through using the Gaussian hill problem, which has been investigated previously. We take the fully anisotropic diffusion problem as an example, and the second approach presented in Sect. 3.4 [the anisotropic CDE is written in an isotropic form, see Eq. (66)] is adopted. In the following simulations, the diffusion tensor \(\mathbf {K}\) is taken as

$$\begin{aligned} \mathbf {K}=\kappa \left( {\begin{array}{*{20}{l}} 1 &{}\quad 1 \\ 1 &{}\quad 2 \\ \end{array}} \right) , \end{aligned}$$
(86)

from which one can further determine the function \(\mathbf {D}=\mathbf {K}\phi /\kappa \) in the second approach [see Eq. (79)]. \(\kappa \) is a constant, and is varied to test the stability of the BGK model and MRT model. The lattice speed c is equal to 1.0, the velocity \(\mathbf {u}\) is fixed to be \(\mathbf {u}=(0.1, 0.1)^{\top }\). For the relaxation parameters appeared in the MRT model, \(s_{3}\) and \(s_{5}\) can be determined from \(\kappa \), and the others are fixed through the following equation,

$$\begin{aligned} s_{0}=0,\ s_{1}=s_{2}=s_{4}=s_{6}=s_{7}=s_{8}=s, \end{aligned}$$
(87)

where s can be varied in a proper range to ensure that the MRT model is stable, but for simplicity, only a special case \(s=0.6\) is considered. The other parameters used in simulations are the same as those appeared in Sect. 3.4 except for time \(T=5.0\).

We first conducted simulations with \(\kappa =10^{-3}\), and presented the results in Fig. 20. As shown in this figure, both numerical results obtained by the BGK model and MRT model are close to the analytical solution. However, when \(\kappa \) is decreased to \(10^{-4}\), the BGK model is unstable, while the MRT model can give a stable solution (see Fig. 21), and the GRE is about \(4.438\times 10^{-2}\). From above discussion, it is clear that, through tuning the relaxation parameters properly, the MRT could be more accurate and more stable than the BGK model.

4 Conclusions

In this work, a multiple-relaxation-time lattice Boltzmann model for the general nonlinear anisotropic convection–diffusion equations is proposed, and is then tested by some classic NACDEs, including the simple linear CDE, nonlinear Burgers–Fisher equation, nonlinear Buckley–Leverett equation and some anisotropic CDEs. The numerical results show that the present MRT model is efficient and accurate in solving the NACDEs, and also has a second-order convergence rate in space. Besides, we also conducted a comparison between the BGK model and MRT model, and found that the present MRT model could be more accurate and more stable than BGK model through tuning the relaxation parameters properly. And finally, we would also like to point out that, based on the superiority of the MRT model and the role of the NACDEs in describing the physical phenomena caused by the convection and diffusion processes, the present work may promote the MRT model in the study of heat and mass transfer [2], multiphase flows and crystal growth based on phase-field models [15, 23, 57].