CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Mesh Utilities (
-   -   more than two regions to join using stitchMesh partial or perfect option (

Lada October 30, 2011 15:05

more than two regions to join using stitchMesh partial or perfect option
1 Attachment(s)
It seems when attaching a mesh using partial option there can be only one such interface and it must be the last one in the joining sequence.
I have created a rather simple case made of three cylinders which I want to join to make a single pipe. The cylinders are meshed completely the same. The only difference is they are offset axially by their respective heights.
When I merge them and stitch them using perfect option, everything goes smoothly. When the first interface is stitched as perfect and the second one as partial, no problems rise. But when the first stitching is partial and the second one perfect, the second one is not performed resulting in an error:

Master or slave face zone contain no faces. Please check your mesh definition.

From function void slidingInterface::checkDefinition()
in file slidingInterface/slidingInterface.C at line 97.

Has anyone encountered this weird behaviour of stitchMesh utility when applied to join more than two meshes?
Is there a way out?

I hope the attached case might help to solve the puzzle. Just run the Allrun script to see the error in the log.stitchMesh_2 file.

jherb November 25, 2011 14:09

I can reproduce this problem (with/without the -partial option) and have reported a bug at:

wyldckat October 20, 2013 03:48

1 Attachment(s)
Greetings to all!

I was browsing the list of bugs still open at OpenFOAM's bug tracker, when I spotted the bug report that points to this thread.

I gave the case a try and reproduced the same error. But I applied the solution I had found some time ago here: post #10 - and attached is the result.
It can stitch the 3 meshes just fine, as long as the file "constant/polyMesh/meshModifiers" is removed between stitches.

In addition, the attached case also demonstrates how to use my own little utility stitchMeshMultiPatch:

Best regards,

braker May 28, 2015 09:52

Thank you very much, that just solved the problem!

LaszloBarta April 12, 2017 11:00

I have a multiregion case, I would like to stitch or merge meshes of the regions into a single mesh. But I would like to retain the zones for defining porous zones. Could anyone tel me if that is possible and if yes, how?

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