What's the highest possible ambient temperature Tr from which an unpowered device may convert boiling water (at Th=373K) into ice water (at Tc=273K). We already know that it happens automatically if the ambient temperature is below freezing. But what if it's warm outside, and the last thing you need to cool you off is a cup of boiling water?
Given that water is relatively uncompressible at standard temperature and pressure, in doing this calculation we might as well neglect expansion-related work and further assume that the heat capacity of water is a constant between freezing and boiling. Perhaps also stick with cooling the water from arbitrarily close to boiling down to arbitrarily close to freezing so that life isn't complicated by phase changes.
Secondly calculate heat, work and entropy flows into and out of the device as it cools the water from room temperature down to near freezing (Tc). These are illustrated in the bottom half of the same figure.
The five small black circles in the figure represent five equations: (i) two first-law (heat and work) equations including e.g. Qin=Qout+Wout, (ii) two 2nd-law (entropy) equations, set as equalities so as to get values for the limiting case of reversible processes, and (iii) a work equality Wout=W'in to guarantee that the invention neither requires (nor acts as a supply of) net available work.
Solving these five equations for the unknowns Qout, Wout, Q'out, W'in, and Tr yields the desired value: the requested upper limit or maximum room temperature Tr at which one can pull this off without a separate power source. There is of course no lower limit on Tr. If it's below freezing in the room, it's trivial to turn boiling water into ice water: Just sit it out and wait until it's ice.
Books on physical chemistry might prompt their readers to solve the problem with intermediate results from a 1st and 2nd law analysis of specific ideal engines. For example, begin with a Carnot heat engine to recover work Wout while cooling the coffee to room temperature. Its well-known efficiency is dWout/dQin = (1 - Tr/T), where T is the varying temperature of the hot reservoir. Total Wout is then calculated by multiplying by C dT, and integrating over T between Tr and Th.One can similarly chill the water down from room temperature to freezing with a reversible heat pump whose best possible coefficient of performance is dQ'in/dW'in = T/(Tr-T). Here T is the varying temperature of the cold reservoir. Solve this for total work W'in by integrating C dT divided by this coefficient. Setting W'in equal to Wout then allows one to solve for Tr.
This approach returns to basic principles, taking advantage of net surprisal as a dimensionless* free-energy analog designed to track finite departures from expected. It is proving useful in both thermal and purely information-based investigations. For example a special case of it, mutual information, is extensively used in otherwise quite unrelated studies of stuff like quantum computing, dynamical attractors hidden in non-linear systems, and the phylogeny of evolved codes like a mitochondrial DNA sequence, or the text of a chain letter.
We begin with two generally useful observations about a pair of connected sub-systems (like the cup's contents and environment in this problem), each of which may be treated as internally equilibrated: (i) Reversible processes will hold net surprisal constant even though its form might change, and (ii) net surprisal for simple constant heat-capacity systems with respect to an ambient heat bath at temperature To is Inet=C*Ξ[T/To] where Ξ[x]≡x-1-ln[x] and C is the system's heat capacity. For larger context on these facts (e.g. to find out why you might want to know more, or for derivations and/or caveats) see the "thermal roots" note here.
Given this context, the answer can be obtained by solving one equation for one unknown. To be specific, find the value of Tr by equating surprisals before and after, i.e. from C*Ξ[Th/Tr]=C*Ξ[Tc/Tr]. It's easy to see here that the specific heat C of the cup's contents, as well as any intermediate forms of net surprisal involved**, are irrelevant to the final answer.
The approaches above all yield the same result. We'll leave it for you to figure out: How cool does the room have to be in order for an unpowered device to convert boiling water reversibly into icy water? We've given you the equations for several approaches -- which will you try to apply first?
The rationale underlying the surprisal-based solution is also perhaps simpler and more intuitive. For example, one might say that both boiling water and ice water have some net surprisal with respect to typical room temperature ambients. If one converts hot water to cold water having comparable or less net surprisal, there is obviously no thermodynamic requirement for added surprisal (or batteries that provide net surprisal in the form of available work). Of course figuring out how to do it in practice, for a reasonable manufacturing cost, remains a challenge (as far as I know) that has not yet been met...