confused by UniaxialStrainer's parameters and uniaxial compression test

Asked by Ziyu Wang

Dear all,
As a beginner of Yade,I want to start with the uniaxial compression test.I refer to the code of many people on the forum.
When I run the following code, no matter how to modify the parameters of UniaxialStrainer(), I can't get the ideal stress-strain curve.The problems are as follows:
1.When the following code is run, the strain increases and the stress remains constant after an instantaneous increase.
2.When I changed the parameter asymmetry of uniaxialstrain() to 1, the cylinder was scattered from below, which puzzled me.
3.In the above process, I am also puzzled by the positive and negative values of stress and strain.In my understanding, when strainrate is set to a negative value, the stress and strain are both compressive, then both are negative. But the actual situation doesn't seem to be like this. I don't know if I understand it right.
Can anyone help me? Thanks!!

#######code####
from yade import pack,qt,plot
sphere_radius=2e-3
normalCohesion=1e9
shearCohesion=1e9
RollingStiffness=1

material_1=O.materials.append(CohFrictMat(young=23e9,poisson=0.4,frictionAngle=atan(0.5),density=2036,normalCohesion=normalCohesion,shearCohesion=shearCohesion,fragile=True))
sp=pack.randomDensePack(pack.inCylinder((0,0,-0.05),(0,0,0.05),0.025),radius=sphere_radius,rRelFuzz=0.02,returnSpherePack=True,spheresInCell=2000)
sp.toSimulation(material=material_1)

for b in O.bodies:
 b.shape.color=(0,1,0)

factor=1.5
damping=0.4
strainRate_Tension=-0.005

renderer=qt.Renderer()
renderer.dispScale=(10,10,10)

bb=uniaxialTestFeatures()
negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=factor,label='bo1s'),],verletDist=0.05*sphere_radius),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=factor,label='ig2ss')],
  [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=False)],
  [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=False)],
  ),
 NewtonIntegrator(damping=damping,label='damper'),
 PyRunner(iterPeriod=1,command='addPlotData()'),
 PyRunner(iterPeriod=4,command='stopIfDamaged()',label='damageChecker'),
]

O.dt=0
O.step()
bo1s.aabbEnlargeFactor=1
ig2ss.interactionDetectionFactor=1
O.dt=0.8*PWaveTimeStep()

for i in O.interactions:
 i.phys.cohesionDisablesFriction=True

O.engines=O.engines[:4]+[UniaxialStrainer(strainRate=strainRate_Tension,axis=axis,asymmetry=1,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=False,blockRotations=False,setSpeeds=True,label='strainer')]+O.engines[4:]

dim=utils.aabbExtrema()
if strainRate_Tension<0:
 layerSize=.05
 height=dim[1][axis]-dim[0][axis]
 for b in O.bodies:
  if isinstance(b.shape,Sphere):
   if(b.state.pos[axis] < (dim[0][axis]+layerSize*height)) or (b.state.pos[axis] > (dim[1][axis]-layerSize*height)):
    b.shape.color=(1,1,1)

for i in O.interactions:
 if isinstance(O.bodies[i.id1].shape,Sphere) and isinstance(O.bodies[i.id2].shape,Sphere):
  if O.bodies[i.id1].shape.color==(1,1,1) or O.bodies[i.id2].shape.color==(1,1,1):
   i.phys.normalAdhesion*=1000
   i.phys.shearAdhesion*=1000

def addPlotData():
 plot.addData(i=O.iter,sigma=strainer.avgStress,eps=-strainer.strain)
def stopIfDamaged():
 if O.iter<2 or 'sigma' not in plot.data : return
 sigma=plot.data['sigma']
 extremum=max(sigma)
 if extremum==0 : return
 if abs(sigma[-1]/extremum)<0.5 or abs(strainer.strain)>5e2:
  print('damaged')
  O.pause()
plot.plots={'eps':('sigma'),'i':('eps')}
plot.plot()
O.saveTmp()

Thank you for your help!!

Question information

Language:
English Edit question
Status:
Open
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

Can you help with this problem?

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

To post a message you must log in.