Table of Contents


snapvratio - compute various global virials (clausius, newton)


snapvratio in=snapshot [parameter=value]


snapvratio computes the global virial of a snapshot. It works best if the snapshot has potentials as well as forces are present. They are normally created by the N-body integrator, but see also e.g. hackforce(1NEMO) .

Currently a table is produced with the following entries:

        time, -2T/W,  T+W,  T,  W,  W_1,  W_2, Mass
where W is the potential energy (which one depends on the selected wmode). wmode=phi is the potential as obtained from appropriately summing the product of masses and potentials in the snapshot, wmode=acc gets the Clausius virial:
        Wacc = sum_(m r.f)
(sum over all masses (m), position (r) and forces (f)), and wmode=exact the Newtonian (m/r) potential.

W_1 and W_2 in the table are the other two potentials not selected as the prime potential, the original order of the potentials is acc, phi, exact. The choosen one comes first, the others ones follow in the order left from this array.


The following parameters are recognized in any order if the keyword is also given:
Input file name (snapshot). No default.
Times to select snapshot. [Default: all].
Mode how to compute the prime potential: choice is between acc (forces from the snapshot, hence Clausius virial), phi (potentials from the snapshot), and exact (computed exact newtonian potential m/r [expensive!]). The remaining unchoosen ones are listed as W_1 resp. W_2 in the output table. [Default: acc]
Do an N^2 newtonian calculation too? If true, an N^2 algorithm will be used and [Default: f]
Standard gravitational softening for mode=exact. [Default: 0.05]

See Also

snapstat(1NEMO) , hackforce(1NEMO) , snapvirial(1NEMO)

Marmo, C.; Secco, L. Clausius’ virial vs. total potential energy in the dynamics of a two-component system (2003NewA....8..629M)


Scott Foster

Update History

05-nov-91    V0.0 Created    SMF
27-Mar-92    V0.1 added clausius - changed columns and names      PJT
3-apr-92    V0.2 added wmode= keyword      PJT
13-mar-97    V0.4 added total mass to the output    PJT
30-jul-97    V0.5 added eps=     PJT

Table of Contents