A WebGPU-powered interactive simulation that visualizes the complex behavior of 2D Coulomb gases, showing how electrons arrange themselves under competing forces of repulsion and confinement.
A new WebGPU-powered simulator brings the abstract mathematics of 2D Coulomb gases to life, allowing users to visualize how electrons arrange themselves under competing forces of repulsion and confinement. The 2D Coulomb Gas Simulator demonstrates a system where each dot represents an electron experiencing pairwise Coulomb repulsion with every other electron while being confined by an external potential.
The simulator visualizes configurations that minimize the 2D log-gas Hamiltonian:
$$\mathcal{H}(z_1, \ldots, z_n) = -\sum_{i \neq j} \log |z_i - z_j| + n \sum_{j=1}^n Q(z_j)$$
This mathematical framework appears across multiple domains of mathematical physics, including eigenvalues of random matrices with Gaussian entries, zeroes of polynomials with Gaussian random coefficients, the fractional quantum Hall effect, Hele-Shaw flow, and vortices in superconductors. The breadth of applications has generated substantial research interest, including a 2017 proof showing that particle density near boundaries follows an erfc distribution through remarkably complex analysis.
Unlike Monte Carlo methods that sample from temperature-dependent distributions, this simulator approximates minimum-energy states known as Fekete configurations. Users can explore different external potentials including the Ginibre ensemble (|z|²), Mittag-Leffler distributions with varying lambda parameters, and lemniscate potentials with different k values. The interface supports particle counts ranging from 2 to 500,000, though exact pairwise repulsion calculations scale as O(n²), making very large configurations computationally intensive.
The WebGPU implementation enables real-time visualization of these complex systems directly in browsers. Users can adjust particle radius and opacity, add custom particles with tunable charges, and place them directly on the canvas to observe how the system responds. This interactive approach makes abstract mathematical concepts tangible, bridging the gap between theoretical physics and visual intuition.
The simulator builds on research documented in a bachelor thesis and accompanying blog post, providing both an educational tool and a platform for exploring the rich mathematical structure of Coulomb gases. By making these complex systems accessible through intuitive visualization, the project demonstrates how modern GPU computing can illuminate fundamental questions in mathematical physics.
Comments
Please log in or register to join the discussion