next up previous contents
Next: Equally-spaced Particles Up: Single Stars Previous: Single Stars   Contents


Equal-mass Particles

To construct a single star with equal-mass particles, you can use the ``setup1em'' subroutine, which is called by setting the three letter code in sph.init to ``1em''.

This routine first constructs a polytropic fit to the density profile of the star, with the following parameters supplied in sph.input: Stellar mass ``AMNS'', stellar radius ``RNS'', and adiabatic index $\Gamma=$``GAM''. It then will lay down the exact number of particles you set by the parameter ``N'' in sph.input, by means of a Monte Carlo technique, weighted by the radial density profile. Since this routine is extremely fast, and need never be repeated during a run, we have not used any Monte Carlo tricks to decrease the rejection rate (if you don't know what this means, it will not hurt you). Typically, the configurations which result will be rather unrelaxed, with non-trivial density perturbations. To relax the model, we recommend setting ``NRELAX''=1 and ``TRELAX'' $\approx\sqrt{{\tt RNS}^3/{\tt AMNS}}$ in sph.input, with the time until relaxation finishes, ``TRELOFF'', set to a much larger value.



Joshua Faber 2003-06-28