I am currently working on automating the mesh generation process and subsequently importing the mesh into OPENFOAM. At present, I am encountering a challenge with creating groups. Specifically, I am working with a blocked pipe for structured meshing. Please refer to the attached image for a visual reference:
My objective is to extract only the surface faces. For the walls, I require all faces on the circumference of the cylinder, and for the inlets (1, 2, 3, 4, 5) and the outlets, I need the respective faces.
When I use all_faces = geompy.ExtractShapes(Divided_Cylinder_1, geompy.ShapeType[“FACE”], True)
I can extract all the faces. However, this includes faces inside the block, which I do not need. I considered sorting these based on coordinates and tried using:
center = geompy.MakeCDG(face)
Unfortunately, this did not work as anticipated, as multiple faces have their center of mass not aligning as expected.
Is there a more straightforward method to achieve this, such as a specific function to extract only the surface faces?
Thank you very much for your support and assistance.
Best regards,
Shariq