## Hole In Wall

Program `HoleInWall` models the behavior of N particles that are located in one of two halves of a two-dimensional box.
The dynamics is very simple. A a particle is chosen at random and moved to the other half of the box.
The macroscopic quantity of interest is the number of particles in
the left half of the box.
The goals of this simulation are to explore the approach to equilibrium,
the nature of the fluctuations at equilibrium, and the relation between the magnnitude of the fluctuations and N.

**Problem: Hole in the wall**

- Before you run the program describe what you think will be the qualitative behavior of $n(t)$, the time dependence of the number of particles on the left side of the box.
- Run the program and describe the behavior of $n(t)$ for various values of $N$. Does the system approach equilibrium? How would you characterize equilibrium? In what sense is equilibrium better defined as $N$ is increased? Does your definition of equilibrium depend on how the particles were initially distributed between the two halves of the box?
- When the system is in equilibrium, does the number of particles on the left-hand side remain a constant? If not, how would you describe the nature of equilibrium?
- If $N \gtrsim 32$, does the system return to its initial state during the time you have patience to watch the system?
- How does $\skew3\overline{n}$, the average number of particles on the
left-hand side, depend on $N$ after the system has reached
equilibrium? The program computes various averages
from the time $t = 0$. Why does such a calculation not yield the
correct equilibrium average values? Use the
`Zero Averages`button to reset the calculation of the averages. - Define the quantity $\sigma$ by the relation (This use of $\sigma$ should not be confused with the length $\sigma$ in the Lennard-Jones potential.) $$\sigma^2 = \overline{\Delta n)^2} = \overline{(n - \skew3\overline{n})^2}.$$ What does $\sigma$ measure? What would be its value if $n$ were constant? How does $\sigma$ depend on $N$? How does the ratio $\sigma/\skew3\overline{n}$ depend on $N$? We say that $\sigma$ is a measure of the fluctuations of $n$ about its average, and $\sigma/\skew3\overline{n}$ is a measure of the relative fluctuations of $n$.

## Resources

- Problem 1.2 in
*Statistical and Thermal Physics: With Computer Applications*, 2nd ed., Harvey Gould and Jan Tobochnik, Princeton University Press (2021).