Collision Simulator

A collision simulator for two bodies sliding along a line. Give each a mass and a speed, dial the elasticity from a perfectly elastic bounce down to a dead-stick inelastic hit, then launch. Watch the total momentum readout hold perfectly steady through the impact while the kinetic-energy readout drops for anything less than a perfectly elastic collision. It all runs on your device.

You are in the Physics lab.

Set masses, speeds and elasticity, then Launch
Total momentum0.0 kg·m/s
Total kinetic energy40.0 J
KE change0%
Momentum is always conserved; kinetic energy only when the collision is perfectly elastic. Whatever elasticity you pick, the total momentum before the impact equals the total momentum after it — the readout does not budge. Kinetic energy is different: it stays constant only at a perfectly elastic collision (e = 1). Turn the elasticity down and some of that energy is lost to heat and deformation, so the kinetic-energy readout drops the moment the bodies meet.

How It Works

Conservation of momentum, a single elasticity setting, and two equations solved at the instant of contact.

1

Conservation of momentum

Each body carries a momentum equal to its mass times its velocity, and the collision can only redistribute it. The signed total is fixed: m₁u₁ + m₂u₂ = m₁v₁ + m₂v₂, where u are the incoming velocities and v the outgoing ones. This single equation holds no matter how bouncy or sticky the impact is.

2

The coefficient of restitution

Momentum alone is not enough to fix both outgoing velocities, so we add the elasticity e. It sets the speed the bodies separate with as a fraction of the speed they approached with: v₂ − v₁ = e(u₁ − u₂). At e = 1 they rebound at full relative speed (elastic); at e = 0 there is no separation and they move together (perfectly inelastic).

3

Solving for the outgoing velocities

Combining the two equations gives a closed form applied once each time the discs touch: v₁ = (m₁u₁ + m₂u₂ + m₂·e·(u₂ − u₁)) / (m₁ + m₂) and v₂ = (m₁u₁ + m₂u₂ + m₁·e·(u₁ − u₂)) / (m₁ + m₂). The readouts recompute momentum and kinetic energy from these new velocities, so you can see momentum hold and energy fall in real time.

What is an elastic collision?
An elastic collision is one in which the total kinetic energy of the bodies is conserved — none of it is turned into heat, sound or deformation. It corresponds to a coefficient of restitution of e = 1, where the bodies separate at the same relative speed they approached with. Total momentum is conserved as well.
What is an inelastic collision?
An inelastic collision is one in which some kinetic energy is lost — converted into heat, sound or permanent deformation — even though momentum is still conserved. A perfectly inelastic collision is the extreme case where the bodies stick together and move as one afterwards, corresponding to a coefficient of restitution of e = 0. In this simulator any restitution below e = 1 makes the kinetic-energy readout fall at the moment of impact while the total-momentum readout stays fixed.
Is momentum always conserved in a collision?
Yes — momentum is conserved in every collision, elastic or inelastic, as long as no external forces act on the system. The total momentum before the impact equals the total momentum after it. Only the way that momentum is shared between the two bodies changes; the signed sum stays the same.
What is the coefficient of restitution?
The coefficient of restitution, e, measures how bouncy a collision is. It is the relative speed of separation divided by the relative speed of approach, and ranges from 0 to 1. A value of e = 1 is a perfectly elastic collision, while e = 0 is a perfectly inelastic collision in which the bodies stick together.

Teaching or blogging about physics? You can embed this on your own site free — one line of code, no sign-up.