← Back to team overview

yade-users team mailing list archive

Re: [Question #704551]: How to make VTK file of relative particle rotation angle from state1 to state2

 

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

Jan Stránský proposed the following answer:
a MWE for a case where you have the computed values
###
from yade import export
import builtins # to store "data" and access them from a string command

spheres = [
    sphere((0,0,0),1),
    sphere((3,0,0),1),
    sphere((6,0,0),1),
]
O.bodies.append(spheres)

data = [ # e.g. angle
    1,
    2,
    3,
]
builtins.data = data # make data "global", visible in export module

vtk = export.VTKExporter("test-angle")
vtk.exportSpheres(what=dict(angle="data[b.id]"))
###

Cheers
Jan

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