CFC 2025

Automatic generation of adjoint lattice Boltzmann methods through reverse mode alogorithmic differentiation in OpenLB

  • Ito, Shota (KIT)
  • Kummerländer, Adrian (KIT)
  • Bukreev, Fedor (KIT)
  • Krause, Mathias Joachim (KIT)

Please login to view abstract download link

Two main challenges in addressing optimal flow control problems with gradient-based methods are (i) the lack of a generic approach to obtaining the system sensitivities and (ii) the numerical performance required to conduct such studies in a reasonable computation time. Automatic differentiation (AD) is a popular approach to obtaining system sensitives in numerical investigations due to its generic approach and ideal accuracy. However, the numerical scaling regarding the number of derivatives of the forward mode or the expensive requirements on the computation memory of the reverse mode still present limitations on their usage to address complex flow control problems. In the current study, we present our approach to generating efficient code for arbitrary adjoint operators in lattice-Boltzmann simulations through reverse mode automatic differentiation. The algorithms of the lattice Boltzmann method (LBM) show a high affinity towards parallelization, which reveal their suitability to address expensive problems, such as in topology optimization. Instead of performing flow simulations with the forward mode of AD through operator overloading [1], the current approach generates the adjoint operators before executing the simulation. The primal expressions are retrieved from a dummy lattice cell containing the physical model, on which the reverse mode AD is applied to obtain the sensitivities. The resulting formulations are then optimized regarding common sub-expressions and used to produce executable code to run efficient adjoint simulations. The adjoint code generation, combined with OpenLB’s support for the execution of the implemented models on various computation platforms [2], delivers a flexible and efficient method for obtaining system sensitives, which can be then used to solve flow control problems. The talk introduces the code generation process, followed by academic validation cases and comparison with continuously derived adjoint operators. Large-scale applications showcase the capability of the numerical framework with evaluations of the scalability of the generated code. Mathias J. Krause et al., Parallel fluid flow control and optimisation with lattice Boltzmann methods and automatic differentiation, 2013, DOI:10.1016/j.compfluid.2012.07.026 Mathias J. Krause et al., OpenLB—Open source lattice Boltzmann code, 2021, DOI:10.1016/j.camwa.2020.04.033