12 ODEs: Applications
14 Mar 2019After implementing a number of integrators for ODEs we are now in the position to solve some practical problems:
- projectile movement with air resistance
- realistic movement of a spinning baseball
For the problem that you should solve during the class, get the notebook1 12-ODE-applications-students.ipynb and see notebook 12-ODE-applications.ipynb for the full solution.2
The baseball problem was live-coded from scratch during class and the notebook baseball_solution.ipynb2 is a cleaned-up and commented solution. The lesson showed how
- to define the physical problem (obtain trajectory of a baseball with spin and air resistance)
- to derive the underlying equations (Newton's equations of motions and the forces acting on the ball)
- to adapt an algorithm to solve the equations (use RK4 for
integrating the ODEs and express the problem in ODE standard form
so that one can use
ode.rk4()
) -
to visualize and discuss the results (plot trajectories and assess the influence of spin)
Resources
- Computational Modelling: Chapter 3
Footnotes
-
As usual,
git pull
the resources repository PHY494-resources to get a local copy of the notebook. Then copy the notebook and all other code into your work directory in order to complete the exercises. ↩ -
Notebook will be posted after class; in the mean time look at the student notebook. ↩ ↩2