Collision Simulator

A collision simulator for two carts sliding along a line. Give each a mass and a velocity, dial the elasticity from a perfectly elastic bounce (e = 1) down to a dead-stick inelastic hit (e = 0), then launch. Each cart carries a labeled velocity arrow and momentum arrow, the readouts compare total momentum and kinetic energy before and after, and an energy-bar chart shows exactly how much kinetic energy is lost. Momentum holds steady for every setting; kinetic energy only survives a perfectly elastic hit. It all runs on your device.

You are in the Physics lab.

Set masses, speeds and elasticity, then Launch
Momentum before0.0 kg·m/s
Momentum after0.0 kg·m/s
KE before40.0 J
KE after40.0 J
KE lost0.0 J
KE lost percent0%
Collision typeElastic

Total kinetic energy before and after the impact. The green bar is the energy the carts keep; the red slice on the After bar is the energy lost to heat and deformation. At e = 1 the red slice vanishes; at e = 0 the loss is as large as it can be for these masses and speeds.

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.

Reading the simulation

What every arrow, readout and bar on the screen is telling you.

1

Each cart carries two arrows

Above every cart is a solid velocity arrow labeled v in m/s — it points the way the cart is heading and grows with its speed. Below the cart is a dashed momentum arrow labeled p in kg·m/s, which is the mass times that velocity. A heavy, slow cart can carry the same momentum as a light, fast one, so watch how the two arrows differ in length. The mass of each cart is printed right under it.

2

Total momentum does not change

The readouts show Momentum before and Momentum after — and they are identical, because a collision only trades momentum between the carts, never creates or destroys it. Adding the two dashed arrows head to tail before the impact gives the same signed total as adding them afterward. That is conservation of momentum, and it holds for every elasticity you pick.

3

Restitution controls the energy lost

The elasticity e decides how much kinetic energy survives. The bar chart puts KE before next to KE after; the red slice is the KE lost to heat and deformation, also shown as a number and a percentage. Slide e to 1 and the red slice disappears — a perfectly elastic hit. Slide it to 0 and the carts stick, and the loss is as large as momentum conservation allows. The badge names the regime: Elastic, Partially inelastic or Perfectly inelastic.

How It Works

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

1

Conservation of momentum

Each cart 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 the u are the incoming velocities and the v the outgoing ones. This single equation holds no matter how bouncy or sticky the impact is, which is why the two momentum readouts always match.

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 carts 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 and no kinetic energy is lost; at e = 0 there is no separation and they move off together, the most inelastic hit possible.

3

Solving for the outgoing velocities

Combining the two equations gives a closed form: v₁ = (m₁u₁ + m₂u₂ + m₂·e·(u₂ − u₁)) / (m₁ + m₂) and v₂ = (m₁u₁ + m₂u₂ + m₁·e·(u₁ − u₂)) / (m₁ + m₂). The tool solves these from your slider values, so the momentum and kinetic-energy readouts and the energy bars are the exact predicted outcome — momentum conserved, kinetic energy never rising above its starting value.

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.

Classroom activity

A ready-to-assign lab using the simulation above. Free to use — nothing to install or sign up for, and no student data leaves the browser.

High school, College10–20 minInteractive simulation

Learning objectives

  • Apply conservation of momentum to collisions.
  • Distinguish elastic from inelastic collisions by kinetic energy.
  • Predict outcomes for equal and unequal masses.

Variables to change

  • Mass of each object
  • Initial velocities
  • Elasticity (elastic/inelastic)

Procedure

  1. Set two equal masses moving toward each other at equal speeds in an elastic collision.
  2. Make one object much heavier and repeat.
  3. Switch to a perfectly inelastic collision (objects stick) and compare.

Observations

Record velocities before and after, and note total momentum and total kinetic energy each time.

Questions

  1. Is momentum conserved in every collision here?
  2. Is kinetic energy conserved in an inelastic collision?
  3. Two equal masses collide elastically head-on at equal speeds. What happens?
  4. In a perfectly inelastic collision, what is true of the objects afterward?
  5. Write the conservation-of-momentum equation for a two-body collision.

Explanation

Momentum is conserved in every isolated collision. Elastic collisions also conserve kinetic energy (objects bounce), while inelastic ones lose kinetic energy to heat and deformation — perfectly inelastic objects stick and move together.

Answer key (for instructors)
  • 1. Yes — total momentum is conserved in all collisions when no external force acts, elastic or inelastic.
  • 2. No. Kinetic energy is conserved only in elastic collisions; inelastic collisions convert some to heat/deformation.
  • 3. They exchange velocities and rebound with equal and opposite speeds.
  • 4. They move together with a common velocity found from total momentum ÷ total mass.
  • 5. m₁u₁ + m₂u₂ = m₁v₁ + m₂v₂.

Educators: link or embed this simulation freely in your LMS or course guide.

Add This Collision Simulator to Your Website

Put the Collision Simulator on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.

The credit line under the widget links back to LK Forge — please keep it so others can find it too.