The Lattice Boltzmann Method (LBM) is a computational fluid dynamics (CFD) technique used to simulate fluid flow and other complex physical phenomena. Unlike traditional CFD methods that solve the Navier-Stokes equations directly, LBM operates at a mesoscopic level, modeling fluid as a collection of particles that propagate and collide on a discrete lattice grid.
The LBM method uses a distribution function \(f_i(\mathbf{x}, t)\) that describes the probability of finding a particle at a given lattice site \(\mathbf{x}\) and time \(t\) with a discrete velocity \(\mathbf{c}_i\). The distribution function evolves according to the following equation:
\[f_i(\mathbf{x} + \mathbf{c}_i \Delta t, t + \Delta t) = f_i(\mathbf{x}, t) + \frac{1}{\tau} \left( f_i^{\text{eq}}(\mathbf{x}, t) - f_i(\mathbf{x}, t) \right)\]Where:
The equilibrium distribution function \(f_i^{\text{eq}}(\mathbf{x}, t)\) is given by:
\[f_i^{\text{eq}} = w_i \left( \rho + \frac{\rho}{c_s^2} \mathbf{c}_i \cdot \mathbf{u} + \frac{\rho}{2 c_s^4} \left( (\mathbf{c}_i \cdot \mathbf{u})^2 - u^2 \right) \right)\]Where:
$$ u = | \mathbf{u} | $$ is the magnitude of the macroscopic velocity. |
The macroscopic fluid variables, such as density \(\rho\) and velocity \(\mathbf{u}\), are obtained by moments of the distribution function. The density \(\rho\) is the zeroth moment, and the velocity \(\mathbf{u}\) is the first moment:
\[\rho(\mathbf{x}, t) = \sum_i f_i(\mathbf{x}, t)\] \[\rho(\mathbf{x}, t) \mathbf{u}(\mathbf{x}, t) = \sum_i \mathbf{c}_i f_i(\mathbf{x}, t)\]Where:
The relaxation time \(\tau\) is related to the kinematic viscosity \(\nu\) through the following relation:
\[\nu = \frac{c_s^2 (\tau - \frac{1}{2})}{6}\]Where \(c_s\) is the speed of sound in the lattice.
LBM requires the specification of boundary conditions to handle fluid interactions with solid boundaries. Common boundary conditions include:
The three main components of the method are firstly the streaming part, where the distribution functions from neighboring lattice sites are pulled, the calculation of macroscopic variables, and lastly the collision step, wherein an operator is executed, calculating the new distribution function and storing the new grid.
In every timestep, the lattice grid is traversed, and the new distribution function values are then calculated only depend on old grid values. The means the algorithm is embarrassingly parallel and suited for distributed HPC systems.
Related program(s): Lattice Boltzmann kernel (LBC)