Advanced Automatic Code Generation for Multiple Relaxation-Time Lattice Boltzmann Methods
arXiv:2211.02435 · doi:10.1137/22M1531348
Abstract
The scientific code generation package lbmpy supports the automated design and the efficient implementation of lattice Boltzmann methods (LBMs) through metaprogramming. It is based on a new, concise calculus for describing multiple relaxation-time LBMs, including techniques that enable the numerically advantageous subtraction of the constant background component from the populations. These techniques are generalized to a wide range of collision spaces and equilibrium distributions. The article contains an overview of lbmpy's front-end and its code generation pipeline, which implements the new LBM calculus by means of symbolic formula manipulation tools and object-oriented programming. The generated codes have only a minimal number of arithmetic operations. Their automatic derivation rests on two novel Chimera transforms that have been specifically developed for efficiently computing raw and central moments. Information contained in the symbolic representation of the methods is further exploited in a customized sequence of algebraic simplifications, further reducing computational cost. When combined, these algebraic transformations lead to concise and compact numerical kernels. Specifically, with these optimizations, the advanced central moment- and cumulant-based methods can be realized with only little additional cost as when compared with the simple BGK method. The effectiveness and flexibility of the new lbmpy code generation system is demonstrated in simulating Taylor-Green vortex decay and the automatic derivation of an LBM algorithm to solve the shallow water equations.
arXiv comment23 pages, 6 figures
References in corpus (13)
- DOLFIN: Automated Finite Element Computing
- Firedrake: automating the finite element method by composing abstractions
- Initial and Boundary Conditions for the Lattice Boltzmann Method
- Statistical Mechanics of the Fluctuating Lattice Boltzmann Equation
- Comprehensive comparison of collision models in the lattice Boltzmann framework: Theoretical investigations
- Massively Parallel Algorithms for the Lattice Boltzmann Method on Non-uniform Grids
- waLBerla: A block-structured high-performance framework for multiphysics simulations
- Three-dimensional cascaded lattice Boltzmann method: improved implementation and consistent forcing scheme
- Consistent forcing scheme in the cascaded lattice Boltzmann method
- Comparison of different Propagation Steps for the Lattice Boltzmann Method
- On the Three-dimensional Central Moment Lattice Boltzmann Method
- On the accuracy and performance of the lattice Boltzmann method with 64-bit, 32-bit and novel 16-bit number formats
- Extreme-Scale Block-Structured Adaptive Mesh Refinement