yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #11493
Re: [Question #269063]: Metallic plate tension
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
Follow ups
References