# Curveball Modeling

1. Apr 4, 2015

### ryankunzzz

Hi there, so for my Differential equations class we are trying to model the vertical displacement of a curveball that is only in 2 dimensions, the X-Y plane, with Y being the vertical displacement, and X being the horizontal displacement.

To do this we were told that the 2 forces acting on the ball would be the force of gravity, and the magnus force due to the rotation of the ball. the problem is, the ball is thrown at an upward angle with a forward spin, and because the magnus force always acts perpendicular to the velocity of the ball it will always have 2 components, also x and y.

So far I have gotten my equations for the acceleration in both directions, and I think the equations for velocity in both directions, but im having trouble solving the differential equations themselves. He hinted that using Runge-Kutta4 would be our best bet, but the equations are confusing me.

These are the 2nd derivative of displacement in each direction:
If Ay= -g - kVxω Where kVxω is the Y component of the magnus force.

Then Ax= +KVyω which is the X compenent of the magnus force,

Then our velocity equaions, which are the firs derivative of displacement, of should be:

Vy=Ay*t + Vy0 and
Vx=Ax*t + Vx0

But I'm totally stuck on how to apply Runge-Kutta4 to this.

2. Apr 4, 2015

### Delta²

Your velocity equations dont seem correct to me. Ay and Ax are not necessarily constant in time.

i think the proper velocity equations can come out like this:

By taking the time derivative of both sides of the equation for Ay we will have $\frac{dA_y}{dt}=-kA_x\omega$ and replacing $A_x=kV_y\omega$ we get
$\frac{dA_y}{dt}=-k^2V_y\omega^2$ or $\frac{d^2V_y}{dt^2}=-k^2\omega^2V_y$. With similar way you can get an equation for V_x. I hope this form is suitable for the Runge-Kutta method.

But then again such ODE have analytic solution, maybe your system of equations for the accelerations Ax and Ay is not correct at first place.

Last edited: Apr 4, 2015
3. Apr 4, 2015

### ryankunzzz

Yes sorry, the accelerations are not constant in time, but are depending on the opposite velocity from the step before hand.

4. Apr 4, 2015

### ryankunzzz

Upon more research it seems we should be trying to solve these as 2 coupled 2nd order ODE's, which we can bring down into 4 first order ODE's and use Runge-Kutta on, but that is where I'm stumped.

5. Apr 4, 2015

### Delta²

Hmmmm, maybe you forgot the drag force from air $\vec{F_d}=-b\vec{v}$ in the modeling of the equations for A_x and A_y?

Also the ball is spining around which axis?

6. Apr 4, 2015

### ryankunzzz

We were told to only take two forces into account, Magnus, and the force of gravity.

The ball is spinning about the axis coming out of the paper if you were to be looking down on to it.

7. Apr 5, 2015

### Delta²

Well all i can assume is that your professor wants you to test RK4 method though the equations seem to have exact analytic solution.

To the problem now I suppose we can further assume that the accelerations A_x and A_y do not vary much in time so as to consider them almost constant. Under this assumption your equations for velocity are correct. So it will be $V_x=A_xt+V_{x_0}=kV_y\omega t+V_{x_0}$ and replacing that expression in the equation for A_y we get $\frac{dV_y}{dt}=-g-k^2\omega^2tV_y-k\omega V_{x_0}$. This last equation is obviously in RK4 form $v'=f(t,v)$.

You ll get another equation for V_x working in similar way. Together with the trivial equations of the definition of velocities $V_x=dx/dt , V_y=dy/dt$ you ll have a total of 4 first order ODEs.

Last edited: Apr 5, 2015
8. Apr 6, 2015

### ryankunzzz

The assumption that the accelerations are constant is what gets me. Wouldn't the accelerations at each point be dependent on the velocity of the opposite component at that point? So the Acceleration of x depends on the velocity of Y, and vice versa, and then those accelerations give the next velocities we would be using?

9. Apr 6, 2015

### ryankunzzz

How does this look?