CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   How to check if the extracted faces from patch are in order or not? (https://www.cfd-online.com/Forums/openfoam-programming-development/238243-how-check-if-extracted-faces-patch-order-not.html)

sunagra27 September 1, 2021 04:47

How to check if the extracted faces from patch are in order or not?
 
Dear all,


1. I have extracted the faces of a patch using "PatchToFace" in topoSet.
2. I used these faces and split the patch accordingly to my needs so that I can apply BC to each of these splitted patches.
3. I have several case studies of similar design. So, when I use PatchToFace and split it, some of the cases miss the face order when extracting. Because of this, the combined mesh shows random shapes.
4. Below are the images which I think it will be understandable.

a. After PatchToFace: In this, the below picture shows the extracted patch of top picture from PatchToFace.

https://drive.google.com/file/d/1sZC...ew?usp=sharing

b. Based on b, I split the patch like this:

https://drive.google.com/file/d/1138...ew?usp=sharing

c. For few cases, after PatchToFace and split, the faces are arbitrarily placed as:

https://drive.google.com/file/d/1AbU...ew?usp=sharing

5. So, what is wrong with PatchToFace for some cases is not understood.


Please go through and let me know if not understood. Any leads will be appreciated.

Regards,
Sunag R A.

olesen September 2, 2021 05:01

Quote:

Originally Posted by sunagra27 (Post 811399)
Dear all,

1. I have extracted the faces of a patch using "PatchToFace" in topoSet.


The topo sets (cell, face, point) all use a labelHashSet as their basis, thus the labels are unordered. You either need to use sortedToc() to obtain the faceIds in a consistent and correct order, or else simply obtain the faceIds directly from the patch information (it has size and startFace).


All times are GMT -4. The time now is 01:40.