Table of Contents

Name

orbint - integrating single stellar orbit

Synopsis

orbint in=orbit out=orbit [parameter=value]

Description

orbint will integrate a stellar orbit. It is currently implemented with a few simple constant-timestepping algorithms with minimal support for diagnostics and restart options. For fancy integrators see for example orbintvq(1NEMO) or the newton0(1NEMO) family of orbit integrators.

Non-rotating potentials are also supported, but only with the rotation axis defined along the Z-axis.

Integrations backwards in time can be achieved by setting dt<0, since no stop time is given, but the number of steps is used to terminate the integration.

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=in-file
input file, in orbit(5NEMO) format [no default]
out=out-file
output file, will be in orbit(5NEMO) format [no default]
nsteps=number
number of integration steps [default: 10].
dt=time-step
time step (constant) to be taken. Negative values are allowed to achieve integrations backwards in time. [default: 0.1].
ndiag=number
number of timesteps when diagnostics are checked and output to stdout. [default: 10].
nsave=number
number of timesteps when data must be save to output orbit-file. Note that the program must have run to completion before the actual saved data are saved to the specified output file. [default: 1].
potname=name
name of file of potential(5NEMO) descriptor. If no name given, the potential name of the input orbit is used. [default: none].
potpars=par-list
List of parameters to the potential descriptor. The first parameter MUST be the pattern speed in the x-y plane. The remaining parameters are used by the _inipotential() routine in the potential descriptor. [default: none - use default from input orbit].
potfile=name
name of an optional datafile to the potential descriptor. This might be an N-body snapshot or list of spline fit coefficients etc. [default: none - use default from input orbit].
mode=int_mode
Specify the integration mode. Any one of euler, leapfrog1, leapfrog2 or rk4 can be given. [Default: rk4].
eta=
Relative error allowed in energy conservation. Integration is terminated if the relative error (|dE/E|) is too large. By default not used.
variable=t|f
Use variable timesteps? If so, the error control parameter eta= needs to be specified. Also note that not all integration methods support variable timesteps. Default: f.

Examples

The following example launches a particle from the Y axis (at y=1) in the X direction (speed 0.4) in a plummer potential. Although the 6D initial conditions are fully specified, so a potential (potname=) is not needed, it is tagged along with the orbit, such that the orbint integrator will use it. The integrated orbit is then passed on to a simple plotting program, which plots an X-Y view of this 2D orbit.
mkorbit - x=0 y=1 z=0 vx=0.4 vy=0 vz=0 potname=plummer |\
     orbint - - nsteps=10000 dt=0.05 ndiag=1000 |\
     orbplot -
Using pattern speed = 0
pos: 0.000000 1.000000 0.000000  
vel: 0.400000 0.000000 0.000000  
etot: -0.627107
lz=-0.400000
Pattern speed=0
0.000000 0.080000 -0.707107     -0.6271067811865 -8.85195e-17
50.000000 0.118074 -0.745181     -0.6271067924302 1.79294e-08
100.050000 0.214977 -0.842084     -0.6271068023637 3.37697e-08
150.100000 0.214182 -0.841289     -0.6271068142254 5.26845e-08
200.150000 0.117347 -0.744454     -0.6271068268041 7.27429e-08
250.200000 0.080125 -0.707231     -0.6271068377636 9.02191e-08
300.250000 0.126220 -0.753327     -0.6271068490425 1.08205e-07
350.300000 0.222816 -0.849922     -0.6271068584659 1.23232e-07
400.350000 0.205165 -0.832271      -0.627106871307 1.43708e-07
450.400000 0.109993 -0.737100     -0.6271068833543 1.62919e-07
Energy conservation: 1.62919e-07
Read orbit with 10001 phase-points

See Also

mkorbit(1NEMO) , orblist(1NEMO) , orbintv(1NEMO) , potential(5NEMO) , newton0(1NEMO)

Timing


With fpa on SUN 3/50 (~16Mhz) 1000 integration steps
potential=harmonic    1"
potential=plummer    1"
potential=bar83      3"
potential=hackforce    10" (100 bodies, standard Plummer model)
potential=hackforce    30" (500 bodies)
potential=hackforce    50" (2000 bodies)
potential=hackforce    80" (8000 bodies)
AuthorPeter Teuben Files
src/orbit/misc      orbint.c

Update History


xx-jul-87    V1.0: Created: simple Eulerian    PJT
2-May-88    V2.2: many changes + doc; leapfrog implemented    PJT
2-Jun-88    V2.3: new filestruct, code same       PJT
14-jun-91    V2.5: added variety of options, removed various bugs    PJT
26-mar-92    V2.5b: documented that rot.potentials are OK -       PJT
24-may-92    V2.6: default potential now taken from orbit    PJT
9-jun-92    V2.7: fixed rotating potential bug    PJT
19-apr-95    V3.1: various, rk4 is now default integrator    PJT
3-feb-98    V3.4: added eta= to control termination if errors bad     PJT
19-feb-03    examples...    PJT
10-feb-04    V4.0: started variable timestepping    PJT


Table of Contents