Question #432837 on Yade changed:
https://answers.launchpad.net/yade/+question/432837

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Alma,
try the following script
############################
from yade import pack, export
mat = PolyhedraMat(young=1e9, poisson=0.25)
O.materials.append(mat)
t1 = polyhedron([(0,0,0),(1,0,0),(0,1,0),(0,0,1)],wire=False)
t2 = polyhedron([(0,0,0),(1,1,0),(1,0,1),(0,1,1)],wire=False)
O.bodies.append((t1,t2))
O.engines = [
  ForceResetter(),
  InsertionSortCollider([Bo1_Polyhedra_Aabb()]),
  InteractionLoop(
    [Ig2_Polyhedra_Polyhedra_PolyhedraGeom()],
    [Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],
    [Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()],
  ),
  NewtonIntegrator()
]
O.step()
stresses = bodyStressTensors()
for b in O.bodies:
  b.mystress = stresses[b.id]
vtk = export.VTKExporter('/tmp/aaa')
vtk.exportPolyhedra(what=[('stress','b.mystress')])

from yade import qt
qt.View()
############################
cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to