HTML automatically generated with rman
Table of Contents

Name

runbody6 - Hermite N-body code with optional stellar evolution, NEMO frontend to nbody6 and nbody6++

Synopsis


runbody6 [parameter=value]
nbody6   < nbody6.in
nbody6++   < nbody6.in

Description

runbody6 is a NEMO frontend to the Aarseth family NBODY6(++) program. It creates a run directory, prepares a parameter input file, and optionally input (snapshot(5NEMO) data, and runs the NBODY6(++) program. This can be particularly useful if you need to run a lot of simulations unattended.

Note that this front-end is not yet designed to run every possible way in which NBODY6++ can be run, particularly re-runs, but it most useful to run initial conditions from a NEMO snapshot(5NEMO) file.

Although the kz= vector can be specified, an alternative way is the indexed parameter access method that getparam(3NEMO) provides, which overrides the default kz=. For example to turn off KS, use

      KZ15=0 KZ30=0
note the all-caps name of these indexed keywords. Since in NBODY6++ this vector has 50 elements, overriding them with an indexed parameter may be easier. It also bypasses any decisions of using the correct default for certain KZ’s that is done in the kz= vector. For example, for nbody6=1 the default value for kz(22)=2 will be reset to kz(22)=3, but by setting KZ22=2 you can cheat and override these.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
input file (optional, see nbody= to generate your own input data on the fly). If input data are given, it forces KZ(22)=2 (see below). Default: not used.
outdir=
Output run directory. This directory should not exist, although can be overriden with NEMO’s standard error= system keyword. No default.
nbody=
Total particle number. The maximum value (NMAX) is compiled into the NBODY4 program. Note that even if in= is supplied, this parameter is needed. No default.
nfix=
Output frequency of data save or binaries; KZ(3 & 6) [Default: 1]
nrand=
Random number sequence skip. [Default: 0]
nrun=
Run identification index. [Default: 1]
eta=
Time-step parameter for force polynomials. [Default: 0.02]
deltat=
Output time interval in units of the crossing. [Default: 0.25]
tcrit=
Termination time in units of the crossing time. [Default: 5]
qe=
Energy tolerance (restart if DE/E > 5*QE & KZ(2) > 1) [Default: 2e-5]
eps=
Potential softening parameter [Default: 0.01]
kz=
Non-zero options for alternative paths (up to 50)
[0 0 1 0 0 0 5 0 0 1  0 0 0 0 2 0 0 0 0 0  1 2 2 0 0 2 0 0 0 2  0 0 2 0
0 0 1 0 0 0  0 0 0 0 0 0 0 0 0 0]
1    COMMON save on unit 1 at end of run (=2: every 100*NMAX steps).
2    COMMON save on unit 2 at output (=1); restart if DE/E > 5*QE (=2).
3    Basic data on unit 3 at output (freq. NFIX; >1: cluster + tail).
4 #    Binary diagnostics on unit 4 (# threshold levels = KZ(4) < 10).
5    Initial conditions (#22 =0; =0: uniform & isotropic sphere;
                =1: Plummer; =2: two Plummer models in orbit, extra input;
                =3: massive perturber and planetesimal disk, extra input).
                =4: massive initial binary, extra input; output on unit 35).
6    Output of significant & regularized binaries (=1, 2, 3 & 4).
7    Lagrangian radii (>0: RSCALE; =2, 3, 4: output units 6, 7, 12;
                >=5: density & rms velocity at given radii on unit 26 & 27;
              >=5: average mass at given radii on unit 36 every DELTAT;
                 =6: Lagrangian radii for two mass groups on unit 31 & 32.
8    Primordial binaries (=1 & >=3; >0: BINOUT; >2: BINDAT; >3: HIDAT).
9    Individual bodies printed at output time (MIN(5**KZ9,NTOT)).
10    Diagnostic KS output (>0: begin; >1: end; >=3: each step).
11 #    Synchronization of circular orbits (suppressed).
12    Disk shocks (=1: standard model) or interstellar clouds (< 0).
13    Scaling of time (1: variable by t_cr; 2: variable by t_r;
                 -1: constant scaling to t_r; -2: constant scaling to t_c).
14    External force (=1: linearized; -1: cutoff; =2: point-mass galaxy;
             =3: point-mass + disk + logarithmic halo in any combination).
15    Triple, quad, chain (#30 > 0) or merger search (>1: full output).
16    Updating of regularization parameters (RMIN, DTMIN & ECLOSE).
17    Modification of ETA (>=1) & ETAU (>1) by tolerance QE.
18    Hierarchical systems (=1: diagnostics; =2: primordial; =3: both).
19    Stellar evolution and mass loss (=1: old supernova scheme;
                      =3: Eggleton, Tout & Hurley; >4: Chernoff--Weinberg).
20    Initial mass function (=0,1: Salpeter; >1: various, see IMF).
21    Extra output (>0: model, etc; >1: CENTRE; >2: MTRACE; >3: GLOBAL).
22    Initial conditions on unit 10 (=1: output; =2,3(unscaled): input).
23    Escaper removal (>1: diagnostics in file ESC; =2: angles unit #6;
                           >1: tidal tails output if #14 = 3).
24    Initial conditions for subsystem (routine SCALE; KZ(24) = #).
25 #    Partial reflection of KS binary orbit (GAMMA < GMIN; suppressed).
25    HR diagnostics of evolving stars (output of B & S on #82 & 83).
26    Slow-down of two-body motion (=1: KS binary; =2: chain binary).
27    Two-body interactions (-2: RADIUS = 0; -1: collision detection;
                                 =1: sequential circ; > 0: collision).
28    (not used).
29 #    Boundary reflection for hot system (suppressed).
30    Chain regularization (=1: basic; >1: main output; >2: each step).
31    Centre of mass correction after energy check.
32    Increase of output intervals (based on single particle energy).
33    Block-step diagnostics at main output (=2: active pipes).
34     Roche lobe overflow (suppressed).
35    Time offset (global time from TTOT = TIME + DTOFF; offset = 100).
36    Step reduction for hierarchical systems (not recommended).
37    Step reduction for encounters with high-velocity particles.
38     Multiple use of GRAPE-6 (sleep 1 sec after each timer check).
39    Neighbour list (=-1: on host; =0: full list or closest on GRAPE).
40      Use force and first deriv to estimate time steps (0), >0 uses Flploy2
41      proto-star evolution properties
42      Initial binary distribution
43      (unused)
44      (unused)
45      (unused)
46      HDF5/binary/ANSI format
47      frequency of KZ(47) output
48      (unused)
49      compute moments of inertia (Chr. Theis)
50      for unpert KS binary.
#    currently surpressed
xtpar1=
Mass of external Plummer model (KZ(15) = 1; [Default: 1]
xtpar2=
Length scale for Plummer model (KZ(15) = 1) [Default: 2]
zmgas=
Mass scale for logarithmic potential (KZ(15) = 2)
rgas=
Length scale for logarithmic potential (KZ(15) = 2)
alphas=
Power-law index for initial mass function (routine DATA) [Default: 2.3]
body1=
Maximum particle mass before scaling [Default: 5.0]
bodyn=
Minimum particle mass before scaling [Default: 1.0]
q=
Virial ratio (q=0.5 for virial equilibrium) [Default: 0]
vxrot=
XY-velocity scaling factor (> 0 for solid-body rotation) [Default: 0]
vzrot=
Z-velocity scaling factor (not used if VXROT = [Default: 0]
rbar=
Virial radius in pc (for scaling to physical [Default: 1]
zmbar=
Mean mass in solar units [Default: 1]
xcm=
Displacement for subsystem (routine SCALE; KZ(17))
ecc=
Eccentricity of relative motion for subsystem (ECC =< 1)
KZ#=
This is an indexed keyword, and the upper case version of the kz= array keyword. This way the user can override single elements of the kz= vector, and using a default for the long kz= vector. For example "kz=@kz.def KZ22=2 KZ5=2". See getparam(3NEMO) for a description of indexed keywords.
nbody6=0|1
Support mode for nbody6: 1=nbody6, 0=nbody6++ (default)
exe=
Name of the nbody6 executable in your $PATH (absolute or relative path also allowed). Both nbody6 and nbody6++ are supported. The default for exe depends on the value for nbody6=: 1=nbody6 0=nbody6++ Note that for nbody6=1 the default nbody6 executable is the single-processing version, there is also a parallel version, dubbed nbody7.sse. For nbody6++ there is the default nbody6++.sse and the possibly faster nbody6++.avx available.

Examples

nbody6 can also be used to generate snapshots. Here is an example to create a 1024 body homogeneous sphere in the directory run1 and a plummer sphere in run2.
    % runbody6 "" run1 1024 tcrit=0 KZ5=0 KZ22=1
    % snapplot run1/OUT3.snap
    % runbody6 "" run2 1024 tcrit=0 KZ5=1 KZ22=1
    % snapplot run2/OUT3.snap

You can also supply existing NEMO snapshots as initial conditions, this is actually the best supported way to use runbody6:

    % mkplummer p1024 1024
    % runbody6 p1024 run3 tcrit=1

Caveats

Small N systems may need to be tuned with larger rs0= and nnbopt=, but don’t even think of trying a 3-body problem.

The dreaded CALCULATIONS HALTED message means you will need to consult the NBODY6++ manual

The interface has been primarely tested with nbody6++, it’s possible that some differences between nbody6 and nbody6++ have not been taken care of.

Bugs

In mode nbody6=1 the end-time does not seem to be reached. Seem to halt at tcrit-dtadj ?

See Also

runbody1(1NEMO) , nbody2(1NEMO) , nbody4(5NEMO) , snapshot(5NEMO) , u3tos(1NEMO) , stou4(1NEMO) , snapprint(1NEMO)


nbody6:    ftp://ftp.ast.cam.ac.uk/pub/sverre/nbody6/nbody6.tar.gz
nbody6++:  https://github.com/nbodyx/Nbody6ppGPU

Files


$NEMO/usr/aarseth    support to install and test the codes
$outdir/OUT3.snap    particle dump (see u3tos(1NEMO)) in snapshot(5NEMO) format.

Author

Peter Teuben

Update History


20-feb-2019    V0.1 cloned off runbody4, some of keyword descriptions not complete
yet        PJT
22-feb-2019    V0.5 support nbody6/nbody6++    PJT
5-apr-2019    V0.7 support writing snapshots without virtual particles    PJT
26-apr-2019    V0.8 reversed logic of nbody6=, fix  KZ22 option for nbody6=1    PJT


Table of Contents