HTML automatically generated with rman
Table of Contents

Name

snapvirial - scale snapshots while retaining or setting virial ratio

Synopsis

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

Description

snapvirial copies an N-body system from in to out, scaling particle qantities such that the virial ratio is either retained or gets a specified value. For a more manual rescale use snapscale(1NEMO) .

The input snapshot must not only contain masses and phase space information, but also potential, as to make the rescaling computation a linear operation. Depending on accuracy needed, a general algorithm as in hackforce(1NEMO) can be used to add potentials and forces to a snapshot.

Parameters

The following parameters are recognized:
in=in_file
input file, in snapshot(5NEMO) format. Default: none.
out=out_file
output file, also snapshot format. If none supplied, the current virial ratio is reported, 1 being the ideal virialized case.
mscale=bool
Scale the masses? [default: f].
rscale=bool
Scale the positions? [default: t].
vscale=bool
Scale the velocities? [default: t].
times=time-ranges
Only snapshots with time values within times-ranges, which is of the form ts[:te],..., will be scaled and copied. [default: all].
virial=positive ratio
Virial ratio (must be non-negative) to be obtained - rescaling is done such that a virial ratio of |2T/W| is obtained. If no value is given, the old virial ratio is retained [default: not used].

See Also

snapscale(1NEMO) , hackforce(1NEMO) , snapshot(5NEMO) , units(5NEMO)

Bugs

It is considered an error when either the potential energy is positive or the kinetic energy is negative. This usually requires the snapshot to be in the center of mass frame. Use snapcenter(1NEMO) if need be.

This program has no intelligence about the shape of the system, and hence does a simple rescaling of the required quantities. It thus works quite well for spherical galaxies.

Author

Peter Teuben

Files


~/src/nbody/trans       snapvirial.c

Update History


12-March-89    V1.0: created              PJT
 6-apr-89    V1.1: added keywords 2t/w (bug?)    PJT
11-aug-89    V1.2: mscale added and logic improved       PJT
29-oct-90    V1.3: fixed decision bug    PJT
11-nov-91    V1.3a: man page clarifications    PJT
18-jul-2012    V2.0:  reporting mode when out= left blank    PJT


Table of Contents