← Back to team overview

yade-users team mailing list archive

[Question #403360]: Packing Cylinder with MakeCloud

 

New question #403360 on Yade:
https://answers.launchpad.net/yade/+question/403360

Hello everybody,

i am doing a script to fill a cylinder and then it is going to apply a force on the normal direction.

So, how can i get to do it by using packing cylinder and makecloud? Also, is it possible to include spheres material?

Following the examples that i have done separate.

#Only pack cylinder
pred=pack.inCylinder((0,-45,0),(0,40,0),radius=50)
sp=SpherePack()
sp=pack.randomDensePack(pred,radius=5,returnSpherePack=True, material='shperes')
sp.toSimulation()

#Only MakeCloud
sp=pack.SpherePack()
sp.makeCloud((-35,-45,-35),(35,50,35),rMean=2,rRelFuzz=.1,num=10000,periodic=False,porosity=0.9,distributeMass=False,seed=0)
sp.toSimulation()


There is one script example that i found which is joining the two command, but it's not working as well as i expect. how is it working the predicate?

from yade import pack
sp = pack.SpherePack()
maxCorner = (45,45,45)
sp.makeCloud(maxCorner=maxCorner,rMean=1.0,num=5000)
pred = pack.inCylinder((0,-45,0),(0,45,0),radius=50)
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


Hope to hear from guys some ideas to solve these problems.


Thanks,

Felipe



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