LBM boundary conditions — accuracy versus simplicity
Our earlier Lattice Boltzmann Method article introduced bounce-back and Zou-He walls in passing. In practice, boundary conditions are where most LBM codes gain or lose their accuracy: the collision and streaming steps are second-order accurate almost by construction, but a careless wall treatment can silently drop the whole simulation to first order, or introduce a slip velocity that ruins a drag or Strouhal-number (a dimensionless measure of how fast vortices are shed behind an obstacle) measurement. This article compares the main families — on-grid vs halfway bounce-back, Zou-He, interpolated bounce-back for curved geometry, and immersed boundary forcing — by accuracy order, robustness and implementation cost.
1. Why boundary conditions are the weak link in LBM
After streaming, a node adjacent to a solid wall is missing some of its incoming distribution functions f_i — the ones that would have arrived from inside the solid, where there is no fluid. A boundary condition's job is to reconstruct exactly these missing populations so that the macroscopic velocity and (where relevant) pressure at the wall match the physical condition — no-slip, prescribed inflow velocity, fixed outlet pressure, or a curved obstacle surface.
The bulk LBM update (BGK collision + streaming) is formally second-order accurate in space and time via the Chapman-Enskog expansion. Many boundary schemes, however, are only first-order accurate, or accurate only for walls aligned exactly with the lattice — and the error they introduce at the wall does not stay local: it pollutes the whole flow field over enough time steps, especially in recirculating or high-Reynolds-number flows.
2. On-grid vs halfway bounce-back
On-grid (simple) bounce-back places the solid wall exactly on a lattice node. Any population arriving there is reflected straight back:
This is trivial to implement and unconditionally stable, but the effective no-slip location is only first-order accurate — the true zero-velocity surface sits somewhere between the wall node and its neighbour, not exactly on the node, introducing an O(Δx) error in wall position that shows up as an O(Δx) error in drag coefficients and boundary-layer thickness.
Halfway bounce-back instead places the wall exactly midway between the last fluid node and the first solid node. The reflection rule is identical in code, but because the wall sits at the midpoint of the link, the effective no-slip location becomes second-order accurate — matching the accuracy of the bulk scheme, at zero extra computational cost. This single geometric choice — treating the wall as living between nodes, not on them — is the most impactful, cheapest accuracy fix available in LBM wall treatment.
3. Zou-He velocity and pressure boundaries
Bounce-back only handles solid walls; it says nothing about prescribing a known inlet velocity or outlet pressure. Zou & He (1997) derived boundary populations by combining the known macroscopic condition with the bounce-back rule applied only to the non-equilibrium part of the distribution normal to the boundary. For a left inlet with velocity u = (u_x, 0) in D2Q9 (directions 1, 5, 8 unknown after streaming):
f_1 = f_3 + (2/3) ρ_in u_x
f_5 = f_7 − (1/2)(f_2 − f_4) + (1/6) ρ_in u_x
f_8 = f_6 + (1/2)(f_2 − f_4) + (1/6) ρ_in u_x
The same derivation gives a pressure (density) outlet: prescribe ρ_out directly and solve the analogous three equations for the outgoing velocity component instead. Zou-He is second-order accurate and exactly reproduces a known uniform inflow with no start-up transient — a clear improvement over the older approach of simply setting all nine f_i to their equilibrium value at inflow, which is only first-order accurate and introduces spurious pressure waves at start-up.
4. Curved walls — interpolated bounce-back
Halfway bounce-back is exact only for walls that run exactly along lattice links. A circular cylinder or aerofoil intersects lattice links at an arbitrary fraction q ∈ (0, 1) of the link length from the fluid node. Treating this as ordinary halfway bounce-back (q = 0.5 everywhere) introduces an O(Δx) staircase error in geometry that dominates for coarse grids.
Bouzidi, Firdaouss & Lallemand (2001) derived a second-order accurate interpolated bounce-back that linearly (or quadratically) interpolates between the wall's exact intersection fraction q and the neighbouring fluid nodes:
f_ī(x_f, t+1) = 2q f_i*(x_f, t) + (1 − 2q) f_i*(x_ff, t)
For q ≥ 1/2 (wall close to the solid node):
f_ī(x_f, t+1) = (1/(2q)) f_i*(x_f, t) + ((2q − 1)/(2q)) f_ī*(x_f, t)
x_f: fluid node adjacent to the wall; x_ff: next fluid node further from the wall
q: fraction of the link length from x_f to the true wall location
This recovers second-order accuracy for arbitrarily curved solid boundaries at the cost of pre-computing q for every boundary link once at setup time (a geometric ray-intersection test) — a one-time cost that pays for itself immediately in accuracy for the Kármán-vortex-street and flow-past-cylinder class of simulations.
5. Immersed boundary method — moving/deformable walls
For walls that move or deform every time step (a beating heart valve, a flapping wing, a swimming fish), recomputing bounce-back geometry every frame is expensive and can introduce a "staircase" jitter in the moving boundary. The Immersed Boundary Method (IBM) instead represents the boundary as a set of Lagrangian marker points carrying a forcing term that is spread onto the underlying fixed Eulerian lattice via a smoothed delta function (e.g. the Peskin 4-point kernel):
U(X_k) = Σ_x u(x) δ_h(x − X_k) Δx^d interpolate velocity back to marker
The lattice never needs re-meshing as the boundary moves — only the marker positions and forces update — which makes IBM the method of choice for fluid-structure interaction, at the cost of a smeared (rather than sharp) no-slip condition of typically first-to-second order, depending on kernel choice and force computation scheme (direct forcing vs feedback forcing).
6. Open boundaries — outflow and free-slip
Besides walls and prescribed inlets, two further boundary types recur constantly:
- Convective / extrapolation outflow: the simplest robust outlet copies (zero-gradient extrapolation) or convects the unknown populations from the interior using a local convective velocity, avoiding artificial wave reflections back into the domain — critical for vortex-shedding simulations where a naive fixed-pressure outlet reflects shed vortices.
- Free-slip (symmetry) walls: implemented as a specular reflection rather than bounce-back — the wall-normal velocity component is reversed but the tangential component is preserved, useful for exploiting a plane of symmetry to halve the simulated domain.
7. Choosing a scheme — accuracy vs cost
| Scheme | Geometry | Order | Extra cost |
|---|---|---|---|
| On-grid bounce-back | straight, lattice-aligned | 1st | none |
| Halfway bounce-back | straight, lattice-aligned | 2nd | none |
| Zou-He | straight inlet/outlet | 2nd | low (per-node algebra) |
| Interpolated bounce-back | arbitrary curved | 2nd | medium (setup-time q) |
| Immersed boundary | moving/deformable | 1st–2nd | high (marker tracking, spreading) |
The practical rule: use the cheapest scheme that matches your geometry exactly. Halfway bounce-back is free and should always replace on-grid bounce-back for flat walls; interpolated bounce-back is worth the one-time setup cost whenever the obstacle is curved and quantitative accuracy (drag, Strouhal number, pressure coefficient) matters; immersed boundary is reserved for genuinely moving geometry where re-meshing the lattice every step is not an option.
8. Practical checklist
- Always verify boundary accuracy independently: run Poiseuille channel flow (analytic parabolic profile) with your wall scheme and confirm the numerical error decreases at the expected order as Δx is refined.
- Watch for spurious slip velocity at flat walls with on-grid bounce-back — a tell-tale sign is a channel-flow velocity profile whose analytic fit implies a no-slip plane offset by about Δx/2 from the wall node.
- For vortex-shedding benchmarks (Kármán vortex street), always use interpolated bounce-back on the cylinder — on-grid or halfway bounce-back alone on a "staircased" circle introduces spurious high-frequency noise in the lift/drag signal that can be mistaken for physical shedding harmonics.
- Cross-check outflow boundaries by moving the outlet further downstream and confirming the solution near the region of interest is unchanged — sensitivity to outlet position signals reflected waves from an inadequate outflow condition.
🌀 Lattice-Boltzmann Flow
See halfway bounce-back and inlet/outlet boundaries running live in a 2D D2Q9 flow-past-cylinder simulation.