Inelastic Collision Simulator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: 1. Inelastic impacts and energy dissipation

An inelastic collision occurs when two moving objects exchange momentum but do not retain all of their kinetic energy after impact. Cars crumple, clay blobs splat, and meteorites can adhere to the surfaces they strike. These events are inelastic: momentum is conserved for the isolated pair, while some kinetic energy is converted into deformation, heating, sound, or other unmodeled effects. Engineers use collision analysis in vehicle safety work, sports scientists use it to study rebounds, and astronomers use it when considering accreting bodies. This simulator calculates post-impact velocities for two blocks moving on one line and animates their motion. Change the coefficient of restitution e to control how strongly the blocks rebound. The labeled energy controls track each block’s kinetic energy and the energy removed from translational motion. A caption and text fallback report the changing state, and the CSV button can export the recorded simulation steps.

2. Inelastic-collision variables and assumptions

This inelastic-collision model uses two rigid blocks sliding along a frictionless line. Their masses are m1 and m2, and their initial velocities are v1 and v2. The coefficient of restitution e ranges from 0 for a perfectly sticking impact to 1 for a perfectly elastic impact. Positive velocities point to the right. Blocks begin at positions x1=-2 and x2=2 m and approach one another only when the entered velocities make that possible. Inputs use SI units and must be finite; the script clamps the time step Δt to 0.0005–0.05 s. The blocks have no rotation or modeled deformation during contact, so the reported energy loss is an aggregate measure rather than a material-level heat calculation. When the blocks stick together (e=0), the simulator carries them forward at one common velocity.

Formula: 3. Inelastic-collision momentum and restitution equations

For the two blocks before their inelastic impact, positions follow xi(t) = xi0 + vit . At contact, conservation of momentum together with the restitution relation determines the outgoing velocities:

Formula: m_1 v_1 + m_2 v_2 = m_1 v_1' + m_2 v_2'

m1 v1 + m2 v2 = m1 v1' + m2 v2'

Formula: e = (v_2' - v_1') / (v_1 - v_2)

e = v2' - v1' v1 - v2

Solving the inelastic-collision equations gives

Formula: v_1' = (m_1 - e · m_2) / (m_1 + m_2) v_1 + (1 + e) / (m_1 + m_2) m_2 v_2

v1' = m1 - e · m2 m1 + m2 v1 + 1 + e m1 + m2 m2 v2

Formula: v_2' = (1 + e) / (m_1 + m_2) m_1 v_1 + (m_2 - e · m_1) / (m_1 + m_2) v_2

v2' = 1 + e m1 + m2 m1 v1 + m2 - e · m1 m1 + m2 v2

For this collision, kinetic energies before and after impact are KEi = 1 2 mi vi 2 and KEi' = 1 2 mi vi' 2 . The displayed loss is Q = ( KE1 + KE2) - ( KE1' + KE2') ; it is the portion of initial translational kinetic energy not remaining in the two-block motion.

4. Inelastic-collision numerical stepping

The inelastic-collision animation advances positions in explicit time steps using xi+=v_iΔt. For a step in which the blocks would overlap, the algorithm locates the contact time by linear interpolation, applies the restitution formulas, and advances the remaining fraction of that step with the new velocities. When e =0, the code combines the blocks into a single mass m1+m_2 travelling at their common momentum-conserving velocity. The chosen Δt controls how much simulated time passes on each animation update, while input changes are debounced to avoid repeatedly rebuilding the state during typing.

5. Worked example: equal-mass inelastic carts

Consider a 1 kg cart travelling at 2 m/s that strikes a 1 kg cart travelling at −1 m/s, with e=0.5 . The collision equations give post-impact velocities v1'=-0.25 m/s and v2'=1.75 m/s. Entering those values in the simulator with Δt=0.01  s produces the same velocity change at contact. The initial kinetic energies are 2 J and 0.5 J; after the impact they are approximately 0.03 J and 1.53 J, so approximately 0.94 J is lost from translational kinetic energy. The energy-loss control rises accordingly, while the caption reports the fractional energy drift caused by the numerical simulation. The CSV export records the time, position, velocity, kinetic-energy, and loss values for each simulated step; in this example the pair’s total momentum is 1 kg·m/s before and after impact.

6. Comparison table: restitution in the same collision

This inelastic-collision table compares three restitution settings for equal masses with initial velocities of 2 m/s and −1 m/s.

e v₁′ (m/s) v₂′ (m/s) Energy Loss (J)
1.0 -1 2 0
0.5 -0.25 1.75 0.94
0.0 0.5 0.5 1.25

For these equal-mass impacts, lowering e reduces the first cart’s rebound and increases the amount of kinetic energy not retained after collision. At e=0 , both carts leave contact at 0.5 m/s, which is the perfectly inelastic, sticking case.

7. Reading the inelastic-collision animation

The inelastic-collision canvas shows a blue block ( m1) and an orange block ( m2) moving along the same horizontal path. At contact, the selected coefficient e determines whether they separate or, when it is zero, continue with a common velocity. The labeled progress controls beneath the canvas report kinetic energy for each block and the accumulated energy loss. The caption supplies time, both velocities, loss, and energy drift in text, and the text fallback repeats that summary for assistive technology. Pressing the space bar while the canvas has focus toggles play and pause.

8. Limits of this one-dimensional inelastic-collision model

This inelastic-collision model omits rotation, ground friction, and a restitution coefficient that changes with material or impact speed. Real contacts can have velocity-dependent e , finite contact duration, deformation, or multiple rebounds. A large time step makes the displayed motion less temporally detailed, although the collision calculation interpolates the contact point within a step. For very small e , the merged post-impact block is treated as rigid; real soft bodies may deform and oscillate after sticking.

9. Suggested extensions for inelastic-collision modeling

A more detailed inelastic-collision simulator could use a spring-damper contact force, giving the impact a finite duration and allowing oscillatory rebound. A chain of blocks with different restitution coefficients could represent simplified granular material. Adding external forces such as gravity would connect this one-dimensional impact model with the Projectile Motion Simulator. For a contrasting no-loss case, compare the output with the Elastic Collision Simulator, and use the Work from Force Simulator to explore related energy accounting.

10. References for inelastic collision mechanics

How to use the inelastic collision simulator

  1. Enter the mass m1 of the blue block in kilograms.
  2. Enter the initial velocity v1 of the blue block in meters per second.
  3. Enter the mass m2 and initial velocity v2 of the orange block, then choose a restitution value e from 0 to 1.
  4. Press Play to follow the impact, inspect the velocity and energy-loss caption, and test another physically meaningful collision setup if you need to compare outcomes.

Arcade Mini-Game: Inelastic Collision Simulator Calibration Run

Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.

Enter masses, velocities, and e then press Play.
Simulation summary will appear here.