escape velocity


This is the copy of a blog post from my other blog, which got some comments there.

CIP asked a question about the entropy during star formation and I think we got the answer, at least qualitatively; but I would like to understand this better.
So let us begin with this calculation of John Baez, which gets the entropy wrong - it would decrease during star formation, i.e. the gravitational collapse of the matter which makes up the star. What the formula leaves out is the entropy of the outgoing radiation, but I would like to stay in a simple Newtonian model with classical point particles only.
In this case the "missing entropy" must come from the particles with velocities above the escape velocity of the star, which leave the collapsing cluster of particles. (The positions and velocities of the particles are actually not bounded, violating an assumption of this calculation, as he noted at the end of his page.) In other words, the formula John uses can only be an approximation, there is actually no decreasing volume V which encloses all particles and if one defines V considering a sphere which encloses all particles which cannot escape, the number N he uses would not be constant. So how does one really calculate the entropy?
A simpler question would be: If the initial number of particles was N, contained in a volume V, what fraction will escape within a small time interval dt? The Maxwell distribution would tell us the number of particles with velocities above the escape velocity and approximately 1/2 of them would escape, if they are within a distance dt*v from the surface ...
But all this seems a bit unsatisfactory; does anybody have the reference to a full calculation of this problem or do I have to run a computer simulation?

added later: A simple simulation of N=1000 particles, initially contained within a sphere of radius 1 and with zero initial velocity, suggests that after long enough time almost all particles escape to a location outside the initial sphere, due to the simulated gravitational interaction. Of course, my program (quickly cobbled together) could be wrong or inaccurate. The chart below shows the fraction of escaped particles on the y axis after so many time steps on the x axis (I have no explanation for the kink after 500 time steps).




The distribution of particles (projected onto a 2d plane) after hundred time steps ...



... one can see a "halo" of escaping particles surrounding the majority of particles in the collapsing star.