Sign in to follow this  

Resting Contact With Friction

This topic is 600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to add friction, static and dynamic, to my resting contact force resolution. I formulated the problem as an LCP, but in some situations it seems the LCP is unsolvable. As a simple example consider the, badly drawn, diagram below. 

 

[attachment=30505:forces.jpg]

 

The horizontal box has a very high mass and is initially stationary. I will largely ignore the forces on this box because its mass is assumed to be so big that the forces involved are unable to accelerate it.

 

The vertical box isn't quite vertical, but the lower left vertex is in contact with the horizontal box and slightly to the right of the vertical box's centre of mass. The vertical box is moving to the right and has a force acting downwards on it. The reactive contact force would push up on the vertical box and this would also cause a frictional force to the left. The vertical box's centre of mass is high above the contact point so the friction will cause a large torque. The reactive force will cause very little torque. This can actually leave us in the situation where applying a larger reactive force leads to the boxes accelerating more towards each other.

 

I thought about this situation and what would happen in the real world. I think there would be a very large reactive and frictional force applied over a short period of time that would stop the vertical box moving to the right. I could probably detect and handle this situation by setting tangent velocities to 0.

 

I also thought that maybe I could approximate and calculate friction based on the forces acting at the start of each frame. Then resolve the contact forces, removing any effect that friction had on the normal acceleration.

 

How are people practically handling friction in their physics engines?  I would like my physics engine to run in real time and the second approach simplifies things quite a bit, but is more approximate. Which of these approaches would make the most sense to you or do you have a better idea?

Share this post


Link to post
Share on other sites

I use a velocity based formulation, with two tangential directions (in 3D). I remove the relative tangential velocities at the contact point, enforcing lo <= Pt <= hi, where 

 

hi = u * Pn

lo = -hi

Pn = normal impulse

Pt = tangential impulse

u = coefficient of friction (represents both static and dynamic friction)

 

This way I get automatic static friction.

Edited by Irlan Robson

Share this post


Link to post
Share on other sites

The LCP formulation using acceleration can create infinite friction forces. You are actually showing the classic text book example here. In computer games we use a velocity level LCP and forces are now impulses and you don't have the problem of infinite forces there anymore. Pretty much what you say here happens then kind of automagically (a force applied over a very short period of time is an instant change in velocity aka as impulse):

 

I thought about this situation and what would happen in the real world. I think there would be a very large reactive and frictional force applied over a short period of time that would stop the vertical box moving to the right

 

Note that you can improve friction a bit compared to Irlan's box clipping. Instead block solve the 2x2 LCP along the two friction axes and then use Pt1^2 + Pt2^2 < ( mu * Pn )^2 for clipping. This way you can use more coherent tangents and don't need to align them with the relative velocity in the contact plane. This is an implementation detail though.

Edited by Dirk Gregorius

Share this post


Link to post
Share on other sites

I thought about this situation and what would happen in the real world.

 

as i recall, the vertical box would move to the right, affected by drag against the horizontal box. the drag force would be F0 * Fdynamic, where Fdynamic is the coefficient of dynamic friction for the two materials in question - which is determined experimentally . this drag force would produce a deceleration of the lower end of the box, until you reached the point where the velocity of the bottom edge dropped low enough for static friction to take over. at that point the box would pivot on the static bottom edge. until then the box would begin to lean over as the drag force on the bottom edge and the momentum of the center of mass produce a torque effect.

 

https://www.google.com/search?sourceid=chrome-psyapi2&rlz=1C1FDUM_enUS472US473&ion=1&espv=2&ie=UTF-8&q=coefficient%20of%20static%20friction%20formula&oq=coefficeint%20of%20staic%20friction&aqs=chrome.3.69i57j0l5.12736j0j7

 

http://www.pstcc.edu/departments/natural_behavioral_sciences/Web%20Physics/Experiment%2006%20PHYS%201310.htm

 

also note that the lower left corner cant be in contact if the box is leaning to the right as you describe. the lower right corner would be the corner in contact with the "ground".

 

in your diagram, the box is leaning left, not right - which might  change the real world physics somewhat. if the bottom slowed enough to stop before the box leaned right, it would pivot on the left edge, then the right edge. 

Edited by Norman Barrows

Share this post


Link to post
Share on other sites
I recall I have seen this problem being discussed endlessly in text books on technical mechanics.

 

Here is a discussion of the problem. It starts at page 229. Luckily it seems mostly all there:

https://books.google.com/books?id=qKCdH7HklEwC&pg=PA228&lpg=PA228&dq=Painleve%27s+example&source=bl&ots=ZyK7IXlw4a&sig=_5G7CEfE1Nkia6I9N0tP3hpjg-M&hl=en&sa=X&ved=0ahUKEwiIxJ3m8NfKAhUI82MKHUabAM0Q6AEIODAF#v=onepage&q=Painleve's%20example&f=false

 

I own this book and can recommend it. It is a good read on non-smooth mechanics.

Edited by Dirk Gregorius

Share this post


Link to post
Share on other sites

Thanks for the book recommendation. It looks like it covers exactly the sort of thing I need. I had a look at the first chapter on Amazon, which is quite into measure theory. It's not to heavy on the measure theory is it? I'm an engineer so most of my maths skipped quickly over the measure theory, but I can learn if needed.

 

One thing I don't get is this. If you have a velocity based formulation and the rod *only* has velocity tangent to the ground, but is being accelerate towards the ground what should you do? You can't apply an impulse to counter the downward acceleration

Share this post


Link to post
Share on other sites

The way you guys are handling friction is by resolving the normal contact force, multiplying this force by the time step to get an impulse and using that impulse as Pn in the equation Irlan gave?

 

If we go back to my original example this would cause the rod to impact the ground (at some speed) and then rebound. This would make sense for the situation in my example. However, if the rod where shorter (so that the downward acceleration caused by friction could be overcome by the normal force) you would get a similar behaviour, right? The acceleration LCP formulation would allow the rod to slide along the ground. Maybe the bounce would be small enough that this is an OK approximation, just wondering before I try to implement something.

 

Also, just going through some thought experiments, a Painleve paradox is impossible with static friction? Eventually the friction force must hit a maximum based on the force trying to accelerate the rod, thus ending the feedback loop with the normal force.

Edited by CootieKiller

Share this post


Link to post
Share on other sites

This topic is 600 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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