next up previous contents
Next: 9.2 Implementation: a Sphere Up: 9. Setting up a Previous: 9. Setting up a

9.1 A Model for a Star Cluster

Bob:
Now we have a nifty N-body integrator. So what shall we do with it?

Carol:
So far, we have only worked with two or three stars. How about throwing in a whole bunch?

Bob:
Fine, but we have to decide how to set them up. We can't very well put them all on a circle. It wouldn't be stable anyway, as we have seen already with three particles.

Carol:
I can't think of any other particular pattern either. Perhaps we should just pick random positions. But random within a certain region, I suppose, not all over the universe, since then they wouldn't interact.

Alice:
How about letting nature guide us, and constructing a very simple model for a star cluster. Let us assume that a group of stars are born together in a small corner of a galaxy.

Bob:
Sounds good. How shall we model that?

Alice:
It would be simplest to group the stars in a sphere, and so assume a homogeneous distribution, i.e. constant density. In the general case, we should assign each star not only an initial position, but also an initial velocity. Let us again start with the simplest possible assumption, namely that of zero velocities for all stars. In other words, all stars are born at rest.

Carol:
Wouldn't they all start falling to the middle, right away, under the influence of their mutually attractive forces of gravity?

Bob:
I would think so. That means that the system will shrink at first. But what will happen next? Will it shrink forever, or start expanding, or oscillating, or what? We will have to do real experiments to find out.

Carol:
First we have to construct the initial state, as described above. We have to introduce a random number generator, and then use that to choose a random position within a sphere. We may as well choose coordinates such that we will start with a sphere of unit radius.


next up previous contents
Next: 9.2 Implementation: a Sphere Up: 9. Setting up a Previous: 9. Setting up a
The Art of Computational Science
2004/01/25