Generation of efficient adjoint lattice Boltzmann methods with algorithmic differentiation

28 Pages Posted: 1 Apr 2026

See all articles by Shota Ito

Shota Ito

Karlsruhe Institute of Technology

Adrian Kummerländer

Karlsruhe Institute of Technology

Julius Jeßberger

Karlsruhe Institute of Technology

Johannes L. Grafen

Karlsruhe Institute of Technology

Ecem Öz

Karlsruhe Institute of Technology

Nicolas R. Gauger

affiliation not provided to SSRN

Max Sagebaum

affiliation not provided to SSRN

Mathias J. Krause

Karlsruhe Institute of Technology

Abstract

Adjoint-based optimization is widely used to address large-scale flow control problems with distributed control variables, as the computational cost of gradient evaluation is independent of the dimension of the control space. Within this context, the lattice Boltzmann method (LBM) represents an attractive discretization scheme, as it not only reduces the computational expense within optimization iteration loops but also exposes Jacobian expressions through its explicit operator-split formulation, thereby simplifying adjoint analysis. Despite these advantages, most existing adjoint LBM approaches rely on manual derivation of the adjoint system, lack automation, and are highly case-specific. High-level frameworks based on automatic differentiation (AD) address this limitation by enabling generic gradient computation but often compromise numerical performance. In this work, we present a novel framework implemented in the open-source LBM library OpenLB that enables the automated generation of discrete adjoint LBM collision kernels. AD is applied locally to evaluate the Jacobians of the adjoint system, eliminating manual derivations. Code generation combined with common subexpression elimination (CSE) removes the runtime overhead of AD tapes, allowing efficient adjoint collision kernels to be generated from their primal implementations. We conduct a detailed kernel-level performance analysis that is rarely addressed in the literature, where the arithmetically preferred AD mode for adjoint LBM kernels is identified within the proposed approach, and roofline analysis evaluates performance rather than strong and weak scaling tests, which primarily reflect communication overhead. The impact of CSE is investigated across different hardware architectures and floating-point precisions, demonstrating speedups of up to a factor of seven for adjoint collision kernels for double precision on GPUs.

Keywords: Lattice Boltzmann Method, computational fluid dynamics, Adjoint analysis, Algorithmic differentiation, Code generation

Suggested Citation

Ito, Shota and Kummerländer, Adrian and Jeßberger, Julius and Grafen, Johannes L. and Öz, Ecem and Gauger, Nicolas R. and Sagebaum, Max and Krause, Mathias J., Generation of efficient adjoint lattice Boltzmann methods with algorithmic differentiation. Available at SSRN: https://ssrn.com/abstract=6505987 or http://dx.doi.org/10.2139/ssrn.6505987

Shota Ito (Contact Author)

Karlsruhe Institute of Technology ( email )

Kaiserstraße 12
Karlsruhe, 76131
Germany

Adrian Kummerländer

Karlsruhe Institute of Technology ( email )

Julius Jeßberger

Karlsruhe Institute of Technology ( email )

Johannes L. Grafen

Karlsruhe Institute of Technology ( email )

Kaiserstraße 12
Karlsruhe, 76131
Germany

Ecem Öz

Karlsruhe Institute of Technology ( email )

Kaiserstraße 12
Karlsruhe, 76131
Germany

Nicolas R. Gauger

affiliation not provided to SSRN ( email )

Max Sagebaum

affiliation not provided to SSRN ( email )

Mathias J. Krause

Karlsruhe Institute of Technology ( email )

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
32
Abstract Views
67
PlumX Metrics