problem on gravity deposition in 2D by blockedDOFs

Asked by Man Yick on 2021-02-28

Dear All,
I have a problem in simulating spherical particles' gravity deposition in 2D. I use state.blockedDOFs="yXZ" to fix all the particles in y plane. But I found that
1) all the particels fall together (i.e. free falling and no particles collision),
2) the wall disappears (does not prevent particles go through),
3) no packing occurs.

I modified the tutorial example 02-gravity-deposition.py into my input file. It reads:

from yade import pack, plot

O.bodies.append(geom.facetBox((500,100,100),(500,100,100),wallMask=31))

sp=pack.SpherePack()
sp.makeCloud((0,100,0),(1000,100,200),rMean=15,rRelFuzz=.3)
sp.toSimulation()

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  # handle sphere+sphere and facet+sphere collisions
  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
 PyRunner(command='checkUnbalanced()',realPeriod=2),
 PyRunner(command='addPlotData()',iterPeriod=100)
]
O.dt=.05*PWaveTimeStep()

#Block the "flat" axis (Y), and only allow rotations around it.
for i in O.bodies:
        i.state.blockedDOFs="yXZ"

O.trackEnergy=True

def checkUnbalanced():
 if unbalancedForce()<.005:
  O.pause()
  plot.saveDataTxt('bbb.txt.bz2')

# collect history of data which will be plotted
def addPlotData():
 plot.addData(i=O.iter,unbalanced=unbalancedForce(),**O.energy)

plot.plots={'i':('unbalanced',None,O.energy.keys)}

plot.plot()

O.saveTmp()

Is there any problme in my input file ?
Many thanks for your help.
Best regards,
Man Yick

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Karol Brzezinski
Solved:
2021-03-01
Last query:
2021-03-01
Last reply:
2021-02-28
Best Karol Brzezinski (kbrzezinski) said : #1

Hi,

when the facet is created its all degrees of freedom are blocked. In your loop, you constrained the spheres, but also freed the facets. So they disappear in the first step. Change your example, like this:

for i in O.bodies:
        if isinstance(i.shape,Sphere): #modify only Spheres' DOFs
         i.state.blockedDOFs="yXZ"

After you run it, the rest should become clear.

Cheers,
Karol

Man Yick (manyick) said : #2

Thanks Karol Brzezinski, that solved my question.