Conductive cooling of a lava flow: surface quench, crystallisation window and the formation of volcanic glass.
running...
The science
The flow is a 1-D slab cooled from its top surface; the base is insulated. Heat moves by conduction, ρcp ∂T/∂t = k ∂²T/∂x² + ρL dX/dt (k = 1.5 W/m/K, ρcp = 2.6 MJ/m³K, latent heat of crystallisation L = 0.4 MJ/kg). At the surface the loss is convective plus radiative: q = h (Ts−T∞) + εσ(Ts⁴−T∞⁴). The equation is solved implicitly (backward Euler, tridiagonal).
Obsidian is volcanic glass: melt that cooled through the crystallisation window (between the liquidus and the glass transition near 700 °C) faster than crystals could grow. Crystal fraction follows a first-order rate, dX/dt = (1−X) k(T) with a bell-shaped k(T) = kmax exp(−((T−Tp)/W)²). The peak rate drops by orders of magnitude for silica-rich (polymerised, viscous) melt, so rhyolite quenches to glass easily while basalt almost never does unless it meets water. In the model the glass fraction is 1 − X once T falls below the glass transition.
Simplifications: constant thermal properties, a made-up but plausible kinetic law (real crystal nucleation and growth are separate, temperature-dependent processes), no water content, no flow or crust fracturing, and an insulated base. The checks compare the numerical solver to the exact error-function solution for a quenched half-space and verify the energy balance.