← Back to team overview

yade-users team mailing list archive

Re: [Question #271780]: random loose pack in a cylinder container

 

Question #271780 on Yade changed:
https://answers.launchpad.net/yade/+question/271780

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

you can use makeCloud and then "crop" it by a predicate:

#####################
from yade import pack
sp = pack.SpherePack()
maxCorner = (50,50,50)
sp.makeCloud(maxCorner=maxCorner,rMean=1.0,num=5000)
pred = pack.inCylinder((25,25,0),(25,25,50),15)
for c,r in sp:
if pred(c,r): # determines if a sphere with center c and radius r is inside
predicate...
O.bodies.append(sphere(c,r)) # ... if yes, append it to simulation
#####################

HTH
Jan


2015-09-25 18:07 GMT+02:00 amir <question271780@xxxxxxxxxxxxxxxxxxxxx>:

> New question #271780 on Yade:
> https://answers.launchpad.net/yade/+question/271780
>
> Hi,
> how can I get a random loose pack in a cylinder? Is it possible to do that
> through makeCloud?
> Thanks in advance
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.