calculate cell volumes syntax error

Hello everyone, I am trying to calculate a ratio of bubble to cell volume in paraview. I found the link where it say I have to add calculator and in the Expression = volume(inputs[0]), which will give me the array of cell volumes, and then I use it with a calculator to find the value, however I receive a syntax error from the inputs[0] and I am not sure what to do, even though there is an array of cell volumes Vc as given from python Calculator, however the Vb array from the calculator is shown.

Can someone help ? This is the link I used to calculate cell volumes!

Thanks !

Since you’re computing cell volume, the resulting array is a cell array. You’ll need to change the Attribute Type on the filter from Point Data to Cell Data.

I did try what you suggested, however do not see the Vb array, I tried setting both Attribute Type in the PythonCalculator and Calculator to Cell Data. Any idea why is this happening ?


If you can share the dataset I can see what could be going wrong. I am not sure what would be the issue. Take it one step at a time. Did Vc get produced correctly? Confirm in the Information panel.

Oh, btw the Calculator filter doesn’t need a = in the expression. Change =1/Vc*0....25 to 1/Vc*....

the issue was the equal sign “=”, syntax error and it worked thanks!