Understanding lava flows and fountain eruptions