4
$\begingroup$

I have created a crude N-body simulator which allows N bodies of equal masse​s to interact gravitationally in 2 dimensions.

Each body is modeled as a circle with a radius as a function of its mass, in such a way that all bodies have the same density.

When two bodies collide, i.e their radii overlap, they stick together inelastically (but linear momentum is conserved).

I have initialized the simulation with N=300 particles, and initial positions and velocties randomized (all positions bounded to a certain rectangular window, all velocties of the same modulus).

As the simulation progresses, particles move about, collide and form larger particles, and after some time the system appears to reach a stable state in which the number of particles is very few, usually between 2-5 (the most common case is a planet-sun system)

I have plotted the number of bodies vs. time, and the graph shows something like an exponential decrease (maybe subexponential, I haven't done any regression analysis yet) until the system reaches a steady state in which particle number is constant:

enter image description here

Is there a means of predicting an exponential decrease on theoretical grounds, for example by assuming that for large numbers of particles the distribution of velocities is approximately random, and then using probability?

Does this question have anything to do with scattering theory?

$\endgroup$
7
  • $\begingroup$ This particular problem may get better answers on the Astronomy SE. $\endgroup$ Commented Aug 15, 2017 at 1:37
  • 2
    $\begingroup$ I think it's quite appropriate for Physics SE, to be honest. $\endgroup$
    – Noldorin
    Commented Aug 15, 2017 at 1:39
  • $\begingroup$ @Noldorin It's obviously physics, I'm simply suggesting that simulations of this nature are reasonably commonly discussed on Astronomy SE. $\endgroup$ Commented Aug 15, 2017 at 2:58
  • $\begingroup$ @StephenG they're also reasonably commonly discussed on Physics SE & should stay here since it's a physics problem. $\endgroup$
    – Kyle Kanos
    Commented Aug 15, 2017 at 11:13
  • $\begingroup$ Periodic BC's? I'm also curious about the initial conditions as well, specifically why random velocities and not rotationally distributed. $\endgroup$
    – Kyle Kanos
    Commented Aug 15, 2017 at 11:15

2 Answers 2

4
$\begingroup$

Collision theory is probably more what you're looking for. The rate constant for a bimolecular gas reaction (instantaneously analogous to your situation) is a falling exponential, thus similarly giving a falling exponential for the number of reactant particles.

Of course, the key here is instantaneously analogous, since in your situation, the particle (body) size increases with time. This should make your resultant graph somewhat sub-exponential. Have you verified this?

(For the record, scattering theory is more to do with waves, or wave-matter interaction, AFAIK.)

N.B. Ignoring the gravitational attraction would seem to be reasonable, at least while the density and rate of collisions are high, just like ignoring the van der Waals force is reasonable for the gaseous model.

$\endgroup$
1
$\begingroup$

For a first approximation, let's define $n(t)$ as the number of bodies at time $t$. When there are a lot of bodies, the rate of collisions will be proportional to the average distance between the bodies (also called the mean free path), which does come out of scattering theory:

$$\frac{dn}{dt} = -kn^{1/m},$$

where $m$ is the number of dimensions of space--two in your case--and $k$ is some positive real number (this number will involve things like the volume of space the bodies occupy, the size of the bodies, and the average speed of the bodies). We can solve this to find an expression for $n(t)$:

$$\frac{dn}{n^{1/m}} = -k\,dt$$ $$\int_{n_0}^{n_t}\frac{dn}{n^{1/m}} = \int_0^t -k\,dt$$ $$\left.\frac{1}{\frac{1}{m}+1}n^{\frac{1}{m}+1}\right|_{n_0}^{n_t} = -kt$$ $$\left.\frac{m}{m+1}n^{\frac{m+1}{m}}\right|_{n_0}^{n_t} = -kt$$ $$\frac{m}{m+1}n(t)^{\frac{m+1}{m}} - \frac{m}{m+1}n_0^{\frac{m+1}{m}} = -kt$$ $$n(t) = \left(n_0^{\frac{m+1}{m}} - \frac{m+1}{m}kt\right)^{\frac{m}{m+1}}$$

In the final equation, $n_0$ is the initial number of bodies.

As an example, here's a plot of the number of particles with with $m = 2$, $k = 0.01$, and $n_0 = 200$:

Example plot of number of bodies from simulation

You can see a plot of this function and experiment with the parameters here: https://www.desmos.com/calculator/fdz39m6wog

Now, the above calculation did not include gravity, nor does it hold up with a small number of particles. With gravity, you would expect a larger number of collisions in the beginning of the simulation (due to gravity) and much fewer as time runs on (due to collisions becoming rare due to stable orbits). This will make the graph more curved and exponential-looking than what's shown.

$\endgroup$
3
  • $\begingroup$ Some questions: if I'm not mistaken, you integrated $\frac{1}{n^\frac{1}{m}}$ incorrectly. Second, if we want a more realistic model, we should note that $k$ the changes because the speeds of the bodies increase as the simulation progresses. But it seems to me we do have the right to ignore gravity when the number of particles is large, because what happens is the bodies move around more or less randomly. Later however what happens (and I've observed this in my simulation) is that larger bodies ver quickly attract the smaller ones. Finally, the changing radii need to be accounted for. $\endgroup$
    – math_lover
    Commented Aug 16, 2017 at 1:07
  • $\begingroup$ @JoshuaBenabou You're right. I integrated $n^{1/m}$ instead. This results in a curve with opposite curvature--diving to zero at the end. I'm not sure my calculation can be salvaged. I'm surprised that you say that the particles speed up as the simulation progresses. I would expect that they would slow down due to losing kinetic energy to the inelastic collisions. In the extreme case, two particles colliding head on with the same mass and speed would end up with zero speed after merging. $\endgroup$
    – Mark H
    Commented Aug 16, 2017 at 2:37
  • $\begingroup$ i'm not sure that the speeds should increase, it may be an error with my simulation. Indeed, the energy drift of my sim is positive and rather high even though im using the symplectic Verlet integrator - it's the close encounters which mess everything up (force tends to infinity, thus errors grow). Normally with collisions the total energy can only decrease. $\endgroup$
    – math_lover
    Commented Aug 16, 2017 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.