On floating point precision in computational fluid dynamics using OpenFOAM
Authors:
F. Brogi,
S. Bnà ,
G. Boga,
G. Amati,
T. Esposti Ongaro,
M. Cerminara
Abstract:
Thanks to the computational power of modern cluster machines, numerical simulations can provide, with an unprecedented level of details, new insights into fluid mechanics. However, taking full advantage of this hardware remains challenging since data communication remains a significant bottleneck to reaching peak performances. Reducing floating point precision is a simple and effective way to redu…
▽ More
Thanks to the computational power of modern cluster machines, numerical simulations can provide, with an unprecedented level of details, new insights into fluid mechanics. However, taking full advantage of this hardware remains challenging since data communication remains a significant bottleneck to reaching peak performances. Reducing floating point precision is a simple and effective way to reduce data movement and improve the computational speed of most applications. Nevertheless, special care needs to be taken to ensure the quality and convergence of computed solutions, especially when dealing with complex fluid simulations. In this work, we analyse the impact of reduced (single and mixed compared to double) precision on computational performance and accuracy for computational fluid dynamics. Using the open source library OpenFOAM, we consider incompressible, compressible, and multiphase fluid solvers for testing on relevant benchmarks for flows in the laminar and turbulent regime and in the presence of shock waves. Computational gain and changes in the scalability of applications in reduced precision are also discussed. In particular, an ad hoc theoretical model for the strong scaling allows us to interpret and understand the observed behaviors, as a function of floating point precision and hardware specifics. Finally, we show how reduced precision can significantly speed up a hybrid CPU-GPU implementation, made available to OpenFOAM end-users recently, that simply relies on a GPU linear algebra solver developed by hardware vendors.
△ Less
Submitted 13 September, 2022;
originally announced September 2022.
Hermite regularization of the Lattice Boltzmann Method for open source computational aeroacoustics
Authors:
Federico Brogi,
Orestis Malaspinas,
Bastien Chopard,
Costanza Bonadonna
Abstract:
The lattice Boltzmann method (LBM) is emerging as a powerful engineering tool for aeroacoustic computations. However, the LBM has been shown to present accuracy and stability issues in the medium-low Mach number range, that is of interest for aeroacoustic applications. Several solutions have been proposed but often are too computationally expensive, do not retain the simplicity and the advantages…
▽ More
The lattice Boltzmann method (LBM) is emerging as a powerful engineering tool for aeroacoustic computations. However, the LBM has been shown to present accuracy and stability issues in the medium-low Mach number range, that is of interest for aeroacoustic applications. Several solutions have been proposed but often are too computationally expensive, do not retain the simplicity and the advantages typical of the LBM, or are not described well enough to be usable by the community due to proprietary software policies. We propose to use an original regularized collision operator, based on the expansion in Hermite polynomials, that greatly improves the accuracy and stability of the LBM without altering significantly its algorithm. The regularized LBM can be easily coupled with both non-reflective boundary conditions and a multi-level grid strategy, essential ingredients for aeroacoustic simulations. Excellent agreement was found between our approach and both experimental and numerical data on two different benchmarks: the laminar, unsteady flow past a 2D cylinder and the 3D turbulent jet. Finally, most of the aeroacoustic computations with LBM have been done with commercial softwares, while here the entire theoretical framework is implemented on top of an open source library (Palabos).
△ Less
Submitted 5 October, 2017;
originally announced October 2017.