Streamlines or velocity field in particle simulation

Dear users,
I’m trying to plot streamlines (or vector velocity fields) to detect vortices formation using results for particle simulation (from DualSPHysics software). I’m not having success using “stream tracer” in paraview. The “stream tracer” was located in the workspace but nothing is showing (the streamlines expected) along with the evolution of the particles. Could someone help me with the streamlines?

Regards

Please share your data.

Dear Westphal,
Following the file data

and the video to help you (you can build the 3 archives, as showed in the video; others archives only for your simulation understanding):

Thanks in advance.

Use the “Temporal Particles to pathlines” filters.

Please take a look at this blog for processing SPH data in ParaView:

It is likely that you need to interpolate to a volume to do certain things like streamlines. Temporal Particle to Pathlines filter is aimed at connecting positions of particles/tracers over time (pathlines) and will not give you instantaneous streamlines.

Hi there,
I have also been facing the exact problem.
Was there any solution ultimately?

Disappointingly, it seems that streamline filter still does not work on SPH volume interpolator object. However, in Paraview 5.11, it is possible to use SPH Volume Interpolation and then choose Surface LIC representation.

Have you tried the SPH Volume Interpolator?

I always use SPH Volume Interpolator. But the streamline filter on interpolator object yields empty or nonsensical results (see for example the file ldcRe100 - Google Drive). Now, I found out it works for me in 3d. So perhaps it is a 2d specific issue.

Ah I understand. This seems to be an issue with SPH Volume Interpolator. The vector field it generates does not match the original vector field. Maybe it was designed to work in 3D only. @Will_Schroeder may be able to shed some light on it.

As shown in the blog, the sph interpolator interpolates from an input 3D point cloud onto a line, plane, volume (or other dataset type). However, I suspect that if the input point cloud is 2D, the SPH interpolation process must be modified. There may also be issues with determining in/out of points in the underlying spatial locators. But given it’s been a while since I looked at this code, this is just a guess on my part.

There is a nice solution to this 2D problem. Apply the Delaunay2D triangulation and a EvenlySpacedStreamlines2D filter to fill up the space with streamlines. Here is a screenshot and a Python script.
cavityRe100.py (4.6 KB)

1 Like

Yes, using Delaunay2D instead of SPH Volume Interpolator is a good solution here. Thank you for finding this. I still hope that the interpolator issue gets corrected in future.

Thanks Jean! You beat me to it :slight_smile: In terms of supporting 2D, I honestly don’t think that it will happen soon. I am not aware of this being a priority for anyone currently doing development. If there is anyone in the SPH community interested in revising the filter, we would be happy to assist.