CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   create patches out of a patch with two parallel surfaces (

Rebecca513 October 4, 2011 12:01

create patches out of a patch with two parallel surfaces
Dear all,

I have a patch with two parallel surfaces, and I need to split them into two separate patches as they will have different boundary conditions.

Can anyone tell me how to do that?

Thank you for your help!


Rebecca513 October 4, 2011 12:06

Also, they are not cyclic, but flat. Thank you~

Phicau October 4, 2011 12:28


just a slight guess, but you may start again from blockMeshDict by difining them as separate patches. Or you can try "autoPatch 90" (you can choose a different angle, depending on your needs) and renaming patches on "./constant/polyMesh/boundary" file.

Hope it helps

Rebecca513 October 4, 2011 12:42

Hi Pablo,

Thank you for your reply.

The mesh was imported, and it is reconstruction from CT images, so I don't have a blockMeshDict.

My understanding, please correct me if I am wrong, is that autopatch works on the whole region, not allowing me to specify the patch. Also, the surfaces are not perfectly flat, the angles between any two surfaces are not the same, varying around 90. Or I should say that it is a deformed box. I tried to run the autoPatch on it. It generates about 200 new patches.... really frustrating

Phicau October 5, 2011 03:32

Yes, quite annoying, certainly.

Try varying the 90 supplied to autoPatch to reduce the resultant number of patches.

If this still does not work take a look at the mesh manipulation tools of OpenFOAM:
I guess you can make your split operation with the correct combination of them.

Rebecca513 October 5, 2011 09:34

Thank you!

It turned out that I could use faceset and createPatch to get two new patches out of the original one. In this way, I have more control over how many patches to generate.



songzhe March 15, 2013 17:14

Hi Hang

Could you please tell me how to use face set and createPatch to get new patches?

I use construct from face set in creatPatch, and use setSet to generate the face set. But I don't know how to specify in setSet dict.

My understanding is, for example, if you have a whole patch and want to split it into 2, you need to get a face set in one part of the whole patch, from which you want to get one your sub patches, and also for the other part of the whole patch.

# Create face sets
faceSet sideFaces1 new boxToFace (-0.00001 -0.00001 -1) (0.10001 0.00001 1)
faceSet sideFaces2 new boxToFace ( 0.09999 -0.00001 -1) (0.10001 0.05001 1)
faceSet sideFaces3 new boxToFace (-0.00001 0.04999 -1) (1.00001 0.05001 1)
faceSet sideFaces4 new boxToFace (-0.00001 -0.00001 -1) (0.00001 0.05001 1)

This is what I found in tutorial about how to set up in setSet. I guess the faces you want can be obtained by specifying the face centre located in the region specified in boxToFace. I am confused if you have a flat wall as a patch so all the faces are located in a plane, and all the face centres are also in a plane. So you just specify the region of boxToFace as a plane?

Thanks in advance

All times are GMT -4. The time now is 03:23.