Unit normal Vector Fluid Interface

Hello.

This is my first post so I will try my best to be concise. I use Paraview 5.0.1

I am working on a two-phase fluid flow simulation where I am post-processing using Paraview. I am trying to obtain the unit normal vector at the liquid-gas interface given by
n = grad(alpha)/|grad(alpha)|

I have been able to compute the normal by applying the Contour filter (set fluid = 0.5) and checking Compute Normals box.

Q1. Is this unit normal vector?

Q2. If it is, why am I not getting it shown in Calculator to calculate a different parameter?

Q3. If it is not, how can I use the unit normal vector equation above in Calculator or Python Calculator? I read that it is not possible to do gradient calculation with Calculator filter in the below post
https://www.paraview.org/pipermail/paraview/2010-September/018776.html
but when I tried using Python Calculator, it crashes.

I have looked at different forums and have been unsuccessful so far.

Any help is appreciated.

Can you upgrade to 5.9.1 ?

Unfortunately, I am unable to upgrade. Although I have Paraview 5.4.0 but thought it was my implementation which was incorrect.

It is the normal vector at each point

I can see it in my calculator (ParaView 5.9.1)

  1. Would it be possible to obtain unit normal vector from normal vector?

  2. I have attached a screenshot of my Calculator.

Well, upgrade ParaView.

https://www.paraview.org/download/

I wasn’t aware that I could simply run without installing.

I have managed to get ParaView 5.9.1 but still am unable to see the normal in Vectors drop down.

I appreciate your help @mwestphal

1 Like

please share your data.

I am unable to share my data here due to the space limit so please find the dropbox link

If you apply the slice filter first, the result of the contour filter will be line segments, and since there are no surfaces, the normals cannot be calculated. Therefore, it is necessary to change the order of the contour filter and the slice filter.

@Kenichiro-Yoshimi silly mistake, many thanks.

Can I also check if these are unit normal vector?

You can use the mag function in the Calculator filter to compute the magnitude of a normal vector. Then, as shown below, in the Information tab, the maximum and minimum length of the normal vectors are both 1, which confirms that they are unit vectors.

1 Like

@Kenichiro-Yoshimi much appreciate your help.

Hi @Kenichiro-Yoshimi, thanks for the help. I am trying to do a similar thing but I am still a beginner in Paraview. Is it possible for you to outline the steps to do this? Starting from loading the ParaView.foam file. I have tried to do it myself, somehow I get the interface curvature but I do not see the normal vertor as I see here in your image.

@mwestphal can you also help with the steps? I just need the steps and a short explanation. I can figure out the rest by myself.

Below is a video on how to display normal vectors using the data shared here.

Hope this helps you.