Not able to write Streamline for STL geometry as input file

After completing example available with Modulus “Forward simulation using STL geometry: Blood Flow in Intracranial Aneurysm” , I am able to write Pressure Contour Lines or Velocity Contour Lines using Paraview, but not able to write Streamlines. Seek help from Nvidia Modulus Team

Hi @priyanshu.aryan

Can you provide some additional information regarding what file you are trying to visualize and if it shows any data at all inside paraview?

After completing the training of example available with Modulus
“Forward simulation using STL geometry: Blood Flow in Intracranial Aneurysm”
I got different output folders each for Training, Validation and Monitor domain.

Using ParaView, I am able to get pressure contours using “Val_pred.vtu” file (available in val_domain → Results→Val_pred.vtu )

But I am not able to write Streamlines.


I want to draw, Flow streamlines inside the aneurysm generated from Modulus simulation, as shown in the attached image available with Modulus use guide

Hi @priyanshu.aryan

I am unsure where you are getting the Val_pred.vtu file, is this converted from validator.vtp? The output files are point wise files with no mesh information. Let me know if I’m missing something (Latest Modulus version).

You won’t be able to calculate streamlines from just a point cloud. So you could:

  1. Create a mesh from the point cloud (e.q. Delaunay 3D)
  2. Create an inferencer for this problem using Voxel Inferencer which will create a voxel mesh you can use (this is what we do in our OV extension). Probably the best method.
  3. Use the Modulus OV extension (Advanced)

Please see the VTK page in our user guide for some infomation on the different formats.

I have not used validator.vtp and have not done any conversion.
I was using v21.06 of Modulus. By using different class (ValidationDomain, TrainDomain, MonitorDomain ) available with the Modulus library, I have got different output files.
I am attaching the image showing output folder names for your reference.
I have installed recent version of Modulus and will try to run the program.
As we know that in Modulus there is no need of creating any mesh?? but for getting streamlines, do we have to create the mesh?

Hi @priyanshu.aryan

Ah I see, yes your output makes sense using the older Modulus versions. Sorry for confusion.

Regarding the streamlines, yes, you need continuous cell data (mesh data) for the streamlines to integrate over. To generate this figure in the user guide, we interpolated the point cloud onto the openFOAM mesh (we do not provide this). The reason is that the streamline integration needs a continuous function space to work, thus cell data is needed. You likely just have a point cloud right now (this is even what is produced from current modulus).

The three options still stand granted number 2 and 3 are using the current version of Modulus. I would highly suggest looking into option 2. You can do option 1 right now in Paraview but it can be very slow.
There’s some examples of this in the industrial heat sink problem in the training scripts.

Thank you very much, I will try to use option 2nd and will update you later.
The link you have specified in " [training scripts ]" seems not working, may you please recheck.

Hi @priyanshu.aryan

The link does seem to be working for me. No matter, the urls for both follow:

Link 1 (industrial):

https://docs.nvidia.com/deeplearning/modulus/user_guide/advanced/industrial_heat_sink.html

Link 2 (Training scripts):

https://gitlab.com/nvidia/modulus/examples/-/blob/release_22.09/limerock/limerock_hFTB/limerock_flow.py#L151