Angular momentum bug

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Angular momentum bug

Postby Julio Jerez » Fri Apr 30, 2021 11:23 am

well, you asked what is different, to me, it is not enought that it reproduced the behavior at least in principle but not in practice, the principle is eassy to get, the execution some what harder.

Angular momentum is equal the moment of inertial time the angular velocity.
that is. let

L = angular momentum
I = the inertia
w = angula velocity

then the equation is

L = I * w

According to all experiment and observations, even at the sub atomic level, angular momentum is always conserved. This means that the angular momentum at time t0 should be equal to the angular momentum at time t2, in the absent of external torques.
we also know that to get the external torque, you take the time derivative of the above equation and this time derivative must equal the external torque.

T = L' = I' * w + I * w'

here we can call the derivative of the angular velocity angular acceleration alpha, w' = a
a rotating body has a changing inertia matrix over time, and the derivative of a time varying quantity is the cross product of the angular velocity time the quantity. I' = w x I where x means the cross product operator, so we get

T = w x I * w + I * a

moving terms around and noticing that L = I * w, we get the equation for external torque acting on a body.

Code: Select all
I * a = T - w x L


now some engines do not even consider the last turn w x L.
most engines, including newton until 4.0, the secund term w x L is optional, and the application has to select for it.
With Newton 4.0 this term is not longer an option, it is considered in all calculations,
the only way to disabled it is by making the inertia of the body spherical.

you may be right in not consider this an important part, for me on the other hand, conservation of momentum, alone with increase in entropy over time, are the two most important laws of nature human has even discovered, entropy is not part of a rigid body simulator, but conservation of momentum is.
so in my book is not just enough to say we have but can't be use in practice, for me it is a fundamental part of the simulation.

but like I said, if what you get from those engines is satisfactory for what you seek, them you can just ignore this and go with what is best for you.

I added the skeleton of the ndJointDryRollingFriction but is not populated yet, I will do that tomorrow morning and add some test case demos.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Angular momentum bug

Postby Julio Jerez » Mon May 03, 2021 10:01 am

ok the dry friction joint is in.
you can test by selecting the joints demo and play with the ball,
as you roll it around the floor you will see the friction in action.

it has two parameters, contact trail, and friction coefficient.

the contact trail you can look up in the net, it is the torque distance that the normal force is displaced by when asserting the resistance to rolling torque.
it is usually a very small value,
for example an iron tire this value is very, very small,
a tire at normal presure the value is medium,
and for a flat tire it is very big.

is hard coded to 0.1 for now, later I will add an interface for setting by the application.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Angular momentum bug

Postby FSA » Tue May 04, 2021 12:49 am

Thanks I'll check it out this weekend.
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Angular momentum bug

Postby FSA » Thu May 13, 2021 12:17 am

Looks good, thanks. However I have a few questions to fully get the concept of the dry rolling friction joint and linear/angular damping in combination with friction and elasticity. I'll need to read some sources about those subjects first, then I will post my questions in a new thread including how to correctly implement the joint.
User avatar
FSA
 
Posts: 318
Joined: Wed Dec 21, 2011 9:47 am

Re: Angular momentum bug

Postby Julio Jerez » Sat May 22, 2021 2:04 pm

Bill wrote:Hi Julio,

Thanks for the quick reply. Actually, I haven't switched over to Newton 4.0 yet. I'd definitely like to switch over to 4.0 eventually, but I wasn't sure if it was ready and if it already has all the features I need.

For example, I think the reason I stopped when I first looked at 4.0 was that I couldn't find anything relating to compound collision shapes, which is a feature I use a lot in 3.14. Maybe I just missed it, though...are compound collision shapes already available in 4.0? Anyway, I guess I was just concerned that maybe I was too early and that perhaps I should wait a bit before switching.

Thanks,
Bill


I just have the compound collision in. needs an optimization that is new for 4.00 but is is functional
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 2 guests

cron