Output micro-stress vtk
Hi,
I'd like to ask that how to output vtk file for micro-stress[1].
Referring to previous answer at #6 in [2], a working MWE provided by Jan is copied as below:
################### Working MWE
from yade import export
O.bodies.append((
sphere(
sphere(
))
O.step()
s = bodyStressTensors()
vtk = export.
TW=TesselationW
TW.setState()
TW.computeVolumes()
s=bodyStressTen
for b in O.bodies:
b.mystress = s[b.id]
vtk.exportSpher
##########
However, when I tried to adapt this code to a packing of particles like what example code [3] has done. I got an error saying: "AttributeError: 'Body' object has no attribute 'mystress'"
############## Below is the not-working MWE
from yade import export
tt=TriaxialTest()
tt.generate(
O.load("test.yade")
O.run(100,True)
particleIds=[]
for i in O.bodies:
if isinstance(
particleIds.
vtk = export.
TW=TesselationW
TW.setState()
TW.computeVolumes()
s=bodyStressTen
for b in O.bodies:
if isinstance(b.shape, Sphere):
b.mystress = s[b.id]
vtk.exportSpher
##########
Do you know why this error occurs for the second MWE?
Thanks
Leonard
[1]https:/
[2]https:/
[3]https:/
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jan Stránský
- Solved:
- Last query:
- Last reply: