HTML automatically generated with rman
Table of Contents

Name

potccd - Create an image with potentials or densities from a potential

Synopsis

potccd [parameter=value]

Description

potccd stores the potential values of a potential descriptor (see potential(5NEMO) ) on a regular grid in standard image(5NEMO) format. It is also possible to store the Poissonian density, either 2D or 3D. For this numerical derivatives of the force field are used, and hence a small difference step needs to be given.

A potential stored on a grid could be a good approach when the potential is expensive to compute, though in orbit calculations this could limit the exact conservation of the integrals of motion such as energy.

Irregular grids are not forbidden (see x=,y=,z=) but the image(5NEMO) WCS descriptor will then be invalid.

Parameters

The following parameters are recognized in any order if the keyword is also given:
out=
Output file (image). No default.
potname=
Name of the potential(5NEMO) . No default
potpars=
Parameters for the potential.
potfile=
Any optional data file associated with the potential.
x=
X-coordinate(s) to test potential at. This should be a regular array, e.g. 1:10:0.2. Default: 0.
y=
Y-coordinate(s) to test potential at. Default: 0.
z=
Z-coordinate(s) to test potential at. Default: 0.
t=
Time to test potential at
mode=pot|ax|ay|az|ar|at|den
Output mode. Choices are potential, accelerations in X, Y or Z, and density (which needs dr>0). Default: pot.
dr=
Difference step used to compute numerical force derivates that are used to compute Poissonian densities.
omega=
Use this instead of any returned pattern speed. Default: not used, the first parameter in potpars= is used.
ndim=
Number of dimensions used in Poissonian density computation. Should be 2 or 3.
nder=1|2
Normally the density (mode=den) is derived by first derivatives of the forces, but for some potentials the force was never implemented (e.g. potname=gauss). In this case the 2nd derivative of the potential will be needed, hence nder=2. Default: 1

Bugs

With ndim=2 the Z-coordinate is not ignored, and hence may give meaningless results if forces depend on Z.

Examples

First a somewhat obscure way in to create a map of an arbitrary function using the potname=rotcur lookup table. It will use a spline interpolation, and if mode=pot is used, the "potential" is actually the "rotation curve" itself, since in general one cannot easily compute the potential from a rotation curve without knowing the full geometry. Here is an example how to create a smooth radial profile of the function "f(x)=1/sqrt(4+x)" on a grid from -10..10:
    % nemoinp 0:10 | tabmath - - ’1/(sqrt(4+%1)’ > map0.tab
    % potccd map0 rotcur 0 map0.tab x=-10:10:0.1 y=-10:10:0.1
If the functional form is know, ccdmath(1NEMO) will perhaps do better, if not a little more involved to type.

Here is an example of an orbit integration in the analytical plummer potential, and in two gridded versions of the potential.


% mkorbit o1 1 1 0 -0.5 0 0 potname=plummer
etot: -0.452350
% orbint o1 - 10000 0.01 ndiag=10000 | orblist - | tail -1
Energy conservation: 2.05084e-11
10000 100 -1.11384 -0.266207 0 0.557843 -0.315574 0
% potccd ccd1 plummer x=-2:2:0.01 y=-2:2:0.01
% orbint o1 - 10000 0.01 ndiag=10000 potname=ccd potfile=ccd1 | orblist - |
tail -1
Energy conservation: 0.0050378
10000 100 -1.3835 -0.156784 0 0.408364 -0.319573 0
% potccd ccd2 plummer x=-2:2:0.0025 y=-2:2:0.0025
% orbint o1 - 10000 0.01 ndiag=10000 potname=ccd potfile=ccd2 | orblist - |
tail -1
Energy conservation: 0.00073957
10000 100 -1.18841 -0.23806 0 0.518358 -0.3183 0

See Also

potlist(1NEMO) , image(5NEMO) , potential(3NEMO) , potential(5NEMO)

Author

Peter Teuben

Update History


10-Jun-92    V1.0 Created           PJT
30-mar-94    V1.1 added density options (dr=, ndim=)    PJT
12-sep-02    V1.2 added mode=    PJT
19-mar-2021    V2.1 added nder=    PJT


Table of Contents