Calculate spatial average and project value on isosurface


Hi,
I have cell data in 3D, and I would like to compute the average of a scalar or vector on a isosurface.

I am simulating a gravity current (see attached). I can draw the isosurface and would like to compute the entrainment coefficient of ambient fluid and represent it as colors on the isosurface. To do so I am calculating the dot product of the normals to the isosurface and the gas velocity vector. That dot product is supposed to be divided by the mean velocity of the flow, which is the depth-average gas velocity at that point. (In attachment I used as mean velocity the average velocity in the center line, as proxy but that is not satisfactory…)
I am seeking help to know the steps to calculate the depth average velocity of all cells below the isosurface, and have that average value projected on the isosurface, and usable in the calculator that I use on the contour.
This way, I can illustrate the entrainment coefficient on the isosurface and that would be terrific.

1 Like