This HTML automatically generated with rman for NEMO
Table of Contents
runbody2 - Ahmad-Cohen N-body code
runbody2 [parameter=value]
nbody2 < nbody2.in
runbody2 is a frontend to the NBODY2 fortran program, running
the code in a run directory where all files are stored.
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(19), to work in code (virial) units.
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(4)
=2 (see below). Can also be a directory,
in which case the input file for a restart run is assumed to be the default
(fort.4) in native format. 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 NBODY2 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]
- nnbmax=
- Maximum number of neighbours. Should be less then
LMAX, which is compiled into the NBODY2 program. [Default: 40]
- nrun=
- Run
identification index. [Default: 1]
- etai=
- Time-step parameter for irregular
force polynomial. [Default: 0.02]
- etar=
- Time-step parameter for regular force
polynomial. [Default: 0.04]
- rs0=
- Initial radius of neighbour sphere. [Default:
1]
- 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 (see below) [Default: 1,2,1,2,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0]
1 COMMON save on unit 1 at end of run (=2: every 100*NMAX steps) [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 model) [0]
6 Output of significant binaries (=2: frequency NFIX) [0]
7 Lagrangian radii (=1: unit 6; =2: unit 7; =3: both types) [0]
8 Core radius & density centre (N > 20 only) [0]
9 Individual bodies printed at output time (MIN(5**KZ(9),N)) [0]
10 No unique density centre (skips velocity modification of RS(I)) [0]
11 Modification of ETAI & ETAR by tolerance QE [1]
12 Inelastic mergers (>1: diagnostic output) [0]
13 Escaper removal (R > 2*RTIDE; RTIDE = 10*RSCALE) [0]
14 Skip full predictor loop if NNB > KZ(14) = <NNB> & KZ(14) > [0]
15 External potential (=1: Plummer model; =2: logarithmic potential)
[0]
16 No scaling of initial conditions [1]
17 Generation of two subsystems (merger experiment) [0]
18 Adjustment of coordinates & velocities to c.m. condition [0]
19 Use code units for tcrit/deltat [1]
20 Not used at present [0]
- 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)
nbody2
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.
runbody2 "" run1 1024 tcrit=0 kz=0,0,1
u3tos run1/OUT3 run1/run1.snap
runbody2 "" run2 1024 tcrit=0 kz=0,0,1,0,1
u3tos run2/OUT3 run2/run2.snap
You can also supply existing NEMO snapshots as initial conditions
runbody2 run4.snap run4 tcrit=0 kz=0,0,1,2
(this option doesn’t work yet)
Scaling can cause output to become out of bounds.
nbody2(1NEMO)
,
nbody0(1NEMO)
, runbody1(1NEMO)
, snapshot(5NEMO)
, u3tos(1NEMO)
, stou4(1NEMO)
$NEMO/src/nbody/evolve/aarseth/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)
$outdir/OUT3 particle dump (see u3tos(1NEMO))
AuthorPeter Teuben Update History
15-jun-97 V1.0 Created PJT
15-jul-97 V1.2 out= now outdir=, nbody= now required value PJT
5-mar-98 readying for new release PJT
17-mar-06 V1.4 using fullname for in= PJT
9-feb-2019 V2.0 better defaults for snapshot input PJT
Table of Contents