export tangaroa.c data to paraview

754 views
Skip to first unread message

umm0ro H

unread,
Jun 23, 2023, 10:50:53 AM6/23/23
to basilisk-fr
Dear All

I tried to export the flow field of the tangaroa example into a format that paraview could read.

First I used the output_vtu_foreach.h file in the cselcuk sandbox, but after opening the exported vtu file with paraview, you can see that the grid around the hull is not well saved. (Annex 1 to 3)
error_vtu.png


Then I tried output_htg.h in the sander sandbox, but I got the following error , when I run the example on a single core  .(Annex 4 to 6)

>>Tangaroa Step 0 at time 0
>>Writing htg file in step 0 time 0
>>Segmentation fault  

I would be appropriate for comments and suggestions.
Best wishes
output_htg.h
tangaroa.c
output_vtu_foreach.h
output_pvd.h
save_data.h
tangaroa.c

윤대근

unread,
Sep 16, 2023, 2:21:32 AM9/16/23
to basilisk-fr
I have do some modification on the source codes (unstructured one) you attached, retry post-processing with the attached files below

2023년 6월 23일 금요일 오후 11시 50분 53초 UTC+9에 umm0ro H님이 작성:
save_data.h
output_vtu_foreach.h

윤대근

unread,
Sep 16, 2023, 8:34:43 PM9/16/23
to basilisk-fr
Here is a y-velocity image of the example tangaroa case at i =120.

tangaroa.png

2023년 9월 16일 토요일 오후 3시 21분 32초 UTC+9에 윤대근님이 작성:

umm0ro H

unread,
Sep 16, 2023, 9:40:24 PM9/16/23
to basilisk-fr
I tried your code, and it has resolved my issue. It's a fantastic job and significantly enhances Basilisk's capabilities in visual post-processing. Currently, using the clip filter in ParaView allows me to extract sections of the mesh with proper sorting. Now, I will continue to attempt to extract 'water.fraction=0.5.' Unfortunately, the contour filter in ParaView still has some issues with octree grids. 

Nevertheless, thank you very much for your assistance. 

Best wishes
微信截图_20230917093621.png

Daegeun Yoon

unread,
Sep 17, 2023, 5:52:29 AM9/17/23
to basilisk-fr
It is a known visualization issue in Octree. (https://discourse.paraview.org/t/contour-works-inproperly/5267
Although it is not a perfect solution, the generation of holes can be suppressed by using the "ResampleToImage" filter instead of "CellDatatoPointData" filter.
The "ResampleToImage" filter solves the hole problem by interpolating data into a regular grid of a user-specified size, but there is a problem in that small feature information is lost due to the interpolation. Here is a test animation generated by "ResampleToImage" filter.

ezgif.com-optimize.gif

paraview (2).png


Reply all
Reply to author
Forward
0 new messages