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 (obviously ignoring all constants). Equating the above with the kinetic energy, you get 12v2e+Φ(r)=0→ve(r)=√2(r+1)−1/4 This velocity is the maximum velocity you can have at a radius r, so we must have that 0≤v≤ve. In order to get the velocity, we need to know its distribution function; this can be found in this book. It reduces down to g(v)dv∝(−E)7/2v2dv where E=−v2e+12v2. If we let q=v/ve, then the above becomes g(q)=(1−q)7/2q2 with 0≤q≤1. It then becomes a matter of using either rejection sampling (which I generally do not recommend) or the Newton root-finding method (which I usually do recommend) to find a fit. Then you just randomize the angles θ,ϕ and get your x,y,z velocities:
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