Packing Cylinder with MakeCloud

Asked by Felipe

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

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
mohsen
Solved:
Last query:
Last reply:
Revision history for this message
Best mohsen (agha-mohsena) said :
#1

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

Revision history for this message
Felipe (felipetthadeu) said :
#2

Hello Mohsen,

Sorry for delaying the answer. Regarding your comment, i am using different coordinates because depends what strategic is using to create the pack. I mean, when it is trying to create by pack cylinder where have to define either down and top center of cylinder, including the radii. By the way, when it is trying to create by make cloud that has to define the limits like a volume parallelepiped.

In fact, i was creating by pack cylinder but it seems like there is stress/overlap local even i didn't apply any force before. That's why i try to find another method to do it without starting with tensioned/overlap.

it's really important the numbers of particles because i am wondering if the best simulation will be creating either more less 10000, 20000 or 50000 particles. is it possible to do it by using method 3?

Revision history for this message
mohsen (agha-mohsena) said :
#3

Hi Felipe

>In fact, i was creating by pack cylinder but it seems like there is stress/overlap local even i didn't apply any force before. >That's why i try to find another method to do it without starting with tensioned/overlap.
 As I wrote, In randomDensePack always there would be initial overlap. Hence what you had found was correct.
In some cases you can decrease intRadius, then no initial force will exist.

>it's really important the numbers of particles because i am wondering if the best simulation will be creating either more >less 10000, 20000 or 50000 particles. is it possible to do it by using method 3?

It depends on your simulation. You can find a useful conversation in where we talked about what are the essential parameters for calibrating a sample and obtaining the same results with different geometry. According to a review by [2] on YADE literature, the 10000 was suggested.

Regards
Mohsen

[1]https://answers.launchpad.net/yade/+question/403385
[2] Wang X L, Li J C. Simulation of triaxial response of granular materials by modified DEM. Sci China-Phys Mech Astron, 2014, 57: 22972308, doi: 10.1007/s11433-014-5605-z

Revision history for this message
Felipe (felipetthadeu) said :
#4

Thanks mohsen, that solved my question.