Molten lava and diet coke have something in common: too much gas. See here for gas escaping from lava, and throwing molten rock into the air, and see
just for fun, because it is just great. They are using simply bottles of Diet Coke and a brand of mint called Mentos. That’s all.
Incidentally, I thought about lava as I just got an email from a volcanology PhD student asking about the nucleation of bubbles in magma. I know nothing about magma (except that it is hot molten rock) and so had not thought about this problem. But the bubbles you see bursting from the lava must start off small and grow – and the initial process of formation is called nucleation. How much nucleation occurs will then I presume affect whether you get lots of little bubbles or the few huges ones in the YouTube clip.
Anyway, back to the Diet Coke. Like lava it has too much gas. When they make carbonated drinks they force carbon dioxide, CO2, into it. Lots of CO2, so much so that the carbonated drink is unstable, and so bubbles of CO2 tend to form to release this excess gas. These bubbles are of course the whole point.
But this begs the question: As you have too much CO2 in the Coke, how fast will the CO2 form bubbles and escape? That depends on the nucleation rate – the rate at which bubbles form. This can be increased by shaking – we all know that if we shake a can of coke then we get lots of bubbles, and the bubbles and liquid can explode out of the bottle. All you have done is here take a process, the drink losing its CO2 and going flat, that might take hours and speeded it up.
The YouTube clip exploits the same idea except than instead of shaking, you just add lots of a surface on which bubbles of CO2 nucleate like crazy – for some reason the surface of Mentos is perfect for this. Just add Mentos to a bottle of coke, bubbles form like crazy on the surface of these mints and then the bubbles and coke just fountain out. Its just simple physics in action.
The sample principle should work for lava, although you would need something a bit more heat-resistant than mints.