yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #18524
[Question #676664]: plot the stress and strein
New question #676664 on Yade:
https://answers.launchpad.net/yade/+question/676664
Hi
my problem is that I can't plot the stress and strein curve of my script.
I need to know how can I write appropriate code to export and plot stress and strien of my problem.
my script:
readParamsFromTable(rMean=.05,rRelFuzz=.3)
from yade.params.table import *
from yade import polyhedra_utils,pack,qt,plot,utils,export,ymport
polyMat = PolyhedraMat(density=8050,young=210e9,poisson=.29,frictionAngle=atan(0.8))
O.materials.append(polyMat)
t=polyhedra_utils.polyhedra(polyMat,(.6,.6,.6),v=[(0,0,0),(0,0,-1.5),(0,1.5,0),(1.5,0,0)])
t.state.pos = (1,1,6)
t.state.vel = (0, 0, -20)
O.bodies.append(t)
O.bodies.append(geom.facetBox((1,1,1),(1,1,1),wallMask=31))
O.materials.append(ViscElMat(young=4e9,poisson=0.25, density=1400, frictionAngle=radians(30), label='sphereMat'))
partCloud = pack.SpherePack()
#Specify the property of the particle cloud wanted
O.bodies.append(pack.regularHexa(pack.inAlignedBox((0,0,0),(2,2,2)),radius=.08,gap=0.0001,color=(0,0,1)))
#send to simulation assigning the material
partCloud.toSimulation(material='sphereMat')
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Polyhedra_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Sphere_Polyhedra_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.4),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()',realPeriod=2),
]
def checkUnbalanced():
if unbalancedForce()<.05:
O.pause()
plot.saveDataTxt('bbb.txt.bz2')
O.dt=.5*PWaveTimeStep()
O.trackEnergy=True
O.saveTmp()
--
You received this question notification because your team yade-users is
an answer contact for Yade.