Why does the temperature remain constant during boiling?

I think the description in your first paragraph is perfectly reasonable, but I'll try to give a slightly more technical explanation.

If you hold a substance at temperature $T$, the phase that it adopts is determined by a trade-off between energy $E$, which it tries to minimize, and entropy $S$, which it tries to maximize. The actual phase at a given temperature is the one that minimizes the free energy $F = E - TS$.

Entropy is a measure of the disorder of the system, and is high in the gas phase, where the molecules are essentially moving freely and independently of each other, and lower in the liquid, where the density is high and the molecules have less freedom to move. But the energy is also higher in the gas phase, where the molecules have lots of kinetic energy and roughly zero potential energy, than the liquid phase, where they have less kinetic energy and negative potential energy (because of attractive interactions between the molecules, the “intermolecular bonds”).

At high $T$, the best way to minimize $F$ is for the substance to form a gas and hence maximize $S$. At lower $T$, it instead minimizes $F$ by forming a liquid, which reduces $E$. (At still lower temperature, it forms a solid, which has even lower energy and entropy.) At some intermediate temperature, which we call the boiling point $T_b$, the two effects balance out: the energy is lower by $\Delta E$ in the liquid phase and the entropy is higher by $\Delta S$ in the gas; if $\Delta E = T_b \Delta S$ then the two phases have the same free energy, and there is nothing to choose between the two. ($\Delta E$ is called the latent heat.) At this temperature, the two phases are in equilibrium.

So imagine starting with a liquid at $T < T_b$ and heating it up. As you put energy in, the molecules start to move a bit faster and to get a little further apart, increasing both their kinetic and potential energy. But the substance is still a liquid as long as you stay below $T_b$. Once $T$ reaches the boiling point, the extra energy goes into converting liquid into gas, which costs energy $\Delta E$, instead of increasing the temperature. Both liquid and gas are then at the same temperature (as they must be, to be in equilibrium), but the molecules in the gas phase have more energy. Finally, when all of the substance has become gas, the extra energy again goes into increasing the temperature.

During a change of the state of matter, the supplied energy is not used to increase the kinetic energy of the molecules, but to change the binding energies. Therefore, the temperature remains constant.

Constant temperature during vaporization and melting

When water is heated with an immersion heater, one first observes a rise in temperature. But during vaporization, the temperature does not increase any further. The temperature remains constant at 100 °C (boiling point), and this despite the fact that heat is obviously still being supplied by the immersion heater.

Why does the temperature remain constant during boiling?
Figure: Temperature as a function of time during vaporization Animation: Temperature as a function of time during vaporization

A similar behavior can be observed when ice melts. To demonstrate this, place ice cubes from a refrigerator in a bowl and heat them with a heat lamp, for example. The emitted heat causes the temperature of the ice cubes to rise at first. However, if the ice starts to melt at a temperature of 0 °C (melting point), the temperature of the water-ice mixture does not increase any further. The temperature remains constant at 0 °C, even though heat is obviously being supplied by the heat lamp. Only when all the ice has completely liquefied does the temperature increase again.

Why does the temperature remain constant during boiling?
Figure: Temperature as a function of time during melting Animation: Temperature as a function of time during melting of ice

Not only when water melts or vaporizes do the temperatures remain constant, but also in the reverse cases,when gaseous water condenses or liquid water solidifies. This phenomenon of constant temperature can generally be observed when the state of matter of a substance changes (also called phase transition or phase change). This is not only true for water, but can be observed for all pure substances.

The question arises as to why the temperature does not change despite the transfer of heat energy during a phase change. And is this also true for mixtures of substances?

Cause of temperature increase when heat is transferred

If energy is transferred to a substance as heat, this causes the molecules to move more violently. In solids, for example, the vibration of the atoms increases as a result. In liquids and gases, the transferred heat increases the kinetic energy and thus the speed of the molecules. Since the temperature of a substance is a measure of the kinetic energy of the molecules, this explains the generally observable increase in temperature when heat is supplied to a substance (see also the article Temperature and particle motion).

Since, on the other hand, the temperature remains constant in the case of a phase transition, the energy supplied can obviously no longer benefit the kinetic energy of the molecules. Using the example of the vaporization of a liquid, the atomic processes that take place are explained in more detail below.

Atomic processes during vaporization

In the liquid state, the individual molecules are bound together by intermolecular forces (Van der Waals forces). These forces ensure that the molecules in the liquid do not distribute freely throughout the space, as is the case with gases, but form a coherent substance. The intermolecular binding forces can be thought of as rubber bands that hold the molecules of the liquid together.

Why does the temperature remain constant during boiling?
Figure: Transition from the liquid to the gaseous phase

If the liquid is now heated, the binding forces are loosened up by the stronger particle movements. In a figurative sense, this would correspond to an overstretching of the rubber bands due to the increasing movement (increasing distance). At some point, the motion of the molecules will be so strong that rubber bands will wear out and thus lose elasticity. In this state, the boiling point of the liquid is reached and the molecules are hardly elastically connected with each other.

At this boiling point, the kinetic energies of the individual molecules are greater than the binding energies between the molecules. The motion of the molecules is, so to speak, stronger than the bond between the molecules. In the figurative sense, this would correspond to the point where the molecules have enough energy to break the rubber bands that normally hold them together. Those molecules that have broken free of the bonds can now move freely and are no longer bound to the liquid – they have become gaseous. Note that in general, intermolecular binding forces also act in the gaseous state, but these are significantly lower compared to the binding forces in the liquid or solid state!

The heat energy supplied during vaporization therefore does not benefit the increase in kinetic energy and thus the increase in temperature, because the heat energy is used to break the molecules loose from the intermolecular binding forces (change in internal energy). For this reason, the temperature remains constant during vaporization until the change of state is complete. Only then can the kinetic energy and therefore the temperature be further increased.

During a phase transition the supplied energy is not used to increase the kinetic energy of the molecules, but to change the binding energies (increase in internal energy)!

The amount of heat required to completely vaporize a liquid is called the heat of vaporization. More information specifically on this can be found in the article Specific heat of vaporization and condensation (latent heat).

Atomic processes during condensation

When a gaseous substance condenses, it emits the previously absorbed heat of vaporization (in this case called heat of condensation). This process can also be illustrated with rubber bands. While the molecules in the gaseous phase can move relatively free, the molecules in the liquid state are held together by stronger intermolecular forces. The process of condensation thus corresponds to the “capture” of the molecules with the help of rubber bands. Thereby, the flying molecules hit the network of already captured molecules of the liquid phase with full force.

On impact, part of the kinetic energy of the molecules is transferred to the molecules in the liquid. However, in order to prevent molecules that have already been captured by the binding forces from being kicked out of the liquid phase again, energy must be removed from the molecules upon impact. This corresponds to the dissipation of the heat of condensation so that the condensed substance remains permanently liquid and the molecules in it cannot break away again from the liquid phase. Thus, although heat (of condensation) is dissipated, there is no decrease in temperature because of the simultaneous internal release of energy due to the impact processes during condensation.

Atomic processes during melting and solidification

It is not only during the transition from the liquid to the gaseous phase (or vice versa) that the binding energies between the molecules change abruptly. Also during the transition from the solid to the liquid state, a sudden change of the binding energy occurs. While the molecules in the solid state are firmly bound to a specific location due to the great binding forces, the molecules in the liquid state can move relatively freely due to the weak binding forces.

Why does the temperature remain constant during boiling?
Figure: Transition from the solid to the liquid phase

Therefore, energy is also required to break the molecules free from the strong binding forces during melting. This is provided by the heat input during melting. This heat input does not lead to a further increase in temperature until all intermolecular bonds have been broken and the substance has melted. Only then can the supplied heat be used to increase the kinetic energy – the temperature of the liquid rises.

The amount of heat required to completely melt a substance is called the heat of fusion. More information specifically on this can be found in the article Specific heat of fusion and heat of solidification (latent heat).

In the reverse case, i.e. during solidification, the previously supplied heat of fusion must be dissipated (in this case called heat of solidification) in order to completely solidify the liquid substance. Here, too, the temperature remains constant until the liquid has completely solidified.

Changes in the state of matter at non-constant pressure

In the article Why does water boil faster at high altitudes? it has already been explained in detail that the boiling temperature changes with the ambient pressure. Such pressure dependence occurs not only in vaporization or condensation, but generally in any kind of phase transition. Therefore, melting temperatures or solidification temperatures are also pressure-dependent. Thus, the temperature remains constant during a change of state only if the pressure remains constant at the same time.

If, for example, water were to be brought to the boil in a so-called pressure cooker, the temperature would no longer remain constant during vaporization. A pressure cooker seals the pot of water gas-tight. Compared to liquid water, however, gaseous water occupies a much larger space. In a pressure cooker, however, gaseous water cannot expand. The pressure therefore increases continuously as the water vaporizes (a relief valve usually limits the pressure to a maximum of 2 bar). With the continuous increase in pressure, the boiling temperature also rises permanently during vaporization. Consequently, the temperature does not remain constant in this case.

Why does the temperature remain constant during boiling?
Figure: Increasing the boiling temperature in a pressure cooker

In the case of phase transitions of pure substances, the temperature remains constant only if the pressure is kept constant at the same time (isobaric process)!

Phase of transition of mixtures of substances

While in the case of phase transitions of pure substances the temperature remains constant, in the case of mixtures of substances there is usually only a slowing down of the temperature change. In this case, only part of the transferred heat is used to change the binding energies, while the other part simultaneously causes a change in temperature. It is therefore by no means the case that the temperature of all substances remains constant during phase transitions.

In the case of mixtures of substances, the temperature generally no longer remains constant during phase transitions, but the temperature change merely slows down in the process!