yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #15813
Re: [Question #658629]: Oedometric consolidation test
Question #658629 on Yade changed:
https://answers.launchpad.net/yade/+question/658629
Swapnil posted a new comment:
Okay, I will be on that part soon :)
firstly, I am trying to fill in the created cylinder with spheres. I did the following (full script):
# """creates cylinder made of boxes. Axis is parallel with z+""
from math import sin,cos
def cylSurf(center,radius,height,nSegments=12,thick=0,**kw):
center = Vector3(center)
angles = [i*2*pi/nSegments for i in range(nSegments)]
pts = [center + Vector3(radius*cos(a),radius*sin(a),.5*height) for a in angles]
ret = []
for i,pt in enumerate(pts):
l = pi*radius/nSegments
es = (.5*thick,l,.5*height)
ori = Quaternion((0,0,1),i*2*pi/nSegments)
ret.append(box(pt,es,ori,**kw))
return ret
surf = cylSurf((1,2,3),4,5,nSegments=12,thick=.1)
O.bodies.append(surf)
# create the lower plate
lower_plate=O.bodies.append(box((1,2,3),(4,4,0.0002)))
#pack the body (named "surf" with spherical particles)
sp=pack.randomDensePack(surf,radius=0.01,spheresInCell=300)
O.bodies.append(sp)
yade.qt.Controller()
This gives the following error:
File "/usr/bin/yade", line 182, in runScript
execfile(script,globals())
File "box-cylinder.py", line 19, in <module>
sp=pack.randomDensePack(surf,radius=0.01,spheresInCell=300)
File "/usr/lib/x86_64-linux-gnu/yade/py/yade/pack.py", line 418, in randomDensePack
if not dim: dim=predicate.dim()
AttributeError: 'list' object has no attribute 'dim'
Is there another method to pack the body with a set of spheres?
--
You received this question notification because your team yade-users is
an answer contact for Yade.