Cylinder Wake: Laminar Vortex Shedding
Flow past a circular cylinder is the gold standard external aerodynamics benchmark. At low Reynolds numbers the wake is steady and symmetric; above Re ≈ 60 the von Kármán vortex street emerges with periodic vortex shedding. This solver uses Bouzidi interpolated bounce-back for a smooth cylinder surface, eliminating stair-step boundary artefacts.
Setup
| Parameter | Value |
|---|---|
| Grid | 1200 × 600 |
| Cylinder diameter D | 60 cells (NY/10) |
| Reynolds number | 100, 200, 1000 |
| Inlet velocity | uinflow = 0.1 lu/ts |
| Tau (relaxation parameter) | Re=100: 0.68, Re=200: 0.59, Re=1000: 0.52 |
| Number of steps | 80,000 |
| Reference length | D = 60 cells |
| Collision | MRT (d'Humieres 2002) |
| Boundary condition | Bouzidi interpolated bounce-back |
| Lattice spacing / time step | Δx = 1, Δt = 1 |
Flow Field
Use the Reynolds number tabs to select Re (U·D/ν). Top left: steady-state velocity contour with streamlines. Top right: flow evolution from rest to steady state. Bottom: pressure and vorticity fields at steady state.
Velocity (Contour | Streamlines)
Drag the handle to wipe between the velocity-magnitude contour and the streamline plot.
Flow Evolution
Pressure Coefficient Cp
Pressure Coefficient Cp
Vorticity
Vorticity
Validation
| Re | Regime | Computed St | Williamson 1988 | Computed Cd | Tritton 1959 |
|---|---|---|---|---|---|
| 100 | Laminar shedding | 0.188 | 0.164-0.172 | 1.16 | ~1.4 |
| 200 | Laminar shedding | 0.220 | 0.180-0.195 | 1.10 | ~1.3 |
| 1000 | Turbulent (LES) | 0.22 | ~0.22 | 0.95 | ~1.0 |
Discussion
The cylinder case exercises the solver's ability to handle curved boundaries, periodic vortex shedding, and time-varying forces. The Bouzidi interpolated bounce-back replaces the stair-step approximation with a smooth boundary representation, reducing the systematic Cd over-prediction common in on-grid bounce-back methods.
Future comparison: Run the same geometry and Re range in SU2 with an equivalent unstructured mesh to quantify the accuracy/compute trade-off between LBM on Cartesian grids and FV on body-fitted meshes.
Physics-Informed Neural Network (PINN) Surrogate
A mesh-free Physics-Informed Neural Network trains on C++ LBM output as a
hybrid data-physics surrogate. The PINN maps spatial coordinates
(x, y) to velocity and pressure fields (u,
v, p) using a fully-connected MLP with 8 hidden layers
× 64 neurons (29,507 parameters). Training uses a hybrid
loss: data loss on sparse solver measurements + PDE residual
(steady incompressible Navier-Stokes via torch.autograd) +
boundary condition enforcement (no-slip walls and cylinder surface).
PINN vs LBM Comparison
The 3-panel comparison below shows the C++ LBM baseline (left), the trained
PINN surrogate (center), and the absolute error delta map (right). The PINN
is trained on all 3,755 fluid grid points from
frame_18000.json (fully developed wake) plus 10,000 interior
collocation points for the PDE residual. Importance sampling places 40% of
collocation points within 3× the cylinder radius to resolve the
near-field gradients.
Training Convergence
| Parameter | C++ LBM Solver | PINN Surrogate (PyTorch) |
|---|---|---|
| Method | D2Q9 MRT Lattice Boltzmann | Fully-connected MLP (8×64, tanh) |
| Grid / Domain | 800×300 (downsampled 100×38) | Mesh-free: 3,755 sensor points + 10,000 collocation |
| Boundary conditions | Bouzidi interpolated bounce-back | No-slip (analytical): u=v=0 on walls & cylinder |
| Training time | ~10 s (parallelized C++) | ~550 s (PyTorch, Apple MPS backend) |
| Inference latency | 4.1 ms per timestep | <1 ms per full field (29k params) |
| L2 relative error (u) | Baseline (reference) | 36.3% |
| Loss weights | -- | wpde=1.0, wdata=10.0, wbc=5.0 |
| Optimizer | -- | Adam (lr=1e-3) + CosineAnnealingLR (15k epochs) |
The PINN is trained on the Apple M5 MacBook Pro using the PyTorch MPS (Metal Performance Shaders) backend. The full training run (15,000 Adam epochs with cosine-annealing LR schedule) completes in ~9 minutes. Once trained, the network evaluates the entire flow field in <1 ms — enabling real-time interactive inference in the browser via ONNX Runtime Web (Phase 6.5 of the PINN roadmap).