|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Class Summary | |
|---|---|
| AntiprotonAni | Class AntiprotonAni is a sequential program that calculates the positions of the antiprotons as a function of time and displays an animation on the screen. |
| AntiprotonClu | Class AntiprotonClu is a cluster parallel program that calculates the positions of the antiprotons as a function of time. |
| AntiprotonClu2 | Class AntiprotonClu2 is a cluster parallel program that calculates the positions of the antiprotons as a function of time. |
| AntiprotonClu3 | Class AntiprotonClu3 is a cluster parallel program that calculates the positions of the antiprotons as a function of time. |
| AntiprotonFile | Class AntiprotonFile provides an object for reading or writing a series of snapshots of antiproton positions from or to a file. |
| AntiprotonPlot | Class AntiprotonPlot is a main program that plots antiproton position data. |
| AntiprotonSeq | Class AntiprotonSeq is a sequential program that calculates the positions of the antiprotons as a function of time. |
| TrapFrame | Class TrapFrame is a UI window that displays the positions of antiprotons and the total momentum in the Antimatter Simulation. |
| TrapPanel | Class TrapPanel is a UI that displays the positions of antiprotons in the Antimatter Simulation. |
Package edu.rit.clu.antimatter provides the Antimatter Simulation, an example of an N-body problem.
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.
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||