← Back to team overview

yade-users team mailing list archive

[Question #701964]: Problem about record cylinder lateral strain

 

New question #701964 on Yade:
https://answers.launchpad.net/yade/+question/701964

Hi,
I asked a question about measuring the transverse strain of cylinder in uniaxial compression test and referred to the method in [1]. However, I encountered new problems, as described below (the MWE is attached at the end)

With the progress of uniaxial compression, the measured transverse strain will fluctuate (generally increasing, but decreasing, and violently fluctuating with the end of compression)

The following is the code part. Thank you for your help!
----------------------code-----------------------
from yade import pack, ymport, plot, utils, export, timing
import sys

rate=-0.2
saveVTK=2000
intR=1.5
density=2640
young=90e9
friction=25
poisson=0.4
tens=8e6
cohes=40e6
mn,mx=Vector3(0,0,0),Vector3(0.05,0.05,0.05)
OUT='compressionTest_JCFPM_uniaxial'
name='cylinder'
r1=0.0001
r2=0.0006

O.materials.append(JCFpmMat(type=1,density=density,young=young,poisson=poisson,frictionAngle=radians(friction),tensileStrength=tens,cohesion=cohes,label='spheres'))

bottom,top=Vector3(0,0,0),Vector3(0,0,0.05)
radius=0.0125
sp=pack.SpherePack()
pred=pack.inCylinder(bottom,top,radius)
sp=pack.randomDensePack(pred,radius=0.0005,rRelFuzz=0,returnSpherePack=True,memoizeDb='/tmp/triax.sqlite')
spheres=sp.toSimulation(color=(0.9,0.8,0.6))

totalSpheres=len(O.bodies)
print('The number of sphere is:',totalSpheres)

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

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intR,label='Saabb')]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR,label='SSgeom')],
  [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1,label='interactionPhys')],
  [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(recordCracks=True,Key=OUT,label='interactionLaw')]
 ),
 UniaxialStrainer(strainRate=rate,axis=2,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=1,blockRotations=1,setSpeeds=0,stopStrain=0.015,dead=1,label='strainer'),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8, defaultDt=utils.PWaveTimeStep()),
 NewtonIntegrator(damping=0.4,label='newton'),
 PyRunner(iterPeriod=int(100),initRun=True,command='recorder()',label='data'),
 PyRunner(iterPeriod=50,command='stopIfDamaged()'),
]

def recorder():
    elat_avg=lateral()
    yade.plot.addData({'i':O.iter,
	 'elateral':elat_avg,
         'eps':-strainer.strain,
         'sigma':-strainer.avgStress,
         'tc':interactionLaw.nbTensCracks,
         'sc':interactionLaw.nbShearCracks,
         'te':interactionLaw.totalTensCracksE,
         'se':interactionLaw.totalShearCracksE,
         'unbF':utils.unbalancedForce()})
    plot.saveDataTxt(OUT)

def stopIfDamaged(maxEps=0.0001):
	extremum = max(abs(sigma) for sigma in plot.data['sigma'])
	s = abs(plot.data['sigma'][-1])
	e = abs(plot.data['eps'][-1])
	if O.iter < 1000 or s > .5*extremum and e < maxEps:
		return
	if abs(s)/abs(extremum) < 0.1 :
		print('Simulation finished')
		presentcohesive_count = 0
		for i in O.interactions:
        		if hasattr(i.phys, 'isCohesive'):
            			if i.phys.isCohesive == True:
                			presentcohesive_count+=1
		print('the number of cohesive bond now is:',presentcohesive_count)
		print('Max stress and strain:',extremum,e)
		O.pause()

def lateral():
 elatTot=0.0
 nTot=0
 for b in O.bodies:
 	x=b.state.refPos[0]
 	y=b.state.refPos[1]
 	d=sqrt(pow(x,2)+pow(y,2))
 	if d > r1 and d < r2:
 		b.shape.color=(1,1,1)
 		xnew=b.state.pos[0]
 		ynew=b.state.pos[1]
 		dnew=sqrt(pow(xnew,2)+pow(ynew,2))
 		elat=(dnew-d)/d
 		elatTot+=elat
 		nTot+=1
 elat_avg=elatTot/nTot
 return elat_avg

plot.plots={'eps':('sigma',None,'tc','sc'),'elateral':('sigma'),}
plot.plot()

O.step()
SSgeom.interactionDetectionFactor=-1.
Saabb.aabbEnlargeFactor=-1.

strainer.dead=0
O.run()
------------------------------------------------------------
[1]https://answers.launchpad.net/yade/+question/685862

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.