Changes of Phase, Heat, Temperature | Zona Land Education
We will not be discussing the plasma state here.
 
When a substance changes from one state, or phase, of matter to another we say that it has undergone  a change of state, or we say that it has undergone a change of phase. For   example, ice melts and becomes water; water evaporates and becomes water   vapor.
These changes of phase always occur with a change of heat. Heat, which is energy, either comes  into the material during a change of phase or heat comes out of the material during this change. However, although  the heat content of the material changes, the temperature does not.
 
Here are the five changes of phase. They are diagrammed in the opening animation and listed below.
Description of Phase Change
Heat goes into the solid as it sublimates.
None
 
So, how could there be a change in heat during a state change without a change in temperature? During a change in state the heat energy is used to change the bonding between the molecules. In the case of melting, added energy is used to break  the bonds between the molecules. In the case of freezing, energy is  subtracted as the molecules bond to one another. These energy exchanges are not changes in kinetic energy.  They are changes in bonding energy between the molecules.
If heat is coming into a substance during a phase change, then this energy is used to break the  bonds between the molecules of the substance. The example we will use here is ice melting into water.  Immediately after the  molecular bonds in the ice are broken the molecules are moving (vibrating) at the same  average speed as before, so their average kinetic energy remains the same, and, thus, their Kelvin temperature  remains the same.
 
Below is a picture of solid ice melting into   liquid water. The molecule of ice and the molecule of water (the black  balls) are moving with the same rate of vibration in this diagram. This is  meant to show that they have the same average speed and thus the same  average kinetic energy (since they have the same mass) and thus the same  Kelvin temperature. The motions are, though, greatly exaggerated. Actually,  the motions of the molecules should be considered tiny vibrations.
 
At the moment of melting the average kinetic energy of the     molecules does not change.
The heat is used to break the     bonds between the ice molecules as they turn into a liquid phase.
Since the average kinetic energy of the molecules does not     change at the moment of melting, the temperature of the molecules     does not change.
Since both the ice and the water molecules     have the same average kinetic energy at the time of melting, the     temperatures of both are the same.
Click this button to see the computer code for this animation.
Here's the code that runs the above animation.
You can change the code, if you like, and then click the following 'Reevaluate code' button.  The program will then work as per your changes.  Of course, your changes, especially random changes, can introduce errors, miscalculations, and browser crashes. If you   need to get things back to their original condition, just reload this page using your browser's reload button.
The intention here is to conveniently show the inner workings   of this program so that you understand how the diagram is drawn.   Can you figure out how to change the code to make the molecules vibrate at a higher frequency?
Click the 'Code' button again to close this section.
// change of state  var loopWait = 50; // ms.  var iceXO; // original x-coordinate var iceYO; // original y-coordinate var iceX;  // current x-coordinate var iceY;  // current y-coordinate  var waterXO; var waterYO; var waterX; var waterY;  // molecule vibration var amplitude; // amplitude, both molecules var fx;        // x-frequency, both molecules var fy;        // y-frequency, both molecules  var phase;     // phase offset for water molecule  var t;  // current time var dt; // delta time  var twoPi = 2 * Math.PI;   setup = function() {  // original position for ice molecule  iceXO = 140;  iceYO = 120;    // original position for water molecule  waterXO = 170;  waterYO = 195;    fx = 2; // x-frequency for both molecules  fy = 3; // y-frequency for both molecules    amplitude = 10; // amplitude of vibration for both molecules    phase = 1; // phase of vibration for water molecule    t  = 0;  // current time  dt = .1; // delta time };   loop = function() {  // find new positions for molecules  update();    // draw molecules at new positions  render();    // wait a bit, do it again  loopTimeout = setTimeout(loop, loopWait); };   update = function() {  // this math moves the molecules in a Lissajous figure    // calculate molecule positions at the current time  iceX = Math.floor(iceXO + amplitude * Math.sin(fx * t));  iceY = Math.floor(iceYO + amplitude * Math.sin(fy * t));  // phase shift water molecule vibration  // the motions are identical, except one lags behind the other  waterX = Math.floor(waterXO + amplitude * Math.sin(fx * t + phase));  waterY = Math.floor(waterYO + amplitude * Math.sin(fy * t + phase));   t += dt; // tic the clock to the next time for the next update    // keep the time between 0 and two times pi  // since two times pi is the natural period of the sine function  if(t > twoPi) t -= twoPi; };   render = function() {  // position DOM images  iceImg.css('left', iceX.toString() + 'px');  iceImg.css('top',  iceY.toString() + 'px');    waterImg.css('left', waterX.toString() + 'px');  waterImg.css('top',  waterY.toString() + 'px'); };
In the ice the molecules are strongly bonded to one  another, thus forming a rigid solid. When heat is added to the ice   these bonds are broken and the ice melts. The molecules afterward bond  to one another with less strength and a different geometry, and water is formed.
Now, before the melting, the molecules were actually moving when in the solid state. They were  vibrating back and forth. They had an average kinetic energy. So they had a Kelvin  temperature proportional to this average kinetic energy.
After the melting the water molecules are still vibrating. And they have the same average kinetic energy as they had before the melting. So, the water is at the same temperature   at the moment after the melting that the ice was at the moment before the melting.
 
Heat came into the situation, but it was not used to  change the kinetic energy of the molecules. It was used to change the  bonding between the molecules. Breaking the bonds between the molecules of  the ice requires energy, and this energy is the added heat.
In a similar way heat enters a liquid to change the molecular bonding when the liquid boils or  evaporates into a gas, and heat enters a solid to change the molecular bonding when it sublimates into a gas.
In an inverse way heat leaves a gas to change the molecular bonding when the gas condenses into  a liquid, and heat leaves a liquid to change the molecular bonding when it freezes into a solid.
 
In none of these changes of state is the heat (energy)  that is input or output used to change the speed of the molecules. The average speed of the molecules is the same before and after a phase   change, and so is the average kinetic energy.
Heat (energy) is transferred into the ice.
The heat is used to break the bonds between molecules, not to     increase the average kinetic energy of the molecules.
Since the bonds among the ice molecules     have been broken, water is formed. The water molecules, at this     moment, have the same average kinetic energy as they did when they     were ice.
Since the ice and water molecules both have the same average     kinetic energy, they are at the same Kelvin temperature.