Particle Collision Simulator Back
Particle Physics / DEM

Particle Collision Simulator

Watch N particles bounce in a 2D box. Adjust restitution coefficient, gravity, and temperature to observe energy conservation and Maxwell-Boltzmann speed distribution formation.

Settings

Particle count N
Particle radius (px)
px
Restitution coefficient e
Temperature (initial speed)
Results
Temperature (avg KE)
Total energy
Collisions
0
Energy conserved
Sim
Hist
Theory & Key Formulas

$$m_1 v_1 + m_2 v_2 = m_1 v_1' + m_2 v_2'$$

Conservation of momentum: the total momentum of the system does not change before and after the collision

$$e = -\frac{v_1' - v_2'}{v_1 - v_2} \quad (0 \leq e \leq 1)$$

Coefficient of restitution: \(e=1\) perfectly elastic, \(e=0\) perfectly inelastic

$$v_1' = \frac{(m_1-e\,m_2)v_1 + (1+e)m_2 v_2}{m_1+m_2}$$

Velocity after an elastic collision (1D): at \(e=1\), energy is also conserved

What is Particle Collision Physics?

🙋
What exactly is the "restitution" parameter in this simulator? I see it goes from 0 to 1.
🎓
That's the coefficient of restitution, or 'e'. Basically, it tells you how bouncy a collision is. In practice, e=1 means a perfectly elastic collision—like two superballs hitting—where kinetic energy is conserved. Try moving the slider to 0.5 and watch how much slower the particles move after they collide; that's kinetic energy being lost.
🙋
Wait, really? So at e=0, they just... stick? What happens to the momentum then?
🎓
Exactly! At e=0, it's a perfectly inelastic collision—they clump together. Momentum is always conserved, but kinetic energy isn't. The lost energy becomes heat or causes deformation. A common case is two lumps of clay colliding. Try it in the simulator: set e to 0 and watch particles merge on impact, still moving as one combined mass.
🙋
That makes sense. What about the "Enable Gravity" and "temperature" controls? How do they change the simulation?
🎓
Great question. "Enable Gravity" adds a constant downward force, so particles accelerate and gain kinetic energy as they fall, just like in the real world. "Temperature" is directly related to the particles' average kinetic energy. When you increase the temperature slider, you're giving all particles a random speed boost. Try turning on "Show velocity vectors" to see the chaotic, high-energy motion it creates!

Physical Model & Key Equations

The core of this simulator is the conservation of linear momentum during a collision between two particles. For a 1D collision along the line connecting their centers, the final velocities are calculated from the initial ones.

$$ v_{1f}= \frac{m_1 - e m_2}{m_1 + m_2}v_{1i}+ \frac{(1+e)m_2}{m_1 + m_2}v_{2i}$$ $$ v_{2f}= \frac{(1+e)m_1}{m_1 + m_2}v_{1i}+ \frac{m_2 - e m_1}{m_1 + m_2}v_{2i}$$

Here, $m$ is mass, $v_i$ is initial velocity, $v_f$ is final velocity, and $e$ is the coefficient of restitution (0 to 1). When $e=1$, these simplify to the classic elastic collision formulas.

For many particles, the system tends toward a Maxwell-Boltzmann speed distribution, which describes the probability of finding a particle with a certain speed at a given temperature.

$$ f(v) = 4\pi \left( \frac{m}{2\pi k_B T}\right)^{3/2}v^2 e^{-mv^2/(2k_B T)} $$

$f(v)$ is the probability density function, $m$ is particle mass, $k_B$ is Boltzmann's constant, $T$ is absolute temperature, and $v$ is speed. This is why, when you increase the "temperature" in the simulator, you see a wider spread of particle speeds.

Frequently Asked Questions

A coefficient of restitution of 1.0 means an ideal elastic collision with no energy loss, but in numerical simulations, errors due to the time step size or a separately set coefficient of restitution for the wall when particles collide with it may cause this. Please check the wall's coefficient of restitution and try reducing the time step size.
As a guideline, an average of 10 to 20 collisions per particle is needed. For example, with N=100, the distribution begins to stabilize after about 1000 to 2000 total collisions. The larger the number of particles, the smoother the distribution obtained.
If gravity is too strong, particles settle and collision frequency decreases. Please reduce the gravity value or set a higher initial velocity for the particles. Also, setting the coefficient of restitution closer to 1.0 increases bouncing, making it easier for a distribution to form.
On a typical PC, 500 to 1000 particles is the upper limit for comfortable operation. Increasing beyond that slows down the simulation because the computational cost of collision detection increases proportionally to the square of the number of particles. If speed is prioritized over accuracy, we recommend limiting the number of particles to around 200.

Real-World Applications

Granular Flow & Industrial Processing: Simulating the movement of grains, powders, or pills in hoppers, mixers, and conveyor belts relies on particle collision models with specific restitution and friction values. Engineers use this to prevent clogging and ensure consistent flow rates in pharmaceutical or food production.

Discrete Element Method (DEM) in CAE: This is a major CAE technique where engineers simulate the behavior of bulk materials composed of thousands of individual particles. It's used to analyze the stress in a gravel pile, the mixing efficiency in a cement drum, or the abrasion on mining equipment, all by modeling individual collisions.

Planetary Ring Dynamics: Astronomers use similar collision physics to model the spectacular rings around planets like Saturn. The restitution coefficient determines how much energy is lost when ring particles (ice and rock) collide, affecting the ring's thickness and stability over millions of years.

Fluidized Bed Reactors: In chemical engineering, gases are blown through a bed of solid catalyst particles to suspend them, creating a fluid-like mixture. Predicting reactor efficiency requires modeling the collisions between catalyst particles to understand heat and mass transfer.

Common Misconceptions and Points to Note

First, be wary of the assumption that "more particles means more realistic." While increasing the particle count does make the simulation look livelier, the computational load explodes. For instance, increasing particles from 100 to 1000 makes the collision detection calculations about 100 times heavier! In practice, the golden rule is to start with the minimum number of particles needed to capture the essence of the phenomenon you're analyzing. Next is setting the coefficient of restitution, e. While e=1 means "perfectly elastic" and e=0 means "perfectly inelastic," "perfect" conditions are almost non-existent in the real world. Even for metal spheres, e is around 0.9, and for materials like clay, it can be 0.1 or lower. After grasping the textbook theory, it's crucial to adjust this value to be more realistic. Finally, the question, "Does enabling gravity lower the temperature?" When particles fall due to gravity and cluster at the bottom, the increased collision frequency might make it seem like kinetic energy is being "lost" as heat. However, this isn't a violation of energy conservation. The primary reasons are the conversion between potential and kinetic energy of the particles, and dissipation through collisions with the container walls (where the coefficient of restitution matters again!). Get into the habit of considering the overall energy balance of the system.