extract interface between water and air

Hello,
i am looking for some paraview recommendations on how to extract this data correctly, more for the seek of learn how than anything else.
I have a cylindrical reactor (main axis is Z axis), where I have water and i bubble air from the bottom of the reactor.
so air goes up throught the water and the level of the water will increase as the simulation runs.
i would like to measure this level in function of time,
for this what I thought as workflow were 2 differents:

  1. using slice

slice filter:making a slice with the normal [0,0,1] and change the center to different z points

integrate variables filter: integrate over the slice the alpha air

check at what two z points the integrate variables will do a hop in value and i will know that the level of water in average will be there

  1. use contour

contour filter: with alpha air ==0.5 this will give the interface over the air and water

integrate variables filter: use integrate variables over the contour filter to get an average point position and recover the z position

I find way more elegant (and more efficient the 2. method) but my issue is that the contour filter is also detecting ‘bubbles’ inside the fluid:


I thought about using cliping filter to ‘remove’ the bubbles but this will not necessarily solve the issue when the bubbles comming are ‘reaching’ the surface.
what would be the correct approach to only get the most up points of this contour?

Can you share data and statefiles ?

You could try running the Connectivity filter on the output of the Contour filter. Connectivity will divide your data into groups of cells that are mutually touching and give a unique id to each connected group. You can then identify which id is assigned to the surface part of the contour and use the Threshold filter to extract that part.

That should work as long as no bubble is touching. If a bubble touches, then you’ll get the geometry for that bubble as well.

hello @mwestphal
saddly this time i can not share the data. it is an openfoam simulation will try to put something together to be able to share this afternoon.
@Kenneth_Moreland thanks for your input, this could be a solution, outside of when the bubble touches which would bring down the value of the level (as you said it). anyway, i will check this solution, only one thing for anyone reading this, the contour gives a vtkMultiblockDataSet so one needs to use merge blocks filter before being able to use connectivity filter. one big issue i found with this approach is that the regionID generated with the connectivity filter changes during the time steps (as some regions will disapear and other apear) this I dont know how to solve it :confused:

Yes, the regionID cannot be trusted across time.
Can you always safely assume that the surface area of the surface is going to be larger than the bubbles? If so, you may also choose to set the extraction mode of the Connectivity filter to “extract largest region”. See an example below:

test

1 Like

thanks, this would not solve the issue as sometimes it would not select the correct one, but on the other hand i found the solution thanks to your comment. use the extract closest point region and put a point near the outlet of the geometry. this gave a consistant detection!

1 Like

Great! that is much better! Thanks for posting the solution here! :slight_smile:

1 Like