some interactions (sphere-box(width=Period width) are not detected

Asked by Xin Li

Hi everyone,
I am modelling a sand_pipe interaction problem, and I put my sample in a rigid container with periodic boundaries on the front and the back side. The problem is that some particles will cross rigid boundaries (not real rigid, fixed boxes are used), while the interaction between spheres and pipe (cylinderConnection) is fine. Same issue I find from the Bruno's example 'PeriodicSandPile.py' (https://gitlab.com/yade-dev/trunk/blob/master/examples/PeriodicBoundaries/periodicSandPile.py). Besides, I have not observed particles crossing the rigid boundary when the width of box is smaller than width of the periodic cell and no such issue occurs if the scene is not periodic. In my example, allowBiggerThanPeriod=True; boxes , cylinder and periodic cell have the same dimensions in the cylinder diameter direction. Can anyone give me some ideas about how to fix this issue?

related old questions: https://answers.launchpad.net/yade/+question/246392
related bugs: https://bugs.launchpad.net/yade/+bug/1112763
yade version: yade 20220218-6333~d331682~focal1
system: Ubuntu 20.04.3 LTS

 My simplified example as below:
# encoding: utf-8

from yade import pack, qt
from yade import polyhedra_utils
from yade.gridpfacet import *

E=1e8
v=0.3
angle=30
beta=0.5
eta=0.5
rho=2650

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),Bo1_GridConnection_Aabb()],allowBiggerThanPeriod=True),
   InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),
         Ig2_GridNode_GridNode_GridNodeGeom6D(),
         Ig2_Sphere_GridConnection_ScGridCoGeom(),
         Ig2_GridConnection_GridConnection_GridCoGridCoGeom()
        ],
  [Ip2_FrictMat_FrictMat_FrictPhys(),
         Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True, setCohesionOnNewContacts=False)],
  [Law2_ScGridCoGeom_CohFrictPhys_CundallStrack(),
         Law2_GridCoGridCoGeom_FrictPhys_CundallStrack(),
         #Law2_ScGeom_FrictPhys_CundallStrack(),
         Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
     always_use_moment_law=True,
     useIncrementalForm=True
  )],
   ),
   GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.2),
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.2),
]

spMat = O.materials.append(CohFrictMat(young=E,poisson=v,frictionAngle=radians(angle),density=rho,isCohesive=False,alphaKr=beta,alphaKtw=beta,momentRotationLaw=True,etaRoll=eta,etaTwist=eta))
wallMat = O.materials.append(CohFrictMat(young=E,poisson=v,frictionAngle=radians(0),density=rho,isCohesive=False,alphaKr=0,alphaKtw=0,momentRotationLaw=False,etaRoll=0,etaTwist=0))
extcylMat = O.materials.append(CohFrictMat(young=E,poisson=v,frictionAngle=radians(0),density=rho,isCohesive=False,alphaKr=beta,alphaKtw=beta,momentRotationLaw=True,etaRoll=eta,etaTwist=eta))
intcylMat = O.materials.append(CohFrictMat(young=E,poisson=v,frictionAngle=radians(0),density=rho,normalCohesion=-1,shearCohesion=-1,momentRotationLaw=True))

O.periodic = True
x=0.01
y=0.02
z=0.02
O.cell.setBox(x,y*3,z*3)

sp=pack.SpherePack()
mn,mx=Vector3(0,y,z+0.006),Vector3(x,y*2,z*2)
sp.makeCloud(mn,mx,rMean=.001,rRelFuzz=0,seed=1)
sphereIds=sp.toSimulation(material=spMat)
print(len(sp))

left_wall=O.bodies.append(utils.box((x/2,y,z*1.5),(x/2,0,z/2),wire=True,fixed=True,color=[1,0,0],material=wallMat))
right_wall=O.bodies.append(utils.box((x/2,y*2,z*1.5),(x/2,0,z/2),wire=True,fixed=True,color=[1,0,0],material=wallMat))
bottom_wall=O.bodies.append(utils.box((x/2,y*1.5,z),(x/2,y/2,0),wire=True,fixed=True,color=[1,0,0],material=wallMat))
#front_wall=O.bodies.append(utils.box((x,y*1.5,z*1.5),(0,y/2,z/2),wire=True,fixed=True,color=[1,0,0],material=wallMat))
#behind_wall=O.bodies.append(utils.box((0,y*1.5,z*1.5),(0,y/2,z/2),wire=True,fixed=True,color=[1,0,0],material=wallMat))

D=0.005
nodesIds=[]
cylIds=[]
vertices=[]
vertices.append([0,y*1.5,z+0.6*D])
vertices.append([x/5,y*1.5,z+0.6*D])
vertices.append([x*2/5,y*1.5,z+0.6*D])
vertices.append([x*3/5,y*1.5,z+0.6*D])
vertices.append([x*4/5,y*1.5,z+0.6*D])
vertices.append([x,y*1.5,z+0.6*D])
cylinderConnection(vertices,radius=0.5*D,fixed = True,nodesIds=nodesIds, cylIds=cylIds, intMaterial=intcylMat, extMaterial=extcylMat)

qt.View()

O.saveTmp()

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
Xin Li (portal3) said :
#2

Hi Bret,
Thank you for your reply. I am sorry I didn't understand the meaning of the intersection of rectangle and circle you said. Maybe I should describe my problem a little bit more clearly. I find several particles go through the box in the periodic cell when the size of box on one direction is exactly the same (or bigger or slightly smaller, I don't know the effect of specific range of body size) as the periodic cell. I find my issue is similar to an issue (https://answers.launchpad.net/yade/+question/246392) and I am trying to fix this without changing the source code.

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

Hello,
Bret is a bot (?) spammer, do not take his messages seriously.
Cheers
Jan

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

Hello,

> I have not observed particles crossing the rigid boundary when the width of box is smaller than width of the periodic cell

so one straight approach is to split the large wall into smaller walls :-)

If you want to use larger wall, investigate position of the wall and position of crossing particles.
If I remember correctly, the large bodies are not "periodically copied", so the spheres from "next" cells do not interact with the wall.
One solution is to copy the wall to the surrounding cells manually.

Cheers
Jan

Revision history for this message
Xin Li (portal3) said (last edit ):
#5

Hi Jan,

Thank you very much for your answer! Manual copies of the solid boundary worked in my MWE! I added the same size box and cylinder in the near cell and no particles cross the wall and cylinder. Still one question, I used larger sized wall and cylinder (much larger than periodic cell ) before, but this issue still occurs. I am a little confused about the difference between extending the large bodies and copying them manually in the surrounding cells' position.

Regards,
Xin

Revision history for this message
Xin Li (portal3) said :
#6

Hi Jan,

I tried again with more particles using copying the boundary manually. There are still several particles cross the boundary ( but much less than not operating like this). And these particles have not crossed the periodic boundary before crossing the wall.
Thanks again for your idea.

Regards,
Xin

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

> There are still several particles cross the boundary ( but much less than not operating like this). And these particles have not crossed the periodic boundary before crossing the wall.

It can be that the wall stiffness has too little value ant the particles are simply pushed through.
You can investigate the particles and if there are/were contact with wall or not.

> I am a little confused about the difference between extending the large bodies and copying them manually in the surrounding cells' position.

this probably should be answered by somebody (Bruno?) knowing the code and philosophy of the collider.

Cheers
Jan

Revision history for this message
Xin Li (portal3) said :
#8

Hi Jan,
>It can be that the wall stiffness has too little value ant the particles are simply pushed through. You can investigate the particles and if there are/were contact with wall or not.
No interactions detected between the extruded particles and the wall
Maybe I should back to the source code 'InsertionSortCollider.cpp'.
Thank you!

Regards,
Xin

Revision history for this message
Xin Li (portal3) said :
#9

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