[ODE] Previous timestep significance? (part 1)

Konstantin Voloshin volk6 at mail.ru
Wed Oct 15 15:57:41 MST 2003


Hello,

> I don't use a cfm variable in my code so I don't know about this.  In any
> case it doesn't sound like a good idea to add even more terms which have 1/h
> in them for the numerical accuracy reason I mentioned, unless you disallow
> very small time steps.

Hm. I shared your doubts before tried that. Not only 1/time (i.e. 1/h) is
suspicious value in dynamical computing of erp&cfm. E.g. CFM itself
also is. Its default value is 1e-10 (in case of double precision
configuration).

Inverse of the formulae for erp & cfm is:
    spring = erp / (cfm * time)
    dumping = (1 - erp) / cfm
If we put there the defaults (default erp= .2; timestep, most frequently
used in examples = .05), we get spring = 4e+10 and dumping = 8e+9.

This values are to be used in dynamic evaluation of erp & cfm, which
also looks suspicious. I haven investigated why that suspicious evaluations
result in such a nice behaviour. Perhaps high and low floating-point orders
compensate each other...

However, I tried following modifications to test_boxstack.cpp demo:
1. Using .1 as timestep (nothing else changed)
2. Using .001 as timestep (nothing else changed)
3. Switching .1 and .001 every frame (with dynamical evaluation of erp & cfm)
4. Switching .1 and .0001 every frame (with dynamical evaluation of erp & cfm)
5. Using random timestep between .1 and .0001 (with dynamical evaluation of erp & cfm)

The result is that all 5 systems behave _very_nice_ and visually absolutely
_the_same_ (apart from different timescale in all cases and twitching in the
5-th case, which is predictable, because I didn't implement frame-delay
mechanism to make render fps follow physics fps).

For comparison, if I'd skipped dynamical erp&cfm evaluation, examples
3-5 would suffer strong explosions.

All these made me consider the solution, I've bumped into, as satisfactory.
Perhaps my experiments could help you, in case you haven't solved this
problem already. Have you? :)

VolK


----- Original Message ----- 
From: Adam Moravanszky [Novodex]
Sent: Tuesday, October 14, 2003 8:38 PM
Subject: Re: [ODE] Previous timestep significance?
http://q12.org/pipermail/ode/2003-October/010174.html



More information about the ODE mailing list