yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14272
[Question #517125]: How to set an correct Id of a particle assembly
New question #517125 on Yade:
https://answers.launchpad.net/yade/+question/517125
Hi,
This question bothers me for a long time, i.e. when I create a particle assembly, I do want to use body.state.vel and body.state.blockedDOFs to set a particular motion for the particle assembly. But, I failed for several times.
I have tried this two methods, the first one is posted in https://answers.launchpad.net/yade/+question/404127, namely
ball_id = O.bodies.append(...)
ball = O.bodies[ball_id]
but I got an error:
Traceback (most recent call last):
File "/home/huihuang/YADE/install/bin/yade", line 182, in runScript
execfile(script,globals())
File "cube.py", line 8, in <module>
cube.state.blockDOFs='xyzXY'
AttributeError: 'list' object has no attribute 'state'
The second method is:
cube=pack.randomDensePack(pred,radius=0.00005,rRelFuzz=0.5,spheresInCell=1000)
O.bodies.append(cube)
cube.state.blockDOFs='xyzXY'
cube.state.vel=(0,0,-0.1)
and this one also got a same error, AttributeError: 'list' object has no attribute 'state'.
Can anyone help me solving this problem?
Thanks in advance,
Huihuang Xia
--
You received this question notification because your team yade-users is
an answer contact for Yade.