← Back to team overview

yade-users team mailing list archive

Re: [Question #688070]: save the evolution of the average kinetic energy of the grains and their average distance

 

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

    Status: Needs information => Answered

Jan Stránský proposed the following answer:
>> fil.write('%d %.3f\n' % (e,x_g/n))
> I guess it crashes on something like "e is not defined"

ok, sorry, it does not crash, because e IS defined and is math.e (yade uses "from math import *" at startup), Euler's number, 2.718...
If you save it as int (%d, why saving energy as int??), you get the value 2

cheers
Jan

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