Random dense packing gives low density

Asked by Oskari Nihtilä

Hi, I just started to get familiar with Yade. I'm trying to generate a random dense packing in a box with dimensions 2x1x1. By using randomDensePack function I get a packing fraction of approximately 0,3 which is not very good.

My packing parameters are

pred=pack.inAlignedBox((0,0,0),(2,1,1))

spheres=pack.randomDensePack(pred, radius=0.1, cropLayers=0, rRelFuzz=0.0, spheresInCell=2000, memoizeDb=None, useOBB=False, memoDbg=False, color=None, returnSpherePack=True)

It gives me coordinates for 147 spheres which gives a packing fraction of 0,31. Is there something I should modify in the parameters?

Thanks,
Oskari

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

Hi Oskari,

In the periodic case, randomDensePack results in packing fraction approx.
0.62, which is pretty good (see [1]). I think in this case the boundary
effects are very strong. If you use spheresInCell parameter, first a
periodic sample is created and then cropped. For 20x10x10 box, I got 0.52.
The limit should be around 0.62

For **just postprocessing** reasons, you can add a box to see actual
considered box:
O.bodies.append(box((1,.5,.5),(1,.5,.5),wire=True))

For the spheresInCell case, you immediately see that near boundary there
are no spheres..

A solution should be not to use spheresInCell, but then I got very strange
results..
Depending on your simulation requests, a solution could be to use larger
predicate with the risk, that some particles will overlap outside the box.

cheers
Jan

[1] https://arxiv.org/pdf/cond-mat/0003416.pdf

Revision history for this message
Oskari Nihtilä (nihtile1) said :
#2

Hi Jan,

I'm using the generated packings in my own simulation script, so I need only the sphere coordinates. I would like to have different rectangular packings with different but uniform sphere sizes. But if the boundary effects are this strong I don't think I can use these packings.

I tried to increase the predicate to 2.1x1.1x1.1 but it didn't affect much on the packing fraction.

Cheers,
Oskari

Revision history for this message
Oskari Nihtilä (nihtile1) said :
#3

Hi Jan,

One more question. Is the basic principle of randomDensePack to generate as many spheres as possible in a larger volume (big enough to get desired packing fraction) than the predicate and then compress until the volume reaches the predicate?

Cheers,
Oskari

Revision history for this message
Jan Stránský (honzik) said :
#4

Hi Oskari,

I tried to increase the predicate to 2.1x1.1x1.1

yes, this is almost no difference from point of view of the boundaries

also see [1], this problem is not the new one, but evidently either
everybody uses

randomDensePack, periodic variant, works (a bit simplified):
- create a periodic packing with defined spheresInCell
- copy the packing in space such that predicate is entirely filled
- crop the spheres that are not in the predicate

I personally do not use the non-periodic case, so I can't answer the rest.

Alternatively you can create your own function to create the packing, e.g.:
##########################
import random
r = 0.1
N = 200
dim = (2,1,1)

for i in range(N):
  x = dim[0] * random.random()
  y = dim[1] * random.random()
  z = dim[2] * random.random()
  s = sphere((x,y,z),r)
  O.bodies.append(s)

walls = aabbWalls(((0,0,0),dim),thickness=2*r,wire=True)
O.bodies.append(walls)

O.engines = [
  ForceResetter(),
  InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
  InteractionLoop(
         [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
  NewtonIntegrator(damping=.6),
]
O.dt = PWaveTimeStep()

def check():
  intrs = [i for i in O.interactions]
  print 'maxOverlap', 0 if not intrs else max(i.geom.penetrationDepth for i
in intrs)
  print
'packingFraction',len(O.bodies)*4/3.*pi*pow(r,3)/(dim[0]*dim[1]*dim[2])
##########################
open a 3d view, let it run until it stabilizes (few seconds), chen in yade
terminal all "check()" function to see max overlap and packing fraction.
Change "N" value until you get what you want,

cheers
Jan

[1] https://bugs.launchpad.net/yade/+bug/1666838

Can you help with this problem?

Provide an answer of your own, or ask Oskari Nihtilä for more information if necessary.

To post a message you must log in.