## Abstract

A coupled LBGK scheme, constituting of two independent distribution functions describing velocity and temperature respectively, is established in this paper. Chapman-Enskog expansion, a procedure to prove the consistency of this mesoscopic method with macroscopic conservation laws, is also conducted for both lattice scheme of velocity and temperature, as well as a simple introduction on the common used DnQb model. An efficient coding manner for Matlab is proposed in this paper, which improves the coding and calculation efficiency at the same time. The compact and efficient scheme is then applied in the simulation of the famous and well-studied Rayleigh-Benard convection, which is common seen as a representative heat convection problem in modern industries. The results are interesting and reasonable, and meet the experimental data well. The stability of this scheme is also proved through different cases with a large range of Rayleigh number, until 2 million.

You have full access to this open access chapter, Download conference paper PDF

### Similar content being viewed by others

## Keywords

## 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,

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:

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:

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,

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,

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

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

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

### 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

and for 2^{nd} order,

for 3^{rd} order,

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

Generally, the time **t** and space x are scaled as

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:

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

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

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

Take summation over i, it is easy to obtain that

Thus, the macroscopic mass conservation equation can be derived as

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

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

## 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

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:

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

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

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

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

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

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:

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

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

### 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:

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:

### 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:

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’:

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:

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):

### 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:

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.

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.

## 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.

## References

Lin, Z., Fang, H., Tao, R.: Improved lattice Boltzmann model for incompressible two-dimensional steady flows. Phys. Rev. E

**54**(6), 6323 (1996)Yang, X., Shi, B., Chai, Z.: Generalized modification in the lattice Bhatnagar-Gross-Krook model for incompressible Navier-Stokes equations and convection-diffusion equations. Phys. Rev. E

**90**(1), 013309 (2014)Guo, Z., Shi, B., Zheng, C.: A coupled lattice BGK model for the Boussinesq equations. Int. J. Numer. Methods Fluids

**39**(4), 325–342 (2002)Qian, Y.H., d’Humières, D., Lallemand, P.: Lattice BGK models for Navier-Stokes equation. EPL (Europhys. Lett.)

**17**(6), 479 (1992)Qian, Y.H.: Simulating thermohydrodynamics with lattice BGK models. J. Sci. Comput.

**8**(3), 231–242 (1993)Alexander, F.J., Chen, S., Sterling, J.D.: Lattice boltzmann thermohydrodynamics. Phys. Rev. E

**47**(4), R2249 (1993)Eggels, J.G.M., Somers, J.A.: Numerical simulation of free convective flow using the lattice-Boltzmann scheme. Int. J. Heat Fluid Flow

**16**(5), 357–364 (1995)Zhang, T., Sun, S., Yu, B.: A fast algorithm to simulate droplet motions in oil/water two phase flow. Procedia Comput. Sci.

**31**(108), 1953–1962 (2017)El-Amin, M.F., Sun, S., Salama, A.: On the stability of the finite difference based lattice Boltzmann method. Procedia Comput. Sci.

**18**, 2101–2108 (2013)Castaing, B., Gunaratne, G., Heslot, F., et al.: Scaling of hard thermal turbulence in Rayleigh-Benard convection. J. Fluid Mech.

**204**, 1–30 (1989)Cioni, S., Ciliberto, S., Sommeria, J.: Strongly turbulent Rayleigh-Benard convection in mercury: comparison with results at moderate Prandtl number. J. Fluid Mech.

**335**, 111–140 (1997)Calzavarini, E., Lohse, D., Toschi, F., Tripiccione, R.: Rayleigh and Prandtl number scaling in the bulk of Rayleigh-Bénard turbulence. Phys. Fluids

**17**(5), 055107 (2005)Silano, G., Sreenivasan, K.R., Verzicco, R.: Numerical simulations of Rayleigh-Bénard convection for Prandtl numbers between 10–1 and 10 4 and Rayleigh numbers between 10 5 and 10 9. J. Fluid Mech.

**662**, 409–446 (2010)Puthenveettil, B.A., Arakeri, J.H.: Plume structure in high-Rayleigh-number convection. J. Fluid Mech.

**542**, 217–249 (2005)Zhou, Q., Xia, K.Q.: Physical and geometrical properties of thermal plumes in turbulent Rayleigh-Bénard convection. New J. Phys.

**12**(7), 075006 (2010)

## Author information

### Authors and Affiliations

### Corresponding author

## Editor information

### Editors and Affiliations

## Rights and permissions

## Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

## About this paper

### Cite this paper

Zhang, T., Sun, S. (2018). A Compact and Efficient Lattice Boltzmann Scheme to Simulate Complex Thermal Fluid Flows.
In: Shi, Y., *et al.* Computational Science – ICCS 2018. ICCS 2018. Lecture Notes in Computer Science(), vol 10862. Springer, Cham. https://doi.org/10.1007/978-3-319-93713-7_12

### Download citation

DOI: https://doi.org/10.1007/978-3-319-93713-7_12

Published:

Publisher Name: Springer, Cham

Print ISBN: 978-3-319-93712-0

Online ISBN: 978-3-319-93713-7

eBook Packages: Computer ScienceComputer Science (R0)