runbody1 [parameter=value] nbody1 < nbody1.in
The new version 2.x interface tries to mimic to run NBODY1 in virial units with a default input and output. In previous versions the defaults were more geared towards running the classic interface where data were scaled and times were measured in crossing times, making comparisons with other codes in NEMO much harder. This however means it is now more work to make NBODY1 run in classic mode. Parameters names and meaning have not changed, except for the introduction of kz(15), to work in code (virial) units.
1 COMMON save on unit 1 if TCOMP > CPU or if TIME > TCRIT. [1] 2 COMMON save on unit 2 at output (=1); restart if DE/E > 5*QE (=2). [2] 3 Basic data written to unit 3 at output time (frequency NFIX). [1] 4 Initial conditions on unit 4 (=1: output; =2: input). [2] 5 Initial conditions (=0: uniform & isotropic; =1: Plummer). [0] 6 Output of significant binaries. [0] 7 Output of movie frames on unit 7. [0] 8 Generation of two subsystems (merger experiment). [0] 9 Individual bodies printed at output time (MIN(5**KZ9,N)). [0] 10 No scaling of initial conditions. [1] 11 Modification of ETA by tolerance QE. [1] 12 Initial parameters for binary orbit. [0] 13 Escaper removal (R > 2*RTIDE; RTIDE = 10*RSCALE). [0] 14 Adjustment of coordinates & velocities to c.m. condition. [0] 15 Use code units for tcrit/deltat [1]
Coding the the input-order logic in the frontend program can be hazardous to your health. It will depend on how the NBODY1 main program is structured.
variables condition where
---------------------------- ------------------- ---------
KSTART TCOMP MAIN
Nbody NFIX NRAND NRUN INPUT
ETA DELTAT TCRIT QE EPS INPUT
KZ(1..15) INPUT
ALPHAS BODY1 BODYN KZ(4).NE.2 DATA
SEMI ECC KZ(12).NE.0 DATA
Q VXROT VZROT RBAR ZMBAR SCALE
NFRAME DELTAF KZ(7).GT.0 SCALE
XCM ECC KZ(8).GT.0 SUBSYS
By decreasing TCRIT, you observe the integrations at finer details, thus re-syncing all particles again. This will have an effect on orbits
mkplummer p128 128 runbody1 p128 run1 deltat=0.1 tcrit=10This will create a run1/OUT3.snap. Code units are now used, not crossing time units.
If however you want to use the more original NBODY1 flavored
run, pay attention to the kz= vector as the default will not suffice anymore.
runbody1 outdir=run2 nbody=128 deltat=0.1 tcrit=10 kz=1,2,1,1,1Note that requesting tcript=10 you will see the final snapshot written at time=28.2843 because the crossing time is about 2.828 and tcrit is measured in terms of crossing times, as opposed to code times for the default run with kz(15)=1.
cd $NEMO/src/nbody/evolve/aarseth/nbody1/
make bench
will run a standard 1280 body plummer sphere benchark to T=10, typically
taking 5-10 seconds.
$NEMO/src/nbody/evolve/aarseth/nbody1 nbody code $NEMO/src/nbody/evolve/aarseth/tools various tools code $outdir/fort.1 restart dump (compile time dep. size) $outdir/fort.2 restart dump (compile time dep. size) $outdir/fort.4 restart dump (compile time dep. size) (see stou4(1NEMO) and u4tos(1NEMO)) $outdir/fort.7 formatted frame files (option KZ(7)) $outdir/OUT3 particle dump (see u3tos(1NEMO))
4-mar-98 V1.1 documented, and changed out= to outdir=, n= to nbody= PJT 17-mar-04 V1.1a fixed bug when in= was specified 17-mar-06 V1.2 using fullname for in= 7-feb-2019 V2.0 better defaults for snapshot input PJT 14-feb-2019 V2.1 default run now computes nbody= and converts to snapshot PJT 20-jan-2024 formatting PJT