B1 · Lesson 25 · Energy and momentum lab
Conservation laws as tools for checking simulations, rockets, bounces and crashes
Conservation laws do two jobs in engineering. They solve problems directly, as in lessons 15 to 24, and they audit simulations: a simulated pendulum that gains energy, or a crash that creates momentum, has a bug or a bad method. In this lab you'll watch Euler's method pump energy into a pendulum and fix it with a one-line change, fly a rocket against gravity, sum an infinite series of bounces, integrate work from force data, and reconstruct a crash.
- A gently swinging 1 m pendulum ( s⁻²) is stepped forward in time by two methods. The curves are each method's energy error, as a fraction of the starting energy, against time.
- Plain Euler updates position and velocity from the old values, and its energy climbs steadily, by a factor every step. Symplectic Euler uses the new velocity to update the position, and its energy just wobbles, by either way.
- Change the step: explicit Euler's growth shrinks with h but never stops, while the symplectic wobble stays bounded however long it runs.
Predict
A lively ball dropped from 1 m bounces with coefficient of restitution 0.9. In theory it bounces infinitely many times. How long until it stops?
About 8.6 s. Each bounce's height is times the last, so each flight time is e times the last, and the times form a geometric series with a finite sum: s. Infinitely many bounces fit into a finite time, which is also why a bouncing ball's sound speeds up to a buzz just before it stops. Along the way it travels m up and down.
Name it
Energy as a test
For a conservative system the total energy must stay constant. Explicit Euler applied to an oscillator multiplies the energy by every step, so it always grows. Symplectic (semi-implicit) Euler updates the velocity first and then uses the new velocity for the position:
It conserves a slightly altered energy exactly, so the true energy only oscillates by a small amount, of order h, forever. Orbit and molecular simulations use methods like this for long runs.
Rockets against gravity
A rocket climbing vertically gains : the gravity loss is why rockets burn hard and fast at launch.
Bounces
With restitution e, the flight times form a geometric series, totaling , and the distance traveled up and down totals .
Work from data
When force is measured at points rather than given as a formula, the trapezoid rule gives the work, accurate to order .
Worked example
A 1000 kg rocket with 600 kg of propellant burns it at 10 kg/s with exhaust speed 2500 m/s, climbing vertically. What speed does it reach at burnout?
Show the solution
- Burn time. 600 kg at 10 kg/s lasts 60 s.
- Without gravity.
- Gravity loss. Gravity takes m/s, leaving
- A faster burn. A rocket with the same propellant burned in 30 s would lose only 294 m/s. That's why launchers have thrust-to-weight ratios well above 1: the thrust here, 25 kN against a 9.8 kN weight, is 2.55 times the starting weight.
Answer the rocket reaches 1703 m/s at burnout.
Worked example
Explicit Euler steps a pendulum (g/L = 9.8 s⁻²) with h = 0.01 s. By how much does its small-swing energy grow per second?
Show the solution
- Growth per step. Each step multiplies the energy by
- Growth per second. Over 100 steps that's 10% per second.
- Over longer runs. After 10 s a gentle swing's energy has grown by a factor of 2.66. A pendulum released at 1 rad swings more slowly, so its energy grows a little less, by 2.13 times in 10 s, but after 27 s it has gained enough to go over the top.
- Symplectic Euler. With the same step, its swing energy stays within 1.5% of the starting value for as long as you run it.
Answer the energy grows by a factor of 1.103 each second, about 10%.
Worked example
A 1500 kg car going east at 20 m/s and a 3000 kg truck going north at 10 m/s lock together. What does a reconstruction give?
Show the solution
- Momentum. The car brings 30 000 kg·m/s east and the truck 30 000 kg·m/s north:
- Wreck velocity. Divide by 4500 kg: m/s, which is 9.43 m/s at 45°.
- Energy absorbed. Kinetic energy before is 450 kJ and after 200 kJ, so 250 kJ was absorbed.
- Working backward. Investigators get the wreck's velocity from the skid direction and length after the crash, and the speeds before it from momentum, which settles who was speeding.
Answer the wreck moves off at 9.43 m/s, 45° north of east, and the crash absorbed 250 kJ.
Check
Step 1. Write swing(theta0, h, n, symplectic) that steps a pendulum with from rest at theta0 for n steps of size h, using explicit Euler or symplectic Euler, and returns the final energy .
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write burnout_speed(m0, mf, ve, mdot, h) that steps a vertical rocket's speed with Euler's method, , while its mass falls from m0 to mf, and returns the speed at burnout.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write bounce_time(h, e) that adds up the first fall and the flight times of 200 bounces, each rising to times the previous height, and returns the total.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 4. Write work(x, F) that integrates force samples F at positions x (NumPy arrays, not necessarily evenly spaced) by the trapezoid rule.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 5. Write stick(m1, v1, m2, v2) for two bodies that lock together; v1 and v2 are 2D velocity lists. Return the common velocity (a NumPy array) and the kinetic energy lost.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A rocket of 500 kg, of which a fraction 0.5 is propellant, burns for 120 s with exhaust speed 3000 m/s, climbing vertically.
(a)
What Δv would it gain without gravity?
Write units the way you normally would: 1.5 m/s, 1500 mm/s and 0.0015 km/s are the same answer.
(b)
What speed does it actually reach at burnout?
Check
A ball dropped from 2 m bounces with restitution 0.5. What total distance does it travel, up and down, before it stops?
Write units the way you normally would: 1.5 m, 1500 mm and 0.0015 km are the same answer.
Check
Explicit Euler steps an oscillator of angular frequency 3.13 rad/s with step 0.01 s. By what percentage does its energy grow in one second?
Explain why
Why is checking energy conservation a good way to test a simulation of a frictionless system?
In a frictionless system the total energy can't change, and that's true no matter how complicated the motion is. Computing the energy at each step costs almost nothing, and any drift shows that something is wrong: a bug in the forces, a step that's too large, or a method like explicit Euler that adds energy every step. A trajectory can look plausible for a long time while drifting, but the energy reveals it at once. Momentum plays the same role for isolated systems of interacting bodies. Conservation doesn't prove a simulation right, since some errors conserve energy, but violating it proves one wrong.
Practice
Keep practicing
5 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.