CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] Automatically delete empty patches from boundary file after stitchMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By rcastilla
  • 1 Post By Gerhard

LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2012, 03:08
Default Automatically delete empty patches from boundary file after stitchMesh
New Member
Join Date: Sep 2011
Posts: 1
Rep Power: 0
g_b is on a distinguished road
Hello foamers,

I was wondering if there is a straightforward/out-of-the-box way to automatically delete empty patches from the boundary file after a successful stitchMesh? Although pyFoam has a utility to add empty patches to the boundary file, I haven't found any to remove them.

g_b is offline   Reply With Quote

Old   November 21, 2012, 13:59
Senior Member
mturcios777's Avatar
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 736
Rep Power: 26
mturcios777 will become famous soon enough
I know createPatch removes empty boundaries; try grouping all the empty patches together and see if createPatch will remove them.
mturcios777 is offline   Reply With Quote

Old   November 24, 2012, 00:37
Vishal Achasrya
Join Date: Nov 2011
Posts: 38
Rep Power: 13
vishalsacharya is on a distinguished road
renumberMesh also sometimes does that... but i may be mistaken... its a good idea to renumber after stitching to get the most optimal mesh for decomposition...
vishalsacharya is offline   Reply With Quote

Old   February 27, 2013, 13:00
Senior Member
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 107
Rep Power: 15
rcastilla is on a distinguished road
I think that the problem is that the boundary is in the 0/polyMesh directory instead of in the constant/polyMesh one. Move the 0/polyMesh directory into constant (overwrite the old one) and run pyFoamClearEmptyBoundary again. It worked for me
yanxiang likes this.
rcastilla is offline   Reply With Quote

Old   November 23, 2020, 08:37
New Member
Join Date: Mar 2017
Posts: 25
Rep Power: 7
Gerhard is on a distinguished road
createPatch with no entries under patches in the createPatchDict file will always remove zero-sized patches.
You do not even have to group them together.

salehi144 likes this.
Gerhard is offline   Reply With Quote


boundary, empty patch, patch, pyfoam, stitchmesh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 11:03
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 02:22
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 11:57

All times are GMT -4. The time now is 05:09.