as a volcano, or it moves into another magma chamber. Plutonism When magma cools it begins to form solid mineral phases. Some of these settle at the bottom of the magma chamber forming cumulates that might form mafic layered intrusions. Magma that cools slowly within a magma chamber usually ends up forming bodies of plutonic rocks such as gabbro, diorite and granite, depending upon the composition of the magma. Alternatively, if the magma is erupted it forms volcanic rocks such as basalt, andesite and rhyolite (the extrusive equivalents of gabbro, diorite and granite, respectively). Volcanism Magma that is extruded onto the surface during a volcanic eruption is called lava. Lava cools and solidifies relatively quickly compared to underground bodies of magma. This fast cooling does not allow crystals to grow large, and a part of the melt does not crystallize at all, becoming glass. Rocks largely composed of volcanic glass include obsidian, scoria and pumice. Before and during volcanic eruptions, volatiles such as CO2 and H2O partially leave the melt through a process known as exsolution. Magma with low water content becomes increasingly viscous. If massive exsolution occurs when magma heads upwards during a volcanic eruption, the resulting eruption is usually explosive. Use in energy production The Iceland Deep Drilling Project, while drilling several 5,000 m holes in an attempt to harness the heat in the volcanic bedrock below the surface of Iceland, struck a pocket of magma at 2,100 m in 2009. Because this was only the third time in recorded history that magma had been reached, IDDP decided to invest in the hole, naming it IDDP-1. A cemented steel case was constructed in the hole with a perforation at the bottom close to the magma. The high temperatures and pressure of the magma steam were used to generate 36 MW of power, making IDDP-1 the world's first magma-enhanced geothermal system. References Igneous petrology Igneous rocks Volcanism Earth's crust