Maintenance has stopped a while back, nbody6(1NEMO) is the recommended replacement.
Example input
parameter_file for the standard internal benchmark (a 100-body problem
integrated for 20 crossing times):
1 1000.0 KSTART TCOMP 100 5 10 30 35 1 N NFIX NCRIT NRAND NNBMAX NRUN 0.02 0.03 0.4 1.0 1.0 20.0 5.0e-05 1.0 0.6 ETAI ETAR RS0 DTADJ DELTAT TCRIT QE RBAR ZMBAR 1 2 0 0 1 0 1 0 0 0 KZ(J), J=1,40 0 0 0 1 1 1 1 0 0 1 1 0 2 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 2.0e-05 1.0e-03 0.1 1.0 1.0e-06 0.01 DTMIN RMIN ETAU ECLOSE GMIN GMAX 2.3 1.1 0.1 0 ALPHAS, BODY1, BODYN, NBIN0 0.5 0.0 0.0 0.0 Q VXROT VZROT RSPH2(for comparison the original NBODY1 default parameter set:)
1 1.0 KSTART TCOMP 25 1 10 1 N NFIX NRAND NRUN 0.02 1.0 5.0 2.0E-05 0.03 ETA DELTAT TCRIT QE EPS 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 KZ(J), J=1,15 2.5 5.0 1.0 ALPHAS BODY1 BODYN 0.5 0.0 0.0 1.0 1.0 Q VXROT VZROT RBAR ZMBARNote: the order of input lines may change depending on previous ones (KSTART and KZ’s in particular)
Here are, for completeness,the READ statements from the source code
binpop.f: READ (5,*) NBIN, SEMI0, ECC0, RATIO, RANGE, NSKIP, IDORM cloud0.f: READ (5,*) NCL, RB2, VCL, SIGMA, (CLM(J),J=1,NCL), data.f: READ (10,*) BODY(I), (X(K,I),K=1,3), (XDOT(K,I),K=1,3) data.f: - READ (5,*) ALPHAS, BODY1, BODYN, NBIN0 hotsys.f: READ (5,*) SIGMA0 input.f: READ (5,*) N, NFIX, NCRIT, NRAND, NNBMAX, NRUN input.f: - READ (5,*) ETAI, ETAR, RS0, DTADJ, DELTAT, TCRIT, QE, RBAR, ZMBAR input.f: - READ (5,*) (KZ(J),J=1,40) input.f: - READ (5,*) DTMIN, RMIN, ETAU, ECLOSE, GMIN, GMAX input.f: READ (5,*) DELTAS, ORBITS(1), (GPRINT(J),J=1,K) intide.f: READ (5,*) RSTAR, RTSTAR, RSYNC, EPOCH0 intide.f: READ (5,*) IMS, IEV, RMS, REV, IMF modify.f: READ (5,*) DTA, DT, TA, TN, TC, QE1, J, K modify.f: READ (5,*) ETA1, ETA2, ETA3, DTM, RM mydump.f: - READ (J,ERR=10,END=10) DUMMY mydump.f: - READ (J) A, B, IC, ID, E, F, G, H, IR nbody5.f: - READ (5,*) KSTART, TCOMP scale.f: - READ (5,*) Q, VXROT, VZROT, RSPH2 scale.f: READ (5,*) (X(J,I),J=1,3), (XDOT(J,I),J=1,3)
Definition of input parameters: (parameters with a * start on a new line; their type is the implicit FORTRAN specification: [I-N] for integers, [A-H,O-Z] for floating point parameters)
Definition of options KZ:
1 COMMON save on unit 1 if TCOMP > CPU or if TIME > TCRIT. 2 COMMON save on unit 2 at output (=1); restart if DE/E > 5*QE <=2). 3 Basic data written to unit 3 at output time (frequency NFIX). File: OUT3 4 Initial conditions on unit 4 (=1: output; =2: input; 3=input+output). 5 Initial conditions (=0: uniform & isotropic; =1: Plummer law). 6 Output of significant binaries on printout. 7 Output of movie frames on unit 7 (read NFRAME, DELTAF). 8 Generation of two subsystems (merger experiment) (read XCM, ECC). 9 Individual bodies printed at output time (MIN(5**KZ9,N)). 10 No scaling of initial conditions to physical units. 11 Modification of ETA by tolerance QE. 12 Initial parameters for binary orbit (read SEMI, ECC). 13 Escaper removal (R > 2*RTIDE; RTIDE = 10*RSCALE). 14 Adjustment of coordinates & velocities to c.m. condition. 15 --read but not used--
read: KSTART, TCOMP if KSTART=1 then new run read: N, NFIX, NRAND, NRUN input.f read: ETA, DELTAT, TCRIT, QE, EPS input.f read: KZ(J),J=1,15 input.f if KZ(4)=2 then read(unit 4) data.f else read: ALPHAS, BODY1, BODYN data.f endif if KZ(12)>0 then read: SEMI, ECC data.f endif read: Q, VXROT, VZROT, RBAR, ZMBAR scale.f if KZ(7)>0 then read: NFRAME, DELTAF scale.f endif if KZ(8)>0 then read: XCM, ECC subsys.f endif else read (unit=1) restart nbody1.f if (KSTART>2) restart with new parameters if KSTART=4 then ... else read: DELTAT, TNEXT, TCRIT, QE, J, KZ(J) modify.f endif if KSTART>=4 then read: ETA modify.f endif endif endif
486dx2-66 linux 1.2.3 433" -O sparc 10/30 (bootes) 250" -O sparc 20/50? (phoenix) 90" -O sparc 20/50? (phoenix) 96"!! -O4 -libmil -cg92 (bizarre!) Ultra 7 155H (laptop) 0.22 -O3 (default; gfortran 11.4.0)
KT = MAX(2.001*STEP(I1)/DT,1)needs to have a real argument, thus 1.0, not 1
fort.1 common block restart dump file (option 1) fort.2 common block restart dump file (option 2) OUT3 output file (option 3) fort.4 initial conditions input or output file (option 4) *** not in nbody5 *** fort.7 formatted frame files (option 7) *** not in nbody5 *** OUT9 ??? ESC ascii file containing the times of each escaper STOP control file, when exists, program will prematurely stop.
Direct Methods for N-Body Simulations by S.J. Aarseth in: Multiple Time Scales, eds. J.U. Brackbill & B.L. Cohen, Academic Press, p. 377 (1984).
NBODY0 source code in Binney & Tremaine’s Galactic Dynamics (Princeton University Press, 1987). pp.678.
Small-N Systems by S.J. Aarseth in: XXX eds. Benz, Barnes and XXX (to be published, 1994)
https://ftp.ast.cam.ac.uk/pub/sverre/nbody5/nbody5.tar.Z (4-apr-2004 version)
22-may-95 manual page written PJT 19-jan-2024 format fix PJT