(CGNS) Is it possible to load boundary patches from a CGNS file?

Greetings to all people of this forum!

For the past few days I have been searching for a way to display flow properties on boundary patches defined in the CGNS file, unfortunately to no avail.

I found a relevant thread, but has zero responses:

I also found a plugin that was written for older ParaView versions (it lists 4.3.1 on Git log), but does not work for current versions (I am on 5.9).

I think the plugin loads correctly, since I am able to have the new “Load Boundary Elements (Unstructured Grid)” option.
However, I am not able to get the relevant info in the Multi-block inspector; inside the doc/ directory on the plugin Git repo there is a picture that shows the boundary patches loaded on Paraview. My “patches” family has 0 entries instead.

In addition, I think when multiple element sections are present, ParaView displays only the first.
Maybe this has something to do with not being able to view the relevant boundary patches?

The cgns file used in the plugin examples is an example cgns file from the cgns site:

It is the yf17 file from the unstructured examples.

I tried to read the plugin and try to find what’s wrong with it and maybe fix it, but unfortunately I am not experienced with ParaView plugins.

A last note: When a cgns file with ZoneBC info is read, I think ParaView load boundary patches since it displays warnings if an unknown BC type is read. So I think it does something with the info at least.

Is there anything I can try?

I’m afraid this is not supported by ParaView yet.

Well, it kinda sucks that this is the case…
What format would support boundary patches though?
Maybe I can write a CGNS converter to do what I want to.

boundary patches is just another geometry for ParaView, so any geometrical format would support it, eg vtu.

Well, I’m afraid I did not phrase my question correctly…

I know that ParaView can support any geometric format.
I have worked with legacy vtk, xml vtu, tec, and cgns files.
ParaView can read anything and will display things accordingly.

However, what I am looking for is having all geometric/element entities (volume mesh and surface patches) in a single file and being able to toggle them on and off.

If I want to have a separate file for each element entity, I can just use cgns_to_vtk on my cgns file and get a file for each element entity.
What I want though is having them written on a single file while having the option to focus on the entity I want (kinda like zones in tecplot).

Is there any format that can support this functionality?

Any multiblock based format support that, including cgns.

I meant a format that can support this functionality in ParaView.
CGNS supports multiblock entities but, as per your first reply in this thread, ParaView cannot display the entities.

ParaView CGNS supports reading patches, but it does not support reading the specific types of patches you are using in your file (BCFarfield and BCSymmetryPlane).

Maybe you can try using more standard type of patches ?

Here is an example file:

I tried the example file and checked it with ParaView and cgnsview.
It indeed displays boundary entities, but it is not what I’m looking for since it uses multiple bases and multiple zones for different element entities.
I was, hopefully, looking for some way to extract/use this information from a single zone and base.

The example file you sent has one 3D base and one 2D base.
The 3D base has the Volume elements (interior) while the 2D base has multiple zones, one for each Surface element entity.

I am aware this is a way to display both Surface and Volume elements, however this approach has multiple shortcomings:

  • The whole array of node coordinates is written for each and every zone, which is not optimal
  • In my case (vertex based solution) I have to either repeat the full solution on every zone or interpolate the solution on face elements or rebuild the boundary node mapping in order to not have the full array of nodes

I was aware of this approach but it is unfortunately not suited to what I want to do.