Sign in to follow this  
dangerdaveCS

Friction force decelleration

Recommended Posts

Hello, this is probably a really simple question for those who understand.

Lets say I have a box that I'm pushing on a flat surface. I let go of the box and it carries on moving, decellerating until it stops. I know the friction coefficient and momentum, etc.

How do I calculate the friction force on the box?

Share this post


Link to post
Share on other sites
The force friction exerts on a moving object is equal to the coefficient of dynamic friction times the normal force. This is oriented in the direction opposing the velocity vector.

Share this post


Link to post
Share on other sites
So, I normalise the velocity and reverse it. Then multiply that by the magnitude of the normal force. Then multiply by the coefficient of friction... is that right?

I.e.

F = -v/|v| * |mass*gravity| * mu

Share this post


Link to post
Share on other sites
Yes that's right. But... you also calculate the force that when applied in this direction would stop all motion in that direction over the following timestep. Then you apply the minimum of the two forces.

The reason for doing this is so that your object doesn't start oscillating when it nearly comes to rest.

Share this post


Link to post
Share on other sites
Quote:
I have a box that I'm pushing on a flat surface.

The above equations are good if the flat surface is also horizontal - i.e., perpendicular to the direction of gravity. Otherwise you need to apply the surface normal to mass*gravity, as gravity is a vector.

Share this post


Link to post
Share on other sites
Also, if the force pushing on the box isn't exactly parallel to the surface then that will also change the normal force.

Share this post


Link to post
Share on other sites
Thanks for all the help guys. As always, gamedev, best site on the net.


Quote:
Original post by MrRowl
Yes that's right. But... you also calculate the force that when applied in this direction would stop all motion in that direction over the following timestep. Then you apply the minimum of the two forces.

The reason for doing this is so that your object doesn't start oscillating when it nearly comes to rest.


I have noticed this oscillating effect. However, I'm having trouble calculating this max friction force. I.e.:





Where v is velocity, n is surface normal, m is mass, dt is the timestep.

But this gives a force orders of magnitude smaller than the friction as calculated in my post above, so f_max is always chosen, but isn't strong enough to prevent acceleration.

Anyone see what I'm doing wrong?

Share this post


Link to post
Share on other sites
OK, turns out I wasn't taking into account the force accumulated over the current timestep along with the velocity from the previous timestep. Seems to work fine now - for linear friction force.

I'm now completely at a loss how to do angular friction. So, to revise my original example: say I've got a box on a flat surface and I apply some torque to get in spinning on the spot (i.e. torque is in the surface normal direction). How do I then calculate the opposing torque due to friction?

EDIT: just had a thought. If friction is a constant force, then applying another constant force that overcomes it will mean constant acceleration... how is it, for example, that cars have a maximum speed? Doesn't friction increase with velocity?

[Edited by - dangerdaveCS on September 30, 2010 9:20:09 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by dangerdaveCS
EDIT: just had a thought. If friction is a constant force, then applying another constant force that overcomes it will mean constant acceleration... how is it, for example, that cars have a maximum speed? Doesn't friction increase with velocity?


The friction you've been considering is Coulomb friction, but the major drag force on a fast-moving car is wind resistance. One very simple approximation to this second force is that it increases with the square of the velocity. A good example of this -- better than a car, honestly -- is the terminal velocity of a falling object. This is the velocity at which the drag force exactly balances the force of gravity so the object stops accelerating.

For a car, there are of course many other factors at work, including that the engine actually starts to produce less torque as it begins to spin too fast.

Share this post


Link to post
Share on other sites
Thanks for the reply...

OK. So isn't wind resistance a kind of friction? Isn't there some analogue to that for pushing a box along a surface? Maybe assuming the surface is a bit rough? What is the equation governing this kind of friction (or just a relevant link to online material would be good)?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this