Calculating the Acceleration of a Golf Ball Flight

AI Thread Summary
Calculating the acceleration of a golf ball in flight involves understanding the forces acting on it, specifically drag and Magnus forces. The drag force is calculated using the drag coefficient and the ball's velocity, while the Magnus force depends on the ball's spin and velocity. To resolve these forces into X and Y components, the initial launch angle is crucial, as it allows for trigonometric calculations of the forces. Numerical integration is suggested for real-time simulation, but approximations can be used for less accuracy if needed. Properly managing the angular velocity and ensuring accurate force calculations are essential for realistic flight simulation.
Paul7
Messages
14
Reaction score
0
I am currently trying to create a computer simulation of the flight of a golf ball and am having difficulties in calculating the acceleration of the ball.

The following forces are applied to the ball:

http://www.3dreal.co.uk/project/phys.jpg

I know how to calculate the forces but am unsure as how to resolve the forces into component form and then calculate the acceleration of the ball?

Thanks Paul
 
Last edited by a moderator:
Science news on Phys.org
Do you have equations that yield the drag and magnus given a certain velocity? The drawing only illustrates the orientation of the forces relative to the velocity.
 
"Magnus"? What is "magnus"?



You will need to know the strength (magnitude) of each force as well as its angle with respect to a specific direction. If you can get the angle with respect to the horizontal then it should be simple trigonometry to get horizontal and vertical components.
 
Am calculating the magnus force or uplift force using:

Fm = (2PI^2 * p * v * r^4 * w) / 2r

were p = density of air, r = radius, w = angular velocity, v = velocity

The drag is calculated using:

Fd = 0.5 * cd * p * area * v^2

where cd = drag coefficient, area = cross sectional area

The diagram just shows for a particular position during flight. The magnus force is always perpendiclur to the velocity and the drag always opposes the velocity.

My problem is resolving the forces into an X and Y component and calcuating the net force. I think I could do this if I knew the angles but I don't think I do. Is there any way to do this without knowing the angles?
 
In your simulation, surely you know the inital angle at which the golf ball is fired into the air, right?

Let that angle be alpha... in the very first moment of the flight, the drag force is alpha degrees below the X axis, the magnus force is alpha degrees to the left of the Y axis, and the gravitational force is on the Y axis.

\Sigma F_x = F_m\sin {\alpha} + F_d\cos {\alpha}
\Sigma F_y = F_m\cos {\alpha} - F_d\sin {\alpha} - F_g

Now you use Pythagoras to find the net force, and the angle of the force is given by:
\tan {\theta} = \frac{\Sigma F_y}{\Sigma F_x}

So you know the momentary acceleration of the ball. Use that to calculate the new velocity of the ball, and you would have the new alpha, and this whole thing would happen all over again.
 
Originally posted by Paul7
My problem is resolving the forces into an X and Y component and calcuating the net force. I think I could do this if I knew the angles but I don't think I do. Is there any way to do this without knowing the angles?
No, you have to know the angles. But you should know the first set of angles and be able to calculate the rest [like Chen was saying].

I assume you are doing some sort of step method here, calculating everything every 1/100 of a second or so. Since you know the launch angle, you have the entire first set of decelerations. Find the resultant and calculate the position after 1/100 of a second assuming all those decelerations are constant (over such a short time period, they are very nearly constant). Now calculate the angle between the first and second positions.

Are you familiar with http://www.teachers.ash.org.au/mikemath/calcnumNewton/ for numerical solving of equations?
 
Last edited by a moderator:
Let \vec{v} be the 3-dimensional velocity vector.
Let \Delta{t} be the time since the last update(frame) of the simulation.
Let m be the mass of the ball.
Let \vec{v}\prime be the new updated velocity vector.

Now \vec{v}\prime=\vec{v} -

(\frac{\vec{v}}{\|\vec{v}\|}\frac{\frac{1}{2}c_{d}\|\vec{v}\|^2\Delta{t}A\rho}{m}) -

(g\vec{k}\Delta{t}) +

(\frac{\vec{v}\times(\vec{k}\times\vec{v})}{\|\vec{v}\times(\vec{k}\times\vec{v})\|} \ \frac{2\pi^2\rho\|\vec{v}\|r^4\omega\Delta{t}}{2rm})
 
Last edited:
Sorry if my post was messy, I was in a rush. I forgot to mention that at some point (namely, immediately after the Y component of the velocity equals zero) your angle alpha will become negative. When this happens \sin \alpha will also be negative, which means both F_m and F_d will too change their signs.
 
Last edited:
Thanks a lot for the help

Dont no if am being a bit dumb but what's the K vector in Palpatine's equation? and also would I solve this three times once for X, Y, Z coordinates?
 
Last edited:
  • #10
k is the unit vector in the z (up direction) <0,0,1>
 
  • #11
If you have a vector library you only have to do it once and adapt your drawing code or whatever to use the coordinates in the vector object.

Remember the new position vector is the old one + old velocity vector * (delta t).
 
  • #12
Originally posted by Palpatine
k is the unit vector in the z (up direction) <0,0,1>
I'm sorry but I don't understand is how:

\frac{\vec{v}}{\|\vec{v}\|}

Gives you the direction of the velocity vector. I'm genuinely interested because I only recently picked up vectors in mathematics. :smile:

Ah wait, is it because:

\frac{\vec{v}}{\|\vec{v}\|} = \frac{\|\vec{v}\|\cos \theta}{\|\vec{v}\|} = \cos \theta
 
Last edited:
  • #13
A vector of length 1 multiplied by a constant is the same as scaling the vector with that amount. Consequently its also the same as making the length of the vector the same as the amount you multiplied it with.

Thus if you divide a vector by its magnitude ( ||v|| ), it yields a vector of length 1 (unit vector) in the direction in which v is pointing.
 
  • #14
Also note where it multiplies vectors it means cross product and also that you must do it in the order specified because v x u is not equal to u x v
 
  • #15
You can also get wind drift as a function of time by using the following equation:

Drift = wind velocity * sin theta [t - (range/initial velocity)]

theta is the angle of the crosswind
range is the horizontal distance the ball has traveled at time t

Please note that at lower velocities the drag is NOT proportional to the square of velocity. This is done with numerical integration. Wind drift is proportional to wind velocity. Also note that corrections for elevation (msl) of the golf course and temperature are simply a function of the air density. Wind drift is also proportional to air density. I have much more information; if you need it, say so.

Hope this helps you. -Mike
 
Last edited by a moderator:
  • #16
Originally posted by HallsofIvy
"Magnus"? What is "magnus"?


If you're still interested and nobody's mentioned it yet, the Magnus force, named for the guy who first demonstrated it, shows up whenever you have a spinning object in a fluid. It's similar to normal aerodynamic drag in that it is caused by a pressure difference defined by the shape of the boundary layer of the moving object. The spin deflects the wake so that instead of having a front-to-back pressure difference, the pressure difference will be across the ball. As mentioned, the Magnus force acts at a right angle to the forward motion of the object. It's the explanation for the curve of a curve ball.

Here's a site with a blurb on it.

Paul7: In your calculation of the Magnus force, are you assuming a constant &omega; or do you have some model where the spin rate decays? Hope your simulation is up and running...
 
  • #17
Tried implenting this using Palpatines equation but still can't get it to work right. The ball starts off correct initially then reaches a maximum height and then carries on going up and down in a sin wave like motion and never comes back to the groud.

I don't know as to whether the angular velocity should be reduced or not. If I just reduce it by a certain amount each time step the flight looks a lot better although the ball does not travel as far as it maybe should.

Is there any other forces applied to the ball that reduce the angular velocity? maybe I should just reduce it by a constant value or maybe base it on another factor? In both situations the ball also flies a lot higher than it should.

Once the ball is hit the initial values for the forces are 3N for the magnus and 1.4 for the drag, do these seem ok?


"Please note that at lower velocities the drag is NOT proportional to the square of velocity"

Could this be causing a problem. Should I change the equation when the velocity goes below a certain threshold?

Thanks a lot for your help
Paul
 
  • #18
Try this website:
www.aeroballisticsonline.com

There are a couple of typos in the charts, but they're pretty obvious so they probably won't give you any problem. This site deals with velocities that are higher than what you need, but it should help you quite a bit. The math for these problems is cumbersome, but this is the method currently in use (numerical integration). The coefficient of aerodynamic drag varies greatly with velocity in high powered rifle bullets especially near mach 1. It won't change anywhere near as much for your golf ball. I said that the drag was not proportional to the square of velocity; it is also not directly proportional to velocity. It lies in between the two.
www.remington.com[/url] has a 30 day free trial on ballistics software. Also, try [PLAIN]www.eskimo.com/~jbm or www.snipercountry.com I've done a lot of shooting, and I have a good working knowledge of the practical application of these concepts. If I can be of any further help to you, let me know.

-Mike
 
Last edited by a moderator:
  • #19
Ideally I don't particulary want to deal with all sorts of numerical integration. The simulation needs to run in real time so the fewer calculations needed the better. Is there any type of approximations that would produce the required results. It doesn't have to be 100% physically accurate just look as near the the real thing as possible.
 
  • #20
I'm not an expert on computers or golf. If I knew of an easier way to solve your problem, I would certainly tell you about it. The math isn't difficult, just a little time consuming. -Mike
 
  • #21
You might ask Russ Watters for a short cut or a swag, I'm sure he is pretty sharp on air flow at low velocities. But, be forewarned, he is also "afflicted with mathematics" and probably won't be too sympathetic about you not wanting to do numerical integration
-Mike
 
Last edited by a moderator:
  • #22
Paul7,

Would you mind posting some of your pseudocode and/or the actual code you're using (also what language you're using)? If so, I'd be willing to take a look at it for you (without speaking for others, I'm sure they would too).
 
  • #23
Thanks a lot Jamesrc that'd be great. My code can be found at:

http://www.3dreal.co.uk/project/code.txt

Its written in C. Should be pretty easy to follow even if your not familiar with it. The idle function is part of OpenGl that is used to update the display as often as possible but don't really need to worry about that.

If it is run just using the gravitational and drag contribution it works fine. Its when I add the magnus force that the flight goes crazy!

Thanks Paul
 
Last edited by a moderator:
  • #24
Code:
w = Simulation.rps;
The RPS is the frequency of the rotations of the ball, it's not the angular velocity.

\omega = 2\pi f = \frac{2\pi}{T}

So the code should read
Code:
w = 2 * PI * Simulation.rps;

(If the balls rotates twice per second, the period of its rotations (T) is 0.5 second, i.e it takes him half a second to rotate fully. If the ball rotates fully in half a second, a given point on it traverses 360 degrees (2\pi radians) in half a second. From there we find the angular velocity.)
 
Last edited:
  • #25
The simulation.rps is already in radians per second, its defined in another section of code earlier. Its not very clear sorry!

Simulation.rps = (2 * PI * 3000) / 60;

where 3000 is the initial rpm.
 
  • #26
Sorry, I thought RPS was Rotations Per Second and not Radians Per Second. Anyway, this value doesn't stay constant, does it? Where's the part that you modify its value?
 
  • #27
Yeah I know that's the thing, I`m not entirely sure on this. I've tried just reducing it by a constant value which gives okish results but the ball doesn't travel any where near far enough and is far too high. For example it should really go about 200m where mine only goes about 100m and it should be about 20m high, mines about 50m.

How would you best suggest I affect it?
 
  • #28
If it goes too high and too short, the constant deceleration of the angular velocity is probably too small. Try increasing it and see how the results change. I have not studied rigid body physics (yet), so someone else will need to answer that question, although I'm going to do some searches and maybe find something... :smile:
 
  • #30
The magnus force is always perpendicular to the velocity, right? This means that the work it does is 0, since the the angle between the force and the road is 90 and cos(90) is 0. So if it does no work, it also can't be held responsible for any changes in the ball's energies, kinetic or otherwise. The rotational energy should be:

\frac{1}{2}I\omega ^2

So in fact, the magnus force does not increase or decrease the ball's angular velocity, since that would change its rotational energy as well.

As I said I did not study rigid body physics so I'm not sure how right this is, so if anyone wishes to correct me please do.
 
  • #31
From what I know I don't think the magnus force does affect the angular velocity, maybe the drag has some effect? or maybe there's some other forces affecting it?
 
  • #32
The drag will slow the angular speed of the ball down over the course of its flight. I've read that a reasonable estimate of the resistive torque would be:
k*FM*r, where r is the radius of the ball, FM is the Magnus force magnitude, and k is a constant for which you can use 1/10. (So, if you were so inclined, you could say
\alpha = \frac{-kF_Mr}{I}
where I is the inertia of the golf ball.)

Note that the direction of the Magnus force is given by the cross product of the direction of the spin vector and the direction of the velocity vector. So the way you have your equations, you are assuming that ithe golf ball has "backspin" only, i.e. the direction of the spin is suck that the direction of the Magnus force is in the direction you have shown in your first post. That's fine, as long as you're aware of the assumption -- you're model does not take into account the effects of any potential "sidespin."

All of that said, I'm not sure what is going wrong with your simulation.
Your numerical integration technique is pretty crude, but as long as your time step is small enough, you should still get a reasonable simulation. I've run code based on yours in MATLAB, assuming that your library of vector functions (like Vector3D_crossproduct and Vector3D_length and Vector3D_scale) works properly (I don't know if you wrote those yourself or if they were from some predefined library). The only thing left is to make sure your initial conditions are reasonable.

P.S. are you still getting that sine wave effect? I didn't see any evidence of that. Again, it could be your sampling time.

Sorry if that's not much help.
 
Last edited:
  • #33
side spin gives the hook or slice from a strait path
angle of the club head is = to the angle of flight ,higher is shorter, lower longer distance traveled
 
  • #34
How about a golf ball with extruded pips as opposed to customary inverted pips? Or a golf ball with multiple, adjacent and shallow sinusoidal channels (extending the analogy to a hard ball)?
 
  • #35
Thanks for that jamesrc that's just what I needed, only thing is am not too up on all this rotation stuff so am not sure what the inertia of the golf ball is. Have had a look around and it says the moment of inertia of a ball is 2/5 m r^2. Is this the same thing? Tried using this and get a value of alpha of 700 and something so that doesn't seem right.

Dont think is a problem with my vector library as have been using it for years and works fine.

Am aware that am only dealing with backspin. Will try to extend it later once get the basic flight working correctly.

My initial conditions are. Ball radius = 0.022, ball mass = 0.045, initial rpm = 3000, angle hit at = 8 degrees, initial velocity 70ms.
Think these are right, seem to be roughly same as many sites I`ve looked at.

Dont get the sine wave effect if reduce the angular velocity by a constant value. Ball just doesn't fly far enough and goes to high.

Thanks a lot for the help.
 
  • #36
You've got the right inertia formula (there's no reason to include the dimples in the golf ball in the inertia calculation since our model makes other assumptions that make that kind of thing negligible).

When I use your initial conditions with my simulation, I get a hang time of ~9.1 s, a peak of ~40m and a range of ~230 m.

That's using a constant angular acceleration. When I put in the decaying spin rate, that knocks off about 80 m of the range and halves the hang time.

I also forgot to mention before that I think you have the Magnus force twice as high as it should be (at least according to where I've seen the Magnus Force in a form like yours). So when I include that and use the decaying spin rate based on our crude model of that, I get a ~9m peak, a ~141.5 m range, and ~3.4s of hang time.

How do those results compare with yours?

One more note: you probably already realize this, but as long as you're not considering lateral forces on the ball, this is just a 2d problem. If you're going to include 3D effects later, you're approaching it the right way.
 
  • #37
I always thought the magnus force was too big but there doesn't seem to be anything wrong with the calculation. Have just tried dividing the force obtained by 5 and running the simulation and it works almost as required it travels about 180m and a height of 17m, this is with no spin reduction.

Can you see anything wrong with the way I am calculating the magnus force?

Fm = (2 * PI^2 * pair * v * r^4 * w) / (2 * r)

pair = 1.29 kg/m^3
initially v = 70.9 m/s
r = 0.022 m
w = 3000 rpm = 314 rad/s

therefore

Fm = (2 * PI^2 * 1.29 * 70.9 * 0.022^4 * 314) / (2 * 0.022)

= 3.01N

the weight of the ball is only 9.81 * 0.045 = 0.44N therefore this does seem an awful lot. Throughout the whole flight of the ball the lowest the magnus force gets is 1.7N so this can't be right.

Cant see anything wrong in wat I've done though?
 
  • #38
Check http://carini.physics.indiana.edu/E105/spinning-balls.html for a discussion on the Magnus force; that suggests that you have an extra factor 2 in your expression for the magnus force. I don't play golf, but I thought the numbers I was getting were reasonable. I mean, 140m is a heck of a drive, isn't it?
 
Last edited by a moderator:
  • #39
That page uses the same formula as you do, except that it uses the rotation frequency and not the angular velocity. So the formula should be:

F_M = \frac{\pi pr^3v\omega}{2}

That would make your Magnus force about 6.3 times weaker.
 
  • #40
Originally posted by Chen
That page uses the same formula as you do, except that it uses the rotation frequency and not the angular velocity. So the formula should be:

F_M = \frac{\pi pr^3v\omega}{2}

That would make your Magnus force about 6.3 times weaker.

Exactly what I was trying to say, but I looked at Paul7's posted formula too fast and did not compare them correctly. This is the formula I used in my simulation, where I got the results I posted before.
 
  • #41
Thanks a lot for all your help its much appreciated. Works really well now.

Tryin to do the response of the ball from the collision with the ground. Any one have any ideas on this. I need it to take into account the spin of the ball and the friction between it and the ground.

Have got the folowing formula for a collision between two bodies:

J = -vr(e+1)/[1/m1 + 1/m2 + n.(r1 X n)/ I1 + n.(r2 X n)/ I2]

where
J is the impulse in the normal direction
vr is the relative velocity along the line of action
I 1 and 2 are either impulses or more probably the inertias of the bodies, book doesn't eplain very well

v1(after) = v1(before) + [J n + (mu J) t] / m1
v2(after) = v2(before) + [-J n + (mu J) t] / m2
w1(after) = w1(before) + {r1 X [J n + (mu J) t]}/Icg
w2(after) = w2(before) + {r2 X [J n + (mu J) t]}/Icg

and here Icg is the inertia around the center of gravity i think
and mu is the coefficient of friction

As the ground has an infinite mass and no real radius am presuming that I can just assign a value of 0 to these and then get an equation of:

J = -vr(e+1)/[1/m1 + n.(r1 X n)/ I1]

v1(after) = v1(before) + [J n + (mu J) t] / m1
w1(after) = w1(before) + {r1 X [J n + (mu J) t]}/Icg


Am not entirely sure how to calculate the relative velocity in the book I have it states that for two bodies:

vr = (v1-v2) X normal

do you think that this is correct?
so for my case I just use vr = v1 X normal?
also will the inertias I1 and Icg just be 2/5 m r ^2?
 
  • #42
What is v1, v2, w1 and w2?

As the ground has an infinite mass and no real radius am presuming that I can just assign a value of 0 to these
Actually both the radius and mass of the ground are infinite since they are a lot bigger than the radius and mass of the ball.
 
  • #43
v1 and v2 are the velocities of object 1 and 2 respectively and w 1 and 2 are their angular velocities
 
  • #44
Just realized that r1 and r2 are the vectors from the center of mass of the objects to the collision point and are not the radius's as I first thought, if that's any help!
 
Back
Top