CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] Issue with coupled patches at multibody layer addition in snappyHexMesh

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2025, 08:45
Question Issue with coupled patches at multibody layer addition in snappyHexMesh
  #1
New Member
 
Join Date: Jul 2025
Posts: 1
Rep Power: 0
szdavid is on a distinguished road
Hi everyone,

I'm generating a mesh for chtMultiRegionSimpleFoam using snappyHexMesh. Everything works well up until the layer addition step. The regions and interfaces are correctly created — snappyHexMesh recognizes the solids properly using locationInMesh, and the coupled regions make sense (e.g. air-layer, layer-air patches). There are no patches between non-touching solids before layer addition.

However, when layers are added, I get phantom coupled patches — interface patches are created between solids that are not even in contact (e.g. layer1-layer10). These patches don't physically make sense and weren't present in the earlier meshing steps.

Has anyone experienced this issue? Could it be due to snapping, some layer configuration, or the small distance between layers?

Typical layer height: ~6–8 mm

Distance between solids: ~5–8 mm

Also, as a test:
When I only include alternating solids (i.e. solids 1, 3, 5, 7, 9, 11, 13), the inflation layers are generated without errors, and the mesh looks correct. (See image attached.)

Here's a link to the geometry (STLs used): [https://www.dropbox.com/scl/fo/nga01...ieyjj6rm&dl=0]

I could only attach the layeraddition from snappyHexMeshDict only for the first layer but it´s the same for all solids. I don´t intend to add inflation layers to layer14.

Thanks in advance!

inflation layers1.jpg

inflation layers.jpg

snappyHexMeshDict_castellated.txt

snappyHexMeshDict_snap.txt

snappyHexMesh_addLayers_group1.txt

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2412 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

scale 1;

vertices
(
(-0.48 -1.25 -0.235)
( 0.48 -1.25 -0.235)
( 0.48 1.25 -0.235)
(-0.48 1.25 -0.235)
(-0.48 -1.25 0.25)
( 0.48 -1.25 0.25)
( 0.48 1.25 0.25)
(-0.48 1.25 0.25)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (15 25 15) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
maxY
{
type wall;
faces
(
(3 7 6 2)
);
}
minX
{
type patch;
faces
(
(0 4 7 3)
);
}
maxX
{
type patch;
faces
(
(2 6 5 1)
);
}
minY
{
type wall;
faces
(
(1 5 4 0)
);
}
minZ
{
type wall;
faces
(
(0 3 2 1)
);
}
maxZ
{
type wall;
faces
(
(4 5 6 7)
);
}
);

mergePatchPairs
(
);


// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2412 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

layer13_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer12_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

layer11_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer10_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

layer9_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer8_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

layer7_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer6_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

layer5_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer4_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

layer3_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer2_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

layer1_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
layer14_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

airshield1_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}
airshield2_mm.stl
{
extractionMethod extractFromSurface;

// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;

// Keep open edges (edges with 1 connected face)
openEdges yes;
}

// Write options
writeFeatureEdgeMesh yes;

// Write features to obj format for postprocessing
writeObj yes;
}

// ************************************************** *********************** //
szdavid is offline   Reply With Quote

Old   August 26, 2025, 09:36
Default
  #2
New Member
 
Aman
Join Date: Aug 2025
Posts: 1
Rep Power: 0
Aman_Shah is on a distinguished road
Hello brother, i am using snappyHexMesh to mesh my wing body but getting same error again and again that is

keyword file is undefined in dictionary "/home/aman_shah/OpenFOAM/aman_shah-/run/airfoilWing/system/snappyHexMeshDict/wing.stl"

can you please help me out with this
Aman_Shah is offline   Reply With Quote

Reply

Tags
coupled bc, layer addition, multiregion meshing, openfoam, snappy hex mesh

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
[snappyHexMesh] Why doesn't SnappyHexMesh retain patches from BlockMesh Nidalsb OpenFOAM Meshing & Mesh Conversion 10 February 20, 2023 09:48
[snappyHexMesh] Help with Snappy: no layers growing GianF OpenFOAM Meshing & Mesh Conversion 2 September 23, 2020 09:26
[snappyHexMesh] layer not added Rasmusiwersen OpenFOAM Meshing & Mesh Conversion 1 January 2, 2020 10:43
[snappyHexMesh] snappyHexMesh Boundary Layer at Corner panpanzhong OpenFOAM Meshing & Mesh Conversion 5 July 3, 2018 06:53
[snappyHexMesh] Disturbance in the mesh after the addition of layers Dorian1504 OpenFOAM Meshing & Mesh Conversion 0 June 13, 2017 03:27


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