[ODE] Possible solution to unstable rotating bodies problem

Gary R. Van Sickle g.r.vansickle at worldnet.att.net
Tue Apr 5 22:10:29 MST 2005


> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On 
> Behalf Of Tyler Streeter

> This refers to the problem where energy is added to rotating 
> bodies (especially long, thin objects) due to numerical 
> inaccuracy from explicit integration, described here:
> 
> http://ode.org/ode-latest-userguide.html#sec_12_12_0
> 
> Here's my idea to alleviate this problem:
> 
> 1. Store each body's previous angular velocity (just the 
> magnitude should be enough).
> 2. Every time step, check the bodies to see if they are 
> "freely spinning," which is true if no contacts have been 
> made with the body and no user forces have been added in the 
> last time step.
> 3. If a body is freely spinning and its current angular 
> velocity is greater than the previous angular velocity (i.e. 
> by comparing magnitudes), then make the current angular 
> velocity magnitude equal to that of the previous step 
> (normalize the current angular velocity and scale it by the 
> previous magnitude).
> 
> This should ensure that freely spinning bodies can never 
> increase their angular velocity.  Does this seem like a good 
> solution?  Any other ideas?
> 
> Tyler

It certainly sounds like it'd be an improvement than the current situation.
Long ago I had suggested that it may be possible to solve this problem in
the general case by making conserviation of momentum (energy) an explicit
constraint.  Of course, like the old saying goes, "Code talks, BS walks"
;-).

-- 
Gary R. Van Sickle
 



More information about the ODE mailing list