I'm wondering about the most efficient way of producing ice from water at room temperature.
First of all: why, in principle, do we need to put in work to do so, if water gives off energy while cooling? I could say that when it's at equilibrium with its surroundings, the entropy of the universe is maximized, so in order to change that (= lower the entropy) we need to put in work, but I don't quite understand why exactly would entropy be lower at non-equlibrium.
Anyway, we know that what refrigerators do is exactly that: they put in work in order to draw some heat from a system and dump it outside. The efficiency of a refrigerator, unlike a heat engine, has only a lower cap, so theoretically, one could think of a refrigerator with such a high efficiency, that work required to cool something would approach 0. Presumably however, creating such a fridge (for instance, with an extra cold interior) would require work on its own. Another way of freezing the water at room temperature would be to put it in a container and depressurize it, so that the water would boil and lose energy through evaporation, eventually freezing. I'm sure one could devise other methods.
But what would be the theoretical minimal work required to do so? When it comes to chemical reactions, the net work required to ignite one or net work available to acquire from one if it's spontaneous is given by the Gibbs free energy. But while it's easy to calculate for gases, I'm not sure how one would go about applying it here.