The reason may be counter-intuitive, but the more magma crystallizes, the hotter it gets and the more likely a volcano will erupt, according to a team of scientists that includes a University of Oregon geologist. The knowledge likely will aid monitoring of conditions at Mount St. Helens and other volcanic hot spots around the world.
It certainly does seem counter-intuitive: decompression generally causes cooling. That's the basis for how refrigeration works. In the diagram on the right (thanks to Wikipedia), the two places where there are pressure chages are the Compressor and the Expansion Valve. The Compressor increases the pressure and superheats the refrigerant. The Expansion Valve causes decompression and auto-refrigeration. This is how most materials behave.
I remember when I was a kid, my grandfather let me shoot his 22 caliber rifle at a spent aerosol can. The can still had pressure in it, because when I hit it (we'll just pretend it was on my first shot), the rapid decompression caused the can to fly (and the momentum from the bullet probably helped out there too). When we recovered the can, it was covered with frost and very cold to the touch.
Why then does magma behave so counter-intuitively? The answer lies in a process called fractional crystallization. From wikipedia:
Fractional crystallization is one of the most important geochemical and physical processes operating within the Earth's crust and mantle. Fractional crystallization is the removal and segregation from a melt of mineral precipitates, which changes the composition of the melt.
Fractional crystallization in silicate melts (magmas) is a very complex process compared to chemical systems in the laboratory because it is affected by a wide variety of phenomena. Prime amongst these is the composition, temperature and pressure of a magma during its cooling. The partial pressure of vapor phases in silicate melts is also of prime importance, especially in near-solidus crystallization of granites.
In the case of the above study, water seems to be the key. At the pressures existent deep in the Earth, water is dissolved in the magma preventing crystallization. Think about a glass of salt water. The salt isn't crystalline because of the presence of water keeps it in solution. However, if you leave the glass on the counter for the water to evaporate, you'll see the salt begin to crystallize out. A similar process appears to happen to the magma as it moves up towards the surface of the Earth. About 2 kilometers from the surface, decompression causes the pressure to drop enough that the trapped water is able to turn to steam and escape the magma. As a result, certain minerals in the magma begin to crystallize. But shouldn't the escaping steam cool the magma? How does the crystallization cause it to heat up?
The short answer is that crystallization is exothermic. This means that it produces heat. Melting and vaporization are endothermic; they require heat. Another example of an exotherm is an oxidation reaction, such as combustion. Since both exothermic and endothermic things are happening to the magma, the exotherms must be winning. The tool of choice for measuring exotherms and endotherms is the Differential Scanning Calorimeter (DSC).
The basic idea of the DSC is to measure the difference in heat flow between a sample and a reference standard. The set-up is pretty simple. Two identical sample pans are placed side by side over two very sensitive temperature probes (thermocouples). One pan contains a sample of the material to analyze, and the other is empty and acts as the standard. This whole set-up is inside an oven (or a chiller) where the temperature can be carefully controlled. As the temperature inside the instrument changes, the thermocouples detect any difference in heat-flow between the two pans.
If an endothermic event (like a melt) occurs, then the sample will absorb some of the heat it is being given for the melt process, while the standard will continue to use all its heat for temperature increase. The thermocouples will detect the temporary slight difference in temperature and send it to the computer. On the DSC chart, this will show as a downward facing peak.
If an exothermic event (like crystallization) occurs, then the sample will heat up and the thermocouples will detect it. If the exothermic event is encountered during a cool down, then the sample either briefly stops cooling, momentarily heats up a tad, or just cools at a slower pace than the standard. On the DSC chart, this will show as an upward facing peak.
The chart below is a DSC scan I ran of a material known as a plastic crystal. Plastic crystals are a class of compounds that store and release heat through a reversible solid-solid transition from an ordered crystal to a less ordered plastic state. The phase transition of a plastic crystal involves more energy than the heat of fusion. Plastic crystals are therefore very useful in industry for heat storage; they are sort of like heat capacitors. This is why I thought it would make a good example. Obviously whatever is crystallizing out of the magma must also have a high crystallization enthalpy in order to counteract the endotherms associated with decompression and still raise the temperature by 100°.
Allow me to explain what is happening in the above chart. I tested the plastic crystal sample starting at 20°C, then slowly ramped the temperature up to 120°C, then let it cool back down to 20°C. That is why the curve doubles back on itself--the x-axis of the chart is increasing temperature. The scan begins at the left (the lower curve) and moves towards the right. The first event is an endotherm around 80°C. This corresponds with the sample going from a crystalline to a plastic phase. Unlike the material in the example chart on the wikipedia page (which offers a very good explanation if you're still scratching your head after reading me), the plastic crystal is crystalline at room temperature and becomes amorphous before melting (I didn't take it up that high, but if I had, you would see that the melt endotherm was much smaller than the decrystallization endotherm). This happens because when the material hits about 80°C, it begins to absorb heat in order to break up the crystals--heat that would otherwise be used to raise the temperature. The standard (empty pan) undergoes no such transition, and the instrument detects the difference.
The next event happens at around 120°C when the curve doubles back to the left. This is where the temperature begins to drop back down. No "heat event" happens here. The final event begins at about 70°C. This is the exotherm of crystallization. Here the sample begins to heat up faster than the standard as it crystallizes. I'm not exactly sure why there is a 10°K (It is customary in thermal chemistry to use kelvins when talking about change in temperature. An increase of 1°K is equal to that of 1°C.) discrepancy between the crystallization and decrystallization temperatures, but that kind of thing is not unusual.
So what appears to be happening in a volcano is that first the magma decompresses (and cools some) as it flows towards the surface and nears the dome of the volcano. Second, the decompression allows trapped water to escape the magma (and cool it some) in the form of steam. This should manifest itself to the observer as a series of minor "steam heavy" eruptions from the mountain. Third, the loss of water allows minerals in the magma to undergo crystallization. This crystallization, like that of the plastic crystal, is highly exothermic and overpowers the previous endotherms raising the temperature of the magma by up to 100°K. :-) Fourth, this exotherm greatly increases the energy of the magma just as it's getting near the dome of the volcano. This makes for a very explosive situation.