How does the process of nucleation work for boiling liquids? I have a somewhat clear picture how (on the molecular level) a gas turns into a liquids as it cools. When a gas has a certain temperature, its molecules on average have a high enough kinetic energy so that electromagnetic interactions cannot hold the molecules together and they are essentially free. When the gas cools, the kinetic energies are smaller and thus electromagnetic interactions between molecules start to pull the molecules together and the process of turning into a liquid begins. As more molecules lose kinetic energy, initially small numbers of molecules start to cluster up, forming "lumps" that continue growing as more molecules gather up into these clusters. I believe this process is called "nucleation".

I found this video that helps visualize the effect:

https://www.youtube.com/watch?v=wFT6G4CIL1o

But how does the reverse take place? Let's say I'm boiling water. I have a textbook that specifically states:


  During nucleation, small droplets of liquid form in gases or gas bubbles form in water as it starts to boil.


As I heat water, the average kinetic energies of the molecules increase. How does nucleation create bubbles in this situation? I understand that a bubble is a "pocket" of gas inside a liquid. If nucleation works the same way in the process of liquid turning into a gas as it works in a gas turning into a liquid, by analogy there should be some "lumps" of gas forming inside the liquid. But what would hold these gas "lumps" together as the molecules in the gas have a higher kinetic energy as the molecules around them (that are still part of the liquid)? And how do these molecules with higher energy "find" each other to start forming clusters/bubbles? Or do I have a completely wrong visualization as to how bubbles form?
Firstly, the average kinetic energy of the water has to be high enough (water obviously doesn't start to boil at room temp. and pressure the moment it is poured into a pan).

As the water gains more and more energy, small bubbles appear but don't fully rise to the surface as the energy of the gas particles is transferred to the surrounding water particles, eventually losing enough energy and becoming liquid again.

But if the energy of the gas particles is lost too slowly for this to occur they fully rise to the surface. This will only occur at a certain temp. difference i.e. the liquid has to be close to boiling temperature if not it will absorb too much energy and the bubble will become a liquid again.

A single bubble can increase in "size" (more molecules inside the bubble compared to when it started not talking about the diameter) as it rises, similar to the cluster effect you mentioned. This will only occur if the energy difference is high enough to vaporise the surrounding water molecules and not just increase their kinetic energy.

This can also not occur depending on how "violently" the water is being heated, or at which temperature the heating element is, therefore the temperature of the bubble being produced.