\inline{add meta-intro to the chapter: goals, structure, summarize my own contributions}
This chapter dedicated to the lattice Boltzmann method (LBM), an attractive numerical approach for the simulation of fluid flow \cite{kruger:2017lattice}, chemical or thermal transport \cite{Sharma2020,Dapelo2021}, radiative transport \cite{Mink2020,Mink2022}, and other problems.
The method can be easily and efficiently parallelized \cite{kruger:2017lattice} and the advent of general-purpose computing on graphics processing units (GPGPU) made large-scale and highly resolved numerical simulations of turbulent flows feasible \cite{kang2013,geier2015cumulant,kumar2018,peng2018,wittmann2013,zakirov2021}.
The lattice Boltzmann method \cite{kruger:2017lattice} (LBM) is an alternative to traditional computational methods such as finite difference, finite volume, and finite element methods.
LBM can be formulated as a time-explicit scheme that can be easily parallelized \cite{kruger:2017lattice} and the advent of general-purpose computing on graphics processing units (GPGPU) made large-scale numerical simulations of \todo{make it more general -- this is the first mention of flow in this section/chapter}turbulent flows feasible \cite{kang2013,geier2015cumulant,kumar2018,peng2018,wittmann2013,zakirov2021}.
For the simulation of air flow in a \todo{wind tunnel simulations are in the next chapter}wind tunnel, we could take advantage of the previously developed parallel LBM algorithms validated in \cite{fucik2019,eichler2021a,eichler2021b,eichler2022}.
The content of the chapter focuses on the implementation of the method and performance optimizations for distributed parallel computing platforms, which is the author's contribution within the research group.
Hence, the method is described with the objective to formulate the computational algorithm and details such as rigorous derivation of the method are omitted.
The LBM implementation used in this work was developed, analyzed and validated in \cite{fucik2019,fucik2020,eichler2021a,eichler2021b,eichler2022,fucik:lbman,fucik:lbmat}.
The chapter is organized as follows.
First, the background of the method in the kinetic theory of gases is described in \cref{sec:lbm:background} and its components are introduced in \cref{sec:lbm:components}.
The following \cref{sec:lbm:streaming schemes} describes the streaming schemes and the computational algorithm is formulated in \cref{sec:lbm:computational algorithm} in several variants leading to the scalable distributed algorithm.
\Cref{sec:lbm:implementation} provides insights into the implementation and \cref{sec:lbm:optimization} describes important performance optimizations.
The final \cref{sec:lbm:results} contains the results of several computational benchmarks, including strong and weak scaling studies on the Karolina supercomputer~\cite{it4i:karolina}.
\section{Background}
\label{sec:lbm:background}
The lattice Boltzmann method \cite{kruger:2017lattice} (LBM) is an alternative to traditional computational methods such as finite difference, finite volume, and finite element methods.
Instead of directly solving a macroscopic PDE, such as the Navier--Stokes equations or a general advection-diffusion equation, LBM approximates the temporal evolution of macroscopic quantities such as density $\rho$~[\si{\kilogram\per\cubic\metre}], velocity $\vec v$~[\si{\metre\per\second}], and other variables (e.g., pressure, stress tensor, etc.) using probability moments of the density distribution function $f(\vec x, \vec\xi, t)$~[\si{\kilogram\second\cubed\per\metre\tothe{6}}] that represents the density of particles with velocity $\vec\xi=[\xi_x, \xi_y, \xi_z]^T$~[\si{\metre\per\second}] at position $\vec x$ and time $t$.
Based on the kinetic theory \cite{kruger:2017lattice}, the density distribution function $f$ evolves according to the Boltzmann transport equation
\begin{equation}\label{eq:lbm:BTE}
@@ -13,6 +24,7 @@ where $\rho$~[\si{\kilogram\per\cubic\metre}] is the mass density, $\vec F = [F_
LBM follows from the discretization of \cref{eq:lbm:BTE} in space, velocity space, and time.
\section{Components of the method}
\label{sec:lbm:components}
The detailed derivation of LBM is not within the scope of this thesis.
Instead, we review the components needed to describe the implementation of the method and refer the reader to \cite{kruger:2017lattice} for further details.
@@ -272,6 +284,7 @@ However, none of the aforementioned papers discuss advanced topics such as MPI c
Hence, these streaming patterns are not yet implemented in our LBM code.
\section{Computational algorithm}
\label{sec:lbm:computational algorithm}
The time-stepping algorithm for LBM can be generalized to cover all aforementioned streaming patterns.
\Cref{alg:LBM} summarizes the steps according to our implementation for the A-A pattern and the push/pull schemes with the A-B pattern.
@@ -612,6 +625,7 @@ The thread block size is selected such that $B_y$ is a multiple of 32 (i.e., the
Since the verification and validation of the LBM implementation was performed primarily by other research team members \cite{fucik2019,eichler2021a,eichler2021b,eichler2022}, this section presents only the performance evaluation, which is the author's original work.
author={Mink, Albert and McHardy, Christopher and Bressel, Lena and Rauh, Cornelia and Krause, Mathias J.},
journal={Journal of Quantitative Spectroscopy and Radiative Transfer},
title={Radiative transfer lattice {B}oltzmann methods: {3D} models and their performance in different regimes of radiative transfer},
year={2020},
issn={0022-4073},
pages={106810},
volume={243},
abstract={The numerical prediction of radiative transport is a challenging task due to the complexity of the radiative transport equation. We apply the lattice Boltzmann method (LBM), originally developed for fluid flow problems, to solve the radiative transport in volume. One model (meso RTLBM) is derived directly from a discretization of the radiative transport equation, yielding in a precise but numerical costly scheme. The second model (macro RTLBM) solves the Helmholtz equation, which is a proper approximation for highly scattering volumes. Both numerical algorithms are validated against Monte-Carlo data for a set of 35 optical parameters, which correspond to radiative transport ranging from ballistic to diffuse regimes. Together with a set of four benchmark simulations, the comprehensive validation concludes the overall quality and detects asymptotic trends for radiative transport LBM. Furthermore, an accuracy map is presented, which summarizes the error for all parameters. This graph allows to determine the validity range for both radiative transport LBM at a glance. Finally, comprehensive guidelines are formulated to facilitate the choice of the radiative transport LBM model.},
doi={10.1016/j.jqsrt.2019.106810},
}
@Article{Mink2022,
author={Mink, Albert and Schediwy, Kira and Posten, Clemens and Nirschl, Hermann and Simonis, Stephan and Krause, Mathias J.},
journal={Energies},
title={Comprehensive computational model for coupled fluid flow, mass transfer, and light supply in tubular photobioreactors equipped with glass sponges},
year={2022},
issn={1996-1073},
number={20},
volume={15},
abstract={The design and optimization of photobioreactor(s) (PBR) benefit from the development of robust and quantitatively accurate computational fluid dynamics (CFD) models, which incorporate the complex interplay of fundamental phenomena. In the present work, we propose a comprehensive computational model for tubular photobioreactors equipped with glass sponges. The simulation model requires a minimum of at least three submodels for hydrodynamics, light supply, and biomass kinetics, respectively. First, by modeling the hydrodynamics, the light–dark cycles can be detected and the mixing characteristics of the flow (besides the mass transport) can be analyzed. Second, the radiative transport model is deployed to predict the local light intensities according to the wavelength of the light and scattering characteristics of the culture. The third submodel implements the biomass growth kinetic by coupling the local light intensities to hydrodynamic information of the CO2 concentration, which allows to predict the algal growth. In combination, the novel mesoscopic simulation model is applied to a tubular PBR with transparent walls and an internal sponge structure. We showcase the coupled simulation results and validate specific submodel outcomes by comparing the experiments. The overall flow velocity, light distribution, and light intensities for individual algae trajectories are extracted and discussed. Conclusively, such insights into complex hydrodynamics and homogeneous illumination are very promising for CFD-based optimization of PBR.},
doi={10.3390/en15207671},
}
@Article{fucik2020,
author={Fučík, Radek and Galabov, Radek and Pauš, Petr and Eichler, Pavel and Klinkovský, Jakub and Straka, Robert and Tintěra, Jaroslav and Chabiniok, Radomír},
journal={Magnetic Resonance Materials in Physics, Biology and Medicine},
title={Investigation of phase-contrast magnetic resonance imaging underestimation of turbulent flow through the aortic valve phantom: experimental and computational study using lattice {B}oltzmann method},
year={2020},
issn={1352-8661},
number={5},
pages={649--662},
volume={33},
abstract={The accuracy of phase-contrast magnetic resonance imaging (PC-MRI) measurement is investigated using a computational fluid dynamics (CFD) model with the objective to determine the magnitude of the flow underestimation due to turbulence behind a narrowed valve in a phantom experiment.},