
A hard sphere model of an ideal gas.
Hard Sphere Gas extends the Hard Disk model to three dimensions. Particles move with constant velocity until a collision event is detected. Although collision detection is not the most efficient computation algorithm for this problem, it is straightforward, accurate and fast-enough for small numbers of particles to show the physics that gives rise to a simple model of an inert monatomic gas. The accumulate data averages the speed histogram over many time steps.