Hello ParaView community,
I am having deep troubles figuring out how to calculate this very specific operation:
weighted, surface integrals of scalars, that is \int \vec{\omega} T \,d\vec{A}, for example for temperature.
I am having trouble believing that the very generic “IntegrateVariables“ in ParaView actually performs cell area considering integrals. Because when I use vectors instead of scalars for the weight factor (such as \vec{\omega} = \rho*\vec{v}) the result is also in 3D and for each direction I get an integrated value. This tells me that “IntegrateVariables” is not a true area/surface integral!
I am finding it hard to believe this because when I use scalar weights to compare my results from other tools (where I can control vector or scalar weighted area integrals), I get almost matching values. However as I said when I use vector weight factors, there is not even a comparable result, it literally just gives me a 3D result as if integration over the area is not calculating the integrand as \vec{\omega}*d\vec{A} , where \vec{\omega} = \rho*\vec{v} and d\vec{A} = [dx, dy, dz].
Could you please inform me if what I require is possible or not in ParaView? Why do I still get a 3D result after a supposedly weighted area integral operation on a vector?
Best regars,
Fizikci
Let me answer my own question so anyone who has come to the same issue can also find the answer. I am working with v6.0.1:
-
We need to extract the surfaces from the data –> Filters/ExtractSurface
-
Now we need the surface normals –> Filters/SurfaceNormals
Here the key detail is to activate the “Compute Cell Normals“ below Properties of the SurfaceNormals.
-
Under the SurfaceNormals layer we calculate the variable of interest that will be mass-weighted, for example Temperature;
T\vec{\omega} = T(\rho(\vec{v}\cdot\vec{n}))
where n represents the surface normal we just created. This variable now exists in the Cell Data list. Here another detail that can be problematic is the dot product operation. Unfortunately Paraview is absolutely useless when the user is at lost because the regular dot() function does not work for my case error messages are as cyriptic as they can be… So I manually do the dot product, in that you may select the indivudal vector components for surface normals as well as the velocity under “Scalars” list in Properties and multiply them with the corresponding X, Y, Z components.
-
Perform the IntegrateVariables filter on this new mass-weighted variable, meaning calculate the surface integral on it. Obviously you need the surface you want to be active for this operation to make sense.
-
Calculate the weight factor omega as a new variable
-
Perform again the IntegrateVariables filter on omega
-
Divide the result of the first integral with the second one such that you have;
\frac{\int T \vec{\omega} dA}{\int \vec{\omega} dA}