1 Introduction

LBM, short for Lattice Boltzmann Method, is a numerical approach to simulate fluid flows in mesoscopic level, which is quite popular at present and has been applied to varieties of extensions [1,2,3,4,5,6,7,8]. One main reason of its popularity is the introduction of distribution function, which allows this method to avoid solving directly the common non-linear hydrodynamic equations, e.g. Navier-Stokes equations. The hydraulic flow is modeled by distribution function evolutions, constituted by two stages—collision and streaming process. These two stages represent the general microscopic fluid particles, but not directly model the molecular dynamics. LBM scheme is famous for some feathers, like the natural full parallelism and easy coding, which makes it enhanced and improved from many other classical CFD methods. In the past two decades, plenty of works have been contributed to this area [9, 10], and great success has been obtained in many subsections, including single phase or multiphase flow, isothermal or non-isothermal flow and flow in single tube or porous media.

In original LBM scheme, only mass and momentum conservations are considered, thus it is only applied in isothermal problems. However, as many applications require the investigation of temperature field, it is sometimes important to take the thermal effect into the consideration of fluid flows. For example, in reservoir simulation, phase composition and thermodynamic properties are common needed, which should be calculated under certain temperature evolution. To handle the thermal fluid flows, several models have been developed and the past two decades have seen remarkable progress in this development, with three major classification: the multi-speed (MS) approach [3, 4], the coupled LBGK (CLBGK) approach and multi-distribution function (MDF) [5, 6] approach. The MS approach is limited in a very narrow range of temperature variation, due to its simplicity of distribution function application. It is just a simple and trival extension of the classical isothermal LBGK models, and the thermal effect is only represented by some additional discrete velocities included in the distribution functions. The macroscopic energy conservation is generally reserved by adding higher order velocity terms in the energy distributions. As a result, there is always a severe numerical instability in such models.

To overcome the limitations of both severe instability and narrow temperature range, the MDF model was proposed. With the assumption that pressure effect has been ignored on the heat dissipation and compression process, the fluid flow is the main reason of temperature filed advection and a simpler passive-scaler formula is applied. Compared with MS model, an independent distribution function is introduced in MDF model, which could be computed with LBGK scheme as well. Both the numerical stability and temperature range are improved in MDF model. In the meantime, some disadvantages have been found in this scheme. At present, the Mach number of the flow is restricted to be very slow in MDF model, and the density ratio is assumed to be in a very short range to keep the scheme stable. Besides, these disadvantages are more serious for a turbulent flow, and in such cases some undesired unphysical phenomena may be produced due to the artificial compressibility introduced.

As the recent developments in MDF model have noticed these limitations, some efforts have been made to eliminate such errors. An improved LBGK scheme is proposed to numerically scheme the flow models in steady and unsteady flow conditions. This scheme is further extended in [3] to simulate thermal fluid flows. An additional LBGK equation is introduced and then incorporated with the classical distribution function based on the Boussinesq assumption. This model is called ‘coupled LBGK’, known as CLBGK. As the multiple distribution functions are applied here, this scheme is similar to MDF, but the lattice in CLBGK used for temperature field can be different compared to that used for velocity field. As a result, this coupling scheme is more flexible and proved to be more numerical efficient.

This paper is organized as follows. First, we introduce the mathematical scheme of the LBGK model as well as the Chapman-Enskog expansion in Sect. 2. The coupling of temperature and velocity is performed in details in Sect. 3. A complex thermal fluid flow phenomena, Rayleigh-Benard heat transfer is simulated in Sect. 4, and results of different Reyleigh number are considered and compared. Finally, in Sect. 5, we make some discussions and conclusions.

2 LBGK Equations

The LBM numerical method is first developed from the Lattice Gas Automata (LGA), which models the microscopic molecular dynamics of gases. During its development, it is founded that it can be derived from original Boltzman equation as well using some discretizations. As a result, LBM is viewed as a special treatment of Boltzmann equation, as well as a mesoscopic model itself. Due to the avoid of solving traditional CFD equations, e.g. NS equations, Lattice Boltzmann Method is often referred as a popular method with easy implementation and coding.

2.1 DnQb LBGK Model

The starting point is the BGK approximation used at Boltzmann equation,

$$ \partial_{t} f + \xi \cdot \nabla_{x} f =\Omega \left( f \right) = - \frac{1}{\tau }\left( {f\left( {x,\xi ,t} \right) - f^{eq} \left( {x,\xi ,t} \right)} \right), $$

where \( f\left( {x,\xi ,t} \right) \) is the particle distribution function with x representing space and velocity is symbolled as \( \xi \), which means that the number of particles at time step t, in an area centered at x, with a radius of dx, and velocity varying from \( \xi \) to \( \xi + d\xi \). \( \tau \) is called relaxation time and \( \frac{1}{\tau } \) represents the collision frequency. The superscript ‘eq’ means the distribution function has been evolved to the equilibrium state. Macroscopic properties, including density, velocity and internal energy can be obtained through following equations from distribution functions:

$$ \uprho = \smallint fd\xi , \rho u = \smallint \xi fd\xi ,\rho e = \smallint \left( {\xi - u} \right)^{2} fd\xi , $$

where total energy E can be derived from \( {\text{E}} =\uprho{\text{e}} + \frac{1}{2}\rho u^{2} \). At equilibrium state, the distribution function reaches a Maxwellian equation:

$$ f^{eq} = \frac{\rho }{{\left( {2\pi RT} \right)^{D/2} }}exp\left( { - \frac{{\left( {\xi - u} \right)^{2} }}{2RT}} \right), $$

where \( R = k_{B} /m \) is the gas constant with \( k_{B} \) the Boltzmann constant and \( m \) the molecular mass. D is the space dimension. Using Taylor expansion, the continuous distribution function at equilibrium state can be written in terms of the fluid velocity,

$$ f^{eq} = \frac{\rho }{{\left( {2\pi RT} \right)^{D/2} }}exp\left( { - \frac{{\xi^{2} }}{2RT}} \right)\left[ {1 + \frac{\xi \cdot u}{RT} + \frac{{\left( {\xi \cdot u} \right)^{2} }}{{2\left( {RT} \right)^{2} }} - \frac{{u^{2} }}{2RT}} \right] + O\left( {u^{3} } \right) $$

The velocity space of \( \xi \) is then discretized into a finite set of velocities \( c_{i} \), and to keep the conservation laws, the following quadratures of the expanded equilibrium distribution function should hold exactly,

$$ \smallint \xi^{k} f^{eq} \left( {x,c_{i} ,t} \right)d\xi = \sum\nolimits_{i} {\omega_{i} c_{i}^{k} f^{eq} \left( {x,c_{i} ,t} \right)} , $$

where \( \omega_{i} \) are the weights and \( c_{i} \) are the points of the numerical quadrature rule. Based on the formulation, the standard LBGK equation can be derived as

$$ f_{i} \left( {x + c_{i} \delta t,t + \delta t} \right) - f_{i} \left( {x,t} \right) = - \frac{1}{\tau }\left( {f_{i} \left( {x,t} \right) - f_{i}^{eq} \left( {x,t} \right)} \right) $$

The LBGK models are the most popular LB method and have been widely applied in variety of complex flows. Among the available models, the group of DnQb (n-dimensional and b-velocities) models proposed by Qian et al. are the most representative ones []. In DnQb models, the discrete equilibrium distribution function can be expressed as

$$ f_{i}^{eq} =\uprho\omega_{i} \left[ {1 + \frac{{ce_{i} \cdot u}}{{c_{s}^{2} }} + \frac{{uu:\left( {c^{2} e_{i} e_{i} - c_{s}^{2} I} \right)^{2} }}{{2c_{s}^{4} }}} \right] $$

The common value used in different DnQb models are listed in Table 1,

Table 1. Parameters of some DnQb models.

2.2 Multiscale Chapman-Enskog Expansion

Navier-Stokes equations are common used in computational fluid dynamics, as it can well describe the macroscopic fluid behavior. The Lattice Boltzmann Method focuses on the particle distribution function in a mesoscopic level, higher than the microscopic but less visible than the macroscopic. So it’s a necessary step to derive the macroscopic N-S equations from the proposed LB equation formulas, to show the robustness and reliability of our scheme. Such derivation is often processed with the Chapman-Enskog method and it’s presented in this paper as well. In the following part, the D2Q9, which is the most popular DnQb model at present, is selected as an example to show the detailed Chapman-Enskog expansion process. By defining the expression of physical properties at different time and space level, the macroscopic variables are automatically separated into the corresponding different scales.

With the basic knowledge of lattice tensor, it is easy to get

$$ \sum\nolimits_{i} {c_{i} f_{i}^{eq} } = \sum\nolimits_{i} {c_{i} f_{i} } = \rho u $$

and for 2nd order,

$$ \sum\nolimits_{i} {c_{i} c_{i} f_{i}^{eq} } = c_{s}^{2} \rho I + \rho uu, $$

for 3rd order,

$$ \sum\nolimits_{i} {c_{i} c_{i} c_{i} f_{i}^{eq} } = c_{s}^{2} \rho\Delta \cdot u $$

The distribution function can be expanded in terms of \( {\varvec{\upvarepsilon}} \) as

$$ f_{i} = f_{i}^{\left( 0 \right)} + \varepsilon f_{i}^{\left( 1 \right)} + \varepsilon^{2} f_{i}^{\left( 2 \right)} + \cdots $$

Generally, the time t and space x are scaled as

$$ \text{x} = \varepsilon^{ - 1} x,t_{1} = \varepsilon t,t_{2} = \varepsilon^{2} t, $$

in which, \( t_{1} \) represents the fast convective scale, while \( t_{2} \) describes the slow diffusive scale. The above multiscale representation induces a corresponding representation of the differential operators:

$$ \frac{\partial }{\partial t} = \varepsilon \frac{\partial }{{\partial t_{1} }} + \varepsilon^{2} \frac{\partial }{{\partial t_{2} }},\nabla = \varepsilon \nabla_{1} $$

Substituting Eqs. (10) and (12) into Eq. (13), we can have

$$ \begin{aligned} & \left( {\varepsilon \partial t_{1} + \varepsilon^{2} \partial t_{2} + \varepsilon c_{i} \cdot \nabla_{1} } \right)\left( {f_{i}^{\left( 0 \right)} + \varepsilon f_{i}^{\left( 1 \right)} + \varepsilon^{2} f_{i}^{\left( 2 \right)} + \cdots } \right) + \frac{\delta t}{2}(\varepsilon \partial t_{1} + \varepsilon^{2} \partial t_{2} + \varepsilon c_{i} \cdot \\ & \nabla_{1} )^{2} \left( {f_{i}^{\left( 0 \right)} + \varepsilon f_{i}^{\left( 1 \right)} + \varepsilon^{2} f_{i}^{\left( 2 \right)} + \cdots } \right) = - \frac{1}{\tau \delta t}\left( {f_{i}^{\left( 0 \right)} - f_{i}^{{\left( {eq} \right)}} + \varepsilon f_{i}^{\left( 1 \right)} + \varepsilon^{2} f_{i}^{\left( 2 \right)} + \cdots } \right) \\ \end{aligned} $$

Equating the coefficients of each order of \( \varepsilon \), it is easy to obtain that:

$$ {\text{O}}\left( {\varepsilon^{0} } \right):f_{i}^{\left( 0 \right)} = f_{i}^{{\left( {eq} \right)}} $$
$$ {\text{O}}\left( {\varepsilon^{1} } \right):\left( {\partial t_{1} + c_{i} \cdot \nabla_{1} } \right)f_{i}^{\left( 0 \right)} = - \frac{1}{\tau \delta t}f_{i}^{\left( 1 \right)} $$

Furthermore, from Eqs. (14), (15) and (16), the equation at level \( \varepsilon^{2} \) can be written as

$$ {\text{O}}\left( {\varepsilon^{2} } \right):\partial t_{2} f_{i}^{{\left( {eq} \right)}} + \left( {\partial t_{1} + c_{i} \cdot \nabla_{1} } \right)\left( {1 - \frac{1}{2\tau }} \right)f_{i}^{\left( 1 \right)} = - \frac{1}{\tau \delta t}f_{i}^{\left( 2 \right)} $$

Take summation over i, it is easy to obtain that

$$ {\text{O}}\left( {\varepsilon^{1} } \right):\partial t_{1} \rho + \nabla_{1} \left( {\rho u} \right) = 0 $$
$$ {\text{O}}\left( {\varepsilon^{2} } \right):\partial t_{2} \rho = 0 $$

Thus, the macroscopic mass conservation equation can be derived as

$$ \partial_{t} \rho + \nabla \cdot \left( {\rho u} \right) = 0 $$

On the other hand, the equation at 1st and 2nd level can be also written as

$$ {\text{O}}\left( {\varepsilon^{1} } \right):\left( {\partial t_{1} + c_{i} \cdot \nabla_{1} } \right)f_{i}^{{\left( {eq} \right)}} = - \frac{1}{\tau \delta t}f_{i}^{\left( 1 \right)} $$
$$ {\text{O}}\left( {\varepsilon^{2} } \right):\partial t_{2} \rho u = \nabla_{1} \cdot \left[ {\nu \rho \left( {\nabla_{1} u + \left( {\nabla_{1} u} \right)^{T} } \right)} \right], $$

where \( \upnu = c_{s}^{2} \left( {\tau - \frac{1}{2}} \right)\delta t \). Combining the two scales, it is soon to get the macroscopic momentum conservation equation as

$$ \partial_{t} \left( {\rho u} \right) + \nabla \cdot \left( {\rho uu} \right) = - \nabla p + \nabla \cdot \left[ {\nu \rho \left( {\nabla_{1} u + \left( {\nabla_{1} u} \right)^{T} } \right)} \right] $$

3 Compact CLBGK Model

It is a common knowledge that the temperature field is passively driven by the fluid flow with advection and a simple advection type equation is enough to model the heat transfer if the viscous heat dissipation and compression work carried out by the pressure are neglected. Thus, it is quite easy to discretize the temperature equation into LBGK model. Meanwhile, as the temperature and velocity field use two independent lattice systems, the implementation and coding can be greatly simplified.

3.1 Lattice BGK Equation for Temperature Field

The general heat transfer equation could be written as

$$ \frac{\partial T}{\partial t} + \nabla \cdot \left( {uT} \right) = {\mathfrak{D}}\nabla^{2} T, $$

where \( {\mathfrak{D}} \) is the heat diffusivity. The lattice BGK equation similar as the velocity modeling introduce in previous section can be formed as well for temperature:

$$ T_{i} \left( {x + c_{i} \delta t,t + \delta t} \right) - T_{i} \left( {x,t} \right) = - \frac{1}{{\tau^{{\prime }} }}\left( {T_{i} \left( {x,t} \right) - T_{i}^{eq} \left( {x,t} \right)} \right), $$

where \( \tau \) is the dimensionless relaxation time, and it could be not the same as the \( \tau \) in velocity LBGK equation. As the independent distribution function of temperature, the simplest D2Q5 model is applicable here. The temperature distribution function at equilibrium state is given by

$$ T_{i}^{{\left( {eq} \right)}} = \frac{T}{4}\left[ {1 + 2\frac{{e_{i} \cdot u}}{c}} \right], $$

and the macroscopic temperature is the summation of temperature distribution function in all 5 directions:

$$ T = \sum\nolimits_{i = 1}^{4} {T_{i} } $$

The Chapman-Enskog procedure, a multi-scaling expansion technique to derive macroscopic conservation equations from mesoscopic LBGK equations is shortly introduced for the temperature field here:

Similar with Eq. (11), the temperature is Taylor expanded as

$$ T_{i} = T_{i}^{\left( 0 \right)} + \varepsilon T_{i}^{\left( 1 \right)} + \varepsilon^{2} T_{i}^{\left( 2 \right)} + \cdots , $$

where \( T_{i}^{\left( 0 \right)} = T_{i}^{{\left( {eq} \right)}} \), and \( \varepsilon \) is a small parameter proportional to the Knudsen number. Two mesoscopic time scales \( t_{1} = \varepsilon t^{{}} \) and \( t_{1} = \varepsilon^{2} t^{{}} \) and a macroscopic length scale \( x_{1} = \varepsilon x \) are introduced, thus

$$ \frac{\partial }{\partial t} = \varepsilon \frac{\partial }{{\partial t_{1} }} + \varepsilon^{2} \frac{\partial }{{\partial t_{2} }},\nabla = \varepsilon \nabla_{1} , $$

which is the same as Eq. (13). Through a Taylor expansion in time and space, the lattice BGK equation can be written in continuous form as

$$ D_{i} T_{i} + \frac{{\Delta t}}{2}D_{i}^{2} T_{i} + O\left( {\Delta t} \right)^{2} = - \frac{1}{{\tau^{{\prime }} \cdot t}}\left( {T_{i} - T_{i}^{\left( 0 \right)} } \right), $$

where \( D_{i} = \left( {\frac{\partial }{\partial t} + ce_{i} \cdot \nabla } \right) \). Substituting Eq. (29) into (30), collecting the terms of order \( \varepsilon \) and \( \varepsilon^{2} \) respectively, and taking summations of the equations into two scales over i, we can get:

$$ \frac{\partial T}{{\partial t_{1} }} + \nabla_{1} \cdot \left( {uT} \right) = 0 $$
$$ \frac{\partial T}{{\partial t_{2} }} + \left( {1 - \frac{1}{{2\tau^{{\prime }} }}} \right)\nabla_{1} \cdot\Pi ^{\left( 1 \right)} = 0, $$

where \( \Pi ^{\left( 1 \right)} = \sum\nolimits_{i = 1}^{4} {ce_{i} T_{i}^{\left( 1 \right)} } \). Combining the two levels, it is easy to obtain the following temperature equation as

$$ \frac{\partial T}{\partial t} + \nabla \cdot \left( {uT} \right) = {\mathfrak{D}}\nabla^{2} T , $$

to the \( {\text{O}}\left( {\Delta t^{2} } \right) \) order and the diffusivity \( {\mathfrak{D}} \) is determined by

$$ {\mathfrak{D}} = \frac{{\left( {2\tau^{{\prime }} - 1} \right)}}{4}\frac{{\Delta x^{2} }}{{\Delta t}} $$

3.2 The Coupled Lattice BGK Model Using Boussinesq Approximation

The Boussinesq approximation is common seen in the study of natural convection problems, and it’s still popular after so many years’ development due to the simple treatment of temperature effect on fluid flow. Thus, it is a good method for us to couple temperature and velocity distribution functions. It is assumed common properties cared in fluid flow, including thermal diffusivity, density and viscosity can be treated as a constant, while the temperature effect is only reflected in the body force term. The macroscopic Boussinesq equations can be written as the following form:

$$ \nabla \cdot u = 0 $$
$$ \frac{\partial u}{\partial t} + \nabla \cdot \left( {uu} \right) = - \nabla p + \upsilon \nabla^{2} u - g\beta \left( {T - T_{0} } \right) $$
$$ \frac{\partial T}{\partial t} + \nabla \cdot \left( {uT} \right) = {\mathfrak{D}}\nabla^{2} T $$

The coupled LBGK equations in previous section can be used here, and the coupling is established by adding the following term to the right-hand-side of the evolution equation as:

$$ f_{i} = - \frac{1}{2c}\Delta t\alpha_{i} e_{i} \cdot {\text{g}}\upbeta\left( {T - T_{0} } \right) $$

3.3 The Efficient Coding in Matlab

Previously, LBM is often coded in language Fortran and C, due to the long history and fully developed coding technique in these two. As there are always plenty of iterations in LBM numerical implementations, high-level language, like Matlab, sometimes performs a relatively slow calculation efficiency. To the writer’s opinion, the main advantage of language Matlab falls on the sufficient high-level functions included in its library, which benefit a lot in the equation solving and result visualization. Thus, we try to utilize the packaged function in Matlab to speed up the solving of LBM as:

figure a

The above codes represent the streaming process. Using the function ‘circshift’, codes are simplified a lot, compared with a common coding style as a ‘traditional Fortran manner’:

figure b

It is easy to find that the improved coding technique will greatly shorten the codes as well as the CPU time used. In all, the best coding is the codes fit best the features of language.

4 Numerical Cases

Rayleigh–Bénard convection is one of the most commonly studied heat transfer phenomena due to its well-researched analytical and experimental results [11,12,13,14,15]. Applications of R-B type natural convection can be found in many areas, including: the atmosphere and ocean convection on the weather and climate on earth; mantle convection on the plate movement and volcanic formation; nuclear convection to produce the earth’s magnetic field; the sun and other stars in the convection heat from the stars inside to the surface; engineering applications convection in heat transfer and heat dissipation; convection in crystal growth and metal preparation; convection in thermonuclear reactor and so on. A general Rayleigh-Benard convection problem can be set as: In a closed convection cell filled with convection medium, the lower guide plate is heated, the upper guide plate is cooled, and the temperature at upper and lower guide plates varies with a constant value. When temperature difference is large enough, the fluid in the cell will exhibit a very complicated random movement pattern, and form turbulent convection. For the fully developed turbulent convection system, there is a very thin temperature boundary layer near the upper and lower guide plates in the convection tank, and hot and cold plumes are generated and separated from the upper and lower temperature boundary layers respectively.

4.1 Results of Different Ra Number

Some important dimensionless number are often used in the establishing and modeling of these convection problems, including Prandtl number (Pr), Rayleigh number (Ra) and Grashof number (Gr). A short introduction is provided as follows to help understand: Grashof number is a dimensionless parameter often applied to approximate the correlation ratio of viscous force and buoyancy effecting the thermal flow. Prandtl number is defined to approximate the correlation effect of thermal diffusivity and momentum diffusivity. Rayleigh number is a dimensionless parameter often used in free convection and natural convection, or sometimes attributed as buoyancy-driven fluid flow. When the Rayleigh number is high enough, heat transfer is always treated as mainly driven by convection, but not conduction. At present, heat convection at high Ra number is of much focus.

For Ra number varying of 5000 and 20000, temperature field and velocity field at steady state are shown as Figs. 1 to 2:

Fig. 1.
figure 1

Temperature field at Ra number equaling (a) 5000 and (b) 20000

Fig. 2.
figure 2

Velocity field at Ra number equaling (a) 5000 and (b) 20000

From the above two figures, it can be referred that a turbulent flow is driven by temperature difference on two walls and the result is different with Ra numbers.

In the study of circumfluence, the relation of Reynolds number (Re) and Rayleigh Number (Ra) is of special interest. Generally, a positive correlation is assumed, which indicates that a more complex turbulent flow will occur for a larger Ra case. Thus, we expect more intense flow at the steady state driven by the temperature difference in simulation of higher Ra number. Here, a 200000 case is taken as example:

A different result is shown in Fig. 3 and it is obvious that more complex circumfluence flows occur in the higher Ra situation, with overall higher velocity (seen in color bar). It is a common knowledge that numerical simulation will perform worse for high Re number cases, thus it is always a manner to test the scheme stability. As the positive correlation of Ra and Re number, a Ra equaling 2 million case is performed using our scheme, and we can still get reasonable results (Fig. 4):

Fig. 3.
figure 3

Temperature and velocity field at Ra number equaling 200000

Fig. 4.
figure 4

Temperature and velocity field at Ra number equaling 2000000

4.2 Correlation Between Nu and Ra

In heat transfer problems, the Nusselt number (Nu) is the ratio of convective to conductive heat transfer across (normal to) the boundary. The calculation of Nu number is always calculated by the following equation in the present R-B simulation:

$$ {\text{Nu}} = 1 + \frac{{\left( {u_{y} \cdot {\text{T}}} \right)}}{{\alpha \cdot\Delta T/H}} $$

It is found in previous experimental and numerical investigations that the Nusselt number in Rayleigh–Benard convection can always be represented by a power law: \( {\text{Nu}} \propto Ra^{r} \), in which the power value r varies slightly around 0.282 [11, 12]. In this paper, we also calculate the correlation of Nu and Ra to validate our simulation:

As shown in Fig. 5, our simulation results meet well with the empirical data, thus our scheme is validated. Besides, it can be seen that there is slight difference when \( {\text{Ra}} \le 10^{4} \) and \( {\text{Ra}} \gg 10^{6} \). It can be attributed that such power law is only validated near the turbulence regime, while large Ra will result in large velocity, thus large Mach number will be obtained. However, the stability of LBM scheme is limited in a low Mach condition. Anyway, the robustness of our scheme is proved here as the case with Ra number as high as 2 million can be handled well with acceptable results.

Fig. 5.
figure 5

Correlation of Nu and Ra

The convergence of Nu number is also a test to show the scheme efficiency. Converging process of Nu number at two cases of Ra numbers equaling 5000, 20000, 200000 and 2000000 are shown here:

It can be seen in Fig. 6 that with the arising of Ra numbers, it will take more time for the Nu number to converge to the steady value. It is reasonable due to the more complex turbulence occurred in a higher Ra number condition. The efficiency of our scheme is validated as in low Ra numbers, it is very fast to see the convergence of Nu number and the iteration steps needed in high Ra number are still acceptable. However, in the case of Ra equaling 2000000, it is very hard to get a steady Nu value, although we could see the obvious convergence trend, which could be attributed that the high Re number resulted from high Ra number is still a high challenging of LBM scheme. For CPU time, only 62.79 s is needed for Ra = 5000 while the Ra = 2000000 case costs more than 200 s to convergence.

Fig. 6.
figure 6

Nu convergence process of different Ra number

5 Conclusion

Complex thermal fluid flows are common seen in modern industry, thus it is very meaningful to find an efficient manner to simulate such phenomena. A compact LBGK scheme is generated in this paper, with the coupling of temperature and velocity distribution functions using Boussinesq approximation. As the two distribution functions are independent to each other, we could treat them in two different lattice systems. In this paper, the D2Q5 model is selected for the temperature field evolution while the D2Q9 model is chosen for velocity distribution function. This treatment will obviously accelerate our simulation. Combined with a more efficient coding style, we can simulate the complex Rayleigh-Benard convection problems under different Rayleigh numbers. The robustness of our scheme is validated through the acceptable results obtained at very high Ra number, 2 million. The Nusselt number calculated for different Ra number meet well with the empirical data and the convergence process of Nu is also acceptable and reasonable. The increasing iterations and CPU time needed to get the steady state meet well the arising of Ra numbers.

As this scheme is validated and proved to be compact and efficient, it is a good lattice system based on which we can implement other thermal fluid flows, like the heated oil transfer and Flash calculation with gradient flows.