HTML automatically generated with rman
Table of Contents

Name

flowcode - evolve an N-body system based on a given flow (2D only)

Synopsis

flowcode [parameter=value] ...

Description

flowcode is an equal-timestep N-body integrator which evolves the particles based on the computed flow (currently only in 2D) at their current position. The flow is obtained from a standard potential descriptor, given by the three keywords potname=,potpars=,potfile= (See also potential(3,5NEMO)), except that flow velocity must be returned instead of forces. The potential returns the density, if this is meaningful for that flow-potential.

In addition to integrating the equations of motion, the particles are allowed to loose some (eta) of their random energy (smoothed over a certain ‘‘box’’ size (cell)), and turn it into mean orbital motion. (NOT IMPLEMENTED - see potcode(1NEMO) .

Orbits can also be diffused: at regular intervals the velocity vector can be rotated over a randomly gaussian distributed angle (sigma).

Parameters

The following parameters are recognized; they may be given in any order.
in=in-file
Initial conditions will be read from in-file in snapshot format [default: none - but is required].
out=out-file
If given, results are written to out-file in snapshot format [default: empty, no snapshot output file produced].
potname=name
name of file of potential(5NEMO) descriptor [no default].
potpars=par-list
List of parameters to the potential descriptor. The first parameter must be the pattern speed in the x-y plane (rotating frames of reference are not supported for all integration modes). The remaining parameters are used by the inipotential() routine in the potential descriptor. [default: none - let them be defined by routine itself].
potfile=file-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].
freq=integ-freq
Inverse time-step, to be used with the time integrator. [Default: 64.0 (64 steps per unit time)].
mode=mode-number
Integration mode number: 0=Euler, 1=PC (Predictor Corrector), 2=modified PC, 3=Runge-Kutta (JEB modified), 4=4th order Runge-Kutta, 5=LeapFrog. [default: 4].
tstop=stop-time
Time to stop integration in N-body model units. Default is 2.0.
freqout=out-freq
Frequency of major N-body data outputs. Default is 4.0 (4 frames per unit time).
minor_freqout=out-freq
Frequency of minor diagnostic outputs. Default is 32.0 (32 diagnostic measurements per unit time).
options=option-string
Miscellaneous control options, specified as a comma-separated list of keywords. Currently recognized keywords are: reset_time: when reading initial data, set tnow to zero; new_tout: when restarting, set new output times; mass, phi, acc, aux: output mass, potential (density really) acceleration data and auxilliary (the deflection angle from diffusion is stored here) with major data outputs.
eta=loss-fraction
*** Fraction of random energy that is dissipated [Default: 0.0].
cell=box-size
*** Cell size in which dissipation is performed after every timestep. Dissipation is current performed on a cartesian grid, in which cells are square (2D) or a cube (3D) . [Default: 0.1].
rmax=max_box-size
*** Maximum size of the "box" (actually cube) within which dissipation is performed. If a negative number is given, the box is allow to grow as large as is needed, though this may consume a lot of memory. Default: -1, i.e. box can grow indefinite.
fheat=fheat
*** The ratio of diffusion angle to rms velocity dispersion in a cell. If fheat>0, each time dissipation is applied, the rms velocity dispersion in a cell is computed, and a diffusion angle computed. The velocity vector of each particle is then rotated with a gaussian distributed value with rms fheat*velsig. This in effect gives a dissipation dependant heating source. See also sigma=, which is position independant. [Default: 0].
sigma=angle
Diffusion angle, gaussian distributed with this sigma, about which each velocity vector is rotated after each timestep. Diffusion is used only when sigma > 0. [Default: 0].
freqdiff=diffusion-out-freq
Frequency of diffusion. Currently the same diffusion angle is used between changes, instead of during a single integration step Default is the same as the integration frequency (freq=).
seed=random-seed
Random number seed, only used when diffusion (sigma=) is used. 0 must be used to get the random seed from the time of the day. [Default: 0].
headline=
Identifying text for this run. Default: not used.

Bugs

RK, PC and PC1 don’t work in rotating potentials - use EULER or RK4.

Since cell is a fixed number throughout the execution, is doesn’t deal well with systems who’s lenght-scale changes, in particular, expanding systems will allocate more and more space to hold the dissipation grid.

Concepts

Normally a distinction is made between a streamline and streakline. A streamline is what we compute here: with a "frozen" field we compute how a tracer particle would have flown through space. A streamline also takes into account that the flow could be a function of time, and now it computes how a tracer particle would have streamed through space in the fluid that changed its flow.

Dissipation

Various schemes of dissipation can be invoked. Here’s one, see also Lin & Pringle (1974):

For each cell the relative position and velocity for each particle within that cell is computed:

        R   =  r  - <r >
         i      i     i
        V   =  v  - <v >
         i      i     i
after which the dimensionless viscosity parameter ’alpha’ controls the new velocity for each particle after a timestep:
                                 < R  x  V >
                                    j     j
        u  =  <v>  - alpha  R  x ------------   +  (1-alpha) V
         i      i            i                                i
                                 < R  .  R >
                                    j     j  

See Also

mkflowdisk(1NEMO) , potcode(1NEMO)

Author

Peter Teuben

Update History


10-apr-96    V0.1 cloned of potcode    PJT
7-feb-04    V0.6 implemented diffusion for modes 0,1,4    PJT


Table of Contents