Table of Contents

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

For more
advanced Plummer models, see *mcluster(1NEMO)*
.

**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).
See also
*xrandom(1NEMO)*. **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**]. **quiet=***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**. **mode=0|1|2**- The processing mode, purely for debugging. 0=no data written. 1=data written,
but no extra analysis. 2=data written, and extra analysis done. [Default:
1].

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

% mkplummer salpeter.dat 10000 massname=’n(m)’ massexpr=’pow(m,p)’ masspars=p,-2.35 massrange=0.1,10

with some sample CPU for bench0:make -f Benchfile bench0 bench1 or/usr/bin/time mkplummer . 10000000/usr/bin/time mkplummer bench1.snap 10000000

xps13 3.1s or 171 MB/s t480 4.9s or 72 MB/sthe time difference betweeen bench0 and bench1 can be interpreted as the time needed to write 535MB (for 10M particles)

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)

~/src/nbody/initmkplummer.c

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