Table of Contents


snapsquash - squash a snapshot using Bosma’s thesis recipe


snapsquash [parameter=value]


snapsquash squashes a snapshot according the the recipe given in Bosma’s thesis. It is a toy model meant to operate on thin disks in the XY plane.

As a crude attempt to describe the velocity field of a galaxy with an oval distortion we have made a simple kinematical model, based on a suggestion by Dr. A. Toomre (note that this model was made in 1974, before more elaborate, and physically better founded, models were constructed by others. It should not be-taken too seriously; and is only meant as a guideline to determine the geometry of the system).

Consider a circular orbit at radius r in the plane of the galaxy. We deform this circle into an ellipse by stretching it along the x-axis and squeezing it along the y-axis. The Cartesian co-ordinates (x, y) of a point P on the circle transform to (x’, y’) with:

    x’ = x*f       ;   y’ = y/f
a is the semi-major axis of the ellipse, b is the semi-minor axis. The circular velocity vector at P is (u, v) = (- V sin(phi) , Vc cos(phi) ), with phi = arctan y / x and Vc the amplitude of the circular velocity at radius r. We can eliminate phi and transform this vector also with equations (1) . Then we give the resulting ovals a constant pattern speed Omegap, but we reduce the angular velocity at each mean radius to compensate for this. We then have:
    u’ = ....      ;  v’ = ....
where r^2 = x^2f^2 + y^2/f^2 and Vc is taken at r.


The following parameters are recognized in any order if the keyword is also given:
Input file name, a snapshot. No default.
Output file name, a snapshot, no default.
Factor to squash by. A number larger than 1 will stretch along the X axis, and squash the Y axis. [1.0]
Pattern Speed [0.0].
Times to select snapshots from [all]


The following example makes a velocity field of a squashed disk, and creates a velocity field to view:
    mkdisk disk1 10000 rmax=2 mass=1
    snapsquash disk1 disk2 1.1 1
    snaprotate disk2 disk3 30,60 zx
    snapgrid disk3 ccd3 moment=-1
    ccdplot ccd3
If you have ds9, the command nds9 will send this image into the ds9 display server.

See Also

mkdisk(1NEMO) , snapshot(5NEMO)


NEMO/src/nbody/init    snapsquash.c


Peter Teuben

Update History

28-Jul-06    V1.0  Created    PJT/AB

Table of Contents