```On Sun, Feb 01, 2004 at 11:26:56PM +0900, Theodore Knab wrote:
> I had a frozen pipe break in a house I was watching. Although the pipe
> is now fixed and insulation was added above the pipes, the PVC (polyvinayl choride)
> water lines are still freezing.
>
> So, I decided I will calculate the times in which these
> water lines freeze and run over and turn on the water before they freeze.
>
> I want to be able to calculate the time in which these water pipes
> will freeze at various cold temperatures.
>
> I was wondering how I would compose the following "Newton's Law of Cooling" into
> a Ruby calculation:
>
> http://scienceworld.wolfram.com/physics/NewtonsLawofCooling.html
>
> t = time
> T = changing temp of object
> T_s = temp of surrounding environment
> T_0 = initial temperature of the object
> K = an experimental constant that has to do with water and surface area
>
> T(t) = T_s + (T_0 - T_s)e^(-Kt)
Hi

I fear your won't get very good results with this formula. I only tells you
at which time the water in the pipes will reach 0 degrees celcius (sorry,
don't know what this is is farenheit). But even after reaching 0 degrees, it
will take quite a time until the water starts to freeze - the water has to
loose a lot of energy to it's environment to get from the liquid state into
crystaline state.

greetings, Florian Pflug

```