Expand description
GPU-accelerated Lattice Boltzmann Method (D2Q9) — CPU mock backend.
Implements the D2Q9 velocity set with BGK collision, periodic streaming, macroscopic quantity recovery, and diagnostic utilities for vorticity and divergence fields.
Structs§
- D2Q9
Weights - Lattice weight set and direction set for the D2Q9 velocity model.
- GpuLbm
Dispatch - High-level dispatcher that couples a
GpuLbmGridwith per-cell boundary conditions and orchestrates time-stepping. - GpuLbm
Grid - 2-D D2Q9 LBM grid (CPU mock of a GPU backend).
- LbmCell
- A single D2Q9 LBM cell holding incoming and outgoing distribution functions.
- LbmDiagnostics
- Diagnostic utilities for LBM simulations.
Enums§
- LbmBoundary
- Boundary condition type for a cell or face.
Constants§
- D2Q9_
DIRS - D2Q9 discrete velocity directions
[cx, cy]. - D2Q9_
OPPOSITE - Opposite (bounce-back) indices for D2Q9.
- D2Q9_Q
- Number of discrete velocities in the D2Q9 velocity set.
- D2Q9_
WEIGHTS - Standard D2Q9 lattice weights.
Functions§
- bgk_
equilibrium - Compute the BGK equilibrium distribution for one velocity direction.
- relaxation_
from_ viscosity - Compute the BGK relaxation parameter
ωfrom kinematic viscosity andcs².