Skip to content
Tutorials Center
My learning

Topics

Lesson 41 of 47 Β· Applications and Simulation

Chapter 8 review: applications and simulation

Review the simulation loop, the accuracy of Euler, semi-implicit Euler and RK4, and the slider-crank formulas with a one-page summary and ten questions.

This chapter turned the theory of dynamics into practice. You learned to simulate systems that have no neat formulas, to choose and test numerical methods, and to analyze a mechanism that sits inside a large share of the world's engines and pumps. This page pulls the key points together and tests them.

Three cards summarizing the simulation loop, the integrators and the slider-crank mechanism
Chapter 8 on one page: the loop, the integrators and the mechanism.

Recap table

Topic Key points
Simulation loop State (x, v) β†’ forces β†’ a = F/m β†’ step by Ξ”t; repeat
Time step Ξ”t ≀ T/50 for oscillations; halve it to test
Explicit Euler Order 1; amplifies oscillator energy
Semi-implicit Euler Order 1; energy stays bounded; update v first
RK4 Order 4; four evaluations per step; error ∝ Ξ”t⁴
Verification Known cases, energy drift, limits, convergence
Slider-crank x = r cosΞΈ + √(lΒ² βˆ’ rΒ² sinΒ²ΞΈ); stroke 2r; ẍ_max β‰ˆ rω²(1 + r/l) at TDC

Common mistakes

Trusting a smooth plot. Check energy and convergence.

Using explicit Euler for a long oscillation. Switch to semi-implicit Euler or RK4.

Forgetting units in Ο‰. Convert rpm to rad/s before using rω².

Mixing up dead centers and mid-stroke. Velocity is zero at the dead centers; acceleration is largest there.

Try it

A final simulation check: a damped, driven oscillator integrated with RK4. The code compares the simulated steady amplitude with the formula from the vibrations chapter, tying simulation back to theory.

Python Simulation versus theory: driven oscillator

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The second tool shows the effect of the rod ratio on the slider-crank. Longer rods reduce the second harmonic.

Python Rod ratio and piston acceleration

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check Β· 10 questions

of 10 answered You scored / 10 Β· perfect!

  1. 1. Which method is fourth-order accurate?

    RK4 has error proportional to Ξ”t⁴.
  2. 2. A vibration has frequency 20 Hz. A good step size is at most:

    T = 0.05 s, so Ξ”t ≀ T/50 = 0.001 s.
  3. 3. Which test best reveals integrator problems in a conservative system?

    Energy drift shows accumulated numerical error.
  4. 4. A slider-crank has r = 30 mm. What is the piston stroke?

    Stroke = 2r.
  5. 5. The mean piston speed of an engine with 80 mm stroke at 6000 rpm is:

    2 Γ— 0.08 m Γ— 100 rev/s = 16 m/s.
  6. 6. Why do engines have a flywheel?

    The torque from the slider-crank fluctuates; a flywheel's inertia stores energy to smooth it.
  7. 7. Halving Ξ”t in RK4 changes the error by roughly:

    Error ∝ Ξ”t⁴.
  8. 8. What is the state vector of a pendulum?

    Angle and angular velocity fix its future.
  9. 9. Rod ratio l/r increases from 3 to 6. The second-harmonic coefficient r/l:

    r/l goes from 1/3 to 1/6.
  10. 10. Which statement is true at the dead centers of a slider-crank?

    The piston reverses direction there: v = 0 and a is at its extreme.

Summary

  • Simulation is a loop on the state; the integrator decides accuracy and stability.
  • Semi-implicit Euler for cheap, bounded oscillations; RK4 for accuracy; verify by energy and convergence.
  • The slider-crank turns rotation into reciprocation, with extremes at the dead centers.
  • Chapter 9 gives you practice problems and projects that tie everything together.

Next: Chapter 9: practice problems