Finding a way to pack two concentric cylinders of differing radii with spheres of differing radii

Asked by Kevin

I am fairly new to Yade in general so any help at all would be most appreciated!
I need to construct two concentric cylinders of differing radii with each having their own collision detection and having spheres of randomized radii (with a certain relFuzz) fill in the OUTER cylinder while the inner cylinder remains unoccupied. I also want to specify number of spheres (I think I can use the pack.Spherepack?) so I can partially fill the outer cylinder volume. How do I only fill the outer cylinder using the code below whilst randomly varying the spheres' radii? How do I update InteractionLoop to help with facet-sphere collision with two cylinders?

Here is a snapshot of code:

from yade import pack, qt, export

cylinder_outer=O.bodies.append(geom.facetCylinder(center=(0,0,125),radius=70,height=200,segmentsNumber=20,wallMask=7,closeGap=True))

cylinder_inner=O.bodies.append(geom.facetCylinder(center=(0,0,125),radius=30,height=200,segmentsNumber=20,wallMask=7,closeGap=True))

sp=pack.SpherePack()

#These are taken from another code so I commented them out for now...

#diameter=[3.600,3.640,3.680,3.720,3.760,3.800,3.840,3.880,3.920,3.960,4.000,4.040,4.080,4.120,4.160,4.200,4.240,4.280,4.320,
          #4.360,4.400,4.440,4.480,4.520,4.560,4.600,4.640,4.680,4.720,4.760,4.800,4.840,4.880,4.920,4.960,5.000,5.040,5.080,
          #5.120,5.160,5.200,5.240,5.280,5.320,5.360,5.400]

#cum=[0.001,0.002,0.003,0.005,0.007,0.010,0.014,0.019,0.027,0.036,0.048,0.063,0.081,0.103,0.129,0.159,0.193,0.232,0.274,
         #0.320,0.369,0.421,0.473,0.527,0.579,0.631,0.680,0.726,0.768,0.807,0.841,0.871,0.897,0.919,0.937,0.952,0.964,0.973,
         #0.981,0.986,0.990,0.993,0.995,0.997,0.998,1.000]

sp.makeCloud((-10,-10,155),(10,10,195),rMean=2.5,rRelFuzz=2,distributeMass=False)

sp.toSimulation()

yade.qt.Controller()
yade.qt.View()

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
        #HarmonicMotionEngine(A=[0,1.5,0],f=[0,0.3,0],ids=cylinder_inner),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.5),
 PyRunner(command='iterations()',realPeriod=2)
]
O.dt=.5*PWaveTimeStep()

#I commented out the Harmonic Motion Engine at the moment

def iterations():
   O.stopAtIter=80000
   export.text('pack.txt')

1. How do I enable spherical packing for the outer cylinder and still have two facet-sphere collisions on the interface between both the outer cylinder walls and the outside wall of the inner cylinder?
2. How do I randomly generate sp.MakeCloud to give me a randomized spherical radius with a specified number of spheres (say 200)?

Thank you so much for any input!

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

> I am fairly new to Yade

welcome :-)

> How do I only fill the outer cylinder using the code below whilst randomly varying the spheres' radii?
> How do I enable spherical packing for the outer cylinder
> How do I randomly generate sp.MakeCloud to give me a randomized spherical radius with a specified number of spheres (say 200)?

It depends on the requirements. If you are happy with "some" packing, it is possible to use simple makeCloud and "crop" it to the cylinder. But the number of spheres would be somehow random..
If you require specific number of particles, you will have to write your own function (but it does not sound too difficult :-)

> How do I update InteractionLoop to help with facet-sphere collision with two cylinders?
> still have two facet-sphere collisions on the interface between both the outer cylinder walls and the outside wall of the inner cylinder?

Looking at the script, it should work (do you have other experience?)

Please read [1] and next time open a new question for a different topic.

cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Can you help with this problem?

Provide an answer of your own, or ask Kevin for more information if necessary.

To post a message you must log in.