randomDensePack explodes because of penetrationDepth

Asked by Tina Asia

Hi,

I have created a spherical packing using randomDensePack without giving spheresInCell, but when I using this packing in my simulation, this packing explodes.

I add i.phys.unp=i.geom.penetrationDepth, but this method also failed. Here is my code:

from yade import pack
from yade import qt,utils

stone=CohFrictMat(young=5.0e10,poisson=0.25,density=2640,frictionAngle=radians(18),isCohesive=True,normalCohesion=4.5e6,shearCohesion=4.5e7,momentRotationLaw=True)
O.materials.append(stone)
steel=CohFrictMat(young=3.06e11,poisson=0.29,density=7861,frictionAngle=0.545,normalCohesion=0,shearCohesion=0)
O.materials.append(steel)

pred=pack.inSphere((0,0,0.5),0.25)
#sphs=pack.regularHexa(pred,radius=0.01,gap=0,material=stone)
sphs=pack.randomDensePack(pred,radius=0.025,rRelFuzz=0,material=stone)
O.bodies.append(sphs)

for i in sphs:
 #global velocity
 velocity=i.state.vel=(0,0,-25)

O.bodies.append(geom.facetBox((0,0,0.2),(0.3,0.3,0.003),material=steel))

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5),Bo1_Facet_Aabb()]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.5),Ig2_Facet_Sphere_ScGeom6D()],
        [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True)],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
        ),
    VTKRecorder(fileName='post/0deg-',recorders=['all'],iterPeriod=50),
    GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
    NewtonIntegrator(damping=0.3,gravity=(0,0,-9.81)),

]

O.trackEnergy=True

O.dt=utils.PWaveTimeStep()
O.usesTimeStepper=True

qt.Controller()
qt.View()

O.run(1,True)
for i in O.interactions:
          i.phys.unp=i.geom.penetrationDepth

BTW: when i using regularHexa packing, there is no error.
Thanks in advances.

Tina

Question information

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

Hi Tina,

see [1], Jerome's answer #4. The problem is that after InteractionLoop, the particles are moved by NewtonIntegrator, so i.geom.penetrationDepth is the old value and setting it as i.phys.unp is nto enough.

One option is setting O.dt=0 for the first step (don't know how it works with GlobalStiffnessTimeStepper, probably should be deactivated for the first step?)

O.dt = 0
for i in O.interactions:
  i.phys.unp = i.geom.penetrationDepth
O.dt = ...

then I had no explosion

cheers
Jan

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

sorry, the reference for previous post :-)

[1] https://answers.launchpad.net/yade/+question/266828

Revision history for this message
Tina Asia (tinaatyade) said :
#3

Hi Jan,

Thanks for your help, but I still got a explosion. Here is my script:

from yade import pack
from yade import qt,utils

stone=CohFrictMat(young=5.0e10,poisson=0.25,density=2640,frictionAngle=radians(18),isCohesive=True,normalCohesion=4.5e6,shearCohesion=4.5e7,momentRotationLaw=True)
O.materials.append(stone)
steel=CohFrictMat(young=3.06e11,poisson=0.29,density=7861,frictionAngle=0.545,normalCohesion=0,shearCohesion=0)
O.materials.append(steel)

pred=pack.inSphere((0,0,0.5),0.25)
#sphs=pack.regularHexa(pred,radius=0.01,gap=0,material=stone)
sphs=pack.randomDensePack(pred,radius=0.025,rRelFuzz=0,material=stone)
O.bodies.append(sphs)

for i in sphs:
    velocity=i.state.vel=(0,0,-25)

O.bodies.append(geom.facetBox((0,0,0.2),(0.3,0.3,0.003),material=steel))

O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=1.5),Bo1_Facet_Aabb()]),
    InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.5),Ig2_Facet_Sphere_ScGeom6D()],
        [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True)],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
        ),
    #VTKRecorder(fileName='post/0deg-',recorders=['all'],iterPeriod=50),
    #GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=5,timestepSafetyCoefficient=0.8,defaultDt=PWaveTimeStep()),
    NewtonIntegrator(damping=0.3,gravity=(0,0,-9.81)),

]

O.dt = 0
for i in O.interactions:
    i.phys.unp = i.geom.penetrationDepth
O.dt=0.3e-7

qt.Controller()
qt.View()

Recently, I have tried many methods:
As it was posted in https://answers.launchpad.net/yade/+question/266828, I added this code segment into my script, but also failed:

O.bodies.dynamic=False
O.step()
for j in O.interactions:
    j.phys.unp = j.geom.penetrationDepth
O.bodies.dynamic=True
O.dt=0.3e-7

I guess the explosion was a consequence of the repulsive force was greater than the bonded strength between contacting particles.

Thanks for your patience!

Tina @ Yade

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

Hi Tina,
you need O.step() before setting unp:

###################
O.dt = 0
O.step() # here
for i in O.interactions:
    i.phys.unp = i.geom.penetrationDepth
O.dt=0.3e-7
###################

cheers
Jan

Revision history for this message
Tina Asia (tinaatyade) said :
#5

Thanks Jan,

Sorry for my carelessness!

Thanks for your patience!

Tina

Revision history for this message
Tina Asia (tinaatyade) said :
#6

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