ProjectPhysX / FluidX3D

The fastest and most memory efficient lattice Boltzmann CFD software, running on all GPUs via OpenCL. Free for non-commercial use.
https://youtube.com/@ProjectPhysX
Other
3.48k stars 281 forks source link

Visualizing rho and u in Paraview #186

Closed aiotko closed 1 month ago

aiotko commented 1 month ago

Hi,

I just wanted to start by saying thank you so much for sharing your project - it's really impressive!

Sorry for the beginner's question, could you please advise the way how to visualize rho and u in Paraview to get the visual picture like in Interactive Graphics mode?

I've tried using Contour for rho and Glyph for u, but Glyph crashed Paraview even with 80 Gb of RAM and Contour didn't look like the expectation )

ProjectPhysX commented 1 month ago

Hi @aiotko,

ParaView offers 2 Representation options for visualizing volumetric data:

Unfortunately, ParaView can't do Q-criterion isosurface like my built-in rendering engine.

Kind regards, Moritz

aiotko commented 1 month ago

Thank you for your explanation, @ProjectPhysX,

I'm just looking for a way to visualize Q-criterion isosurface from VTK output by pyvista or vtk in Python or C++ to have a view like in your engine since it's pretty useful.

Maybe you have an example of how to do it?

ProjectPhysX commented 1 month ago

ParaView can't do Q-criterion isosurfaces out-of-the-box unfortunately from 3-component vector data. This is how it's implemented in FluidX3D:

You'd have to copy the part to calculate the Q-value for each cell to your C++ setup and run it on the entire grid on CPU; you can temporarily store Q-values in the lbm.rho data field. Then export it to .vtk and let paraview draw the isosurfaces - without coloring though.