12 ODEs: Applications
18 Mar 2021After 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
Linear air resistance
For the problem that you should solve during the class, get the notebook1 12-ODE-lineardrag-students.ipynb and see notebook 12-ODE-lineardrag.ipynb for the full solution.2
Baseball physics
The major forces acting on a flying baseball are drag (friction due to air resistance) (see also 12-ODE-baseball.ipynb):
F2=−b2vvand the Magnus force (when the ball is spinning)
FM=αω×vwhere ω is the ball's angular velocity in rad/s (e.g., 200/s for a baseball).
For a sphere the proportionality constant α can be written
FM=12CLρAvωω×vwhere CL is the lift coefficient, ρ the air density, A the ball's cross section. (Advantage of defining CL this way: when spin and velocity are perpendicular, the Magnus force is simply FM=12CLρAv2.)
CL is mainly a function of the spin parameter
S=rωvwith the radius r of the ball. In general we write
FM=12CLρArSω×vFor a baseball, experimental data show approximately a power law dependence of CL on S
CL=0.62×S0.7The equations of motions are then
drdt=vdvdt=−gˆeyv−b2mvv+α ω×v
(quadratic drag −b2mvv included.)
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 meantime look at the student notebook. ↩ ↩2