← Back to team overview

yade-users team mailing list archive

[Question #250922]: Bug report in function VTKExporter.exportInteractions()

 

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

Dear all,

I've been playing with VTKExporter lately and found that there might be a sentence "i = O.interaction[ii,jj]" missing in the func exportInteractions [1] for the looping which outputs Vector3 data. 

[1] https://yade-dem.org/doc/_modules/yade/export.html#VTKExporter.exportInteractions

It appears that all the Vector3 data (i.phys.normalForce) exported with this function are the same (same as in the first interaction). 

The following is part of the script where I think the problem might be:
---------------------------------------------------------------
# Line 34
     for i in O.interactions:
         if i.isReal: break
....

---------------------------------------------------------------
This loop returns i as the first interaction. It probably is the reason that I got same value for all i.phys.normalForce.

---------------------------------------------------------------
# Line 45
         elif isinstance(test,Vector3):
            outFile.write("\nVECTORS %s double\n"%(name))
            for ii,jj in intrs:
               (should we add "i = O.interaction[ii,jj])" here?)
               v = eval(command)
               outFile.write("%g %g %g\n"%(v[0],v[1],v[2]))

In addition to that, does someone know where to find this python script in the source code files? If I am right about this bug, I think I have to modify the code file and install Yade again.

I have a question about VTKExporter. It is irrelevant to above.

When we call VTKExporter class functions, exportInteractions(params) for instance, is it possible to derive some data from O.interactions's attributes like defining the param what as "what=[('contactPhi','degrees(acos(i.geom.normal[2]))')]"? Every time I do that periodically in PyRunner. It reports "name "degrees" ( or acos) is not defined bla bla bla (math module didn't work?). Could someone help me out? :-) 

Regards,

alex

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.