edu.rit.hyb.antimatter

Package edu.rit.hyb.antimatter

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

See: Description

Package edu.rit.hyb.antimatter Description

Package edu.rit.hyb.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.The antiprotons are surrounded by an "antiproton trap" --a square metal cage with sides of length R,extending from coordinates (0,0) to (R,R)in the (x,y) plane.The antiproton trap has a negative charge.Thus, each antiproton experiences a repulsive forceaway from the sides of the trap.Since the antiprotons are repelled from the sides of the trap,the antiprotons will never touch the trapand matter-antimatter annihilation will not happen.

The Antimatter Simulation programmaintains each antiproton's position and velocity.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 force on each antiproton(repulsive forces from all other antiprotonsplus repulsive forces from the sides of the trap),updates the velocity based on the force,and updates the position based on the velocity and force:
 
V' = V + F Δt
 
P' = P + V Δt + 1/2 F Δt2
 
where F is the vector force on the antiproton,V is the antiproton's vector velocity before the time step,V' is the antiproton's vector velocity after the time step,P is the antiproton's vector position before the time step,P' is the antiproton's vector position after the time step,and Δt 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 hybrid SMP cluster parallel programs in this package use Parallel Java (PJ)in package edu.rit.pj.

SCaVis 2.2 © jWork.ORG