Fluid Simulation Methods — SPH vs LBM vs MPM vs FVM
Every fluid simulator makes a fundamental choice: represent fluid as discrete particles (Lagrangian), as values on a fixed grid (Eulerian), or as a hybrid. Each choice determines accuracy, parallelisability, and what phenomena can be captured. This article surveys the four dominant approaches in games, VFX, and scientific computing.
1. Lagrangian vs Eulerian Framing
All fluid simulation methods can be classified by their reference frame:
- Lagrangian: Track fluid parcels as they move. Each particle carries mass, velocity, pressure. The grid (if any) moves with the fluid. Advection is trivially accurate; interpolation is the hard part.
- Eulerian: Fix the grid and watch fluid properties flow through it. Pressure projection and divergence-free velocity fields are solved per-cell. Good for large-scale steady flows; advection requires numerical diffusion management.
- Hybrid (FLIP, APIC, MPM): Particles carry state; a background grid accumulates and projects forces. Combines advantages of both at the cost of transfer overhead.
2. SPH — Smoothed Particle Hydrodynamics
SPH represents fluid as a set of particles. Each property (density, velocity, pressure) is interpolated from neighbours using a smoothing kernel W(r, h). Originally developed for astrophysical gas dynamics (Gingold & Monaghan 1977), it is now ubiquitous in real-time water and lava simulations.
Strengths
- Free surfaces handled naturally — no tracking of water surface needed
- Easy to implement from scratch (weekend project)
- Naturally handles large deformations — no mesh tangling
- GPU-friendly with spatial hash acceleration
Weaknesses
- Incompressibility problem: WCSPH uses a stiff equation of state (high sound speed), requiring very small timesteps. PCISPH / DFSPH (2019) solve pressure iteratively each step for near-incompressible results at larger dt.
- Noisy density estimates at particle-sparse regions
- O(N log N) per step with spatial hashing; O(N²) naive
3. LBM — Lattice Boltzmann Method
LBM works at the mesoscopic scale — between molecular dynamics and Navier-Stokes. Fluid is modelled as particle probability density functions f_i streaming between fixed grid cells and colliding locally. The macroscopic fluid variables emerge from moments of f.
Strengths
- Highly parallelisable — each cell updates independently from neighbours; ideal for GPU
- Handles complex geometry without mesh generation (Bounce-back BC)
- Straightforward implementation of multi-phase flows, porous media
- Used in industrial CFD for high-Re internal flows (PowerFLOW by Exa/3DS)
Weaknesses
- Limited to incompressible, low-Mach flows (Ma < ~0.3) in standard formulation
- Free surfaces require complex Volume-of-Fluid or free-surface LBM extensions
- Grid stores 19–27 floats per cell (D3Q27) — memory-intensive at high resolution
- Viscosity tuning via τ can become numerically unstable for τ very close to 0.5
4. MPM — Material Point Method
MPM, developed by Sulsky et al. (1994) and popularised by Disney Research for Frozen (2013), is a hybrid Lagrangian-Eulerian method. Particles carry mass and deformation gradient; a background grid accumulates forces, solves momentum, and transfers velocities back to particles.
Strengths
- Handles snow, sand, slime, paste, cloth, and fluid with a single codebase — just change the constitutive model (elastoplasticity, viscoplasticity, neo-Hookean)
- No mesh tangling — grid is fixed background structure
- Used in major VFX for snow (Frozen), mud (Brave), sand (Moana)
Weaknesses
- P2G/G2P transfers introduce numerical diffusion; APIC (Jiang 2015) and PolyPIC improve this significantly
- Grid cell size limits resolution; adaptive/nested grids are complex
- More implementation complexity than SPH
5. FVM / FEM — Grid-Based (Navier-Stokes direct)
Classic Eulerian CFD discretises the Navier-Stokes equations directly on a mesh using Finite Volume (FVM) or Finite Element (FEM) methods. The velocity-pressure coupling is enforced via a Poisson equation solved each timestep (Chorin's projection method).
Strengths
- Most physically accurate for well-resolved flows
- Rich literature, mature solvers (OpenFOAM, Fluent, SU2)
- Conserves mass, momentum, energy exactly (when formulated correctly)
Weaknesses
- Free surfaces require level set or VOF tracking — significant extra coding
- Mesh generation for complex geometry is a major engineering effort
- Pressure solve scales poorly with resolution (sparse linear system solver)
6. Comparison Table
| Method | Family | Free Surfaces | Parallelism | Incompressibility | Best For |
|---|---|---|---|---|---|
| SPH / DFSPH | Lagrangian | ✅ Natural | Good (GPU hash) | ⚠️ Iterative | Splashing water, lava, astrophysics |
| LBM | Mesoscopic grid | ⚠️ Extension needed | ✅ Excellent (1 cell = 1 thread) | ✅ Built-in | Aerodynamics, porous media, industrial CFD |
| MPM / APIC | Hybrid | ✅ Natural | Good | Depends on constitutive law | Snow, sand, mud, multi-material VFX |
| FVM (projection) | Eulerian grid | ⚠️ Level set needed | Moderate (sparse solve) | ✅ Projection enforced | Engineering CFD, steady flows |
| FLIP / PIC | Hybrid | ✅ Natural | Good | Grid projection | Large-scale liquids (Houdini FLIP) |
7. How to Choose
- Real-time game fluid (water, ~1K–100K particles): SPH or Position-Based Fluids (PBF). Fast to implement, GPU-friendly, visually convincing free surfaces.
- High-Re aerodynamics simulation: LBM. PowerFLOW/XFlow use LBM for car/aircraft simulations up to Re = 10⁷ on GPU clusters.
- Snow/sand/paste in VFX or games: MPM. Disney's Snow model (Stomakhin 2013) is open-sourced as reference.
- Scientific accuracy, turbulence: FVM with RANS/LES (OpenFOAM). High-Re flows require turbulence models that SPH and LBM can approximate but not match.
- Smoke/fire in real-time: Grid-based Eulerian (Jos Stam 1999 "Stable Fluids"). Semi-Lagrangian advection avoids CFL timestep restriction; industry-standard approach.