## Tuesday, November 6, 2012

### Deriving a cooling matrix from Newton's Law of Cooling

This is an improvement on the last blog entry inspired by a suggestion from Dr. Rose.

Suppose you start with a grid of temperatures like this:

Newton's law of cooling says that an object cools at a rate proportional to the difference of temperatures between itself and its surroundings.
So just considering that this grid is connected everywhere but the diagonals, the cell with starting temperature a would be expected to cool like:
T(new) = a-(k*(b-a) + k(c-a))/2
In other words the value of a cools proportionally to the average of the differences between it's surroundings and itself.

I introduce this matrix:

Now consider the following procedure: A-(A*C+C*A)

So the top left cell and the others are equal to our formula:
T(new) = a-(k*(b-a) + k(c-a))/2
= a- ((.5)*kb -.5ka) +(.5kc - .5ka)
then grouping the ka terms
=a-ka +.5kb +.5kc

Now as for the fact that this doesn't consider cooling across the diagonals, what will happen is after one time step the top left corner and the bottom left corner cool towards each other, and then the next time step the new temperature in the bottom left corner will cool the bottom right corner, so actually information from the top left corner does reach the bottom right corner it just takes an extra step.

Also the sum of the four cells conserves the total temperature: