Study of thermal comfort: numerical simulation in a closed cavity using the lattice Boltzmann method


In this work, a study on thermal comfort in building is presented as it has great interest given its impact on the quality of indoor environments. The thermal comfort depends on several parameters such as air temperature and velocity, relative humidity and so on. With this in mind, numerical investigation is carried out on natural convection induced by temperature gradient between the lower and upper walls in a square enclosure filled with a Newtonian fluid. To approach the real case of underfloor heating subject to real weather conditions, periodic time varying temperature is imposed on the lower wall of the enclosure. The mathematical problem has been formulated by considering the Boussinesq’s approximation, and the resulted governing equations are solved using the Lattice Boltzmann Method. The study has been carried out for Rayleigh numbers in the range 103 ≤ Ra ≤ 106, while Prandtl number and aspect ratio are kept constant at 0.71 and 1, respectively. The results obtained show that the flow’s behaviour is strongly dependent on the values of Rayleigh numbers and heating amplitude. The temporal evolution of the spatially averaged Nusselt number indicate that the transfer regime is periodic for low values of Ra and switches to a perturbed unsteady flow for hight values.


A large amount of energy is used for the space heating/cooling of buildings. The heating/cooling energy consumption depends on the characteristics of building (exterior conditions, physical properties, energy efficiency of inner sub-systems and occupancy). Thermal analysis is necessary to assess the building energy performance. Furthermore, the analysis permits to predict thermal responses and calculate heating/cooling loads of buildings.

It is also helpful to achieve the energy efficiency and the thermal comfort of buildings. Several numerical and experimental studies have been carried out on thermal comfort in the building [1,2,3].The lattice Boltzmann method (LBM) that has been rapidly progressing in developing new models and applications in many fields has attracted much attention and interest [4,5,6,7]. Unlike traditional methods which solve macroscopic equations, the LBM simulates fluid flow based on microscopic models or mesoscopic kinetic equations. This intrinsic feature enables LBM to incorporate easily a multitude of essential physics at microscopic or mesoscopic level [8].

The Rayleigh–Bénard convection has been extensively studied experimentally and theoretically because of its frequent occurrence in various domains. A full account of the linearized theory is given in Chandrasekhar [9] and Drazin and Reid [10]. Osman [11] study numerically the laminar Rayleigh–Bénard convection in a square cavity, the Rayleigh values are between 103 and 106, Prandlt range from 0.1 to 100, he presented the current lines and isotherms; he also calculates the Nusselt number for different Rayleigh value. Raji [12] presented numerical results of natural convection in a square cavity filled with air. For the Rayleigh number 103 < Ra< 106, three different solutions: single-stream, bicellular vertical flow, and bicellular horizontal flow are obtained. The aim of the present work is to contribute to a better understanding of some transient phenomena including heat transfer in a square enclosure filled with a Newtonian fluid.

The configuration under study is showed in Fig. 1, a varying temperature profile is imposed on the lower wall of the enclosure (underfloor heating), where the vertical walls are insulated adiabatic.

Fig. 1

Physical model

The bibliographical research shows that Rayleigh–Bénard convection has been widely studied in the past, the main result is: the identification of a critical Rayleigh number, the birth of vortex convection, and this according to different control parameters. Our contribution is to simulate this last convection with a periodic boundary condition in order to approach the case of air movements in a underfloor heated room (thermal comfort in the habitat). In the next section, the problem formulation and assumptions are presented, followed by the adopted numerical resolution methodology in Sect. 2, the results and discussions are presented in Sect. 3. We finish with conclusions in Sect. 4.

Lattice Boltzmann method

The advantage of lattice Boltzmann’s method, in contrast to other DNS methods, is that it has no non-linearity in its mathematical formulation. Moreover for our study the LBM formulation is totally explicitly unsteady and can therefore approximate the temporal variation of the heating temperature. In this study, we use the lattice Boltzmann method to solve fluid flow and transports phenomena. Collisions and advection are determined by the lattice Boltzmann equation of the distribution functions [13]:

$$f_{i} (x + e_{i} \delta_{t} ,t + \delta_{t} ) - f_{i} (x,t) = \varOmega \left( {f_{i} } \right) + \delta_{t} F_{i}$$

\(f_{i}\) is the distribution function. \(\varOmega \left( {f_{i} } \right)\) is the collision operator and \(F_{i}\) is the implemented external forces term. Note that the nine discrete velocities \(e_{i}\) are given as function of sinus and cosinus of quantities depending on i and \(\pi\) [14].The collision operator rewritten after linearization and in the following indicial form:

$$f_{i} (x + e_{i} \delta_{t} ,t + \delta_{t} ) - f_{i} (x,t) = - \frac{1}{\tau }\left[ {f_{i} (x,t) - f_{i}^{eq} (x,t)} \right] + \delta_{t} F_{i}$$

where in the right hand of the equation, the distribution function at the equilibrium is expressed by:

$$f_{i}^{eq} = w_{i} \rho \left[ {1 + 3e_{i} v + \frac{{9\left( {e_{i} v} \right)^{2} }}{2} - \frac{{3v^{2} }}{2}} \right]$$

The factors \(w_{i}\) are given as:\(w_{0} = 4/9\); \(w_{1,4} = 1/9\); \(w_{5,8} = 1/36\), \(\tau\) is the relaxation time without dimension.

Note that this linearization is the simplest one and named the lattice Bhatnagar–Gross–Krook (LBGK): The single relaxation time approximation of the collision operator.

Numerical instability and fixing a unitary Prandtl number appear as a failures of this method. In order to solve these limits, D’Humières [15] develops the moment approach [Multiple Relaxation Time model (LBM-MRT)], which utilizes multiple relaxation time to simulate the defined macroscopic physical quantities evolutions. Compared to the Bhatnagar–Gross–Krook model, this model gives an optimal stability and simulate a large values of Prandtl number [16, 17].

In the multiple relaxation time method, the collision term is expressed as:

$$\varOmega = - M^{ - 1} C\left[ {m_{i} (x,t) - m_{i}^{eq} (x,t)} \right]$$

In the flow field formulation, the D2Q9 model is utilized in this work:

$$f_{i} (x + e_{i} \delta_{t} ,t + \delta_{t} ) - f_{i} (x,t) = - M^{ - 1} C\left[ {m_{i} (x,t) - m_{i}^{eq} (x,t)} \right] + M^{ - 1} \delta_{t} \left( {I - \frac{C}{2}} \right)D$$

M is the projection matrix of \(f_{i}\) and \(f_{i}^{eq}\) into the moment space where \(m = Mf\) and \(m^{eq} = Mf^{eq}\). The expression of theses multiplications are given by (in moment space):

$$\left( {\begin{array}{*{20}c} \rho \\ e \\ \phi \\ {j_{x} - \frac{{\delta_{t} }}{2}\rho F_{x} } \\ {q_{x} } \\ {j_{y} - \frac{{\delta_{t} }}{2}\rho F_{y} } \\ {q_{y} } \\ {p_{xx} } \\ {p_{xy} } \\ \end{array} } \right) = \left[ {\begin{array}{*{20}c} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ { - 4} & { - 1} & { - 1} & { - 1} & { - 1} & 2 & 2 & 2 & 2 \\ 4 & { - 2} & { - 2} & { - 2} & { - 2} & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & { - 1} & 0 & 1 & { - 1} & { - 1} & 1 \\ 0 & { - 2} & 0 & 2 & 0 & 1 & { - 1} & { - 1} & 1 \\ 0 & 0 & 1 & 0 & { - 1} & 1 & 1 & { - 1} & { - 1} \\ 0 & 0 & { - 2} & 0 & 2 & 1 & 1 & { - 1} & { - 1} \\ 0 & 1 & { - 1} & 1 & { - 1} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & { - 1} & 1 & { - 1} \\ \end{array} } \right]\,\,\left( {\begin{array}{*{20}c} {f_{0} } \\ {f_{1} } \\ {f_{2} } \\ {f_{3} } \\ {f_{4} } \\ {f_{5} } \\ {f_{6} } \\ {f_{7} } \\ {f_{8} } \\ \end{array} } \right)$$

here \(\rho\) is the fluid density, \(e\) the energy, \(\phi\) the energy squared, \(j_{x}\), \(j_{y}\) are the momentum components, \(q_{x}\), \(q_{y}\) are the energy flux in the two directions, and \(p_{xx}\), \(p_{xy}\) are the diagonal/off-diagonal component of the strain-rate tensor.

Note that the first three expressions are the conserved quantities (density and the two direction momentum), while the six other moments are non-conserved one and are relaxed linearly in time. The collision term (operator) is carried out in the moment space and in indicial form:

$$m_{i}^{*} (x,t) = m_{i} (x,t) - C\left[ {m_{i} (x,t) - m_{i}^{eq} (x,t)} \right]$$

The D2Q5 model is proposed to simulate the temperature evolution. This simplification does not diminish the accuracy of the model but its simplicity is chosen and validated by several authors in the literature [18]. The evolution LB equation is expressed as:

$$g_{i} (x + e_{i} \delta_{t} ,t + \delta_{t} ) - g_{i} (x,t) = - N^{ - 1} E\left[ {n_{i} (x,t) - n_{i}^{eq} (x,t)} \right]$$

where \(g_{i} (x,t)\) is the temperature distribution function (second population), N is the orthogonal projection matrix, and as the same procedure as for the first population \(n = Ng\). N is a projection matrix of \(g_{i}\) and \({\text{g}}_{\text{i}}^{\text{eq}}\) into the moment space. The transformation matrix N is given by:

$$\left( {\begin{array}{*{20}c} {{\text{n}}_{0} } \\ {{\text{n}}_{1} } \\ {{\text{n}}_{2} } \\ {{\text{n}}_{3} } \\ {{\text{n}}_{4} } \\ \end{array} } \right) = \left[ {\begin{array}{*{20}c} 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & { - 1} & 0 \\ 0 & 0 & 1 & 0 & { - 1} \\ { - 4} & 1 & 1 & 1 & 1 \\ 0 & 1 & { - 1} & 1 & { - 1} \\ \end{array} } \right] \, \left( {\begin{array}{*{20}c} {{\text{g}}_{0} } \\ {{\text{g}}_{1} } \\ {{\text{g}}_{2} } \\ {{\text{g}}_{3} } \\ {{\text{g}}_{4} } \\ \end{array} } \right)$$

The boundary conditions applied to this problem are defined as follows:

Velocities boundary conditions

$$u\left( {0,y,t} \right) = u\left( {1,y,t} \right) = u\left( {x,0,t} \right) = u\left( {x,1,t} \right) = 0$$
$$v\left( {0,y,t} \right) = v\left( {1,y,t} \right) = v\left( {x,0,t} \right) = v\left( {x,1,t} \right) = 0$$

Temperature boundary conditions

$$T\left( {x,1,t} \right) = 1$$
$$T\left( {x,0,t} \right) = 1 + Amp*(\sin \left( {2\pi frt} \right)$$
$$\left. {\frac{\partial T}{\partial x}} \right|_{x = 0} = 0 et \left. {\frac{\partial T}{\partial x}} \right|_{x = 1} = 0$$

where Amp is the amplitude. The instantaneous and average Nusselt number Nu(t) over the horizontal plane at y = 0 is obtained as:

$${\text{Nu}} = \left. { - \frac{\partial T}{\partial y}} \right|_{y = 0} \quad {\text{and}}\quad {\text{Nu}}_{avg} = \int_{0}^{1} {Nu\,\,dx}$$

It is implemented in the LBM with the bounce-back rule, in which all particles hitting the wall are reflected back in the direction of the source. Therefore, before analyzing the coupled problem, we present in the next section our code validation in natural convection situations.

The present code has been validated in the case of a square cavity with differentially heated horizontal walls. For the natural convection in laminar regime (Ra≤ 106) and Amp = 0.

The comparison of the mean Nusselt number values with other works [11, 19, 20] is shown in Table 1. It gives an excellent agreement with the above studies.

Table 1 Comparison of the present results and the previous work results

Results and discussion

The study of Rayleigh–Bénard’s convection in a square cavity with the periodically heated lower wall is conducted using the already validated code. The Rayleigh number is taken between 103 and 106 and the amplitude between 0.2 and 0.8.

The analyses over a time period, of stream functions and the isotherms is represented in Fig. 2 for Rayleigh number values in the range \({\text{Ra}} \in \left[ {10^{4} , 10^{6} } \right]\) and Amp = 0.3. We should remember that for all cases, the results of the structures of the isovalues are the same at beginning and the end of a period. So, step (a) represents the beginning of a period, it is the same as step (e), which represents the end of this same period. For Ra = 104 and 105, the flow profile is unicellular with one vortex and the effect of heating is insignificant. The results follow the same trends as the results found in the literature with constant heating [20]. For Ra = 106, the values of stream function are more intense. Also, we note that the small cells trapped in the upper left and lower right corners, widen when in the second half of the period following with the increasing in temperature at the hot wall (lower wall). The evolution of the isotherms is consistent with the flow structure. We note that the distortions are more visible in case (b) at τ/2 and the isotherms are more glued to the active wall at τ/2 and τ.

Fig. 2

Evolution of the stream function and isotherms during one cycle for Amp = 0.3

Figure 3 gives the current lines and the isotherms for a higher amplitude (Amp = 0.8). For Ra= 104, the flow profile is identical to that of Fig. 2, represented by a single vortex that rotates clockwise.

Fig. 3

Evolution of the stream function and isotherms during one cycle for Amp = 0.8

When the value of the Rayleigh number increases the counter cells trapped at the corner underwent expansion and R-B cell is thus deformed. These counter-rotating cells gain in volume especially in the second half of the period. For the isotherms, the results depict that unlike the current lines, the isotherms have undergone changes over the period for Ra = 104. They are very close to the hot wall at τ and the end of the period. The other two times, the isotherms are dispersed in the cavity. As the values of the Rayleigh number increase, the isotherms are more distorted following the shape revealed by the streamlines. This result is important in building analogy when for high Ra and Amp we have a temperature mixing in the middle of the cavity.

Figures 4 and 5 shows the curves of the mean Nusselt number as a function of time, for two values amplitude 0.3 and 0.8. The curves represent the last four periods up to the final time t = 9×105.

Fig. 4

Nusselt number evolution for four last periods and Amp = 0.3

Fig. 5

Nusselt number evolution for four last periods and Amp = 0.8

For Amp = 0.3 (Fig. 4) and low value of Ra the regime is periodic. When the Rayleigh number increases (Ra= 106) the heat transfer increases and this is due to the intensification of thermal heating. In this case the curves of Nu show that the regime is periodic with small scale perturbations. I the second case (i.e. Amp = 0.8), the results illustrated in the Fig. 5 shows that the change in Nusselt values is larger than Amp = 0.3.


In this paper, we proposed a numerical study of Rayleigh–Bénard convection in the square cavity using the Lattice-Boltzmann method. Our contribution is to simulate the Rayleigh–Bénard convection with a periodic boundary condition in order to approach the case of air movements in a underfloor heated room (thermal comfort in the habitat). The Rayleigh number value considered is between 103 and 106, while the amplitude varies from 0.2 to 0.8.

The flow state of the structure as well as the isotherms depend on the values of Ra and Amp. One of the most important result of our study is the multicellular regime of the convection essentially, when Ra and Amp increases. For the Nusselt number, various developments have been revealed, while the transfer regime is periodic for low Rayleigh values and switches to another periodical states with small perturbation for Ra = 106. This last regime is characterized by a temporal evolution with several Eigen frequencies hence the multitudes of peaks on the figure. In the perspectives of our work, it is conceivable to make a study for the identification of the critical Rayleigh and the Eigen frequencies of the studied system.


  1. 1.

    Joubert P, Le Quéré P, Béghein C (2005) A numerical exercise for turbulent natural convection and pollutant diffusion in a two-dimensional partially partitioned cavity. Int J Therm Sci 44:311–322

    Article  Google Scholar 

  2. 2.

    Zomorodian ZS, Tahsildoost M, Hafezi M (2016) Thermalcomfort in educational buildings: a review article. Renew Sustain Energy Rev 59:895–906

    Article  Google Scholar 

  3. 3.

    Singh MK, Ooka R, Rijal HB (2018) Thermal comfort in classrooms: a critical review. In: Brotas L et al (eds) Proceeding of the 10th Windsor conference—rethinking comfort. NCEUB, Cumberland Lodge

    Google Scholar 

  4. 4.

    Wang J, Wang D, Lallemand P, Luo LS (2013) Lattice Boltzmann simulations of thermal convective flows in two dimensions. Comput Math Appl 65:262–286

    MathSciNet  Article  Google Scholar 

  5. 5.

    Zhang Y, Zhou Q, Sun C (2017) Statistics of kinetic and thermal energy dissipation rates in two-dimensional turbulent Rayleigh–Bénard convection. J Fluid Mech 814:165–184

    MathSciNet  Article  Google Scholar 

  6. 6.

    Liu H, Wu L, Ba Y, Xi G (2017) A lattice Boltzmann method for axisymmetric thermocapillary flows. Int J Heat Mass Transf 104:337–350

    Article  Google Scholar 

  7. 7.

    Siddheshwar PG, Meenakshi N (2015) Amplitude equation and heat transport for Rayleigh–Bénard convection in Newtonian liquids with nanoparticles. Int J Appl Comput Math 3(271):292

    MATH  Google Scholar 

  8. 8.

    Wei Y, Dou HS, Qian Y, Wang Z (2017) A novel two-dimensional coupled lattice Boltzmann model for incompressible ßow in application of turbulence Rayleigh–Taylor instability. Comput Fluids 156:96–102

    Article  Google Scholar 

  9. 9.

    Chandrasekhar S (1961) Hydrodynamic and hydromagnetic stability. Oxford University Press, London

    Google Scholar 

  10. 10.

    Drazin PG, Reid WH (1981) Hydrodynamic Stability”. Cambridge University Press, Cambridge

    Google Scholar 

  11. 11.

    Osman T, Nilanjan C, Robert JP (2012) Laminar Rayleigh–Bénard convection of yield stress fluids in a square enclosure. J Non-Newton Fluid Mech 171–172:83–96

    Google Scholar 

  12. 12.

    Raji A (2013) Natural convection heat transfer enhancement in a square cavity periodically cooled form above. Numer Heat Transf Part A 63:511–533

    Article  Google Scholar 

  13. 13.

    Guo Y, Bennacer R, Shen S, Ameziani DE, Bouzidi M (2010) Simulation of mixed convection in slender rectangular cavity with lattice-Boltzmann method. Int J Numer Methods Heat Fluid Flow 20(1):130–148

    Article  Google Scholar 

  14. 14.

    Khali S, Nebbali R, Bouhadef K, Ameziani DE (2013) Numerical investigation of non-Newtonian fluids in annular ducts with finite aspect ratio using lattice Boltzmann method. Phys Rev E 87:053002

    Article  Google Scholar 

  15. 15.

    D’Humieres D (1994) Generalized lattice-Boltzmann equations. In: Shizgal BD, Weaver DP (eds) Rarefied gas dynamics—theory and simulations. American Institute of Aeronautics and Astronautics Inc., Reston, pp 450–458

    Google Scholar 

  16. 16.

    Bhatnagar PL, Gross EP, Krook M (1954) A model for collision processes in gases. I. Small amplitude processes in charged and neutral one-component systems. Phys Rev 94(3):511

    Article  Google Scholar 

  17. 17.

    Lallemand P, Lu L-S (2000) Theory of the lattice Boltzmann method: dispersion, dissipation, isotropy, Galilean invariance, and stability. Phys Rev E 61(6):6546

    MathSciNet  Article  Google Scholar 

  18. 18.

    Boutra A, Benkahla YK, Ameziani DE, Bennacer R (2017) Lattice Boltzmann simulation of natural convection in cubical enclosures for Bingham plastic fluid. Heat Transf Res 48(4):1–18

    Google Scholar 

  19. 19.

    Ouertani N (2008) Numerical simulation of two-dimensional Rayleigh–Bénard convection in an enclosure. C R Mecanique 336:464–470

    Article  Google Scholar 

  20. 20.

    Benarab Z, Bouabdallah S (2013) Modes de Convection de Rayleigh–Bénard dans une cavité rectangulaire

Download references


The authors are grateful to the partners who contributed to this study, Laboratoire Energétique Mécanique & Ingénierie (LEMI) as well as Laboratoire des Transports Polyphasiques et Milieux Poreux (LTPMP).

Author information



Corresponding author

Correspondence to Nabil Himrane.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Himrane, N., Ameziani, D.E. & Nasseri, L. Study of thermal comfort: numerical simulation in a closed cavity using the lattice Boltzmann method. SN Appl. Sci. 2, 785 (2020).

Download citation


  • Component
  • Thermal comfort
  • Periodic heating
  • Rayleigh–Bénard convection
  • Lattice Boltzmann method