How do you calculate how long it takes for a certain volume of water to cool?

I’d like to calculate how long it would take a barrel of water of a certain volume and temperature to cool to a certain temperature, given a certain ambient temperature. How do I do this?

You can try to calculate it from first principles, or you can do it semi-empirically. The first principles method is really difficult, because there are many different mechanisms by which water can cool, and they depend on a wide variety of parameters.

In general, though, it’s typically going to be an exponential decay towards the ambient temperature, which means that ultimately the only parameter you need is the decay constant. And you can in principle determine that from knowing the temperature at any two times (though of course more data points will give you a better estimate).

The decay time constant will be the specific heat of the water (4,000,000 J/(m^3 K)) multiplied by the volume of the water (m^3, probably a bit less than 1 for a barrel) divided by the surface area of the water or barrel (m^2, probably around 1 for a barrel), then divided by the heat transfer coefficient (probably about 10 J/(m^2 K) if it’s a barrel just sitting there in quiet air, or perhaps 20 or 30 if it’s outdoors in a mild breeze. Every time you wait another time constant, the barrel will be closer to ambient temperature by a factor of e or 2.71828.

For heat loss through the surface of the barrel, yes. Assuming you know the heat transfer coefficient, which depends both on the properties of the barrel itself and on the properties of the outside air. And depends on whether the barrel is damp, and on the humidity. And that the barrel has the same heat transfer all over, and isn’t (for instance) different at the end, or at the staves. And that’s just for that one mode of energy loss: There might also be energy loss via evaporation, for instance, which will depend on the size of the opening, the airflow, and the ambient humidity. Put it all together, and it’s a lot easier to just measure it.

Even if the water in the barrel starts at a uniform temperature, since it will cool from the barrel surface, it will have a variation of temperature throughout its volume while it’s cooling. So “the temperature” of the barrel isn’t that well defined. Are you concerned about the maximum temperature, or the average?

Regardless of which temperature definiton, to use Chronos’s measurement approach you’d have to measure its temperature in several locations. You’d still have the problem, though, that the temperature loss would depend on the average temperature of the water near the surface, not on the average over the whole volume or its maximum. A simple exponential decay might not be a good fit to the data.

If this is a real-world problem, and you need an accurate answer for a range of conditions, you may need to make measurements over that range of conditions, and fit the data. But if it’s just homework, others have already answered well enough.