Article Fluid Physics · ≈ ⏱ 11 min read

Solving Navier-Stokes Numerically: FDM vs FVM vs LBM

The Navier-Stokes equations have no general closed-form solution, so every CFD (Computational Fluid Dynamics) solver has to discretize them somehow. Three families dominate practice: Finite Difference, Finite Volume, and Lattice-Boltzmann. Each makes a different trade-off between accuracy, geometric flexibility, and how well it maps onto a GPU.

TL;DR: FDM discretizes derivatives on a grid and is simplest but struggles with complex shapes; FVM tracks conserved fluxes through control-volume faces, giving exact conservation and dominating industrial CFD on unstructured meshes; LBM simulates particle populations on a lattice, is embarrassingly parallel on GPUs, and handles complex boundaries with simple bounce-back rules.

1. Why discretize?

The incompressible Navier-Stokes equations describe momentum and mass conservation for a viscous fluid:

Momentum ∂u/∂t + (u·∇)u = −∇p/ρ + ν∇²u + f

Continuity (incompressibility) ∇·u = 0

The nonlinear advection term (u·∇)u and the coupling between velocity u and pressure p mean that, apart from a handful of idealized cases (Poiseuille flow, Stokes flow around a sphere), there is no analytic solution. Numerical methods replace the continuous PDE with a finite set of algebraic equations solved at discrete points, cells, or lattice nodes. FDM, FVM and LBM differ mainly in what gets discretized — derivatives directly, conservation laws over control volumes, or the underlying kinetic (particle-distribution) description of the fluid.

2. Finite Difference Method (FDM)

FDM replaces derivatives with algebraic difference quotients on a structured grid. The simplest central-difference approximation for the second derivative (viscous diffusion term) is:

Central difference (2nd derivative) ∂²u/∂x² ≈ (ui+1 − 2ui + ui−1) / Δx²

A classic incompressible solver built on FDM is Chorin's projection method: advance velocity ignoring pressure, then solve a Poisson equation for pressure and subtract its gradient to enforce ∇·u = 0.

Projection method (3 steps) 1. u* = uⁿ + Δt·(−(u·∇)u + ν∇²u) (advect + diffuse, ignore pressure)
2. ∇²p = (ρ/Δt)·∇·u* (pressure Poisson equation)
3. un+1 = u* − (Δt/ρ)·∇p (project onto divergence-free field)

Strengths: conceptually simple, easy to implement on uniform grids, and the go-to choice for the stable-fluids style solvers used in real-time smoke/water demos (see our Navier-Stokes in WebGL article).

Weaknesses: struggles with irregular geometry — a curved cylinder wall doesn't align with a Cartesian grid, so boundary conditions need ad-hoc immersed-boundary tricks. Mass conservation is only approximate unless the Poisson solve converges tightly, and stability requires the CFL condition Δt ≤ Δx/|u|max.

3. Finite Volume Method (FVM)

FVM starts from the integral form of the conservation laws instead of the differential form. The domain is split into small control volumes (cells), and for each cell the method tracks the net flux of mass and momentum crossing its faces:

Integral conservation (generic scalar φ) d/dt ∫V φ dV + ∮∂V (φu·n̂) dA = ∮∂V (Γ∇φ·n̂) dA + ∫V S dV

Because the divergence theorem converts volume integrals of derivatives into surface integrals of fluxes, FVM is conservative by construction — whatever mass/momentum leaves one cell through a face enters the neighboring cell through the same face, exactly, to machine precision. This is the single biggest reason FVM dominates industrial CFD (OpenFOAM, Fluent, StarCCM+): shock capturing, mass balance, and unstructured (tetrahedral/polyhedral) meshes around complex geometry — car bodies, turbine blades, cylinders — all fall out naturally.

The trade-off is implementation complexity: flux reconstruction schemes (upwind, QUICK, TVD limiters) and unstructured mesh data structures are considerably more code than a simple Cartesian FDM stencil, and gradient reconstruction at cell centers introduces its own numerical diffusion if done carelessly.

4. Lattice-Boltzmann Method (LBM)

LBM takes a completely different starting point: instead of discretizing the macroscopic Navier-Stokes equations, it discretizes the Boltzmann transport equation for a simplified kinetic model of the fluid — populations of fictitious particles fi(x, t) that can only move along a small, fixed set of lattice directions (9 in 2D, the "D2Q9" model).

Lattice-BGK equation fi(x + eiΔt, t + Δt) = fi(x, t) − (1/τ)·[fi(x, t) − fieq(x, t)]

Each timestep is exactly two local operations: collide (relax each node's distributions toward a local equilibrium feq, which is a function of local density and velocity only) and stream (shift each distribution one lattice step along its own direction). Crucially, the macroscopic Navier-Stokes behaviour — including the exact pressure and viscosity — emerges from this microscopic rule via a Chapman-Enskog expansion, without ever assembling or solving a global linear system.

Strengths: both steps above touch only a node and its immediate neighbours, so LBM is embarrassingly parallel — ideal for GPU compute shaders. Complex boundaries (a cylinder, a porous rock sample) are handled with simple local bounce-back rules rather than global mesh generation. This is exactly the method behind our Lattice-Boltzmann in 200 Lines of JS article and the Kármán Vortex Street simulation.

Weaknesses: the standard lattice is uniform, so local mesh refinement near a wall (where boundary-layer gradients are steepest) needs specialized multi-block or adaptive-lattice techniques. Very high Reynolds number, highly compressible, or strongly stratified flows push the method outside its comfort zone without extensions (multi-relaxation time, entropic LBM, cascaded collision operators).

5. Side-by-side comparison

PropertyFDMFVMLBM
What is discretizedPDE derivatives on grid pointsIntegral conservation over control volumesBoltzmann kinetic equation on a velocity lattice
ConservationApproximateExact (by construction)Exact (mass & momentum from moments of f)
Complex geometryPoor (needs immersed boundary)Excellent (unstructured meshes)Good (local bounce-back, but uniform lattice)
Pressure solveGlobal Poisson equation each stepGlobal Poisson / pressure-correction (SIMPLE, PISO)None — pressure is a local moment of f (p = cs²ρ)
Parallelism / GPU fitGood (structured stencils)Moderate (unstructured, irregular memory access)Excellent (fully local updates)
Typical useTeaching, real-time graphics/smokeIndustrial CFD, aerospace, automotivePorous media, microfluidics, real-time GPU CFD
Compressible flowYes, with careYes, standardLimited (low-Mach approximation by default)
Common ground

All three methods must satisfy a stability limit tied to the speed of information propagation: the CFL condition for FDM/FVM, and an analogous lattice-speed constraint (u < cs/√3 ≈ 0.577 in lattice units) for LBM.

6. Which one should you use?

  • Learning the fundamentals or building a real-time smoke/water demo: FDM with a projection method — smallest amount of code, well documented (Jos Stam's "Stable Fluids").
  • Simulating flow around a real car, wing, or turbine blade with certified accuracy: FVM — the industry standard, with mature turbulence models (k-ε, k-ω SST) and validated solvers.
  • GPU-accelerated interactive CFD, porous media, or microfluidics: LBM — trivial parallelism and simple boundary handling win when you need many time steps at interactive frame rates.

In practice, professional pipelines often mix them: FVM for the high-fidelity certification run, LBM for fast design-space exploration, and FDM-based solvers for the artistic real-time previews used in games and this site's own browser simulations.

▶ Live Demo

🧮 Try the Navier-Stokes solver

An Eulerian-grid solver using the projection method described above — draw smoke, watch vorticity roll up in real time.

Open simulation →

🔗 Related Simulations

🌀Kármán Vortex Street 💨NS Solver 🏊Drag Coefficient