Table of Contents

Name

mkplummer - generates a snapshot according to a truncated Plummer model

Synopsis

mkplummer [parameters=values...]

Description

mkplummer constructs a Plummer model, with a spatial or mass cut-off, after which it performs a coordinate transformation to the center-of-mass coordinate system. The data are then written into a file snap-file, in a standard N-body snapshot format. The model is constructed in VIRIAL units (M=G=-4E=1, with E the total energy), and finite spatial extent which can be regulated by specifying mfrac or rfrac or using their default values. The distribution function of a Plummer model is spherically symmetric and isotropic, and is a polytrope of index n = 5. See also Aarseth et al. (1974) and Plummer (1911)

There is also an implementation in Dehnen’s falcON suite: mkplum(1NEMO)

Parameters

The following parameters are recognized; they may be given in any order.
out=snapfile
Output data is written into snapfile, in standard snapshot format.
nbody=integer
Number of particles nobj in Nbody snapshot realization of the Plummer model.
mlow=real
inner core mass fraction within which no stars will be populated. (Default: 0)
mfrac=real
mass fraction of the (infinitely extended) Plummer model; see rfrac immediately below (Default: rfrac=22.8042468).
rfrac=real
radius fraction of the (infinitely extended) Plummer model. If mfrac = 1.0 then particles will be sprinkled in all over space. If mfrac < 1.0 or rfrac > 0.0 then each particle is constrained to lie within both the radial and (cumulative) mass bound. For example, if rfrac( mfrac ) > rfrac then rfrac is the limiting factor, but if rfrac( mfrac ) < rfrac then mfrac limits the extent of the Plummer realization. Note: specifying either value may have no effect if the default value of the other parameter is still the limiting factor; Beware! (Default: mfrac=0.999; rfrac=22.8042468 , chosen so that the cumulative mass at rfrac is mfrac).
seed=integer
seed for the random number generator (default: a value 0, which will be converted into a unique new value using UNIX’s clock time, in seconds since once-upon-a-time-in-the-seventies).
time=time
Time at which the snapshot applies (default: time=0.0).
zerocm=t|f
Reset center of mass to zero? [default: t].
scale=scale_factor
A scale factor or scale to virial units (M=G=-4E=1). Use -1 for virial units, and 1 to get a model in structural (natural) units. Note: large scale factors means small systems with large velocity disperson. [Default: -1].
quit=level
Level of quit start. 0 is noisy, 1=somewhat quiet, 2=more quiet [default: 0].
massname=name
Identification of the mass spectrum. It is normally only a function of mass, so n(m) will suffice. If nothing specified, all stars will have the same mass (total mass M=1). [default: not used].
massexpr=expr
Expression for the mass-spectrum. In addition to the mass m from the massname it may contain any variables contained in the masspars to be specified next. [default: pow(m,p)].
masspars=pars
List of parameters and their values. They can be used by name in the massexpr specified before. [default: p,0.0].
massrange=mlow,mhigh
Valid massrange. A lower and higher cutoff must be supplied. The massrange has arbitrary units, since all masses will be rescaled to set the total mass M=1. [default: 1,1].
headline=string
Optional headline, which is written as the first item in the snapshot file, the next item being the snapshot itself. [default: not used].
nmodel=integer
Number of models to generate. Although mostly meant for benchmarks, generating more then 1 model can be useful to process very large snapshots (which won’t fit in memory) in a serialized fashion. See also snapsplit. Default: 1.

Bugs

A non-delta function mass-spectrum will not create a properly virialized system yet. See snapvirial(1NEMO)

For very large (>1000) ratio in the mass ranges the spline interpolation, used in frandom(3NEMO) , can fail using a valid [0,1] range.

Examples

mkplummer can also be used to create a plummer sphere with a mass spectrum, e.g. a Salpeter mass spectrum with
  % mkplummer salpeter.dat 10000 massname=’n(m)’ massexpr=’pow(m,p)’ masspars=p,-2.35
massrange=0.1,10

See Also

snapvirial(1NEMO) , mkplummer(3NEMO) , snapmass(1NEMO) , snapsplit(1NEM0) , mkplum(1NEMO) , mcluster(1NEMO)

H.C.Plummer (1911), MNRAS, 71, 460.

S.J. Aarseth, M. Henon and R. Wielen (1974), Astron. and Astrophys. 37, p. 183.

A.H.W. Kuepper, Th. Maschberger, P. Kroupa and H. Baumgardt, 2011, MNRAS, 417, 2300 (McLuster)

Author

Piet Hut (Peter Teuben)

Files


~/src/nbody/init    mkplummer.c

Update History


23-Apr-87    Version 1.0: created             PIET
10-Jun-88    Version 1.1: created             PIET
xx-xxx-88    V1.2: zerocm keyword added    PJT
xx-Mar-89    V2.0: full new snapshot version    + doc PJT
15-nov-90    V2.3: mass-spectrum and cleanup    for NEMO 2.x    PJT
6-jun-96    V2.5d: report total mass before scaling      PJT
21-mar-04    V2.7: added mlow=    PJT+NCM
11-apr-05    V2.8: added nmodel=    PJT
15-sep-10    V2.9: clarified rfrac and allow rfrac<0        PJT
2-dec-2017    documented mcluster    PJT