Earth
Volcano and magma chamber
Feed magma into a chamber under a volcano and watch the overpressure climb at the rate the chamber’s compressibility sets, the summit lift, the conduit open at its threshold and the eruption drain the chamber until it plugs again. Thicken the magma to make a long, slow eruption of the same volume, add gas to lengthen the repose, and check that what came in is what erupted plus what is stored.

What happens
A 10 km³ chamber 6 km down is recharged at a set rate; its overpressure rises at Q/(β·V) with the compressibility of the magma (more with dissolved gas) and of the chamber’s walls. The conduit opens at the opening overpressure and closes again at a lower closing one, and while it is open the eruption is Poiseuille flow π·a⁴·Δp/(8μ·L) driven by the pressure above the magma column. Mass is booked exactly: supplied = erupted + stored. The summit lifts by the Mogi point source of the walls’ volume change; the gas in the erupted magma does n·R·T·ln(p/p_atm) of expansion work. Explicit Euler in half-hour steps; one second of the experiment is one day.
Try this
Watch the overpressure climb to the threshold and the eruption drain it; raise the viscosity tenfold for a long slow eruption, add gas for a longer repose, and check the mass balance.
The model and its limits
A lumped chamber and a Poiseuille conduit, fixed opening and closing thresholds, no bubble growth or fragmentation, no conduit erosion. Repose and duration are those of this teaching volcano.
Equations used in the module
Equations dΔp/dt = (Q_in − Q_out)/(β·V) Q_out = π·a⁴·(p − p_atm − ρ_m·g·L)/(8·μ·L) u_z = (1 − ν)·β_w·V·Δp/(π·D²) W_gas = m_g·R_w·T·ln(p/p_atm)


