yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14631
[Question #622071]: a problem about micro-stress computing
New question #622071 on Yade:
https://answers.launchpad.net/yade/+question/622071
I am trying to run a packing model,and try to use TesselationWrapper() to obtain the Micro-stress as the example given by YADE official website: https://www.yade-dem.org/doc/user.html#micro-stress-and-micro-strain.
My specific script is like tihs:
---------------------------------------------------------------
O.reset()
O.bodies.append(geom.facetBox((.5,.5,.5),(.5,.5,.5),wallMask=63))
from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=0.02, rRelFuzz=0.1)
sp.toSimulation()
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_L3Geom(),Ig2_Facet_Sphere_L3Geom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_L3Geom_FrictPhys_ElPerfPl()]
),
NewtonIntegrator(gravity=(0,0,-19.81),damping=0.4),
]
O.dt=0.05*PWaveTimeStep()
----------------------------------------------------------------------
Then I reset the Δt=5.0e-05。Then I type following script:
----------------------------------------------------------------------
O.run(6343)
TW=TesselationWrapper()
TW.computeVolumes()
s=bodyStressTensors()
stress=s[100]**4.*pi/3.*O.bodies[100].shape.radius**3/TW.volume(100)
#These codes are written exactly as the YADE manualy(https://www.yade-dem.org/doc/user.html#micro-stress-and-micro-strain).
----------------------------------------------------------------------
I get message:
----------------------------------------------------------------------
unsupported operand type(s) for ** or pow(): 'Matrix3' and 'float'
----------------------------------------------------------------------
Can someone help me?Thanks very much!
--
You received this question notification because your team yade-users is
an answer contact for Yade.