problem with periodic-triax.py

Asked by liucheng83

Hi, all
I have some change with the script periodic-triax.py. I have three problem with the changed script shown as follow:
Q1: At first, I create "dense" packing by setting friction to zero initially, "O.materials[0].frictionAngle=2", after consolidation finished, εz will go from 0 to .2 while σx and σy will be kept the same, and I have set O.materials[0].frictionAngle=radians(25), but I do not see that for the dense specimen the deviatotic stress increases to reach a pick and then decreases ( softening regime), why? "https://github.com/yade/trunk/blob/master/examples/triax-tutorial/session2-stress-probing.pdf"
Q2: In "InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),", How to determine the verletDist?
Q3: If I set O.cell.hSize=Matrix3(1, 0, 0, 0 ,1, 0, 0, 0,1), the consolidation will not be finished, why?

-------my changed script for periodic-triax.py
# coding: utf-8
# 2009 © Václav Šmilauer <email address hidden>
#"Test and demonstrate use of PeriTriaxController."
from yade import *
from yade import pack,qt,plot
O.periodic=True

hSize=0.1
O.cell.hSize=Matrix3(hSize, 0, 0,
       0 ,hSize, 0,
      0, 0, hSize)
young=5e6
poisson=0.5
compFricDegree = 2
O.materials.append(FrictMat(young=5e6,poisson=0.5,frictionAngle=radians(compFricDegree),density=2600,label='spheres'))
sp=pack.SpherePack()
radius=5e-3
rRelFuzz=0
num=sp.makeCloud(Vector3().Zero,O.cell.refSize,rMean=radius,rRelFuzz=rRelFuzz,num=500,periodic=True,porosity=0.50)
#min,max,radius,rRelFuzz,spheresInCell,periodic
O.bodies.append([utils.sphere(s[0],s[1]) for s in sp])

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()],verletDist=.05*radius),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys()],
  [Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 #PeriTriaxController(maxUnbalanced=0.01,relStressTol=0.02,goal=[-1.0e4,-1.0e4,0],stressMask=3,globUpdate=5,maxStrainRate=[1.,1.,1.],doneHook='triaxDone()',label='triax'),
 #using cell inertia
 PeriTriaxController(dynCell=True,mass=0.2,maxUnbalanced=0.01,relStressTol=0.001,goal=(-1.0e4,-1.0e4,-1.0e4),stressMask=7,globUpdate=5,maxStrainRate=(1.,1.,1.),doneHook='triaxDone()',label='triax'),
 NewtonIntegrator(damping=.2),

]
O.dt=0.5*utils.PWaveTimeStep()

def addPlotData():
 plot.addData(unbalanced=utils.unbalancedForce(),i=O.iter,
  sxx=-triax.stress[0],syy=-triax.stress[1],szz=-triax.stress[2],
  sd=-triax.stress[2]+0.5*(triax.stress[0]+triax.stress[1]),
  exx=-triax.strain[0],eyy=-triax.strain[1],ezz=-triax.strain[2],
  ev=-1*(triax.strain[0]+triax.strain[1]+triax.strain[2]),
  # save all available energy data
  Etot=O.energy.total(),**O.energy
 )

# enable energy tracking in the code
O.trackEnergy=True

# define another plot
plot.plots={'i':('exx','eyy','ezz',None,'sxx','syy','szz'),
     ' i':('ezz'),
     'ezz':('ev',),
     ' ezz':('sd')
}

# show the plot
plot.plot()

#O.run();
qt.View()

phase=0
def triaxDone():
 global phase
 if phase==0:
  print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff
  print 'Now εz will go from 0 to .2 while σx and σy will be kept the same.'
  O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=100)]
  #make the current size as the initial size to calculate strain
  O.cell.trsf=Matrix3.Identity
  triax.goal=(-1.0e4,-1.0e4,-0.2)
  triax.stressMask=3
         # allow faster deformation along x,y to better maintain stresses
         triax.maxStrainRate=(1000.,1000.,.1)
         O.materials[0].frictionAngle=radians(25)
  phase+=1
 elif phase==1:
  print 'Here we are: stress',triax.stress,'strain',triax.strain,'stiffness',triax.stiff
  print 'Done, pausing now.'
  O.pause()

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
Best Bruno Chareyre (bruno-chareyre) said :
#1

Q1.
Check this: https://answers.launchpad.net/yade/+question/197661

Q2.
First off all, did you check the documentation?
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.InsertionSortCollider
If you mean how to determine the optimal value, I would recommend some experiments, although you won't get much better than the default -0.5.

Q3.
I don't know. I should check in details what is wrong (stress doesn't increase? why is the simulation stopping? etc)

Revision history for this message
liucheng83 (lcheng83) said :
#2

Thanks Chareyre, that solved my question.