The Plummer's sphere is an model for the mass density in a globular cluster of stars. For an N-body simulation I have initialized the position of N masses with a Monte-Carlo technique but cannot find a way of initializing the velocity initial conditions.
Is there a simple function that given a position in a Plummers sphere assigns a velocity to a given mass? Lots of sites list the velocity for a circular orbit but is this a good approximation to a globular cluster and how should it be treated off the x-y plane?
Answer
The Plummer model has a potential of the form
Φ(r)=−1√r2+1
vel = x*sqrt(2.0)*(1.0+r(i)*r(i))**(-0.25)
theta = acos(rand(-1.0,1.0))
phi = rand(0.0, 2.0*pi)
vx(i) = vel*sin(theta)*cos(phi)
vy(i) = vel*sin(theta)*sin(phi)
vz(i) = vel*cos(theta)
You can find more information in this great pdf book.
No comments:
Post a Comment