[ODE] NOT A NUMBER / Divide by zero

Nate W coding at natew.com
Sun May 25 11:14:01 2003


On Sun, 25 May 2003, DjArcas wrote:

> This is still happening on occasions. All the numbers related to an objects
> (position, anuglar and linear velocity, are going to NOT A NUMBER)
> 
> What other causes are there for this? And is there any way I can trap them
> happening with an assert?

Far as I can tell, the NANs you're seeing are probably a symptom of one of
two things: I'd look for two things: perhaps a NAN is present in the input
data somewhere, or perhaps your simulation is exploding.  My guess is the
latter.  Is your timestep nice and small?  Try fixing it at 0.01.  Are
there any constraints in your system that are impossible to solve or that
are really stiff, like three bodies connected in a triangle, for example?

It could be something else, but these are worth investigating.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com