impulse VS mass

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

impulse VS mass

Postby blackbird_dream » Tue Mar 06, 2018 10:58 am

to model a contact force, I introduced a procedural law, i.e the elastic contact response is proportional to the deflection of the NewtonBody : F=k*y
I observed this force is constant at initial contact step irrespective of the mass. As a result lighter NewtonBody may be propelled to infinity whereas heavier Newtonbody (with same speed and acceleration at impact =same fall height under constant acceleration) behaves correctly.
Is this processed differently in collision between Newtonbodies ?
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: impulse VS mass

Postby Julio Jerez » Tue Mar 06, 2018 12:32 pm

Congratulations, :D you just discovered Hooke law of motion f=-k * x

There is some of that in newton, but not for calculation forces, instead for calculation a restoring acceleration to reduce constraint violation every time step.

For contacts, this is not really a good solution thought, instead in Newton, contact penetration violation are resolved by calculation a constant velocity that reduces the error at a constant speed until the error is less than half the travel distance in one step, at that point the velocity is the distance divided by the time step, which is an acceleration
Notice that this is not a stiff value, instead is an infinitesimal value that is the result of the ratio between two small quantities.
Is this thick that makes Newton stable but this only works if the solver is capable of calculating accurate reaction forces and the constraints violation are the result primarily of numerical integration.
This fails bad for iterative matrix solvers if they do not calculate an accurate enough reaction force because the penalty try to correct an error that is not really an error is a random value.
In the end, the constraint violation are a combination of both numerical integration and solver iterations, but there must be dominated by numerical integration for that approach to work.

What some engines do is that the apply a penalty like you say, and of course at some point the penalty is stronger than the violations and with some tweaking this could be made stable but not accurate, which is the reason I do not do it that way.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: impulse VS mass

Postby blackbird_dream » Wed Mar 07, 2018 3:31 am

Ok thks Captain Hooke :wink: . I guess, it's impossible (at least not that easy) to implement this way in a simple script (?) It's not really a problem in my case as the mass is well tuned but I just observed what happened when I changed the mass value.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 17 guests

cron