Skip to content

rus4j/Jbody

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jbody 1

N-body algorithm is taken from research article Performance Analysis of Direct N-Body Algorithms on Special-Purpose Supercomputers

Integration consists of the following steps:

(1) The initial time steps are calculated from

equation

where typically ηs = 0.01 gives sufficient accuracy.

(2) The system time t is set to the minimum of all eq and all particles i that have eq are selected as active particles. Note that “classical” N-body codes (Aarseth 1999, 2003) employ a sorted time-step list to select short time step particles efficiently. Such sorting is abandoned in favor of a search over all N particles, which improves load balance in the parallel code due to the more random distribution of short and long step particles.

(3) Positions and velocities at the new t are predicted for all particles using

eq

and

eq

Here, the second subscript denotes a value given either at the beginning (0) or the end (1) of the current time step. All quantities used in the predictor can be calculated directly, i.e. no memory of a previous time step is required.

(4) Acceleration and its time derivative are updated for active particles only according to

eq

and

eq

where

eq

eq

and eq is the softening parameter.

(5) Positions and velocities of active particles are corrected using

eq

and

eq

where the second and third time derivatives of a are given by

eq

eq

(6) The times ti are updated and the new time steps ∆ti are determined.

Time steps are calculated using the standard formula (Aarseth 1985):

eq

The parameter eta controls the accuracy of the integration and is typically set to 0.02. The value of a is calculated from

eq

and a is set to eq.

(7) Repeat from step (2).

Releases

No releases published

Packages

No packages published

Languages