Turbulent flows can be found in many industrial applications, and have a profound impact on the drag resistance and heat transfer characteristics of engineering equipment. While the behavior of turbulence is well-documented for canonical flow cases, its behavior under complex con
...
Turbulent flows can be found in many industrial applications, and have a profound impact on the drag resistance and heat transfer characteristics of engineering equipment. While the behavior of turbulence is well-documented for canonical flow cases, its behavior under complex conditions is largely unknown. This poses a significant challenge when designing engineering equipment, since it is essential to accurately predict the impact of variable property flows and surface roughness on pressure losses and heat transfer rates. Yet such practical cases are beyond the scope of canonical flow data. During recent years, the combination of advances in machine learning and GPU-accelerated flow solvers has yielded promising results in the fields of turbulence and scalar transport. Using a few modern GPUs and state-of-the-art algorithms, it is now possible to simulate highly complex turbulent flows in short periods of time. This has enabled further progress in the field of machine learning for fluid mechanics, since high-fidelity turbulent flow databases can be easily generated, and new models can be trained to predict increasingly complex flow effects accurately. In this project, multiple challenges are addressed, such as optimizing GPU-accelerated DNS solvers for extreme-scale simulations, creating data-augmented RANS turbulence models for flows with strong variations in their thermophysical properties, and developing machine learning models for turbulent flows past rough surfaces.
Prior to working in GPU-accelerated simulations, the sub-project about machine learning for variable property flows focused on building data-augmented RANS turbulence models using a technique known as FIML (Field Inversion Machine Learning). In this framework, non-linear optimization is first performed to obtain an ideal set of corrections, after which a neural network (or another model) is trained to predict the observed corrections. When working with variable-property flows, several challenges arise, such as not knowing beforehand the local fluid properties due to thermal changes. This makes it difficult, for instance, to calculate the input features for the neural network. The solution created is a feedback loop, where CFD predictions are used to re-calculate the local fluid properties and to update the neural network input features, etc. The results show that the data-augmented RANS model can accurately improve the predictions for unique flow cases, which need unusually high corrections not observed in the training set. Additionally, a weighted relaxation factor methodology is proposed, to ensure convergence of the RANS models after inserting neural network corrections. The final results show that, for the most challenging CFD case identified, our machine learning system is able to reduce the L-infinity error on the velocity profile from 23.4% to 4.0%.
To generate the required amounts of data for machine learning studies regarding complex geometries like roughness, it was necessary to develop a GPU-accelerated DNS solver. This work focuses on the implementation of a parallel tridiagonal solver for extreme-scale simulations, and the creation of a new cross-platform communication library for supercomputers with either AMD or NVIDIA GPUs. In general terms, turbulent flow simulations in GPUs can be highly efficient, since all operations can be mapped to different GPU threads. However, large-scale data transfers are the main performance bottleneck of GPU-based simulations. While halo exchanges between GPU sub-domains have a minimal impact, the large-scale transpose operations needed for 3D arrays inside Poisson/Helmhotz solvers occupy most of the total running time. Therefore, any transpose operation avoided will drastically improve the running times for the entire DNS solver. By using a parallel tridiagonal solver, it is possible to reduce the number of transposes (for full 3D arrays) by 50% for 2D pencil decompositions inside the Poisson/Helmhotz solvers, and to replace these avoided transposes by simplified operations with a computational cost resembling halo exchanges. Additionally, in this work, a new opportunity to speed up simulations was found, by re-deriving the coefficients of parallel tridiagonal solvers to substantially improve the efficiency and the GPU parallelization of the DNS solver for implicit 1-D diffusion equations. Based on these improvements, it is observed in the results that the efficiency of the DNS solver is substantially improved for extreme-scale simulations in the LUMI and Leonardo supercomputers. Moreover, we show that the entire DNS solver can operate using 2D pencil decompositions without performance degradation compared to most optimal 1D decompositions available for smaller systems. Therefore, the parallel tridiagonal solver enables high-performance in extreme-scale simulations, where 1D decompositions are not feasible.
To enable extreme-scale simulations in AMD GPUs, a new cross-platform communication library was created, named diezDecomp. This library is able to achieve high performance working with both CPUs and GPUs in NVIDIA or AMD-based supercomputer. The underlying algorithm corresponds to an advanced implementation that works by directly intersecting the x/y/z bounds of all MPI tasks and scheduling data transfer operations. This allows the implementation of any-to-any transpose operations between mismatched 2D pencil decompositions, with complex communication patterns beyond the scope of traditional all-to-all operations. In extreme-scale simulations, direct x-to-z transposes can improve efficiency while solving for implicit 1D diffusion, but they are not available in existing libraries. Thanks to the flexibility of the diezDecomp library, x-to-z transposes can be easily implemented, and the running times of implicit 1D diffusion solvers were improved up to 55% for extreme-scale simulations in the LUMI supercomputer with 1024 GCDs.
The benefits of machine learning to predict the thermal and hydrodynamic behavior of turbulent flows past rough surfaces are explored in Chapter 4. Due to the complexity of this task, a convolutional neural network was used to (independently) scan the input height maps of rough surfaces, and to generate detailed 2-D maps with the local skin friction factors and Nusselt numbers. The proposed neural network is optimized to have linear time complexity while creating 2D maps, instead of quadratic complexity as in naive approaches. The validation study using randomized surfaces with the Fourier spectrum of grit-blasted surfaces shows that machine learning can make accurate 2D predictions for both the local skin friction factors and Nusselt numbers of rough surfaces, with median deviations of 28.43% for the skin friction factors and 6.37% for the Nusselt numbers respectively. The averaged errors in the predictions for skin friction factors and Nusselt numbers were reduced from 24.9% and 13.5% using traditional correlations to only 8.1% and 2.9% thanks to machine learning.
Since the neural network predictions for the thermal behavior of rough surfaces were particularly promising, a further optimization study is presented in Chapter 5. Here, the objective is to combine the benefits of machine learning and GPU-accelerated simulations to improve convective heat transfer in dimpled-surfaces. Remarkably, it was found that machine learning can find a highly optimized dimpled-surface with a 53% higher Nusselt number using cross-aligned dimples after being trained with only random surfaces (displaying lower thermal performance). After the second iteration of the reinforcement learning loop, it was confirmed that the surface found by machine learning created a flow pattern with helical structures inside the dimples. All other tested parameters had lower thermal performance.
In summary, it is concluded that GPU-based DNS solvers can be optimized to enable extreme-scale simulations with minimal performance degradation. Creating highly flexible communication frameworks, such as the diezDecomp library, is also possible while keeping identical running times as traditional libraries. This research project also showcases how machine learning can be an effective tool in fluid mechanics, to predict the behavior of turbulent flows past complex geometries or to account for changes in flows with strong variations in their thermophysical properties.