next up previous contents
Next: Corotating Binaries Up: Single Stars Previous: Equal-mass Particles   Contents


Equally-spaced Particles

To construct a single star with equally-spaced particles, you can use the ``setup1es'' subroutine, which is called by setting the three letter code in sph.init to ``1es''.

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 a number of particles similar to the number you set by the parameter ``N'' in sph.input, in a hexagonal-close packed lattice. Since it is only feasible to estimate the proper lattice spacing, we have set the code to create a number of particles slightly smaller than the requested number, to ensure no memory overflows will occur. Typically, the configurations which result will be somewhat unrelaxed, with small 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