next up previous contents index
Next: 5.4.1 A few potentials Up: 5. Examples Previous: 5.3.1 Making an image   Contents   Index


5.4 Potential

Programs which need an external potential (e.g. orbit integrators) can obtain these via the so-called potential descriptors. They are implemented in NEMO as loadable object files5.10. To the user interface this commonly appears as a set of three program keywords potname=, potpars= and potfile=; they signify the identifying name of the potential, its parameters and an associated filename. The last two are optional, since the potential may not need parameters or an associated file(s).

For example, the program potlist lists the value of the potential and forces at selected gridpoints:

    % potlist potname=harmonic potpars=0,3,2 x=0:3:1 y=0:3:1 z=0:6:2 dr=0.001
    x y z ax ay az phi phixx phiyy phizz rho dr time
    0 0 0 -0 -0 -0 0 9 4 1 1.11408 0.001 0 
    1 1 2 -9 -4 -2 8.5 9 4 1 1.11408 0.001 0 
    2 2 4 -18 -8 -4 34 9 4 1 1.11408 0.001 0 
    3 3 6 -27 -12 -6 76.5 9 4 1 1.11408 0.001 0

The usage of the colon separated implied do-loop in the x=, y= and z= keywords assumes that herinp(3NEMO) has been implemented. potlist will also take first order derivatives of the force, to test Poissons equation. This specific potential, harmonic, happens to have 4 parameters, although only 3 were given in the example. The fourth one will take some default present in the descriptor. The first parameter of all potentials should be the pattern speed5.11. The second through fourth parameters are the $\omega_X$, $\omega_Y$ and $\omega_Z$ harmonic coefficients resp., where the potential is given as:

\begin{displaymath}
\Phi(x,y,z) = {1\over 2} \omega_X^2 x^2
+ {1\over 2} \omega_Y^2 y^2
+ {1\over 2} \omega_Z^2 z^2
\end{displaymath}

Although NEMO comes supplied with a small number of standard potential descriptors, it is relatively easy to make your own ones. In Section [*] we will describe how to add your own potential descriptors. Next we shall present a few examples from the standard list of available potentials, the full listing can be found in Appendix [*].



Subsections
next up previous contents index
Next: 5.4.1 A few potentials Up: 5. Examples Previous: 5.3.1 Making an image   Contents   Index
(c) Peter Teuben