usage: nbody_sh1 [-h (for help)] [-d step_size_control_parameter] [-e diagnostics_interval] [-o output_interval] [-t total_duration] [-i (start output at t = 0)] [-x (extra debugging diagnostics)]"step_size_control_parameter" is a coefficient determining the the size of the shared but variable time step for all particles
"diagnostics_interval" is the time between output of diagnostics, in the form of kinetic, potential, and total energy; with the -x option, a dump of the internal particle data is made as well
"output_interval" is the time between successive snapshot outputs
"total_duration" is the integration time, until the program stops
Input/output are read/written from/to the standard i/o streams. Since all
options have sensible defaults, the simplest way to run the code is by
only specifying the i/o files for the N-body snapshots:
nbody_sh1 < data.in > data.outThe diagnostics information will then appear on the screen. To capture the diagnostics information in a file, capture the standard error stream as follows:
(nbody_sh1 < data.in > data.out) >& data.errNote: if any of the times specified in the -e, -o, or -t options are not an an integer multiple of "step", output will occur slightly later than predicted, after a full time step has been taken. And even if they are integer multiples, round-off error may induce one extra step.
n t m1 x1 y1 x1 vx1 vy1 vz1 m2 x2 y2 x2 vx2 vy2 vz2 ... mn xn yn xn vxn vyn vznOutput of each snapshot is written according to the same format.
mkplummer p100 nbody=100 snapprint p100 m,x,y,z,vx,vy,vz header=t newline=t > p100.tab nbody_sh1 < p100.tab | tabtos - nbody,time m,x,y,z,vx,vy,vz nbody=100or here in more traditional unix pipe example the famous figure 8 orbit:
snapprint $NEMODAT/figure8.dat m,x,y,z,vx,vy,vz header=t newline=t |\ nbody_sh1 -i -o 0.01 -t 20 |\ tabtos - figure8.out nbody,time m,x,y,z,vx,vy,vz nbody=3 snapplot figure8.out trak=t snapplot figure8.out trak=t xvar=x yvar=y snapplot figure8.out trak=t xvar=x yvar=vx snapplot figure8.out trak=t xvar=x yvar=vy snapplot figure8.out trak=t xvar=y yvar=vx snapplot figure8.out trak=t xvar=y yvar=vy snapplot figure8.out trak=t xvar=vx yvar=vy snapprint figure8.out x,y,vx,vy |\ tabplot - 1,1,1,2,2,3 2,3,4,3,4,4 -1.6 1.6 -1.6 1.6 color=2,3,4,5,6,7
http://www.ids.ias.edu/~piet/act/comp/algorithms/starter/index.html
jan-2002 Version 1: Piet Hut, Jun Makino