I have no problem using the calculator filter in the ParaView GUI. Basically, my initial dataset consists of pressure ‘p’, velocity components ‘vxs’, ‘vys’, and ‘vzs’ - they are all point data. I applied many filters to the original dataset and then near the end I want to calculate p*Normals_Y. This is right after a GenerateSurfaceNormals filter which I called ‘normals’. It outputs ‘Normals_X’, ‘Normals_Y’, and ‘Normals_Z’. It works perfectly in the GUI, but I’m not sure how to do it in Python.
When scripting, I used this line of code:
pressure = Calculator(Input=normals, ResultArrayName='Force_Y', Function= p*Normals_Y)
And I get this error:
NameError: name 'p' is not defined
I also tried using my original dataset as the input to the Calculator filter because I can’t exactly tell what the exact input is from the GUI, but it gave the same error.