problem on biaxial compression test using clumps

Asked by hhh_Chen

Dear All,
I have a problem in simulating biaxial compression test using clumps. I have blocked the degrees of freedom as 'zXY' after initial isotropic consolidation. However, during shearing, it can be found that some particles still rotate along Y axis from the graphical view and the volumetric strain curve is also not correct. I wonder the reason.

ubuntu : 18.04
yade 2018.02b

There are minimum of my codes:

Code 1: preparation of clumps

from yade import pack
import random

sp = pack.SpherePack()
size = .32
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.2,num=400,periodic=True,seed=1)
sp.toSimulation()

ori = 0. * pi
coef = pi + 0.315 * sqrt(1-0.315**2) - acos(0.315)
fout = file('clump_zero.lst','w')

for b in O.bodies:
   pos = b.state.pos
   radius = b.shape.radius
   line_oo = 0.63 * radius
   eq_rad = sqrt(2 * coef / pi) * radius
   #print eq_rad
   x1 = pos[0] - 0.5 * line_oo * cos(ori)
   x2 = pos[0] + 0.5 * line_oo * cos(ori)
   y1 = pos[1] - 0.5 * line_oo * sin(ori)
   y2 = pos[1] + 0.5 * line_oo * sin(ori)
   fout.write(str(x1)+' '+str(y1)+' '+str(x2)+' '+str(y2)+' '+str(radius)+' '+str(eq_rad)+'\n')

fout.close()

Code 2: consolidation and shearing

from yade import export,plot,pack

mat_id = O.materials.append(FrictMat(young=4.e8,poisson=.8,frictionAngle=0.05,density=2670))
mat = O.materials[mat_id]

fin = open('clump_zero.lst','r')
clumpDataBase = fin.readlines()
fin.close()

z = 0.05
clump_id = []
coef = pi + 0.315 * sqrt(1-0.315**2) - acos(0.315)
area = 0.0
for i in xrange(len(clumpDataBase)):
   x1 = float(clumpDataBase[i].split()[0])
   y1 = float(clumpDataBase[i].split()[1])
   x2 = float(clumpDataBase[i].split()[2])
   y2 = float(clumpDataBase[i].split()[3])
   radius = float(clumpDataBase[i].split()[4])
   eq_radius = float(clumpDataBase[i].split()[5])
   mass = 2670 * (2*z) * (pi * eq_radius**2)
   area += pi * eq_radius**2
   inertia = (pi / coef * 0.315**2 + pi / 2/ coef) * mass * radius**2
   cpos = [(x1+x2)/2.,(y1+y2)/2.,z]
   color = numpy.random.rand(3)
   ID = O.bodies.appendClumped([sphere([x1,y1,z],material=mat,radius=radius,color=color.tolist()), sphere([x2,y2,z],material=mat,radius=radius,color=color.tolist())])
   clump_id.append(ID[0])
   O.bodies[ID[0]].state.pos = cpos
   O.bodies[ID[0]].state.mass = mass
   O.bodies[ID[0]].state.inertia[2] = inertia
   O.bodies[ID[0]].state.blockedDOFs = 'zXYZ'

O.periodic = True
O.cell.setBox(0.35,0.35,z*2)
print len(clump_id)
t_crit = sqrt(2670 * (2*z) * (pi * 0.004**2) / (O.materials[0].young * 0.01578))
O.dt = .5 * t_crit
print O.dt

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

def postConsol():
   for b in O.bodies:
      b.state.blockedDOFs = 'zXY'
      b.state.vel = Vector3.Zero
      b.state.angVel = Vector3.Zero
      b.state.refPos = b.state.pos
      b.state.refOri = b.state.ori
   setContactFriction(0.5)
   O.cell.trsf = Matrix3.Identity
   O.cell.velGrad = Matrix3.Zero
   O.pause()
   biax.doneHook = 'shear()'

def shear():
   print 'Press start to shear..............\n'
   O.pause()
   biax.goal=(-1.e5, -2.e-1, 0)
   biax.stressMask=1
   biax.relStressTol=0.001
   biax.maxUnbalanced=0.05
   biax.maxStrainRate=(0.05, 0.05, 0.)
   biax.doneHook='term()'
   O.engines=O.engines+[PyRunner(command='saveAddData()',iterPeriod=200)]

def saveAddData():
   stress = biax.stress
   strain = biax.strain
   plot.addData(
      strain_x = strain[0],
      strain_y = strain[1],
      stress_x = stress[0],
      stress_y = stress[1]
   )

def term():
   plot.saveDataTxt('biax.txt',vars=('strain_x','strain_y','stress_x','stress_y'))
   O.pause()

O.run()

Why particle along Y axis rotate? How can I fix this problem?
Many thanks for your help.
Best regards, Lifan

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

Seeing in the script the diverse workflows to apply kinematic constraints, either:

 ID = O.bodies.appendClumped(...)
O.bodies[ID[0]].state.blockedDOFs = 'zXYZ'

Or:

for b in O.bodies:
    b.state.blockedDOFs = 'zXY'

makes me wonder whether your script always pays due attention to the documentation note at https://yade-dem.org/doc/user.html#imposing-conditions ?

Revision history for this message
hhh_Chen (chenlifan) said :
#2

Hi Jérôme,

Thanks for your reply, but I'm not sure what you mean. In my script, the consolidation process is dividied into 2 stages. In the first stage, the degrees of freedom in 'zXYZ' are blocked in order to ensure the direction of long axis for all particles is horizontal until the isotropic pressure reaches 90kPa. And in the senond stage, the blocked rotation along 'Z' is released till the pressure reaches 100kpa. I know that the blockedDOFs will only block forces (and acceleration) in selected directions and if the velocity is not zero when degrees of freedom are blocked via blockedDOFs assignements, the body will keep moving at the velocity it has at the time of blocking. Therefore, I set the linear and angular velocities as zero for all clumps before shearing. But in the shearing process, the clumps can still have angular velocity components along X and Y. Why did this happen?

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

Hello,

Setting angVel has no effect, because angMom is unchanged and used for computation [1]

Try to set angMom to (0,0,0), too.

Cheers
Jan

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/NewtonIntegrator.cpp#L339

Can you help with this problem?

Provide an answer of your own, or ask hhh_Chen for more information if necessary.

To post a message you must log in.