watershed-workflow icon indicating copy to clipboard operation
watershed-workflow copied to clipboard

Mixed element mesh cannot be visualized in Paraview

Open ZhiLiHydro opened this issue 1 year ago • 5 comments

Goal:

To visualize the mixed element mesh (3D) in Pavaview. Note: the mesh file, not ATS result.

Error 1:

Converted .exo failed to be loaded in Paraview:

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\IO\IOSS\vtkIOSSReader.cxx, line 852
vtkIOSSReader (0000016AE7ED72B0): Error in UpdateTimeInformation: 
ERROR: The topology type 'nsided349628' is not supported on 'face_block' in file 'C:/Users/<myusername>/Desktop/coweeta_basin_converted.exo'

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkExecutive.cxx, line 753
vtkPVCompositeDataPipeline (0000016AE7D3CA80): Algorithm vtkIOSSReader(0000016AE7ED72B0) returned failure for request: vtkInformation (0000016AD53C27F0)
  Debug: Off
  Modified Time: 379518
  Reference Count: 1
  Registered Events: (none)
  Request: REQUEST_INFORMATION
  FORWARD_DIRECTION: 0
  ALGORITHM_AFTER_FORWARD: 1

Error 2:

.vtk file cannot be generated in WW1.4 due to an AssertionError:

---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In[48], line 5
      3 except FileNotFoundError:
      4     pass
----> 5 m3.write_vtk(filename+'.vtk')

File ~/ww1.4/watershed_workflow/mesh.py:928, in Mesh3D.write_vtk(self, filename)
    926 print()
    927 print(len(c) for c in self.cell_to_face_conn)
--> 928 assert (all(len(c) == 5 for c in self.cell_to_face_conn))
    929 wedges = []
    930 for c2f in self.cell_to_face_conn:

AssertionError: 

How to reproduce Error 1:

  • meshconvert the .exo files generated in mesh_mixed_element_coweeta.ipynb and mesh_mixed_element_toy_problem.ipynb
  • drag and drop the converted mesh to Paraview

How to reproduce Error 2:

  • Run m3.write_vtk('xxx.vtk') in both examples

Thanks, Zhi

ZhiLiHydro avatar Oct 02 '23 18:10 ZhiLiHydro

Did you try .exo format? I never used vtk so not 100% sure.

saubhagya-gatech avatar Oct 04 '23 21:10 saubhagya-gatech

I've tried. Error 1 is how the .exo format failed after running meshconvert. It should be easily reproducible if following How to reproduce Error 1. My Paraview version is 5.10.1, btw. Thanks!

ZhiLiHydro avatar Oct 04 '23 21:10 ZhiLiHydro

I was able visualize the .exo files generated from example problems, including the toy problem. I used Paraview 5.9.1. If you still have problem, you can send me your mesh file for the toy problem, and I can see if I can visualize it in Paraview at my end.

saubhagya-gatech avatar Oct 20 '23 02:10 saubhagya-gatech

https://drive.google.com/drive/folders/1FIOq7m0B5gh7qdddkx2jqIZTAtCC-R5O?usp=sharing Here are the WW-generated raw mesh files and the mesh files after meshconvert. There's also a screenshot of what's the error message looking like in my Paraview. Please give a try at your end. Thanks!

ZhiLiHydro avatar Oct 27 '23 15:10 ZhiLiHydro

Hi Zhi,

Can you elaborate on the use of meshconvert? WW can produce mesh files directly in .exo format. Have you tried that?

saubhagya-gatech avatar Nov 29 '23 18:11 saubhagya-gatech