Programing, random walk applications
- June 6, 2012
- 3 replies
- 5389 views
This is a program I am having a problem getting to run. It is using a random walk to determine a "temperature" at a point (xo,yo) in a square plate. The temperature distribution is T(x,y) with the boundaries held at specified temperatures. There is no heat transfer in the z-direction. The method is solving for
T(x,y) one point at a time for the LaPlace equation.
The method is based on the relaxation technique, where at at given point there is 1/4 probability to move in the four directions x+, x-, y+, y-. Several random walks are performed from (xo,yo), each time reaching a different boundary. The frequency of how often one reaches a given boundary out of N random walk trials times the temperature of that boundary will estimate T(xo,yo) =( Sfi*Ti). (This is a problem given in NUMBER CRUNCHING, by Paul J. Nahin. He writes great books)
The attached Mathcad 14.0 program which includes a schematic of the heat transfer scenario, What I think is the program algorithm and the Mathcad program is attached. I have tried several "permutations" of the program and still can't get it to work. Help, please.

