Accuracy and performance of the lattice Boltzmann method with 64-bit, 32-bit, and customized 16-bit number formats

Moritz Lehmann, Mathias J. Krause, Giorgio Amati, Marcello Sega, Jens Harting, and Stephan Gekle
Phys. Rev. E 106, 015308 – Published 26 July 2022

Abstract

Fluid dynamics simulations with the lattice Boltzmann method (LBM) are very memory intensive. Alongside reduction in memory footprint, significant performance benefits can be achieved by using FP32 (single) precision compared to FP64 (double) precision, especially on GPUs. Here we evaluate the possibility to use even FP16 and posit16 (half) precision for storing fluid populations, while still carrying arithmetic operations in FP32. For this, we first show that the commonly occurring number range in the LBM is a lot smaller than the FP16 number range. Based on this observation, we develop customized 16-bit formats—based on a modified IEEE-754 and on a modified posit standard—that are specifically tailored to the needs of the LBM. We then carry out an in-depth characterization of LBM accuracy for six different test systems with increasing complexity: Poiseuille flow, Taylor-Green vortices, Karman vortex streets, lid-driven cavity, a microcapsule in shear flow (utilizing the immersed-boundary method), and, finally, the impact of a raindrop (based on a volume-of-fluid approach). We find that the difference in accuracy between FP64 and FP32 is negligible in almost all cases, and that for a large number of cases even 16-bit is sufficient. Finally, we provide a detailed performance analysis of all precision levels on a large number of hardware microarchitectures and show that significant speedup is achieved with mixed FP32/16-bit.

  • Figure
  • Figure
  • Figure
  • Figure
  • Figure
  • Figure
  • Figure
15 More
  • Received 12 January 2022
  • Accepted 7 June 2022

DOI:https://doi.org/10.1103/PhysRevE.106.015308

©2022 American Physical Society

Physics Subject Headings (PhySH)

Fluid DynamicsPhysics of Living SystemsStatistical Physics & ThermodynamicsNonlinear Dynamics

Authors & Affiliations

Moritz Lehmann1,*, Mathias J. Krause2, Giorgio Amati3, Marcello Sega4, Jens Harting4,5, and Stephan Gekle1

  • 1Biofluid Simulation and Modeling–Theoretische Physik VI, University of Bayreuth, Bayreuth, Germany
  • 2Institute of Mechanical Process Engineering and Mechanics, Karlsruhe Institute of Technology, Karlsruhe, Germany
  • 3CINECA, SCAI–SuperComputing Applications and Innovation Department, Rome Branch, Italy
  • 4Helmholtz Institute Erlangen-Nürnberg for Renewable Energy, Erlangen, Germany
  • 5Department of Chemical and Biological Engineering and Department of Physics, Friedrich-Alexander-Universität, Erlangen, Germany

  • *Corresponding author: moritz.lehmann@uni-bayreuth.de

Article Text (Subscription Required)

Click to Expand

References (Subscription Required)

Click to Expand
Issue

Vol. 106, Iss. 1 — July 2022

Reuse & Permissions
Access Options
Author publication services for translation and copyediting assistance advertisement

Authorization Required


×
×

Images

×

Sign up to receive regular email alerts from Physical Review E

Log In

Cancel
×

Search


Article Lookup

Paste a citation or DOI

Enter a citation
×