This program simulates the collision of neutrons (in two dimensions) with nuclei of different media. In the elastic collision with atomic nuclei, neutrons transfer energy and therefore they slow down. Although in reality the nuclei of the moderator material also bounce back in the collisions (and thus the medium heats up or lattice defects arise), in the simulation we only model the movement of the neutrons, the moderator nuclei remain "stationary".

Fast neutrons are launched with the same speed in random directions from the place marked in red around the middle of the upper figure.

The histogram in the lower figure shows the average velocity v of neutrons after n collisions. (The vertical axis has relative units.)
When the speed of a neutron becomes too low, it is "absorbed" (in the simulation) and a new high-speed neutron enters the picture from the point marked in red. The same thing happens when a neutron leaves the picture. Therefore there are always 50 neutrons moving in the picture.

The lower figure also displays the "speed-halving collision number", denoted by n(1/2). An exponential decrease of the average velocities in function of the collision number is assumed. The parameter of this exponential is determined by the ratio of the average speed after the first collision to the initial speed. In the case of hydrogen and deuterium, the speed of the neutron can change abruptly (almost to zero) in a collision, and the slowed down particle can even be "absorbed" immediately without further collisions. Therefore the average speed for higher collisions have large uncertainties

In the simulation, the particle density is roughly the same for all materials (moderator atoms are randomly scattered on the screen). In reality, however, the density of materials varies widely. Atoms are much less densely distributed in gases than in solids and liquids. When we want to deduce the speed-halving distance from the "speed-halving collision number", the density of the moderator material must also be taken into account!

A further difference is to the real moderators that this simulation runs in two dimension, whereas in the reality the movement of the neutrons and the collisions occur in 3D.