← Back to team overview

yade-users team mailing list archive

Re: [Question #698392]: I calculated the kinetic energy by E=0.5mv^2+0.5Iw^2 but it is not equal to kineticEnergy() when O.cell.velGrad is set

 

Question #698392 on Yade changed:
https://answers.launchpad.net/yade/+question/698392

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

both values are computed differently.
E=0.5*m*v^2+0.5*I*w^2
of course still holds, but the values of "v" and "w" are different.
Have a look at source code [2]: conditions "if (scene->isPeriodic)", variables like "spin = scene->cell->getSpin()" and their usage, comments "Only take in account the fluctuation velocity" etc.
If still anything is not clear, please let us know.

If you think this discrepancy should be mentioned in the documentation,
feel free to update it yourself or create and issue on gitlab pages of
the project (not to be forgotten).

Cheers
Jan

[2] https://gitlab.com/yade-
dev/trunk/-/blob/master/pkg/dem/Shop_01.cpp#L193

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.