This HTML automatically generated with rman for NEMO
Table of Contents

Name

snapscale - re-scale an N-body system

Synopsis

snapscale in=in_file out=out_file [parameter=value] ...

Description

snapscale copies an N-body system from in to out, multiplying various components of the snapshot by their respective scale factors. All scalings are done independantly, the scalefactors have to be supplied explicitly. For example, if positions are scaled, velocities are not (unless specified of course), and are treated as independant. The default for all scale factors is 1.

For that matter snapscale is not an intelligent program. One could set it up with default not supplied (empty keywords), and let the program figure out how to rescale all available items in the snapshot if e.g. only masses are scaled, and virial units are to be effective, the radii and/or velocities will also be appropriately scaled. These features are implemented in snapvirial.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=in_file
input file, in snapshot(5NEMO) format. Default: none.
out=out_file
output file, also snapshot format. Default: none.
mscale=m_scale_factor
Scale factor for particle masses. Default: 1.0.
rscale=pos_scale_factor(s)
Scale factor for position space. If three numbers are given, the three positions are scaled independantly. One number means all NDIM (three or two) coordinates are transformed the same. Default: 1.0.
vscale=vel_scale_factor(s)
Scale factor for velocity space. If three numbers are given, the three velocities are scaled independantly. One number means all NDIM (three or two) coordinates are transformed the same. Default: 1.0.
pscale=phi_scale_factor
Scale factor for particle potentials. Default: 1.0.
ascale=acc_scale_factor(s)
Scale factor for accelerations. If three numbers are given, the three accelerations are scaled independantly. One number means all NDIM (three or two) coordinates are transformed the same. Default: 1.0.
xscale=aux_scale_factor
Scale factor for the auxilliary information item, if present. Default: 1.0.
kscale=key_scale_factor
Scale factor for the key item. Note that this item must be an integer. Default: 1.
times=time-ranges
Only snapshots with time values within times-ranges, which is of the form ts[:te],..., will be copied. [default: all].

Examples

For a given axisymmetric disk with all particles on circular orbits squashing the orbits a bit would give a reasonable approximation for elliptical orbits, say by 10%:
    e=1.1
    snapscale in=mod.axi out=mod.ell "rscale=sqrt($e),1/sqrt($e),1" \
        "vscale=$e,1/$e,1"

Scaling an already virialized Plummer sphere (see mkplummer(1NEMO) ), and the Faber-Jackson relation, here is one way to scale such models with a massfraction a:

    a=0.1
    snapscale plum1.dat plum2.dat mscale="$a" rscale="$a**0.5" vscale="$a**0.25"

See Also

mkplummer(1NEMO) , snapvirial(1NEMO) , snapshift(1NEMO) , snapshot(5NEMO)

Author

Joshua E. Barnes, Peter Teuben

Files


~/src/pjt/nbody       snapscale.c snapscale.1

Update History


 7-May-87    V1.0: created              PJT
16-Nov-87    V1.1: mass added    PJT
9-Mar-88    V1.2: data history added, proper debug output    PJT
16-Mar-88    V1.0 at IAS by Josh    JEB
1-Jun-88    V2.0: merged PJT extensions into JEB’s code    PJT
24-aug-88    V2.1: added pscale keyword    PJT
15-aug-89    V2.4: added pscale,ascale,xscale,kscale      PJT
19-oct-99    doc improved    PJT
13-jun-22    add example    PJT


Table of Contents