Table of Contents

mkspiral \- uniform-density test disk plus spiral in spherical potential .SH SYNOPSIS
\fBmkspiral out=\fPsnapshot [parameters=values ...] .SH DESCRIPTION
\fImkspiral\fP sets up a cold disk of test particles orbiting clockwise in the gravitational potential of a user-supplied potential (in \fIpotential(5NEMO) \fP format). In addition a spiral is added with constant width in degrees along a galactic circle. For given ratio of spiral/disk perturbation \fBa\fP and width \fBw\fP (now measured in radians) the fraction of particles in the disk will be about \fB pi / (pi + a.w.sqrt(2.pi))\fP for not too large \fBw\fP.

The inverse wavelenght of the spiral (related to the pitch angle)

will be positive for a \fItrailing spiral pattern\fP. .PP
\fIsnapmass(1NEMO) \fP and \fIsnapcenter(1NEMO) \fP have to be used if for some reason the user want finite mass particles and a perfectly centered set of particles.
.PP

Note this particle distribution is only useful for display, e.g. spiral

structure in a Longitude-Velocity diagram, and should not be integrated with programs like \fIhackcode3(1NEMO) \fP.
.SH PARAMETERS

The following parameters are recognized in any order if the keyword is also

given:
.TP 25
\fBout=\fIout_file\fP

The data are written to this file in \fISnapShot(5NEMO) \fP

format [no default].
.TP
\fBndisk=\fInum_bodies\fP

Number of disk particles [default: \fB2048\fP]

.TP
\fBpotname=\fIpotential_name\fP
name of the potential, see $NEMO/obj/potential for the current repository. The user can supply his own, see potential(5NEMO) . [default: \fBplummer\fP].
.TP
\fBpotpars=\fIpot_pars\fP

Paramaters to the user supplied potential. The number of parameters

depends on the potential supplied, the first parameter is reserved for a pattern speed in future implementation. [default: not supplied, parameters as defined by potential(5) ]. .TP
\fBpotfile=\fIpot_file\fP

Data_file(s) to the user supplied potential. The number of files depends

on the potential supplied.
[default: not supplied, datafile(s) defined by potential(5) ]. .TP
\fBrmin=\fImin_disk_radius\fP

Inner cutoff radius of test-particle disk. [Default: \fB0.0\fP].

.TP
\fBrmax=\fImax_disk_radius\fP

Outer cutoff radius of test-particle disk. [Default: \fB1.0\fP].

.TP
\fBa=\fIratio\fP

Ratio of maximum spiral perturbation w.r.t. base disk. [default: \fB1\fP].

.TP
\fBk=\fIinv_rad\fP

Wavenumber of the spiral pattern, such that \fB2.pi.k.r\fP is the phase of

the spiral density maximum. Positive \fB\fP means trailing spiral pattern. (note that this is defined in term of \fBsign=\fP, see below) [default: \fB1\fP].
.TP
\fBw=\fIwidth\fP

Width of the spiral arm along a galactic circle. Depending on the next keyword

this width is either is degrees along a galactic circle if that is to be constant, or in length units if the width of the spiral is to be constant. [default: \fB15\fP].
.TP
\fBangular=t|f\fP

Is the width of the spiral defined in angular terms, in which case the

physical real width linearly increases with distance from the galactic center, or is is constant as a function of radius. [default: \fBt\fP, i.e. defined in angular terms].
.TP
\fBseed=\fIrandom_seed\fP

Use random number seed. A zero seed will generate a system-time

dependant seed. [default: \fB0\fP].
.TP
\fBsign=-1|+1\fP

Sign of the angular moment vector. Positive means counter-clock wise

rotation. Not
.TP
\fBsigma=\fP\fIs1,s2,s3\fP

Velocity dispersion (isotropic) in the X-Y plane, plus optionally

an offset and exponential dropoff: s = s1 + s2 * exp(-r/s3).

Default: 0

.TP
\fBsigmator=\fP

The ratio of the tangential to radial velocity dispersion. By default 1,

but if you need realistic values, our local solar neighbor measures about 0.5 but the best self-consistent (despite these models are NOT) estimate can be set by using the value -1, in which case 0.5*kappa/omega is used. Default: 1
.TP
\fBnmodel=\fP\fIn_models\fP

Number of output models. [Default: \fB1\fP].

.TP
\fBlinear=t|f\fP

Should the spiral be linear or logarithmic. Although spiral galaxies are

mostly logarithmic, for historic reasons the default here is linear. [Default: \fBt\fP]
.TP
\fBheadline=\fImessage\fP

Text headline for output file [default: not used].

.SH BENCHMARK

This program has been used as benchmark to test writing >2GB files

(40 models of 1,000,000 particles creates a file just over this magic limit):
.nf
% time mkspiral s000 1000000 nmodel=40
.fi

Here is a sample on some 2002-class machines:

.nf
U-sparc IIi/440 MHz: 161.30u 42.59s 5:04.85 66.8% PentiumIV 2.2 GHz: 29.54u 10.68s 2:40.14 25.1% PentiumIV 2.4 GHz: 26.46u 10.14s 1:37.71 37.4%

G5 2.0GHz:
28.400u 24.660s 1:05.41 81.1% (at no load of 0.0) 33.460u 44.950s 13:01.31 10.0% (at full load of 2.0)
P4/1.6 GHz:
69.940u 18.470s 4:50.64 30.4% (laptop) P4/2.6 GHz + SATA 27.400u 16.320s 0:52.13 83.8% 0+0k 0+0io 300pf+0w (at no load of 0.0)
27.790u 20.020s 1:52.22 42.6%
0+0k 0+0io 300pf+0w

sum: 79.35u 3.72s 2:17.64 60.3% P2400
tsf: 0.00u 7.59s 1:59.46 6.3% P2400

sum: 13.610u 4.130s 1:10.12 25.2% P2600/SATA tsf: 0.010u 7.800s 1:09.74 11.1% P2600/SATA

sum: 13.334u 2.915s 0:57.67 28.1% P2800/SATA (Peter's asus ) tsf: 0.003u 4.696s 0:44.36 10.5% P2800/SATA

sum: 68.63u 22.34s 2:31.54 60.0% U440
tsf: 21.85u 30.73s 2:32.06 34.5% U440

.fi
.SH SEE ALSO"
mkdisk(1NEMO) , snapmass(1NEMO) , snapcenter(1NEMO) , hackcode3(1NEM0) .SH UPDATE HISTORY"
.nf
.ta +1.0i +4.5i
13-mar-89 V1.0 created PJT 6-apr-89 V1.1 seed=0 implemented PJT 7-apr-89 V1.2 angular keyword introduced PJT 26-feb-93 V1.4 new potential keywrds PJT 16-sep-95 V1.5 added nmodel=, sign= ; radii now random PJT 26-may-02 added benchmark data for >2GB files PJT 3-aug-09 V1.8 and documented forgotten stuff PJT 11-aug-09 V1.9 added sigmator= PJT


Table of Contents