CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Group/Merge boundary faces (https://www.cfd-online.com/Forums/openfoam-pre-processing/108647-group-merge-boundary-faces.html)

Koga October 29, 2012 11:03

Group/Merge boundary faces
 
I have imported a very large model of about 2mio cells and 1k boundary faces.
Most of the boundary faces have the same boundary condition, so I am looking for a method to group or merge some boundary faces. So that I don't have to write down the boundary condition for each of the 1k boundary faces.
Is there a command to group or to merge boundary faces?

Koga October 29, 2012 17:02

Sorry, I want to merge the patches, not the boundary faces.

For example:

I want to write something like

Code:

patch1, patch2
      {
          type            fixedValue;
          value          uniform 1;
      }

instead of

Code:

patch1
      {
          type            fixedValue;
          value          uniform 1;
      }

patch2
      {
          type            fixedValue;
          value          uniform 1;
      }


aljazari November 13, 2012 13:58

1 Attachment(s)
The utility createPatch will do this for you.

Run the command with the help flag to get more info.

Code:

createPatch -help
A sample of a createPatch dictionary is available if you search the OpenFOAM folder. I have uploaded this sample but it is edited to satisfy my condition. Edit it as you wish although I might have deleted some of the useful comments in the original sample dictionary.

A list of other utilities for mesh manipulation and other 'features' can be found here:
http://www.openfoam.com/features/mesh-manipulation.php

I hope this helps.

Attachment 16935


All times are GMT -4. The time now is 15:10.