CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Mesh Utilities (
-   -   Has anyone used surfaceToPatch (

hsieh February 6, 2008 10:19

Hi, I generated a mesh. Un

I generated a mesh. Unfortunately, it only has 1 patch. I need to split this one patch into several patches (inlet, outlet, wall,..etc.). Has anyone here tried surfaceToPatch utility? Supposely, it can read in a surface file and then, patch the faces ontop of the surface read. What type of surface file does it read? stl? Or can it be I-DEAS unv file (this will be a 3D shell mesh I think).



dmoroian February 6, 2008 10:36

Hi Pei, Doesn't autoPatch hel
Hi Pei,
Doesn't autoPatch help you? What about the gui patchTool?


hsieh February 6, 2008 12:46

Hi, Dragos, I have not used
Hi, Dragos,

I have not used either autoPatch or gui patchTool before. Is gui patchTool part of FoamX? I usually do not use FoamX. Also, autoPatch may not achieve what I want.

Let me explain:

I have a complex geometry. The mesher reads stl surface in, then, mesh the geometry - NO surface information kept in the mesh generated. However, I can use my CAD software to only export the surface patch interested (say an inlet face) to a second stl file. I am hoping the surfaceToPatch can read this second stl file, then, searches through the boundary faces, save the faces that "belongs" to the stl face, AND then, created a new inlet patch in OF format.

I am reading the surfaceToPatch source code now - just curious how it works before I understand the source code.


dmoroian February 7, 2008 03:17

Hi Pei, autoPatch will genera
Hi Pei,
autoPatch will generate automatically a patch for every surface on your mesh.
patchTool runs separately from FoamX and will let you pick visually the surface you need. Then will generate the patch in a boundary file.
But now you made me curious about the surfaceToPatch which seems more apropriate for complex geometries with many different boundaries. I'll take a look at it too.
Please let me know about your findings.


hsieh February 7, 2008 22:40

Hi, Dragos, autoPatch split
Hi, Dragos,

autoPatch splits external faces based on user specified angle. I remembered now that I tried it few times in the past and I was not able to get the patches I wanted due to curved/complex surfaces.

I was not able to find any info on gui patchTool. How can I start it?

When reading the second stl into surfaceToPatch, I got errors. I might need to convert the triangulates in stl to something surfaceToPatch can understand. If I can just get surfaceToPatch to split the boundary faces based on the stl file, then, it will be really cool.


All times are GMT -4. The time now is 17:44.