HomeChemistry & MaterialsRadial Distribution Function in a 2D Lennard-Jones Fluid

Radial Distribution Function in a 2D Lennard-Jones Fluid

A live 2D molecular-dynamics box of Lennard-Jones disks under periodic boundary conditions, with a real-time 2D radial distribution function g(r) revealing gas, liquid and hexagonal-crystal structure — a genuinely 2-dimensional statistical model, not a flattened 3D scene.

Chemistry & Materials2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-molecular-dynamics-physics ↗ Open standalone

This is the 2D counterpart to the 3D Lennard-Jones molecular-dynamics simulator — not that box flattened onto a plane, but an independently derived 2-dimensional statistical model. 100 disks interact through the truncated Lennard-Jones potential in a periodic square box, integrated with velocity-Verlet, while the radial distribution function g(r) is rebuilt live from the running pairwise-distance histogram using the correct 2D ring-shell normalization (2πr dr instead of 4πr² dr). Because a 2D solid packs as a triangular lattice rather than a 3D FCC/HCP crystal, the coordination number, pressure virial coefficient and even the character of melting all differ numerically from the 3D version at matched temperature and density — drag the sliders or jump to a gas/liquid/solid preset to see the 2D g(r), coordination number, instantaneous temperature and virial pressure update in real time.

⚙ Under the hood

A live 2D molecular-dynamics box of 100 Lennard-Jones disks under periodic boundary conditions, with a real-time 2D radial distribution function g(r) built from the correct ring-shell (2πr dr) normalization — a genuinely 2-dimensional statistical model, not a flattened 3D scene, where a 2D solid packs as a triangular lattice with 6 neighbors instead of 12.

molecular dynamicslennard-jonesradial distribution functionstatistical mechanicsperiodic boundary conditions2D physicschemistry

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)