Critical Opalescence 2D: Lattice-Gas Cell and Structure Factor S(q)
Top view of the same lattice-gas cell with Blender laser and thermostat sprites: dense liquid sites in blue, gas dark, a milky veil that grows with the susceptibility. Below it the structure factor S(q) of the current configuration on a log colour scale, plus the Ornstein-Zernike fit, density profile and Onsager energy curve in the panel. Same model, sliders and numerical checks as the 3D bench.
A fluid is modelled as a lattice gas, which maps exactly onto the two-dimensional Ising model with critical temperature 2/ln(1+sqrt2) = 2.269 J. Heat the cell through T_c and the liquid-gas meniscus fades, the density fluctuations grow to every length scale and the structure factor S(q), computed by FFT and shown on the bench screen, piles up at small angles: critical opalescence. Metropolis dynamics with a gravity-like field gradient drive the picture; the checks compare Wolff cluster sampling with the exact Onsager density gap, energy at T = 3 and at T_c, the chi ~ L^(7/4) law, and brute-force enumeration of small lattices.
Top view of the same lattice-gas cell with Blender laser and thermostat sprites: dense liquid sites in blue, gas dark, a milky veil that grows with the susceptibility. Below it the structure factor S(q) of the current configuration on a log colour scale, plus the Ornstein-Zernike fit, density profile and Onsager energy curve in the panel. Same model, sliders and numerical checks as the 3D bench.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install