CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Mesh Utilities (
-   -   stitchMesh perfect vs partial (

Eloise February 22, 2013 11:14

stitchMesh perfect vs partial
2 Attachment(s)
Dear all,

I am trying to join two meshes: a cylinder in a box. Both meshes are generated in blockMesh. The goal is not to have a sliding interface but to have an easy way to rotate a geometry inside the domain.

Here is the procedure I use in order to join them:
  1. Generate the inner cylindrical domain with blockMesh
  2. Generate the outer domain with blockMesh
  3. Merge the domains using mergeMeshes
  4. Stitch the domains using stitchMesh
  5. Remove manually the empty boundaries (0 faces) from constant/boundaries file
  6. Run solver on the final mesh
If I use the same number of faces on the internal patches and the -perfect flag for stitchMesh, this procedure works fine. (see perfect.jpg)

If I use different number of faces on the internal patches and the -partial flag for stitchMesh, some faces remain on one of the internal patch which leads to some "incorrectly oriented faces" (from checkMesh). (see partial.jpg)

I've been looking a lot around the forum and the many threads about stitchMesh but I haven't found a way to stitch internal patches which have different number of faces. Can anyone help me?

Thanks for your help,

Eloise February 22, 2013 12:25

1 Attachment(s)
Hi again,

I actually found the answer right after posting...
I added the -toleranceDict flag to stitchMesh, referring to a tolerance file located in the constant directory (see attachment, remove ".txt").

stitchMesh -partial -toleranceDict toleranceDict patch1 patch2
I hope this will help someone!

Have a nice weekend,

All times are GMT -4. The time now is 13:16.