Lite / Independent Engineering Research / Week 7
Week 7: Numerical integration
This week you will
- Implement explicit Euler, semi-implicit Euler and fourth-order Runge–Kutta and compare their energy behaviour.
- Measure local and global error order with a convergence study.
- Recognise numerical instability and stiffness from the stability region.
Lessons
- Euler, semi-implicit Euler and RK4 · about 50 min
Simulate a frictionless spring with Euler's method and it gains energy from nowhere. Is the physics wrong, or the arithmetic? - Local and global error, and the convergence study · about 50 min
Halve the step and RK4's error drops about sixteen times. How can you prove that from your own code, not from a textbook? - Stability regions and stiffness · about 45 min
The fast part of your model died out in a millisecond, yet your simulation still crawls along in microsecond steps. Why?