Thermal Energy and Phase Changes