edu.rit.clu.antimatter

Package edu.rit.clu.antimatter

Package edu.rit.clu.antimatterprovides the Antimatter Simulation,an example of an N-body problem.

See: Description

Package edu.rit.clu.antimatter Description

Package edu.rit.clu.antimatterprovides the Antimatter Simulation,an example of an N-body problem.

The Antimatter Simulation programcalculates the motion of a number of antiprotonsmoving in a two-dimensional plane.The antiprotons have equal, negative charges.Each antiproton experiences a repulsive forcefrom every other antiprotonthat is directly proportionalto the product of the antiprotons' chargesand is inversely proportionalto the square of the distancebetween the antiprotons.A magnetic field is imposedperpendicular to the plane of the antiprotons.As each antiproton moves,the magnetic field exerts a force on the antiprotonthat bends its path into a circle.

The Antimatter Simulation programmaintains each antiproton's position, velocity, and acceleration.The program calculates the positions and velocitiesas a function of timeby 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 antiprotonsplus 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 termsin the Taylor series expansionsfor velocity and position as a function of time.)

The cluster parallel programs in this package use Parallel Java (PJ)in package edu.rit.pj.

SCaVis 1.8 © jWork.org