← Back to team overview

yade-users team mailing list archive

Re: [Question #403360]: Packing Cylinder with MakeCloud

 

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

    Status: Open => Answered

mohsen proposed the following answer:
In the name of God
Hi Felip

It seems that you did not use the same coordinates when generating your
packing; Can you explain why? It is clear that the generated packings
should not be the same. If it is the case for you to create the same
cylinders from method one and two then I think this may be work:

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


#method 3
from yade import pack
sp = pack.SpherePack()
minCorner = (-50,-45,-50)
maxCorner = (50,45,50)
sp.makeCloud(maxCorner=maxCorner,rMean=5.0,num=5000)
pred = pack.inCylinder((0,-45,0),(0,45,0),radius=50,sphereseInCell=3000)
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

As you may know, when using 'randomDensePack', the generated spheres
have a small initial overlap. This means that the number of particles in
method 1 is larger than method 3. Is it important for you?

>Also, is it possible to include spheres material?
The simplest way is to define desired material before generating spheres or in more precisely before adding them to simulation.

For more information about sphereInCell please check[1]:


Regards

[1]:https://answers.launchpad.net/yade/+question/159764

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