Simulation

Cannon Recoil · SimulatorConservation of Momentum in Action

Momentum & CollisionsConservation of momentum

A cannon fires a ball; cannon and ball move in opposite directions with momenta of equal magnitude

Published: August 24, 2026

Objective

Verify that firing a cannon conserves momentum exactly: the ball and cannon always carry equal and opposite momenta regardless of mass ratio. Observe how increasing cannon mass reduces recoil speed proportionally while keeping ball speed and both momentum magnitudes unchanged. The model assumes no friction, no drag, and instantaneous firing.

Setup

  1. Set Ball Mass to 5 kg, Cannon Mass to 200 kg, and Muzzle Speed to 50 m/s (the defaults). Note the Ball Momentum and Cannon Momentum readouts both show 0.0 before firing.
  2. Click Start. Watch the ball fly right and the cannon recoil left. The momentum readouts should both snap to 250.0 kg·m/s immediately.
  3. After the sim finishes, click Reset and drag the Cannon Mass slider to 50 kg. Start again. The cannon recoil speed shown is now 5.0 m/s (ten times faster) while the ball speed stays at 50 m/s.
  4. Reset again, set Cannon Mass to 500 kg. Start: recoil speed is now 0.5 m/s. Both momentum readouts still read 250.0 kg·m/s.
  5. Reset and drag Ball Mass to 20 kg with Cannon Mass at 200 kg. Start: both momentum readouts now show 1000.0 kg·m/s. Note the cannon's recoil speed increased to 5.0 m/s.
  6. Reset and sweep the Muzzle Speed slider between 20 m/s and 100 m/s, restarting each time. Confirm that the momentum readouts always match each other at every slider combination.
The cannon and ball at rest on the dashed Fire line before firing, with sliders at their defaults (ball 5 kg, cannon 200 kg, muzzle speed 50 m/s).
After firing: the ball moves rapidly to the right while the cannon recoils a short way left; the navy momentum arrows above each body and the momentum bars show equal magnitudes for both.
With a 500 kg cannon the recoil velocity drops to 0.5 m/s while the ball still travels at 50 m/s, yet both momentum bars remain equal.

Analytical Prediction

Conservation of momentum requires that the total momentum before and after firing is zero (both bodies start at rest). So p_ball = p_cannon in magnitude. With the defaults (ball 5 kg, cannon 200 kg, muzzle speed 50 m/s):

v_cannon=m_ball · v_ball / m_cannon
=5 · 50 / 200
=1.25 m/s
p_ball=5 · 50 = 250 kg·m/s
p_cannon=200 · 1.25 = 250 kg·m/s

With Cannon Mass = 50 kg:

v_cannon=5 · 50 / 50 = 5.0 m/s

With Cannon Mass = 500 kg:

v_cannon=5 · 50 / 500 = 0.5 m/s

The ball speed is always exactly the Muzzle Speed slider value; only the cannon recoil speed changes with mass ratio. Both momentum bars remain identical in height at every configuration.

Results Analysis

After clicking Start, check the Ball Momentum (kg·m/s) and Cannon Momentum (kg·m/s) readouts. Both should display the same value within 0.1 kg·m/s at every frame (the readouts show magnitudes; the cannon's momentum points left, so the signed total stays at zero). At defaults the readouts show 250.0 for both. Dragging Cannon Mass to 50 kg and restarting gives Ball Speed = 50.00 m/s and Cannon Recoil = 5.00 m/s with both momentum bars at 250.0. Observe the velocity arrows on the canvas: the ball arrow is long (high speed), the cannon arrow is short (low speed), yet the navy momentum vectors drawn above each body are the same length. Expect the recoil itself to be small on screen: at the defaults the cannon moves at 1 ⁄ 40 of the ball's speed, so it creeps a short way left while the ball crosses most of the canvas. The momentum bar overlay in the lower portion of the canvas shows two equal bars at every instant, making the conservation law unmissable.

Source of Error

This sim models instantaneous firing with no friction, no air drag, no barrel losses, and no propellant mass (the Muzzle Speed slider sets the ball's exit speed directly rather than deriving it from a propellant charge). In reality, propellant gases exert a time-varying force over the barrel length, and the propellant mass itself carries momentum. The ground exerts a friction force on the cannon that slows it quickly. Because both the analytical prediction and the sim share the same idealizations, the momentum readouts should match the predicted values exactly, and any residual difference is purely floating-point rounding in the readout display, not a physical error.

Further Exploration