yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #21384
Re: [Question #685862]: About transverse strain
Question #685862 on Yade changed:
https://answers.launchpad.net/yade/+question/685862
Status: Needs information => Open
AnnaMaria gave more information on the question:
Thanks Jan,
This is a working example.
I want to plot in the positive domain of the Cartesian coordinate system the stress vs strain, and in the negative the lateral strain. But right now it does not seem to work, even if only plot lateral strain. Stress seems to plot ok.
from yade import plot
#### Simulation Control
rate=-1 #deformation rate
#### Material
# default parameters or from table
readParamsFromTable(noTableOk=True, # unknownOk=True,
Specimen_Radius = 0.027,
Specimen_Height= 0.13,
Sphere_Radius = 2e-3,
intR=1.5,
DENSITY=3000,
YOUNG=60e9,
FRICTION_ANGLE=50,
POISSON=1,
TENS=5e6,
COHESIO=40e6,
r1=0.010,
r2=0.020,
h1=0.061,
h2=0.061,
)
from yade.params.table import *
#### material definition
Sample = O.materials.append(JCFpmMat(
young=YOUNG,
poisson=POISSON,
frictionAngle=radians(FRICTION_ANGLE),
cohesion=COHESIO,
tensileStrength=TENS,
density = DENSITY,
label='spheres'
))
#### Specimen Creation
sp=pack.randomDensePack(
pack.inCylinder((0,0,0),(0,Specimen_Height,0),Specimen_Radius),
radius=Sphere_Radius,
spheresInCell=1000,
material=Sample,
rRelFuzz=0.12,
memoizeDb='/tmp/Cpack.db',
returnSpherePack=True,
)
sp.toSimulation()
for p in O.bodies:
x=p.state.refPos[0]
z=p.state.refPos[2]
d=sqrt(pow(x,2)+pow(z,2))
if d>r1 and d<r2:
p.shape.color=(1,1,1)
xnew=p.state.refPos[0]
znew=p.state.refPos[2]
dnew=sqrt(pow(xnew,2)+pow(znew,2))
#### boundary condition (utils.uniaxialTestFeatures)
bb=utils.uniaxialTestFeatures()
negIds,posIds,longerAxis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']
################# ENGINES DEFINED HERE
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,label='interactionLaw')]
),
UniaxialStrainer(strainRate=rate,axis=longerAxis,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,blockDisplacements=1,blockRotations=1,setSpeeds=0,stopStrain=0.1,dead=1,label='strainer'),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.5, defaultDt=utils.PWaveTimeStep()),
NewtonIntegrator(damping=0.2,label='newton'),
PyRunner(iterPeriod=int(100),initRun=True,command='recorder()',label='data'),
]
################# RECORDER DEFINED HERE
def recorder():
global d
global dnew
elat=(d-dnew)/d
yade.plot.addData({'i':O.iter,
'eps':abs(strainer.strain),
'elat':elat,
'sigma':abs(strainer.avgStress),})
#### Plot During Simulation
plot.plots={'elat':('sigma')}
plot.plot()
O.step();
### initializes the interaction detection factor
SSgeom.interactionDetectionFactor=-1.
Saabb.aabbEnlargeFactor=-1.
strainer.dead=0
--
You received this question notification because your team yade-users is
an answer contact for Yade.