← Back to team overview

yade-dev team mailing list archive

energy conservation?

 

Hi there,

I updated scripts/test/energy.py in r2546; it is a simple simulation of many balls falling on plane in gravity. There are contributions of gravity work, elastic potential, plastic dissipation, kinetic energy and non-viscous damping (if enabled). If the script is run, the total is not zero, as if more energy were dissipated then put into the system. The value of the total does not seem to depend on dt. If damping is non-zero, it is much lower (almost zero for 0.2, for instance).

I am not sure about the cause; two possible explanations come to mind (i) mid-step values of velocity vs. on-step accelerations etc. and (ii) without damping, many elastic collisions take place (their number increases if damping is small, as the system never goes to quasi-static state) and integration error accumulates (what contradicts this is that the precision would be increased with smaller dt, which is not the case, and also that the imprecision effects would cancel each other in average).

Could someone have a look at the code and suggest something?

Cheers, Vaclav



Follow ups