analytics

Thursday, October 3, 2013

Cooling matrix revisited

I noticed if you have a grid of temperatures matrix T like:
The diagonal ellipses are meant to imply that the grid can go on to any number of rows and columns...

I found this matrix A:


which is meant extend to however large the temperature grid is. If your temperature gird is at time t then this formula:


finds the temperatures in your grid after 1 second where k is the usual physical coefficient in Newton's law of cooling. It works best if the area you are concerned about is far enough from the boundary of the temperature matrix that the values in the first and last column and row of the matrix don't begin to affect the area you are looking at.


Reasoning:
Look at what happens to a cell T[i,j](t) in the temperature matrix at least one row or column away from the edges of the matrix. After applying the formula the value in that cell becomes:
T[i,j](1) = k*(T[i,j](0) - (1/4)*(T[i-1,j](0)+T[i+1,j](0)+T[i,j-1](0)+T[i,j+1](0)))
So the temperature changes by a proportion k times the difference between the temperature of the cell and the average temperature of the cells around it. This is exactly as it should be by Newton's law of Cooling.

No comments:

Post a Comment