D2Q9 Lattice Boltzmann Channel Flow

A completed C++17 implementation of the Lattice Boltzmann Method for two-dimensional Poiseuille flow, with the numerical profile compared with the analytical parabolic solution.

LBM velocity profile compared with analytical Poiseuille solution
D2Q9LBM lattice
160 × 50example lattice
20,000time steps
τ = 0.8relaxation time

Problem

Poiseuille flow is a controlled LBM validation case because the expected velocity profile is known analytically. This makes it possible to check the method and boundary treatment before moving to more complex flows.

Numerical method

Lattice

D2Q9 Lattice Boltzmann model with a BGK single-relaxation-time collision step.

Boundary conditions

Bounce-back treatment at the upper and lower walls with a periodic streamwise direction.

Driving force

A small constant body force drives the channel flow and produces the analytical parabolic profile.

Validation run

The included figures use nx = 160, ny = 50, steps = 20000, tau = 0.8, forceX = 1e-6, and saveEvery = 200.

Representative results

My contribution

Completed scope and limitations

The completed project uses a single-relaxation-time BGK model and one channel-flow validation case. It does not include an automated grid-convergence study or parallel implementation. Possible follow-up research includes grid refinement, Reynolds-number variation, MRT collision, and OpenMP or MPI acceleration.