Energy Distribution of a Two Dimensional Gas with Hard Disc Collisions

The energy distribution of a gas leads to the evolution of the second law of thermodynamics. The second law states that the motional (kinetic) energy cannot go from a less energetic body to a more energetic body. Note that I have avoided the use of the word "temperature" because temperature is a very poorly defined concept. In this page we will see that the average kinetic energy takes the place of k*T where k is Boltzmann's constant and T is temperature. This page includes an active plot of the kinetic energy distribution versus energy. The particles (discs since they are 2 dimensional) all start out with equal kinetic energies and tend toward their final equilibrium energy distribution which, for a simple monoatomic gas like this, for 2D the following expression is correct:
Canvas with Moving Gas Discs
Single Step
Disc Radius 5
Initial Energy 0.2
$$p_{2D}(E)=a\left({E \over\tilde{E}}\right)^0\exp\left({-{E \over \tilde{E}}}\right)$$ and for 3D it is: $$p_{3D}(E)=b\left({E \over\tilde{E}}\right)^{1 \over 2}\exp\left({-{3E \over 2\tilde{E}}}\right)$$
Plot of Energy Distribution Histogram as Well as Exponential of Maxwell-Boltzmann Theory. Note that, after a minute or two, the red histogram matches the green theory curve quite accurately.
where \(\ E\) is kinetic energy and \(\tilde{E}\) is the average kinetic energy of all particles.
In this expression \(\ p(E\)) is the probability of a given energy and \(\ a\) or \(\ b\) is a constant such that the integral of p(E) over all energies becomes 1. $$a\int_{E=0}^\infty p(E)dE=1$$ One might ask why the probabilty of zero energy is maximal in 2 dimensions and is 0 in 3 and more dimensions . The reason is that in 3 dimensions the result of a collision can never have all three velocity components of one of the particles be zero. To see this we need to get into the dynamics of 2 and 3 dimensional collisions. In the following equations please be aware that bold letters denote vecotors which have either (x,y) or (x,y,z) components depending on whether we are considering 2D or 3D calculations. For hard disc collisions one must consider both conservation of momentum and energy. If the collision was mediated by a potential between the particles, one would only have to consider conservation of kinetic and potential energy. Conservation of momentum requires that the final momentum be the same as the initial momentum. For a collision between particles 1 and 2: $$m_1 \textbf{v}_{1f}+m_2 \textbf{v}_{2f}=m_1 \textbf{v}_{1i}+m_2 \textbf{v}_{2i} (1)$$ where the subscript f stands for final value and the subscript i stands for initial value and the bold letter \(\textbf{v}\) stands for the velocity vector. The conservation of kinetic energy equation is as follows: $$m_1 \textbf{v}_{1f}\cdot\textbf{v}_{1f}+m_2 \textbf{v}_{2f}\cdot\textbf{v}_{2f}= m_1 \textbf{v}_{1i}\cdot\textbf{v}_{1i}+m_2 \textbf{v}_{2i}\cdot\textbf{v}_{2i} (2)$$ where the \(\cdot\) between the velocity vectors stands for the inner or dot product of the two vectors. When we combine equations 1 and 2 we get equations that relate the components of the velocity vectors. The most important concept in these calculations is that of the unit vector \(\textbf{u}\) between the centers of the two particles that are colliding \[\textbf{u}= {(x_2-x_1)\hat{\textbf{x}}+(y_2-y_1)\hat{\textbf{y}}+(z_2-z_1)\hat{\textbf{z}} \over {r_{12}}}\] where the x, y, and z that have hats are unit vectors along their respective axes and $$r_{12}=\sqrt{{(x_2}-{x_1)}^2+{(y_2}-{y_1)}^2+{(z_2}-{z_1)}^2}$$ Note that the unit vector points from disc 1 to disc 2 so, if x2 is greater than x1, the unit vector's x component is positive.
Applying equation 1, we know that the changes of momentum of the discs are equal and opposite and are along the unit vector u so we can write. $$m_1\delta\textbf{v}_1=M\delta v\textbf{u}=-m_2\delta\textbf{v}_2 (3)$$ where \(M\) has units of mass and \(M\) and the scalar speed increment \(\delta v\) are still to be determined. Now we may re-write equation 2 using equation 3 and obtain: $$(m_1\textbf{v}_1+M\delta v\textbf{u})\cdot(m_1\textbf{v}_1+M\delta v\textbf{u})/m_1+(m_2\textbf{v}_2-M\delta v\textbf{u})\cdot(m_2\textbf{v}_2-M\delta v\textbf{u})/m_2 =m_1 \textbf{v}_{1}\cdot\textbf{v}_{1}+m_2 \textbf{v}_{2}\cdot\textbf{v}_{2}$$ After cancellations of the terms on its right side, equation 4 simplifies to: \[M\delta v = {2m_1m_2 \over {m_1+m_2}}\textbf{u}\cdot(\textbf{v}_{1}-\textbf{v}_{2})\] We can now make the identifications: \[M = {2m_1m_2 \over {m_1+m_2}}\] \[\delta v = \textbf{u}\cdot(\textbf{v}_{1}-\textbf{v}_{2})\] where M is known as the "reduced mass" Finally using equation 3 again we can write the expressions for the final velocity vectors: \[\textbf{v}_{1f} = \textbf{v}_{1i}+{M\over m_1}\textbf{u}\cdot(\textbf{v}_{1i}-\textbf{v}_{2i})\textbf{u}\] \[\textbf{v}_{2f} = \textbf{v}_{2i}-{M\over m_2}\textbf{u}\cdot(\textbf{v}_{1i}-\textbf{v}_{2i})\textbf{u}\]