B125 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 (ω2=9.8 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 1+ω2h2 every step. Symplectic Euler uses the new velocity to update the position, and its energy just wobbles, by hω2 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?

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 1+ω2h2 every step, so it always grows. Symplectic (semi-implicit) Euler updates the velocity first and then uses the new velocity for the position:

vn+1=vn+ha(xn),xn+1=xn+hvn+1.

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 Δv=veln⁡m0mf−gtb: the gravity loss gtb is why rockets burn hard and fast at launch.

Bounces

With restitution e, the flight times form a geometric series, totaling 2hg⋅1+e1−e, and the distance traveled up and down totals h1+e21−e2.

Work from data

When force is measured at points rather than given as a formula, the trapezoid rule W≈∑Fi+Fi+12Δx gives the work, accurate to order Δx2.

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
  1. Burn time. 600 kg at 10 kg/s lasts 60 s.
  2. Without gravity. Δv=2500ln⁡1000400=2291m/s
  3. Gravity loss. Gravity takes 9.8×60=588 m/s, leaving 2291−588=1703m/s
  4. 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
  1. Growth per step. Each step multiplies the energy by 1+ω2h2=1+9.8×10−4=1.00098
  2. Growth per second. Over 100 steps that's 1.00098100=1.103 10% per second.
  3. 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.
  4. 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
  1. Momentum. The car brings 30 000 kg·m/s east and the truck 30 000 kg·m/s north: p→=(30000,30000)kg·m/s
  2. Wreck velocity. Divide by 4500 kg: (6.67,6.67) m/s, which is 9.43 m/s at 45°.
  3. Energy absorbed. Kinetic energy before is 450 kJ and after 200 kJ, so 250 kJ was absorbed.
  4. 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 θ¨=−9.8sin⁡θ from rest at theta0 for n steps of size h, using explicit Euler or symplectic Euler, and returns the final energy 12ω2−9.8cos⁡θ.

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, v˙=vem˙m−9.8, 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 e2 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?

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.