Streamlines on a 2D slice from a 3D domain

Hello everyone

I wanted to know if there exists any approach to plot streamlines on a 2D slice of a 3D domain.

Based on the discussions in this forum, I have managed to generate Surface LIC - a good way of visualizing streamlines on a 2D slice of a 3D domain with the following steps :

  • I load the .pvd file in the attachment below.

  • Use a calculator to compute the velocity vector (named vel) from the physical velocity components.

  • Slice the domain using the slice filter.

  • Visualize vel using Surface LIC

Paraview screen below :

Unfortunately, the density of these lines is very high which makes it difficult for the reader to visualize the corner vortex structures if put on a paper. So, I wanted to know if any alternative approach exists.

For the case of a 2D domain, I adopt a usual approach - generate points using the Mask points filter and apply the Stream Tracer With Custom Source filter to visualize the streamlines. By controlling the number of mask points, I can appropriately control the density of these streamlines.

I have tried a similar approach for the current 3D case by using the Mask points filter after slicing the domain. Unfortunately, I get an error - “No points to mask” with an empty figure in the layout.

For reference the attachment can be found in this link.

Thanks
Sthavishtha

Seems like you need something like:
https://blog.kitware.com/evenly-spaced-streamlines-2d/

Unfortunately, this only works on 2D planes perpendicular on Z for now.
It could be extended to work on arbitrarily oriented planes, but we’ll need to identify funding for this work.

dan

Thanks for the reply. As of now, I just need it to work on planes perpendicular to the X, Y and Z axes.

I use Paraview 5.4.1 and I am unfortunately unable to find the filter you mention - EvenlySpacedStreamlines2D. Additionally, the clt dataset in the link you mention doesn’t seem to open - it gives me an error.

I have also tried the approach from this link but can’t get it to work as well. This should sound obvious, but I am not sure where I am going wrong. Do you have any suggestions?

Thanks
Sthavishtha

It might be that the ParaView version you are using is too old. The filter is available in the latest ParaView version 5.8.
There is a link in the blog to both the clt dataset and a paraview state file that creates the visualizations in the blog.

Dan

Thanks for your comments @danlipsa.

For the Ubuntu 18.04 bionic, Paraview 5.4.1 is the stable version available via apt-cache. I shall try to update this sometime later.

As of now, I use an inconvenient (and a tedious approach) to resolve this problem - I save the sliced data of the 3D domain into a VTK file (which will essentially be a 2D domain) and import this in a new paraview window. Then, I repeat the procedure for plotting streamlines in 2D as usual.