Spheres don't move in periodicsandpile example if using wall

Asked by Yuxuan Wen on 2020-07-27

Hello,

I have run the periodicSandPile.py example in https://gitlab.com/yade-dev/trunk/-/blob/master/examples/PeriodicBoundaries/periodicSandPile.py, which uses the box instead of wall or facet to be the plate containing the spheres. I am curious about why Bruno choosing box instead of wall or facet, so I try to using the wall to see if it can also work. However, after commenting the O.bodies.append(box) and adding O.bodies.append(wall), and changing Bo1_Box_Aabb() and Ig2_Box_Sphere_ScGeom() to Bo1_Wall_Aabb() and Ig2_Wall_Sphere_ScGeom(), the spheres will not move when running the code. Would you please tell me the reason? Thank you!

The code after changing box to wall is shown as follows:
#------------------------------------------------------------------------------------
from __future__ import print_function

from yade import pack
from pylab import rand
from yade import qt

O.periodic=True
length=0.4
height=0.6
width=0.2
thickness=0.01

O.cell.hSize=Matrix3(length, 0, 0,
   0 ,3.*height, 0,
   0, 0, width)

O.materials.append(FrictMat(density=1,young=1e5,poisson=0.3,frictionAngle=radians(30),label='boxMat'))
#lowBox = box( center=(length/2.0,height-thickness/2.0,width/2.0), extents=(length*1000.0,thickness/2.0,width*1000.0) ,fixed=True,wire=False)
#O.bodies.append(lowBox)

wallid=O.bodies.append(utils.wall(position=(length/2.0,height-thickness/2.0,width/2.0),axis=1))
O.bodies[wallid].state.blockedDOFs='xzXYZ'
O.bodies[wallid].state.mass=1

radius=0.01
O.materials.append(FrictMat(density=1000,young=1e4,poisson=0.3,frictionAngle=radians(30),label='sphereMat'))
sp=pack.SpherePack()
sp.makeCloud((0.*length,height+1.2*radius,0.25*width),(0.5*length,2*height-1.2*radius,0.75*width),-1,.2,2000,periodic=True)
O.bodies.append([sphere(s[0],s[1],color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand())) for s in sp])

O.dt=0.2*PWaveTimeStep()
O.usesTimeStepper=True
newton=NewtonIntegrator(damping=0.6,gravity=(0,-10,0))

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()],allowBiggerThanPeriod=True),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 GlobalStiffnessTimeStepper(timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8,defaultDt=O.dt),
 newton
]

Gl1_Sphere.stripes=1

from yade import qt
qt.View()
print('Press PLAY button')

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
2020-11-20
Last query:
2020-11-20
Last reply:
2020-08-10
Best Jan Stránský (honzik) said : #1

Hello,

the reason of particles not moving is that after the first iteration, the simulation freezes. You can try:
O.step() # OK, now O.iter = 1
O.step() # freezes...

What is the reason of freezing I have no idea..

cheers
Jan

Yuxuan Wen (wenyuxuan) said : #2

Thanks Jan Stránský, that solved my question.