3.1. Numerical Model Verification
The current study validates the precision of grid distribution and confirms the accurate performance of the selected model. Firstly, based on Corvaro’s experimental conditions (
Pr = 0.71,
Ra = 2.02 × 10
5) and boundary conditions, the temperature distributions at the midline position and the
Nu of the heat source were compared under different grid distributions (140 × 140, 180 × 180, 200 × 200). The left and right temperature boundary is the low-temperature boundary, and the upper boundary is the adiabatic boundary. The lower boundary consists of a constant temperature heat source for the heat source part, while the remaining portion is characterized by an adiabatic boundary. By comparing the temperature distribution at the position of the horizontal midline, as depicted in
Figure 2, it becomes challenging to discern intuitively any noticeable differences among the temperature distributions under the three grid distributions. However, the Nu of the heat source in the three cases is compared with Corvaro’s formula
[
23]. It is observed that for a grid distribution of 140 × 140, there is a relatively larger relative error of 6.22%, while when the grid distribution is 180 × 180, the relative error decreases to 3.88%, which differs by less than 3.07% from the relative error obtained with a grid distribution of 200 × 200. The results are basically consistent, so as to ensure the simulation accuracy and save computing resources. Therefore, this paper selects 180 × 180 mesh precision for numerical simulation (
Table 1).
In order to ensure the accuracy of the simulation results, the BGK-LBM model was used to simulate and compare the natural convection results in a square chamber with Corvaro’s experiment with the same parameters (
Pr = 0.71,
Ra = 2.02 × 10
5), as shown in
Figure 3. The isotherm distribution of the numerical simulation and experimental results was in good agreement, thus verifying the accuracy of the model established in this paper.
3.2. Influence of Amplitude A of Sinusoidal-Temperature-Distributed Heat Source at High Temperature on Heat Transfer Characteristics of Natural Convection in Cavity
The characteristics of natural convective heat transfer in a square cavity can be ascertained by the Nusselt number at the boundary of the heat source [
24],
.
The influence of the amplitude A of heat source on convective heat transfer is investigated in this section. When Pr = 0.71 and Ra = 105, the temperature distribution for a non-uniform heat source can be described by the function T = (1 − A) + Asin(nx + θ). The boundary length of heat source with a high-temperature non-uniform distribution is Lh = 1/2, and the initial position is Lc = 1/4. The natural convection process in a square cavity with n = π, A = 0.1, 0.2, 0.3, and 0.4 is analyzed in this section. The temperature distribution slope along the heat source increases with a larger magnitude of amplitude A, while it decreases with a smaller magnitude of amplitude A, as the temperature distribution of the heat source part is influenced by A.
When
Ra = 10
5 and
n = π, increasing the amplitude results in a higher slope of the temperature sine distribution on the heat source, thereby amplifying the influence of heat source asymmetry and favoring the formation of the primary vortex within the cavity. For instance, at a phase angle of 2π/16, the heat source exhibits an uneven temperature distribution with a slightly higher left side and lower right side. When the amplitude
A = 0.1, the non-uniform temperature difference of the heat source is 0.076, and the size of the two vortices formed in the flow field is approximately equal, with a slightly larger vortex observed on the right side but not significantly prominent. When the amplitude
A reaches 0.2, the non-uniform temperature difference of the heat source attains a value of 0.153, thereby augmenting the impact of temperature difference on density within the flow field and leading to pronounced compression exerted by the right vortex onto the left vortex. When
A increases to 0.4, the non-uniform temperature difference of the heat source reaches 0.306, and its non-uniformity further intensifies. The lift on the left side significantly surpasses that on the right side, resulting in an increased density difference. Consequently, the right vortex exerts additional pressure on the left vortex, leading to the emergence of a dominant main vortex (
Figure 4) that occupies nearly the entire flow field.
When
A = 0.1 and phase angles
θ = 0, the isothermal temperature distribution in the square cavity exhibits symmetry, resulting in the generation of two vortices of equal size within the flow-field distribution diagram. When the phase angles increase to 4π/16, the maximum temperature in the boundary of the sinusoidal-temperature-distributed heat source shifts towards the left, resulting in a larger temperature difference between the left and right parts of the square cavity. The isotherm with a higher temperature exhibits a negligible deviation towards the left, while the vortex in the flow field on the right expands towards the left and marginally compresses the vortex on the left, as illustrated in
Figure 5.
The relatively symmetrical temperature field is primarily attributed to the small amplitude A, which results in an inconspicuous uneven distribution of temperature in the heat source region and a negligible temperature difference. Additionally, there is no distinct density variation between the left and right parts.
When the amplitude
A = 0.2, there is an observed increase in the slope of the temperature distribution within the heat source region. When the phase angle is equal to zero, the isotherm distribution of the temperature field remains symmetrical, resulting in a relatively high temperature at the center. Consequently, two symmetrical primary vortices will form within the flow field. As the phase angles increase, a gradual temperature asymmetry emerges with the left side of the heat source exhibiting higher temperatures compared to the right side at the central symmetric position. Consequently, an increasingly pronounced temperature difference arises and leads to a progressive compression of the vortex on the left by its counterpart on the right. When
θ = 4π/16, the right vortex in the cavity fully occupies the space. The enhancement of temperature heterogeneity in the heat source is further pronounced when amplitude
A increases to 0.3. At the same phase angle, the non-uniformity of the temperature field becomes more pronounced, with a noticeable inclination in the high-temperature isotherm towards the right side. Consequently, this leads to a reduced density of fluid on the right compared to that on the left within the flow field, resulting in a more prominent squeezing effect exerted by the right vortex onto the left vortex. When
θ = 3π/16, the flow field retains only a single dominant vortex. When
A reaches 0.4, the phase angle of the flow field forming the primary vortex decreases solely at
θ = 2π/16. As depicted by the red step line in
Figure 5, a single dominant vortex is observed within each square cavity below the red line, wherein the phase angle associated with this primary vortex decreases as the amplitude value increases.
The variation in the local
Nu of the heat source with the phase angle under different amplitudes is analyzed, which serves as a crucial parameter for evaluating the convective heat transfer effect, as depicted in
Figure 6. Regarding the phase angle range from 0 to π,
Nu basically shows a decreasing trend with an increase in the phase angle. The decline in
Nu at an accelerated rate is consistently observed when the phase angle reaches 4π/16. The corresponding
Nu decreases as amplitude
A increases at the same phase angle. The
Nu of the large amplitude value
A exhibits a more pronounced decrease with an increase in the phase angle.
To investigate the convective heat transfer characteristics in a square cavity, focusing on temperature distribution, this section presents the variation in temperature along the central line for different phase angles, as illustrated in
Figure 7. It can be seen from the figure that as the phase angle increases, the temperature distribution at the center line position in the square cavity gradually transitions from left–right symmetry to asymmetry and then reverts back to symmetry. The temperature at the same location decreases as amplitude
A increases. Simultaneously, the phase angle significantly influences the maximum temperature position of the center line of the square cavity. The maximum temperature gradually decreases as the phase angle increases, while the temperature difference between different amplitude values is observed to increase.
3.3. Influence of Initial Position Variation in Sinusoidal-Temperature-Distributed Heat Source on Convective Heat Transfer Characteristics
In this section, the convective heat transfer conditions are investigated to examine the influence of the initial position of a sinusoidal-temperature-distributed heat source on its effect, considering a heat source length of 1/2 and temperature distribution T = (1 − A) + Asin(nx + θ). The analysis focused on different initial positions, namely, 1/4, 5/16, 3/8, 7/16, 1/2, respectively.
The flow field and isotherm diagram of convective heat transfer with
Ra = 10
5,
A = 0.1, and
n = π are depicted in
Figure 8, illustrating the impact of the varying initial positions of the high-temperature heat source. The temperature field distribution exhibits symmetry when the initial position of the heat source
Lc = 1/4 is considered, as depicted in
Figure 8. Additionally, two symmetrical vortices are observed within the flow field. When the heat source is initially positioned at
Lc = 9/32, a higher temperature gradient is observed on the left side of the heat source compared to the right side. As a result, the right side exhibits lower density compared to the left side, leading to the suppression of the vortex on the right by the dominant vortex on the left. When the heat source is initially positioned at
Lc = 5/16, a higher temperature gradient is observed on the left side of the heat source compared to the right side, leading to flow-field instability. The right vortex ascends due to buoyant lift and is compressed by the left vortex, resulting in the left vortex becoming the dominant one, as depicted in
Figure 8. The temperature gradient on the right side of the heat source continues to decrease as the initial position of the hot source
Lc moves to 7/16, albeit inconspicuously. Therefore, the heat transfer effect is marginally diminished. When the initial position shifts to 1/2, a significant decrease in the temperature gradient of the heat source is observed, leading to a continuous decline in heat transfer capacity. This phenomenon can be attributed to the direct contact between the right end of the heat source and the adiabatic wall, as well as the elimination of heat dissipation through the cold wall. The flow field still exhibits a dominant left vortex, while the right vortex remains confined to the upper right corner with negligible alterations, as shown in
Figure 8.
In order to comprehensively investigate the variation law of a sinusoidal-temperature-distributed heat source in a square cavity with respect to its initial position, the current work also examines the characteristics of local
Nu in the square cavity (
Ra = 10
5,
n = π) under different amplitude changes associated with the initial position of the sinusoidal-temperature-distributed heat source. When the amplitude
A = 0.1, the local
Nu initially increases to a maximum value of 9.52 as the heat source moves towards the right around
Lc = 5/16, and subsequently exhibits a continuous decrease, as illustrated in
Figure 9, which corresponds to the conclusion in the previous section. Simultaneously, within the range of initial heat source positions from 1/4 to 7/16, there is negligible variation in the
Nu value; however, when
A = 0.1, a marginal change of 3.85% in the
Nu number is observed. Subsequently, it slightly decreases with increasing amplitude and reaches a value of 3.79% at
A = 0.4. When
Lc reaches 1/2,
Nu exhibits a discernible decrease by approximately 13%, primarily attributed to a significant reduction in the temperature gradient near the right section of the heat source. This finding aligns with the conclusion presented in
Figure 8.
Even with an expanded range in
Ra between 10
4 and 10
6, the variation trend of local
Nu numbers remains consistent when
A = 0.1 and
n = π, as depicted in
Figure 10. The
Nu attains its maximum value near
Lc = 5/16, followed by a rapid decline after
Lc exceeds 7/16. Moreover, for the same initial position
Lc, an increase in the
Ra leads to a corresponding augmentation of the local
Nu number within the square cavity, thereby enhancing convective heat transfer effects.
3.4. Influence of Angular Velocity n of Sinusoidal-Temperature-Distributed Heat Source on Convective Heat Transfer Characteristics
The present section investigates the influence of angular velocity n of a non-uniform heat source on convective heat transfer in a square cavity. In this section, the angular velocity n is chosen as an integer multiple of π, ranging from π to 16π, in order to ensure that the heat source component encompasses at least one complete half of a sine wave. The initial position of the heat source is determined at Lc = 1/4, the length of the heat source is Lh = 1/2, and the temperature distribution is T = (1 − A) + Asin(nx + θ), where θ = 0.
This section initially examines the impact of angular velocity on convective heat transfer in a square cavity with varying Rayleigh numbers, while maintaining
A = 0.1. When
Ra = 10
4 and
n = π, the heat source exhibits a fully distributed sinusoidal half wave, resulting in a symmetrical isotherm distribution within the temperature field. Consequently, two symmetric main vortices are generated in the flow field. When
n = 2π, the temperature distribution of the heat source exhibits a complete sine wave pattern, with higher temperatures on the left side and lower temperatures on the right side. Consequently, there is a larger temperature gradient on the left side accompanied by lower density, while the vortex on the right side gradually displaces or compresses the vortex on the left side. As
n continues to increase up to 5π, the temperature distribution of the heat source region exhibits symmetrical characteristics once again, while maintaining left–right symmetry in the two primary vortices within the flow field. Upon reaching 6π, an increase in n leads to the reappearance of temperature asymmetry in the heat source. However, compared to the case when
n = 2π, the asymmetry in temperature distribution is less pronounced. The temperature and flow fields will exhibit increased instability at
Ra = 10
5, primarily due to the enhanced dominance of buoyancy force over viscous force. When
n = π, the temperature field and the flow field still exhibit symmetry; however, due to the influence of buoyancy, there is a displacement in the vortex position of the two primary vortices. At
n = 2π, the asymmetry in heat source temperature exerts a significant impact on the flow field, with the vortex on the right completely dominating it. When
n increases to 6π, the temperature distribution of the heat source becomes asymmetric once again. However, due to the constant length of the heat source, an increase in
n leads to a greater number of sine waves distributed within it, resulting in a more uniform temperature distribution. Consequently, as depicted in
Figure 11, two primary vortices reappear in the flow field; nevertheless, owing to the influence of temperature heterogeneity, the right vortex continues to exert pressure on the left vortex. As
Ra = 10
6, the dominance of buoyancy over viscosity continues to increase, thereby further enhancing the impact of temperature inhomogeneity on the flow field. As depicted in the figure, when n is π and 5π, the heat source exhibits a symmetric temperature distribution, resulting in two symmetric primary vortices within the flow field. However, as n reaches 6π, an independent primary vortex emerges while no secondary vortices of comparable magnitude appear.
Furthermore, this section examines the impact of angular velocity n on convective heat transfer characteristics at varying amplitudes. As depicted in
Figure 12a, for
A = 0.1,
Ra = 10
4 and
Ra = 10
5, the maximum value of
Nu is observed at
n = π. Subsequently, as the angular velocity increases, there is an overall decreasing trend in
Nu. Notably, when
n represents an odd multiple of π, a higher
Nu is obtained, whereas for even multiples of π,
Nu tends to be smaller. When
Ra = 10
4 and
Ra = 10
5,
Nu after
n exhibits minimal fluctuation, with a marginal difference of 3.1% and 2.8%, respectively. When
Ra = 10
6, there is no discernible regular fluctuation trend; however, the magnitude of the change in
Nu remains consistently close to 10.7%. With the increase in amplitude
A,
Nu exhibits a consistent downward fluctuation trend with varying
n under
Ra = 10
4 and
Ra = 10
5; however, this trend becomes more pronounced. Simultaneously, when
Ra = 10
6 and amplitude
A varies between 0.3 and 0.4, an overall downward trend becomes evident as
n increases to approximately 11π, as shown in
Figure 12c,d. This is attributed to the increase in
n, which leads to a higher number of sine waves in the heat source section and subsequently reduces temperature heterogeneity. Notably, when
n is an odd multiple of π, the temperature distribution within the heat source section becomes symmetrically centered, resembling a constant temperature heat source.
3.5. Application of Machine Learning to the Natural Convection of Sinusoidal-Temperature-Distributed Heat Sources
The heat transfer performance of the lower cavity under a specific operational condition is rapidly predicted in this section. Therefore, the BP algorithm is employed to establish the correlation between the key parameters (Ra, A, n) and Nu that governs the convective heat transfer performance of the square cavity.
The input parameters (
Ra,
A,
n) are utilized in this section to generate the corresponding
Nu through LBM under specific working conditions. Consequently, a dataset comprising 372 groups is generated. The dataset is then randomly shuffled to mitigate the risk of overfitting in the training model, subsequently partitioned into three subsets: the training data set, validation data set, and test data set, with proportions of 80%, 10%, and 10%, respectively. The neural network model structure employed in this section comprises an input layer, 10 hidden layers, and an output layer, as depicted in
Figure 13.
The Levenberg–Marquardt backpropagation algorithm, known for its second-order training speed, is employed in the training process of the neural network. The training results are illustrated in
Figure 14. After the training, the R values of the training data, verification data, and test data all exceed 0.99, demonstrating high accuracy. Moreover, the predicted values exhibit excellent agreement with the simulation results obtained from the lattice Boltzmann method.
Therefore, this section applies the model to novel working conditions, that is, conditions that have not been encountered previously, in order to predict the heat transfer characteristics under corresponding circumstances and compare them with the LBM simulation results obtained under identical operating conditions. The comparison between machine learning prediction results and LBM simulation results is illustrated in
Figure 15, for the case where
A = 0 and
n = π, with
Ra ranging from 5 × 10
3 to 5 × 10
5.
The figure demonstrates a strong agreement between the predicted results and the LBM simulation results, with a relative error of less than 4%, falling well within the acceptable range of accuracy. Therefore, the model’s generalization performance and accuracy are further validated, providing valuable insights for the application of machine learning in the field of heat transfer.