This HTML automatically generated with rman for NEMO
Table of Contents

Name

snapcenterp - find position center of a snapshot from minimum in potential

Synopsis

snapcenterp in=snap-file [parameter=value] ...

Description

snapcenterp finds the potential center of a snapshot using the iterative Cruz et al. (2002) method. They identified three parameters, fn, eps and eta, discussed below. This algorithm is linear in Nbody and Niter.

Unlike snapcenter(1NEMO) , which centers all phase space coordinates, this program only centers the spatial coordinates, although the method could be generalized and center the velocities.

This program is still in development (see also CAVEATS below), not all keywords are fully implemented.

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=snap-file
Input data is read from snap-file, which must be in snapshot format. No default.
out=snap-file
Output data is written to snap-file, which will be in snapshot format. No default.
weight=expression
The value of expression is used to compute the centroid. expression is a real-valued C language expression over the real values x, y, z, vx, vy, vz, phi, m, t, and the integer value i. [Default m].
times=time-range
Only data frames with time values within time-range, which is of the form, eg, "1.0:1.5,2.5,3.0", will be translated. [Default: all].
report=t|f
Report the center of mass coordinates. These are 2*NDIM numbers, position and velocity, of the new center of mass in the old coordinates. If you want to use snapcenter in a pipe, you need to reset report=f, since both standard output and filestruct output will get merged, and become illegable for the next program in the pipe. [Default: t].
eps=
Softening length, in length units used in the snapshot. [0.025]
eta=
Convergence stop criterion. This number is the length of the difference vector of two subsequent iterations of the potential center, and is thus in units of those of the snapshot and eps. [0.001]
fn=
Fraction of particles to consider in the potential finding algorithm [0.5] **currently all particles used**
iter=
Maximum number of iterations to use. If the eta stop criterion did not converge, this criterion will stop the iterations. [10]
center=xc,yc,zc
An estimated center to speed up convergence. [0,0,0]
one=t|f
Write output center of mass (COM) as a single body with total mass and COM coordinates as computed from weight=. [Default: f].

Caveats

Mysteriously this does not seem to work well for small Nbody, e.g.
mkplummer - 100 seed=123 | snapshift - - 0.5,0,0 | snapcenterp - . debug=1 report=t
### nemo Debug Info: 1 0.212503 -0.023019 -0.111053 0.109614
### nemo Debug Info: 2 0.229355 -0.025213 -0.162219 0.053914
### nemo Debug Info: 3 0.221806 -0.025366 -0.175827 0.015562
### nemo Debug Info: 4 0.215902 -0.017432 -0.178834 0.010336
### nemo Debug Info: 5 0.206639 -0.000181 -0.180961 0.019696
### nemo Debug Info: 6 0.193003 0.019449 -0.182329 0.023941
### nemo Debug Info: 7 0.186807 0.025474 -0.182157 0.008644
### nemo Debug Info: 8 0.186308 0.025859 -0.182110 0.000632
0.186308 0.025859 -0.182110
where the columns are iter#, pos and |r_{i+1} - r_{i}|. But clearly it is not converging to 0.5. The larger the shift, the better the convergence. Increasing eps does help, for example for eps=0.2 an ensemble of simulations with different seeds does return the proper value within the error. See also $NEMODAT/nemoplot/shift1.tab

and shift2.tab

See Also

snapshift(1NEMO) , snapcenter(1NEMO) , bodytrans(3NEMO) , snapshot(5NEMO)

Cruz., F et al. - (2002) Rev.Mex.de Astr.y Astr. 38, 225 https://ui.adsabs.harvard.edu/abs/2002RMxAA..38..225C

Ads

@ads 2002RMxAA..38..225C

Author

Peter Teuben

Update History


1-apr-06    0.1 Created in Rembrandt Hotel        PJT
12-aug-2022    0.2 cleanup up    PJT
16-aug-2022    0.4 add (nemoplot) example    PJT


Table of Contents