Page 1 of 1

if the calculation of velocity magnitude is necessary

Posted: Mon Mar 19, 2018 1:59 pm
by jianfei
Hello everyone,
I have a question about the calculation of the velocity magnitude. i see when we show the velocity distribution in the example, we need make a calculation mag(velocity) to get the unit of cm/s. i want to know if the calculation is necessary, if we don't do it, what's the unit. and it seems that the result is different under the two conditions.
Thanks so much.

Re: if the calculation of velocity magnitude is necessary

Posted: Mon Mar 19, 2018 3:51 pm
by fuzzox294
Hi Jianfei,

Thank you for the question! Velocity is a vector quantity with components in the (x, y, z) directions. When you view a vector quantity like this in Paraview, it will show the magnitude of the vector by default. The magnitude of the vector is computed as: sqrt(x_component^2 + y_component^2 + z_component^2). The units for the magnitude (and all components) are cm/s. You can also choose to display the individual components (X, Y, Z) from a drop down menu in Paraview as well.

It is interesting that you are getting different results. I assume you are using the "mag" option in the Paraview calculator? Can you describe what is different between the plots, with screenshots that illustrate this?

Re: if the calculation of velocity magnitude is necessary

Posted: Fri Mar 23, 2018 7:44 am
by jianfei
Thanks so much for your reply.
And i see that as you said, before the calculation with the magnitude option it shows the velocity vector with three direction components. after the calculation mag(velocity), it shows the value calculated as: sqrt(x_component^2 + y_component^2 + z_component^2). and the difference is when i change the surface to volume view, the render before the calculation become nearly apparent, and nearly can see nothing.
And sorry, i tried several times but it failed to attach the figures.

Re: if the calculation of velocity magnitude is necessary

Posted: Fri Mar 23, 2018 10:13 am
by aeverma
It's been my experience with the volume render that it doesn't handle vector quantities as a scalar magnitude, as one would want. You need to explicitly give the volume render scalar variables.

To confirm this, can you check if the calculated mag(Velocity) and velocity vector magnitude give identical contours along any slice in the model? If so, do they yield different velocity volume plots?

Re: if the calculation of velocity magnitude is necessary

Posted: Fri Mar 23, 2018 10:32 am
by alexdkaiser
Hi Jianfei,

I have seen some strange results when displaying velocity magnitude directly as a volume rendering. It is not obvious what causes this, but it looks transparent and not at all like what other views such as streamline or quiver plots suggest.

As Aekaansh and Justin suggested, try applying the calculator filter to compute the magnitude. If the the norm or mag function does not work, try manually expanding the formula using the sqrt. Try plotting this quantity as a surface, and make sure it looks right on the boundary of your fluid domain. You should be able to make a qualitative guess (or know the exact flow) based on your boundary conditions.

It is difficult to diagnose the problem without images. Please let us know if you get cannot get things resolved, and send further information if so.

Best,
Alex