Consider a box divided into two equal
halves separated by a wall with a hole through which particle exchange can take
place. It is assumed that only one particle can pass through the hole per unit
time. Let there be total

*N*particles and assume that at*t = 0*, all the particles are on left side. (ie at*t = 0*,*n*and_{l}=N*N*). Once the hole is opened, particle exchange takes place and it continues till the equilibrium is reached. The system can be simulated with a simple statistical model. In order to simulate when_{r}= 0*N>>1*, we assume that, all the particles have equal probability of crossing the wall. So probability of particle moving from left to right is*N*and right to left is_{l}/N*N*. Once the physical system is represented in probability function, application of Monte – Carlo method is straight forward. In code, it compares Monte – Carlo result with analytic solution,_{r}/N*References:*

1.

*Computational physics – An introduction, Verma, R C, Ahluwalia, P K, Sharma, K C, New Age International (P) Limited, Publishers (2005)*
2.

*Computational Physics, Richard Fitzpatrick Professor of Physics, University of Texas at Austin*
3.

*Computational Physics, M. Hjorth – Jensen, Department of Physics, University of Oslo (2003)*
nice one

ReplyDelete