Advanced Automatic Code Generation for Multiple Relaxation-Time Lattice Boltzmann Methods

11/04/2022
by   Frederik Hennig, et al.
0

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.

READ FULL TEXT

page 16

page 19

research
01/31/2020

lbmpy: Automatic code generation for efficient parallel lattice Boltzmann methods

Lattice Boltzmann methods are a popular mesoscopic alternative to macros...
research
01/31/2020

lbmpy: A flexible code generation toolkit for highly efficient lattice Boltzmann simulations

Lattice Boltzmann methods are a popular mesoscopic alternative to macros...
research
07/27/2021

Three-Dimensional Central Moment Lattice Boltzmann Method on a Cuboid Lattice for Anisotropic and Inhomogeneous Flows

We present a new 3D lattice Boltzmann (LB) algorithm based on central mo...
research
08/11/2019

Optimal Control for Chemotaxis Systems and Adjoint-Based Optimization with Multiple-Relaxation-Time Lattice Boltzmann Models

This paper is devoted to continuous and discrete adjoint-based optimizat...
research
08/31/2022

Constructing relaxation systems for lattice Boltzmann methods

We present the first top-down ansatz for constructing lattice Boltzmann ...
research
05/05/2022

Rigorous derivation of the macroscopic equations for the lattice Boltzmann method via the corresponding Finite Difference scheme

Lattice Boltzmann schemes are efficient numerical methods to solve a bro...
research
02/17/2021

Automatic Generation of Interpolants for Lattice Samplings: Part II – Implementation and Code Generation

In the prequel to this paper, we presented a systematic framework for pr...

Please sign up or login with your details

Forgot password? Click here to reset