[Physics] Maxwell Boltzmann Distribution in Molecular Dynamics Simulation

molecular dynamicssimulationsstatistical mechanicsthermodynamics

I have an MD simulation that I'm pretty confident it works correctly. One of my tests was to check if the velocity distribution follows a Maxwell Boltzmann distribution.

I printed out the velocity of just one atom to file, and when I histogrammed it, I obtained the following plot. The solid curve is the Maxwell Boltzmann distribution with $kT=0.5$.
enter image description here

As indicated, the simulated data match the theoretical curve. However, there is something I do not understand.

As I recall from my studies of statistical mechanics, the Maxwell Boltzmann distribution is a probability distribution for the speed of all particles in a system that has reached equilibrium.

In my case, I'm considering the velocities of only one particle since the beginning of simulation to its end. That is, I'm not looking at the speeds of all the particles, and I'm not waiting for the system to reach equilibrium. Yet, the data fits theory almost perfectly. What could be the explanation for my results? (The Wikipedia page defines the distribution as giving the probability of finding the particle near a speed $v$. Could it be that the distribution actually concerns one particle and I'm remembering it wrong?)

Best Answer

As I recall from my studies of statistical mechanics, the Maxwell Boltzmann distribution is a probability distribution for the speed of all particles in a system [...]

The Maxwell-Boltzmann (MB) distribution $p(v)$ gives you the probability that a given particle has speed $v$. To be more precise, the integral $\int_{u}^{u'} p(v)dv$ gives you the probability that a given particle has speed between $u$ and $u'$. In other words, it tells you if you measure the velocity of a random particle in the whole system, how likely it is that you find it around the value $v$.

So, no contradiction here, and Wikipedia is right. You are not looking at some probability density $p(\mathbf v_1 \dots \mathbf v_N)$ for the whole system, but really at something that concerns single particles.

The results are well fitted by an equilibrium distribution probably because you are averaging over a time interval much larger than the time needed for the system to reach equilibrium. Take smaller and smaller time intervals (all of them starting at $t=0$), and you will start to see deviations from the MB. However, if you want to do this I suggest that you average over all the particles, because reducing the time window means that you are reducing your statistical sample.

It could actually be very instructive to plot $p(v,t)$ for some values of $t$ starting at $t=0$, because you will be able to see the system evolving from some non-equilibrium speed distribution to a MB, and you will also know exactly how long it takes to do so.