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;
}
// ************************************************** *********************** //
|