This HTML automatically generated with rman for NEMO
Table of Contents

Name

snappot - add analytical potentials/forces to an N-body system

Synopsis

snappot [parameter=value]

Description

snappot - add forces and potential from an analytical potential to a snapshot. Note this replaces (not add) any previously stored values of the potential and accelerations.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=
Input file (snapshot) No default.
out=
Output file (snapshot) No default.
potname=
name of potential(5) No default.
potpars=
parameters to potential []
potfile=
optional filename to potential []
times=
Which times to work on [all]

Caveats

Some snapshots created use virial units,and their structural parameters are not simply unity numbers. For example mkhomsph(1NEMO) uses a default rmax=1.2 with mass 1 for virial units, whereas potname=hom uses the equivalent of mass=1 rmax=1.

The first parameter in potpars= is normally interpreted as the pattern speed. Any non-zero pattern speed will also modify the potential and forces with the centrifugal terms.

Examples

Here is an example creating a homogenous sphere 1000 particles and radius=1 (mass=1). Computing exact Newtonian forces and potentials via snappot and then using hackforce using no softening, then using snapcmp to compare the potentials:
% mkhomsph hom.1 nbody=1000 rmin=0 rmax=1
% snappot hom.1 hom.2 potname=hom
% hackforce hom.1 hom.3 tol=0.5 eps=0.0 
% snapcmp hom.2 hom.3 obs=phi 
# time  Min  Qlow Median Qhigh  Max   Mean Sigma
0   -0.0597801 -0.0123398 0.00170801 0.0167317 0.265311  0.00351182 0.0259002
% snapcmp hom.2 hom.3 obs=phi relative=t
# time  Min  Qlow Median Qhigh  Max   Mean Sigma
0   -0.218659 -0.0138202 -0.0013817 0.0111966 0.0504391  -0.00242348 0.0212987

See Also

potcode(1NEMO) , hackforce(1NEMO) , snapshot(5NEMO) , potential(5NEMO) ,

Files

Author

Peter Teuben

Update History


25-Mar-05    V1.0 Created    PJT


Table of Contents