Errors during step-by-step particle deletion of consolidated specimen

Asked by Zheng

Hi all,

I am simulating the step-by-step fine particle deletion process of a consolidated gap-graded specimen in 2D case. The confining pressure is maintained constant during the deletion process. The initial fine content by mass is FC = 25%, and the 1% of fine particles are randomly deleted at each loop. After 25 loops, all fine particles should be deleted as expected.

At the first several loop of my case, fine particles can be deleted correctly. However, the simulation suspend after fine loss = 8% though there still many fines in the specimen. It seems that the confining pressure cannot be re-achieved after several particle deletions? Attached please see a simple case to reproduce the ERROR. Could you please help to see where is the problem.

Many thanks and best regards,
Zheng

#### Code below ####

from yade import pack,plot,export
import matplotlib.pyplot as plt
import numpy as np
import random

O.materials.append(FrictMat(young=6.e8,poisson=.8,frictionAngle=.0))

sigmaIso=-1e5
sp = pack.SpherePack()
size = 0.24
# 25% fines in 2d case.
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),psdSizes=[0.001,0.0012,0.005,0.006], psdCumm=[0,0.0625,0.0625,1.0],periodic=True,seed=1,distributeMass=True,num=1500)

maxFine = 0.0012 # maximum diameter of fine particles
sp.toSimulation()
O.cell.hSize = Matrix3(size,0,0, 0,size,0, 0,0,.1) # used for periodic boundaries.
massAll = 0
massEroded = 0

for p in O.bodies:
   p.state.blockedDOFs = 'zXY'
   p.state.mass = 2650 * 0.1 * pi * p.shape.radius**2 # 0.1 = thickness
   inertia = 0.5 * p.state.mass * p.shape.radius**2
   p.state.inertia = (.5*inertia,.5*inertia,inertia)
   massAll += p.state.mass # mass of all particles

O.dt = utils.PWaveTimeStep()

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

delperc = range(1,25,1)
delperc = [x/100 for x in delperc]
n = 0
def delFine():
   global delperc,n,massEroded
   #global n
   #global massEroded
   if n < len(delperc):
      print('Current stress before deletion, ',getStress())
      setContactFriction(0.5)
      bodyRadius=[]
      for b in O.bodies:
        if b.shape.radius<=maxFine/2:
         bodyRadius.append([b.id,b.shape.radius,b.state.mass])
      bodyRadius.sort(key=lambda x:x[1])
      i = 0
      for b in bodyRadius:
        if massEroded <= delperc[n]*massAll:
           global massEroded
           massEroded += b[2]
           O.bodies.erase(b[0])
           i+=1
        else:
           break
      print('The amount of fines loss by number, ',i)
      print('Current stress after deletion = ',getStress())
      # when the simulation finish?
      if i == 0:
        print(delperc[n]*100,'% fines loss!')
        O.save(str(int(delperc[n]*100))+'.yade.gz')
        n += 1
   if n == len(delperc):
      biax.doneHook='Finished()'

def Finished():
   print('Test Finished')
   O.pause()

O.run()
O.wait()

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
Last query:
Last reply:
Revision history for this message
Karol Brzezinski (kbrzezinski) said :
#1

Hi Zheng,

what is your version of Yade and the system? What does the error say? I only had an error related to the declaration of "massEroded". It should be declared before the first assignment, and only once in the function (you have two declarations if delFine() function). After fixing this, the simulation works without errors. But there is still something wrong - probably with the end condition (simulation speed goes down to zero iterations per second, but doesn't pause).

Best wishes,
Karol

Revision history for this message
Zheng (zhengdem) said (last edit ):
#2

Hi Karol,

Thanks for your kind reply. My Yade version is Yade 20200613-3983~91b2a7a~xenial1, and the system is Ubuntu 16.04 LTS.

Yes as you mentioned, what disturbed me is why the simulation speed goes down to zero without any error information. It stopped at:

"8.0 % fines loss!
Current stress before deletion, Matrix3(-99946.60764593209,10074.2958308337,0, 10029.02119989909,-100044.9913662341,0, 0,0,0)
The amount of fines loss by number, 56
Current stress after deletion = Matrix3(-96483.58712874983,9117.338292722712,0, 9256.196881197535,-95272.93317511432,0, 0,0,0)"

From the output packing, there still exists some fine particles and the simulation should maintaining running until all fine particles are deleted. So strange.

Another strange question also arise. The simulation process seems very sensitive to particle number, if I change the particle number from 1500 to 1600, the simulation speed will go down to zero much earlier...

Best,
Zheng

Revision history for this message
Best Bruno Chareyre (bruno-chareyre) said :
#3

Hi,
I ran your script and I didn't see a problem on yade side (20211216-6185~d81270c~focal1 here).
The timestep is stable.
It runs until a dense state is reached then it stops. It seems to be the behaviour of your algorithm.
Cheers
Bruno

Revision history for this message
Zheng (zhengdem) said :
#4

Thanks Bruno Chareyre, that solved my question.