yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #19989
Re: [Question #681518]: makecloud in Cylinder
Question #681518 on Yade changed:
https://answers.launchpad.net/yade/+question/681518
Status: Open => Answered
Jan Stránský proposed the following answer:
> I used inCylinder.But after I read the document,I found it couldn't
add a orientation in inCylinder to match my cylinder.
please be more specific what "the document" is.
By centerBottom and centerTop arguments, you can set any orientation to the cylinder [1]..
> My target is to fill half of the drum after the particles have settled
You can consider using a different methods, e.g.:
- pack.randomDensePack (seeJerome's answer #1 and the note about CSG)
###
cyl = pack.inCylinder((0,0,0),(2,0,0),1)
box = pack.inAlignedBox((0,-1,0),(2,1,1))
pred = cyl - box # final predicate
sphs = pack.randomDensePack(pred,radius=0.05,spheresInCell=300)
O.bodies.append(sphs)
###
- gravity deposition in "half-cylinder" and then using that packing
###
cyl = geom.facetCylinder((0,0,0),1,2,Quaternion((0,1,0),.5*pi),24)
cyl = [f for f in cyl if f.state.pos[2] < 0] # "half-cylinder"
O.bodies.append(cyl)
sp = pack.SpherePack()
sp.makeCloud((-1,-1,0),(1,1,3),rMean=0.1,num=300) # set 'num' to meet your requirements
sp.toSimulation()
newton.gravity = (0,0,-10)
# O.run()
###
the codes are some minimal examples to point you what other methods may
be used..
cheers
Jan
[1] https://yade-
dem.org/doc/yade.pack.html#yade._packPredicates.inCylinder
--
You received this question notification because your team yade-users is
an answer contact for Yade.