← Back to team overview

yade-users team mailing list archive

Re: [Question #473518]: Random dense packing gives low density

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
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

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