The core classes,
PeriodicSimulation are derived from the original
Simulation classes to allow periodic boundary conditions: instead of bouncing off the walls, the particles move through them and reappear at the other side of the domain.
In the example given here, the mass of the large particle is set to be equal to that of the small ones, so that it gains enough momentum quickly to be seen to move in the animation. This can be altered by setting the
mass property of the
Share on Twitter Share on Facebook