yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20199
[Question #682390]: label name is not defined
New question #682390 on Yade:
https://answers.launchpad.net/yade/+question/682390
Hi,
I am trying to simulate an uniaxial test, here is the code after referring to several example from others:
from __future__ import division
from __future__ import print_function
from yade import plot,pack,timing
import time, sys, os, copy
rate=-0.1
iterMax=10000
intR=1.1
density=4800
young=20e9
frictionAngle=atan(0.8)
poisson=0.2
Tensile=1e6
Cohesion=1e6
sigmaT=3.5e6,
epsCrackOnset=1e-4
relDuctility=30
idconcrete=O.materials.append(CpmMat(young=30e9,poisson=.2,frictionAngle=frictionAngle,density=density,label="concrete"))
sp=pack.SpherePack()
pred=pack.inCylinder((0,0,0),(0,0,1),0.25)
sp=pack.regularHexa(pred,radius=0.025,gap=0,material=idconcrete,color=[1,1,1])
O.bodies.append(sp)
bb=utils.uniaxialTestFeatures()
negIds,posIds,axis,crossSectionArea=bb['negIds'],bb['posIds'],bb['axis'],bb['area']
O.dt=0.8*PWaveTimeStep()
engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intR,label='is2aabb'),]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR,label='ss2sc')],
[Ip2_CpmMat_CpmMat_CpmPhys()],
[Law2_ScGeom_CpmPhys_Cpm()],
),
NewtonIntegrator(damping=0.4,label='damper'),
CpmStateUpdater(realPeriod=.5),
UniaxialStrainer(strainRate=rate,axis=axis,asymmetry=0,posIds=posIds,negIds=negIds,crossSectionArea=crossSectionArea,
blockDisplacements=False,blockRotations=False,setSpeeds=True,label='strainer'),
PyRunner(iterPeriod=100,realPeriod=1,command='addPlotData()',label='plotDataCollector'),
]
O.step()
is2aabb.aabbEnlargeFactor=1.
ss2sc.interactionDetectionFactor=1.
O.run()
def addPlotData():
plot.addData(i=O.iter,eps=strainer.strain,sigma=strainer.avgStress)
plot.plots={'i':('eps',),'i ':('sigma',),'eps':('sigma',)}
plot.plot()
My Yade version is 2018.02b (on Ubuntu 18.04).
My question is that there is an error:
line 57, in <module>
is2aabb.aabbEnlargeFactor=1.
NameError: name 'is2aabb' is not defined
but in the example " trunk/examples/concrete/uniax.py " , it uses the same label and there is no such error,
Could you please help me with this?
Thanks in advance.
--
You received this question notification because your team yade-users is
an answer contact for Yade.