How it Works
The FHP model places boolean "particles" on the nodes of a triangular lattice, where each node has six neighbors at 60° increments (0°, 60°, 120°, 180°, 240°, 300°). Exclusion means at most one particle can travel in each of the six directions at a node. Every time step applies two local operations everywhere at once: collision, a lookup table that rearranges occupied directions at a node while conserving particle number and momentum, and propagation, which slides each particle one lattice step along its direction.
Raw per-node occupation is just noise — one bit per direction. This simulator divides the lattice into small blocks and averages the direction vectors of occupied particles inside each block every frame, producing the smooth arrow field you see: this coarse-graining step is exactly how continuum hydrodynamics emerges from a discrete, reversible microscopic rule set. A paintable solid region reflects incoming particles (bounce-back), which is enough to generate stagnation points, separated shear layers and, at high inlet rates, shedding vortices behind the obstacle.
Two-body collision: {i, i+3} → {i+1, i+4} or {i-1, i+2} (random, momentum-conserving)
Three-body collision: {0,2,4} ↔ {1,3,5} (60° rotation)
Coarse velocity: u(block) = (1/N)·Σ over occupied dirs of (cos θ_i, sin θ_i)
Frequently Asked Questions
What is a lattice gas automaton, and how does FHP differ from real molecular dynamics?
A lattice gas automaton (LGA) replaces continuous particle positions and velocities with boolean occupation numbers on a fixed lattice: each node can hold at most one particle per allowed direction. Unlike molecular dynamics, which integrates real-valued forces and trajectories, an LGA evolves through two discrete local steps, collision and propagation, applied simultaneously to every node. It is dramatically cheaper to compute and, remarkably, still reproduces the Navier-Stokes equations in the macroscopic limit.
Why did FHP require a hexagonal, 6-direction lattice instead of a square one?
An early square-lattice gas (HPP) conserves mass and momentum but has only 4-fold rotational symmetry, which leaks into the macroscopic equations as an unphysical dependence of pressure and viscosity on direction. The hexagonal lattice has 6-fold symmetry, the minimum needed for the fourth-rank viscosity tensor to become isotropic. Frisch, Hasslacher and Pomeau showed in 1986 that this single geometric change recovers correct, direction-independent Navier-Stokes behavior.
What do the collision and propagation steps actually do?
Propagation (streaming) moves every particle one lattice step along its direction of travel. Collision is a purely local lookup: two head-on particles (180° apart) scatter to one of the two perpendicular direction pairs, chosen randomly; three particles 120° apart rotate together by 60°; every other configuration passes through unchanged. Both rules only relabel which directions are occupied at a node, so total particle count and momentum never change there.
Why do these collision rules conserve mass and momentum?
Mass conservation is automatic because collisions never create or destroy occupied directions, only reassign them. Momentum conservation follows from symmetry: a head-on pair has zero net momentum, and both perpendicular output pairs also have zero net momentum, so the swap is momentum-neutral; the three-particle rotation maps one zero-momentum symmetric triple onto another.
How does coarse-graining turn discrete booleans into a smooth flow field?
A single node's occupation is essentially noise. Averaging over a block of many nodes, summing each occupied direction as a unit vector and dividing by the number of nodes, produces a local mean velocity that varies smoothly in space and time — exactly the procedure statistical mechanics uses to go from microscopic states to macroscopic fields.
How does FHP model flow around an obstacle and vortex shedding?
A solid region uses bounce-back boundaries: any particle entering a solid node has its direction reversed, so it re-emerges the way it came. Particles pile up upstream and rarefy behind the obstacle; in the coarse-grained velocity field this produces a stagnation point in front, separated shear layers, and, at higher inlet speeds, alternating vortices peeling off downstream — a lattice analogue of a von Kármán vortex street.
Who invented the FHP model and why does it matter historically?
The model is named for Uriel Frisch, Brosl Hasslacher and Yves Pomeau, who published it in 1986 after a square-lattice predecessor (HPP) had been shown to fail at isotropic hydrodynamics. FHP was the first cellular automaton proven to recover the Navier-Stokes equations, and it directly inspired the lattice Boltzmann method, now a standard tool in computational fluid dynamics.
What are the main limitations of the FHP lattice gas model?
Each node holds only a handful of boolean particles, so individual runs are extremely noisy; recovering a clean velocity field requires averaging over many nodes or runs. The model is restricted to low Mach numbers, has a velocity-dependent effective viscosity, and discrete exclusion limits achievable density. These issues motivated lattice Boltzmann methods, which largely superseded FHP for practical CFD.
What does the exclusion principle mean on the FHP lattice?
Exclusion means each node can hold at most one particle per direction, six at most in total, all moving at the same unit speed. This is a modeling simplification, not a physical requirement of real gases — it keeps each node's state a small boolean number and makes the automaton exactly reversible and easy to update in parallel.
What happens to particles at the edges of the simulated lattice?
The top and bottom edges wrap around periodically, avoiding artificial walls that would disturb the flow. The left edge acts as an inlet where new particles are continuously injected in forward-moving directions at a rate set by the density slider, and the right edge is an open outlet — particles that stream past it simply leave the domain, mimicking a wind tunnel with steady throughflow.