New question #672684 on Yade:
https://answers.launchpad.net/yade/+question/672684
Hello All,
I am trying to generate cylindrical sphere packing according to a given PSD.
First, I use the following script to generate sphere packing:
>
psdSizes,psdCumm=[2.36,4.75,6.3,9.5,12.5],[0.347,0.657,0.76,0.973,1]
fill_size=100
pred=pack.inCylinder(centerBottom=(0,0,-(h_cyl/2)+1),centerTop=(0,0,fill_size),radius=r_cyl-3)
sp=pack.SpherePack()
sp.makeCloud((-r_cyl,-r_cyl,-(h_cyl/2)),(r_cyl,r_cyl,h_cyl/2),psdSizes=psdSizes,psdCumm=psdCumm,num=14000,distributeMass=True)
sp2 = pack.filterSpherePack(pred,sp,returnSpherePack=True)
sp2.toSimulation()
>
Then after running the script, I check the % of spheres with radii less than
2.36 as follows:
>
yell=[]
for b in O.bodies:
if isinstance(b.shape,Sphere):
yell.append(b.shape.radius)
count=0
for j in range(len(yell)):
if yell[j]<2.36:
count=count+1
print (float(count)/len(yell))
>
Using latter method, I get my answer around 0.87 which should actually be
around 0.347. Is there a mistake in my code or in the usage of makeCloud
command? I am not able to figure out.
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 : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp