CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] using calulator filter output as a pythonAnnotation variable (https://www.cfd-online.com/Forums/paraview/144073-using-calulator-filter-output-pythonannotation-variable.html)

jwstolk November 8, 2014 13:29

using calulator filter output as a pythonAnnotation variable
 
I'm using a ProbeLocation filter to select a (point) U value, then use a calculator filter to select the X component and convert this from m/s to knots using: "U_X * 1.94384" This results in a double, that I give the name speed_kn using the "Result Array Name" option in the calculator filter.

I want to render this value using the pythonAnnotation filter, but so far I'm not able to access the result of the calculator filter.

After installing python-dev and pynum, and recompiling paraFoam with python enabled, I do have the pythonAnnotation filter, and it works with variables like t_value.

I searched google and this forum for similar questions, but all solutions end in scripts that export the calculator object to CVS, and then import the CVS file, or other methods that look inappropriate for the pythonAnnotation expression.

I would like to save the result as an animation, so would like to avoid any manual steps for each time step.

Or would it be possible to run a python script for every time step, and doing the probe and conversion in python, instead of using GUI filters?

(Ubuntu 14.04 64-bit, paraFoam 4.1.0 from openFoam ThirdParty-2.3.0.tgz, pythonlib 2.7)


All times are GMT -4. The time now is 18:49.