Possible reasons for bond not being connected in the method of CohFrictMat

Asked by Jingchi Yu

Dear all,

I tried to use I tried to use mat to simulate the connection behavior of 400 particles, but when running I found that the calculation could not reach the goal and finished (I believe there was an error), and the particles bounced off each other at the beginning of the run instead of coming together quickly (I believe the bond was not successfully connected). Attached is my code. What are the possible reasons for this, please?

code:
O.materials.append(CohFrictMat(young=6e8,poisson=.8,density=2650,isCohesive=True,frictionAngle=26.565,normalCohesion=1e5,shearCohesion=1e5))#density=2e3

sp = pack.SpherePack()
size = .24
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.4,num=400,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)
print(len(O.bodies))
for p in O.bodies:
   p.state.blockedDOFs = 'zXY'
   p.state.mass = 2650 * 0.1 * pi * p.shape.radius**2 # 0.1 = thickness of cylindrical particle
   inertia = 0.5 * p.state.mass * p.shape.radius**2
   p.state.inertia = (.5*inertia,.5*inertia,inertia)

O.dt = utils.PWaveTimeStep()
print(O.dt)

O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom6D()],
      [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
      [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
   ),
   PeriTriaxController(
      dynCell=True,
      goal=(-1.e5,-1.e5,0),
      stressMask=3,
      relStressTol=.001,
      maxUnbalanced=.001,
      maxStrainRate=(.5,.5,.0),
      doneHook='term()',
      label='biax'
   ),
   NewtonIntegrator(damping=.1)

]

Thank you all,
YU

Question information

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

Hello,

please read [1] and provide more information (namely Yade version).

> simulate the connection behavior

what is "the connection behavior"?

> the calculation could not reach the goal and finished

please be more specific.
How you know it did not reach the goal?
How and why it finished (what actually is "finished"?)

> I believe there was an error

please make evidence, not beliefs

> I believe the bond was not successfully connected

again, please make evidence, not beliefs

> and the particles bounced off each other at the beginning of the run instead of coming together quickly

I have tried your code with no problem and cannot reproduce this issue.
The particles comes quickly together, as requested, and the simulation finished in a few seconds. (raising NameError: name 'term' is not defined as doneHook)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Jingchi Yu (yujc-17) said :
#2

Hello, Jan

Sorry for that. Let me answer a few questions you have asked:

> simulate the connection behavior

I'm just expressing the hope that bond connections can be made between particles, not just frictional relationships

> the calculation could not reach the goal and finished

The calculations were performed many times, each time running for ten or even a couple of minutes without stopping.

> I believe there was an error

Sorry for the unclear representation.

> I believe the bond was not successfully connected

Sorry for the unclear representation, again.

> and the particles bounced off each other at the beginning of the run instead of coming together quickly
I'm not sure why there is a difference between our two calculations, but that's really the problem I'm having. I am attaching the full code for your review.

"
O.materials.append(CohFrictMat(young=6e8,poisson=.8,density=2650,isCohesive=True,frictionAngle=26.565,normalCohesion=1e5,shearCohesion=1e5))#density=2e3

sp = pack.SpherePack()
size = .24
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.4,num=400,periodic=True,seed=1)
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1)
print(len(O.bodies))
for p in O.bodies:
   p.state.blockedDOFs = 'zXY'
   p.state.mass = 2650 * 0.1 * pi * p.shape.radius**2 # 0.1 = thickness of cylindrical particle
   inertia = 0.5 * p.state.mass * p.shape.radius**2
   p.state.inertia = (.5*inertia,.5*inertia,inertia)

O.dt = utils.PWaveTimeStep()
print(O.dt)

O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom6D()],
      [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
      [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
   ),
   PeriTriaxController(
      dynCell=True,
      goal=(-1.e5,-1.e5,0),
      stressMask=3,
      relStressTol=.001,
      maxUnbalanced=.001,
      maxStrainRate=(.5,.5,.0),
      doneHook='term()',
      label='biax'
   ),
   NewtonIntegrator(damping=.1)

]
 #globals().update(locals())

def term():
   O.engines = O.engines[:3]+O.engines[4:]
   print(getStress())
   print(O.cell.hSize)
   setContactFriction(0.5)
   O.cell.trsf=Matrix3.Identity
   O.cell.velGrad=Matrix3.Zero
   for p in O.bodies:
      p.state.vel = Vector3.Zero
      p.state.angVel = Vector3.Zero
      p.state.refPos = p.state.pos
      p.state.refOri = p.state.ori

   O.save('1DP-yuan.yade.gz')
   O.pause()

O.run();O.wait()

"

Thank you very much
YU

Revision history for this message
Jingchi Yu (yujc-17) said :
#3
Revision history for this message
Jingchi Yu (yujc-17) said :
#4

Hello Jan,
I found out where my mistake was, I used "O.run();O.wait()" incorrectly, and I'm really sorry to bother you!

Thank you very much
YU