← Back to team overview

yade-users team mailing list archive

Re: [Question #678425]: kenetic Energy of particles

 

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

    Status: Open => Answered

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

I could not reproduce your error.

concerning your addPlotData function, it does not make much sense to
me.. Ek is the same value all the time, so there is no need for the for
loop over bodies. Calling plot.addData inside the loop also does not
make sense.

To get average kinetic energy, you can do something like this:
###
e = O.energy["kinetic"] # or something like that
n = len([b for b in O.bodies if isinstance(b.shape,Sphere)])
eAvg = e/n
###

cheers
Jan

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