← Back to team overview

yade-users team mailing list archive

[Question #695966]: VTKExporter -> exportFacets command

 

New question #695966 on Yade:
https://answers.launchpad.net/yade/+question/695966

Hi all!

I have a question about VTKExporter exportFacet command. The main goal is to export specified facets and forces, stresses, etc acting on them.  I could export facets to vtk and open in paraview, but without the forces, stresses, etc. Here is the MWE:

#####
vtk = export.VTKExporter(vtksave+'file-')
def vtkexporter():
   vtk.exportFacets(ids=facetid)
#####

Also a PyRunner is running in engines:

#####
PyRunner(command='vtkexporter()',virtPeriod=vtksampling)
#####

It works fine, but I have problem when i need to specify the what [1] command:

#####
vtk.exportFacets(ids=facetid, what=dict(velocity='b.state.vel'))
#####

The manual refers to see exportSpheres() [2], but its not very helpfull, cause I'm getting this error:
/home/dem/Yade/install/lib/x86_64-linux-gnu/yade-2020-04-23.git-6c442b0/py/yade/export.pyc in exportFacets(self, ids, what, comment, numLabel)
    489                         outFile.write("\nCELL_DATA %d"%(nBodies))
    490                 # see exportSpheres for explanation of this code block
--> 491                 for name,command in what:
    492                         test = eval(command)
    493                         if isinstance(test,Matrix3):

ValueError: too many values to unpack

So what are the exact expressions that I have to use to save everything (coordnumber, forceLen, forceVec, stressLen, stressVec, torqueLen, torqueVec) like VTKRecorder do?

Thank you for your help!
D

--
[1] https://yade-dem.org/doc/yade.export.html?highlight=exportfacets#yade.export.VTKExporter.exportFacets
[2] https://yade-dem.org/doc/yade.export.html?highlight=vtkexporter#yade.export.VTKExporter.exportSpheres


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