CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] Repair holes in surface (from haning nodes) (https://www.cfd-online.com/Forums/paraview/130216-repair-holes-surface-haning-nodes.html)

AdamAL February 21, 2014 12:00

Repair holes in surface (from haning nodes)
 
I have hexa-mesh produced with ICEM. The mesh is block-refined in ICEM, so there are hanging nodes in places. It seems Paraview cannot handle hanging nodes, but is there some filter that will either

a) do as the answer in the link suggests - break hanging nodes into tetras, and interpolate values or

b) simply fill the holes? The data there isn't important, but it doesn't look very nice.

wyldckat February 21, 2014 16:50

Greetings Adam,

Can you provide a simple example file? It would make it easier to diagnose and test how this can be achieved.

Best regards,
Bruno

AdamAL February 21, 2014 17:38

Sure - this is the smallest working example(18MB) I could get from my data.

To reproduce:
Import with EnSight
CellDataToPointData
Contour[phase_2_vof,0.5]

wyldckat February 22, 2014 14:13

2 Attachment(s)
Hi Adam,

I noticed that you've also asked about this at the mailing list: http://www.paraview.org/pipermail/pa...ry/030632.html

I believe the trick is to use the filter "Tetrahedralize" :) Keep in mind that this will substantially increase the computational requirements of the resulting mesh (680 kcell went up to 3.9 Mcell).

Attached is shown the results of my investigation into this:
  • The first image shows the pipeline I used to get a proper isosurface, or at least without the unwanted holes in the mesh.
  • The second image shows a similar pipeline, where the only change was regarding the input for the "Tetrahedralize" filter. The missing pipeline is identical to the previous one, with the exception that the "Merge Blocks" filter isn't used.
-------------
edit: Sorry, I didn't properly read your question today :( You had already tried this and it was too heavy, as you indicated.
OK, try using the filter "Extract cells by region", which can allow you to get only a certain section of the mesh. Then apply the "Tetrahedralize" filter to it.
You can use multiple "Extract cells by region" filters with the "box" sub-filter (instead of "plane") and then use the "Group Datasets" filter or one of the "Append" filters to group all extractions together.

Best regards,
Bruno

AdamAL February 22, 2014 14:35

Hi Bruno

Thanks a lot for looking into it!

Yeah, I wasn't sure how much attention was given here so after a day of waiting, I figured I'd try the mailing list :)

As you say, the Tetrahedralize increases computation a lot. For animating transient data, that might well be a deal breaker. On top of that, the output seems more faceted. Could there be a way to only tetrahedralize the cells with hanging nodes?

For that to work I suppose something like the following would be necessary (with [ ] meaning taken input) :

Full data set (1);
|-Extract cells w/ hanging nodes (2);
| |-Tetrahedralize (3);
|
|-'Mask' using data set [(2)] (4);
|-Merge with dataset [(3)] (5);

But I have no idea how to accomplish (2) - let alone (4) and (5).

/adam

AdamAL February 22, 2014 14:46

Oh, and I tried VeronoiMergeConnected, thinking it sounded maybe applicable - but ParaView crashes when I apply it.

wyldckat February 22, 2014 15:23

3 Attachment(s)
The steps list you wrote gave me an idea and attached is the resulting pipeline. I'm not sure how much lighter it truly is and the results seem a bit... strange.

The pipeline is essentially:
  1. The case file.
    1. "Mesh quality" filter, using the defaults.
      1. "Threshold" filter with 0 to 1, in regards to the "Quality" field.
        1. Applied the "Tetrahedralize" filter.
      2. "Threshold" filter with 1 to maximum value, in regards to the "Quality" field.
    2. Applied the "Group Dataset" filter, to group the "Tetrahedralize" result and the second "Threshold" filter.
      1. "Merge Blocks" filter. This can be considerably heavy, since it can duplicate the amount of data loaded onto RAM.
        1. "Cell Data to Point Data" filter, without passing the cell data (save a bit of RAM).
          1. "Contour Filter".
Note: after 1.2 and before 1.2.1, you can apply the "Pass Arrays" filter to filter out only the field data you truly need.

edit: never mind, the "Pass Arrays" filter seems to be broken... at least in another test I did.

edit 2: The third image shows another possible pipeline, which may or may not be a little bit lighter.

AdamAL February 22, 2014 16:47

That's _exactly_ what I had in mind.

It does look a little weird still, but I suspect no more so than what all the data would have looked like if tetrahedralizing everything.

As for memory, the Information tab reports the full Tetrahedralize as 290MB, while the MergeBlocks is reported as 140 - but then the mesh quality reported 120MB - which sounds weird, so I'm wondering how accurate that panel really is. For some reason, I couldn't select AppendDatasets - 'twas grayed out.

wyldckat March 1, 2014 05:03

Hi Adam,

Quote:

Originally Posted by AdamAL (Post 476254)
For some reason, I couldn't select AppendDatasets - 'twas grayed out.

Usually that happens when the selected items are not of the same type. It's possible that you had one in multi-block mode and another already merged into a single block.

Best regards,
Bruno

Shahr January 10, 2019 04:02

3 Attachment(s)
Dear Bruno,

I tried to follow your instructions to create a decent looking visualisation of my domain, which contains hanging nodes (see attachment 1). Although the procedure you mentioned helps to improve the iso-surface quality, it is still far from decent representation and even produces false representation (see attachments 2 where the proposed fix leads to showing a continuous surface, when it shouldn't according to screenshot 3). Do you know of any workaround, since the solution was proposed in 2014?



Quote:

Originally Posted by wyldckat (Post 476251)
The steps list you wrote gave me an idea and attached is the resulting pipeline. I'm not sure how much lighter it truly is and the results seem a bit... strange.

The pipeline is essentially:
  1. The case file.
    1. "Mesh quality" filter, using the defaults.
      1. "Threshold" filter with 0 to 1, in regards to the "Quality" field.
        1. Applied the "Tetrahedralize" filter.
      2. "Threshold" filter with 1 to maximum value, in regards to the "Quality" field.
    2. Applied the "Group Dataset" filter, to group the "Tetrahedralize" result and the second "Threshold" filter.
      1. "Merge Blocks" filter. This can be considerably heavy, since it can duplicate the amount of data loaded onto RAM.
        1. "Cell Data to Point Data" filter, without passing the cell data (save a bit of RAM).
          1. "Contour Filter".
Note: after 1.2 and before 1.2.1, you can apply the "Pass Arrays" filter to filter out only the field data you truly need.

edit: never mind, the "Pass Arrays" filter seems to be broken... at least in another test I did.

edit 2: The third image shows another possible pipeline, which may or may not be a little bit lighter.


wyldckat January 12, 2019 08:56

Quick answer @Shahr: I'm a bit confused on what I should be seeing in the first attached image, because all I can understand is that this is a surface mesh of the actual meshed domain, it's not an iso-surface. Therefore, there should not be any hanging nodes on that mesh... unless I'm not understanding it correctly.

Beyond that, I believe that the more recent versions of ParaView have improved their capabilities for iso-surface generation, so try using the more advanced options that are revealed when you turn on the gear icon.

Shahr January 12, 2019 09:22

2 Attachment(s)
Dear Bruno,

thanks for your reply. You are right. The first snapshot is just the domain in opaque solid colour with "surface with edges" option selected. The inner conical structure visible in that image is the irregular shapes that are visible even in the mesh visualisation without any field selected. I attached another shot of another region of my domain which has local refinement, that leads to hanging nodes, without showing cell edges.

So the problem is not only specific to iso-surface generation, but in general for the mesh representation. Of course this issue leads to messed up representation of any iso-surface/iso-volume that intersects those blocks.

In order to reproduce this problem, just locally refine/coarsen any block in ICEM (see attachment 2) and import the mesh in OF using the generated fluent mesh.

wyldckat January 13, 2019 13:33

Quick answer: OK, so the mesh was converted to OpenFOAM format... in that case, please try to use the vtk polyhedron representation, instead of the default option, as instructed here: https://openfoamwiki.net/index.php/F...is_in_ParaView - because it looks like that the mesh you are seeing has the more complex cells decomposed into tetrahedral cells... and the problem with that is that it may interpolate values incorrectly into the decomposed mesh...

Shahr January 16, 2019 03:22

Thank you Mr. Santos very much. Your suggested solution fixed our problem.


All times are GMT -4. The time now is 21:42.