Skip to content

Lattice Boltzmann Theory

Overview

The Lattice Boltzmann Method (LBM) is a mesoscopic simulation technique based on the discrete Boltzmann equation. Rather than solving the Navier–Stokes equations directly, LBM evolves a set of particle distribution functions on a regular lattice. Macroscopic quantities (density, momentum, pressure) are obtained as moments of these distribution functions.

LBM is particularly well suited to:

  • Complex and moving boundary geometries
  • Multi-phase and multi-component flows
  • Coupling with phase-field models
  • Efficient parallelization

Discrete Boltzmann equation

The continuous Boltzmann equation with BGK (Bhatnagar–Gross–Krook) collision approximation is:

(1)ft+ef=1τ(ffeq)+F

where:

  • f(x,e,t) — particle distribution function
  • e — particle velocity
  • τ — relaxation time (controls viscosity)
  • feq — Maxwell–Boltzmann equilibrium distribution
  • F — external force source term

In LBM this is discretized on a lattice with a finite set of velocities {ei}, yielding a set of populations fi(x,t).


D3Q27 lattice

OpenPhase uses the D3Q27 velocity set: 3 spatial dimensions, 27 discrete velocities. Each velocity ei=(eix,eiy,eiz) with components in {1,0,1}.

The three stencils (1D, 2D, 3D) use different weight sets but are stored in the same 3×3×3 array structure:

D1Q3 weights (1D, active dimension only):

(2)w0=46,w±1=16

D2Q9 weights (2D):

(3)w00=49,w±10=w0±1=19,w±1±1=136

D3Q27 weights (3D):

(4)w000=827,w±100=227,w±1±10=154,w±1±1±1=1216

The stencil is automatically selected during initialization based on the number of active spatial dimensions in Settings::Grid.


Equilibrium distribution

The local equilibrium distribution for component n at lattice velocity (x,y,z) is:

(5)fxyzeq=wxyzρn[1+exyzucs2+(exyzu)22cs4|u|22cs2]

where:

  • ρn — lattice density of component n
  • u — local macroscopic fluid velocity
  • cs2=13 — lattice speed of sound squared (in lattice units)
  • wxyz — D3Q27 stencil weight for direction (x,y,z)

Macroscopic quantities

Density and momentum are obtained as moments of the populations:

(6)ρ=x,y,zfxyz

(7)ρu=x,y,zfxyzexyz

The lattice pressure (isothermal EOS) is:

(8)p=cs2ρ=ρ3

BGK collision step

The BGK collision operator relaxes populations toward equilibrium:

(9)fxyz=fxyz1τ(fxyzfxyzeq)+Δfxyzforce

where τ is the relaxation time and Δfforce is the force contribution (Guo or exact-difference forcing scheme).

The kinematic viscosity is related to τ by:

(10)ν=cs2(τ12)Δt

In lattice units Δt=1, so choosing τ directly sets the viscosity.


Streaming step

After collision, populations are propagated to neighboring nodes along their respective velocity directions:

(11)fxyz(x+exyz,t+1)=fxyz(x,t)

This is the exact advection step — no numerical diffusion is introduced.


Chapman–Enskog expansion

A Chapman–Enskog expansion of the LBM equations recovers the incompressible Navier–Stokes equations at second order:

(12)ρt+(ρu)=0

(13)ρ(ut+uu)=p+μ2u+F

with dynamic viscosity μ=ρν.


Force incorporation

The module supports two force-incorporation schemes:

Guo forcing scheme

Modifies both the equilibrium (via corrected velocity) and the collision term:

(14)Δfxyzforce=wxyz(112τ)[exyzucs2+(exyzu)exyzcs4]F

Exact difference method (EDM)

Computes the force contribution as the difference of equilibrium distributions evaluated at shifted momenta:

(15)Δfxyzforce=fxyzeq(ρ,u+Δu)fxyzeq(ρ,u)

where Δu=FΔt/ρ.

EDM conserves momentum exactly and is preferred for multi-phase flows.


Lattice units and physical scaling

LBM operates in dimensionless lattice units. Physical quantities are recovered via scaling coefficients defined in FlowSolverLBM:

FieldCoefficientUnit
DensitydRhokg/m³
PressuredPPa
Momentum densitydmkg/(m² s)
Force densitydfkg/(m² s²)
Kinematic viscositydnum²/s
Timedts

Proper choice of these coefficients ensures the simulation is in the physically relevant regime (low Mach number for incompressible flow).


Stability considerations

  • The relaxation time τ must satisfy τ>0.5 for stability.
  • Typical values: τ[0.55,2.0].
  • Very low viscosity (τ0.5) leads to instability.
  • Use Do_FixPopulations = true to correct negative populations that can arise near interfaces or obstacles.
  • For two-phase flows, the density ratio ρliquid/ρvapor is limited by the pseudo-potential model; excessively high ratios cause instability.

Released under the GNU GPLv3 License.