Does somebody has an idea about how to model the temperature of water during freezing ?

I mean, if you consider a certain mass of water and you put it, for example on a fridge. I don't consider the convection but only the diffusion, and I would like to model, if possible with an animation the temperature of the water (as a cube for the shape).

Normally, during the freezing I should observe a decrease of the temperature, then a freezing at constant temperature, and finally again a ccoling of the ice. During the freezing, the temperature of the water stay constant but it also release heat (latent enthalpie), so the air just around the cube is for a moment higer.

My idea was to work with one cube (let say a square initially) into a other cube (air of the fridge) and model the temperature change in the smallest cube. The temperature of the air is constant initially (and the animation shows the decrease of temperature in the water square) until the release of energy during freezing (Then the fridge evacuate this energy) and at the end everything is at the same temperature and stable.