Question #269063 on Yade changed: https://answers.launchpad.net/yade/+question/269063
Status: Open => Answered Jan Stránský proposed the following answer: Hi Alexander, > What do u mean about e-mail: what adress of e-mail and what should i > send? (code sample, error mesage..) > I meant that if you ask a question involving an error, put the error message in the question :-) like My error is: Traceback (most recent call last): File "/home/honzik/bin/yade-trunk", line 182, in runScript execfile(script,globals()) File "a.py", line 104, in <module> vtk.exportSpheres(what=[('radius','b.shape.radius'),('displacement','b.state.displ()'),('stress','float (__builtin__.my_stresses[b.id])')]) File "/home/honzik/lib/x86_64-linux-gnu/yade-trunk/py/yade/export.py", line 431, in exportSpheres test = eval(command) # ... eval one example to see what type (float, Vector3, Matrix3) the result is ... File "<string>", line 1, in <module> NameError: name '__builtin__' is not defined > > Also what should i use instead of CpmMat for such simulation? > it depends on what you want to simulate. If only elastic behavior, then CpmMat (with neverDamage=True) is fine. You can also try CohFrictMat. > > With our colleagues i want to show that DEM is also applicable for such > type of simulation, definitely it is. > because it' much more simple to create calculational > model in DEM. I would be careful with terms like "much more simple" :-) concerning __builtin__ issue, sorry for my mistake, the idea is this: import __builtin__ ... stresses = bodyStressTensors __builtin__.my_stresses = stresses ... vtk.exportSpheres(what=[...,('stress','my_stresses[b.id]')]) # my_stresses *without* __builtin__. Once more, be careful using __builtin__ module not to overwrite some important variable. E.g. print tuple([1,2,3]) # no problem import __builtin__ __builtin__.tuple = dict print tuple([1,2,3]) # some strange errors cheers Jan -- You received this question notification because you are a member of yade-users, which is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp