The Antimatter Simulation program calculates the motion of a number of antiprotons moving in a two-dimensional plane. The antiprotons have equal, negative charges. Each antiproton experiences a repulsive force from every other antiproton that is directly proportional to the product of the antiprotons' charges and is inversely proportional to the square of the distance between the antiprotons. A magnetic field is imposed perpendicular to the plane of the antiprotons. As each antiproton moves, the magnetic field exerts a force on the antiproton that bends its path into a circle.
The Antimatter Simulation program
maintains each antiproton's position, velocity, and acceleration.
The program calculates the positions and velocities
as a function of time
by doing a series of discrete time steps.
At each time step,
the program calculates the total acceleration of each antiproton
(due to repulsive forces from all other antiprotons
plus the magnetic force),
updates the velocity based on the acceleration,
and updates the position based on the velocity and acceleration:
v' = v + δ a
p' = p + δ v + 1/2 δ2 a
where a is the acceleration,
v is the velocity before the time step,
v' is the velocity after the time step,
p is the position before the time step,
p' is the position after the time step,
and δ is the size of the time step.
(These formulas represent the first few terms
in the Taylor series expansions
for velocity and position as a function of time.)
The cluster parallel programs in this package use Parallel Java (PJ) in package edu.rit.pj.