Home▸Physics & Mechanics▸Magma Physics Simulator (2D)

Magma Physics Simulator (2D)

Interactive 2D cross-section of a magma chamber: gas bubbles rise at a viscosity-limited speed, chamber pressure builds, and eruptions launch ejecta under real projectile motion.

Physics & Mechanics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-magma-physics-simulator ↗ Open standalone

A magma chamber's eruptive style comes down to a tug-of-war between how fast gas bubbles can escape and how much pressure builds up while they can't. This 2D companion to the full 3D magma chamber simulator solves the same viscosity/pressure/temperature/gravity coupling: gas bubbles rise through the melt at a Stokes-law-limited speed that depends on effective viscosity (which itself falls as the melt gets hotter), arriving bubbles build chamber pressure, and once that pressure crosses a viscosity-dependent threshold the chamber erupts, launching ejecta out through the vent under real projectile motion set by the gravity slider. Stiff, cold, high-viscosity melt traps gas and erupts explosively; hot, thin melt vents gas continuously in a gentle, effusive plume.

⚙ Under the hood

Interactive 2D cross-section of a magma chamber: gas bubbles rise at a viscosity-limited speed, chamber pressure builds, and eruptions launch ejecta under real projectile motion.

magmaviscositygas pressurevolcanic eruptionprojectile motionconvection

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

What did you find?

Add reproduction steps (optional)