Vinzmann |
May 19, 2023 11:06 |
Bad mesh in small channel
1 Attachment(s)
Hello everybody,
I have a small channel in my geometry which is a kind of nozzle. My problem is that my mesh in this channel always looks horrible.
I'd be very thankful if you could take a look at my snappyHexMeshDict and my meshQualityDict.
The small geometry is called duese and the inlet sits at the face of this channel.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 8 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 8;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers true;
keepPatches yes;
geometry
{
rohr.stl
{
type triSurfaceMesh;
name rohr;
inGroups (walls);
}
inlet.stl
{
type triSurfaceMesh;
name inlet;
}
cOut.stl
{
type triSurfaceMesh;
name cOutlet;
inGroups (outlets);
}
wOut.stl
{
type triSurfaceMesh;
name wOutlet;
inGroups (outlets);
}
drossel.stl
{
type triSurfaceMesh;
name drossel;
inGroups (walls);
}
duese.stl
{
type triSurfaceMesh;
name duese;
inGroups (dueseGroup);
}
kammer.stl
{
type triSurfaceMesh;
name kammer;
inGroups (walls);
}
globalRefinement
{
type searchableCylinder;
point1 (0 0 0.1);
point2 (0 0 0.2);
radius 0.02;
}
};
castellatedMeshControls
{
maxLocalCells 10000000;
maxGlobalCells 200000000;
minRefinementCells 5;
nCellsBetweenLevels 5;
features
(
{
file "rohr.eMesh";
level 4;
}
{
file "drossel.eMesh";
level 1;
}
{
file "duese.eMesh";
level 3;
}
{
file "inlet.eMesh";
level 3;
}
{
file "wOut.eMesh";
level 1;
}
{
file "cOut.eMesh";
level 1;
}
{
file "kammer.eMesh";
level 1;
}
);
refinementSurfaces
{
"(rohr)"
{
level (3 3);
patchInfo
{
type wall;
inGroups (walls);
}
}
"(kammer)"
{
level (1 3);
patchInfo
{
type wall;
inGroups (walls);
}
}
"(drossel)"
{
level (1 1);
gapLevelIncrement 2;
patchInfo
{
type wall;
inGroups (walls);
}
}
"(duese)"
{
level (5 5);
patchInfo
{
type wall;
inGroups (dueseGroup);
}
}
"(inlet)"
{
level (5 5);
patchInfo
{
type mappedPatch;
offset (0 0.1 0);
sampleRegion region0;
sampleMode nearestCell;
samplePatch none;
}
}
"(cOutlet)"
{
level (1 1);
patchInfo
{
type patch;
inGroups (outlets);
}
}
"(wOutlet)"
{
level (1 1);
patchInfo
{
type patch;
inGroups (outlets);
}
}
}
resolveFeatureAngle 30;
refinementRegions
{
globalRefinement
{
mode inside;
levels ((1e15 1));
gapMode mixed;
gapLevel (4 0 4);
}
rohr
{
mode distance;
levels ((0.001 2));
}
inlet
{
mode distance;
levels ((0.002 2));
}
kammer
{
mode distance;
levels ((0.001 2));
}
drossel
{
mode distance;
levels ((0.0004 4) (0.0008 3));
}
}
locationInMesh (0.001 0.001 0.1);
allowFreeStandingZoneFaces true;
}
snapControls
{
nSmoothPatch 1;
nSmoothInternal 1;
tolerance 0.7;
nSolveIter 100;
nRelaxIter 8;
nFeatureSnapIter 80;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap false;
}
addLayersControls
{
relativeSizes true;
layers
{
walls
{
nSurfaceLayers 7;
}
duese
{
nSurfaceLayers 10;
}
inlet
{
nSurfaceLayers 6;
thickness 2;
expansionRatio 1;
}
}
expansionRatio 1.2;
//finalLayerThickness 2;
thickness 2;
minThickness 0.0001;
nGrow 0;
featureAngle 230;
slipFeatureAngle 90;
nRelaxIter 1;
nSmoothSurfaceNormals 2;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.3;
maxThicknessToMedialRatio 0.3;
minMedialAxisAngle 90;
nBufferCellsNoExtrude 0;
nLayerIter 50;
nRelaxedIter 1;
additionalReporting true;
}
meshQualityControls
{
#include "meshQualityDict"
relaxed
{
maxNonOrtho 35;
}
maxNonOrtho 35;
nSmoothScale 8;
errorReduction 1.5;
}
writeFlags
(
scalarLevels
layerSets
layerFields
);
mergeTolerance 1e-6;
// ************************************************************************* //
My meshQualityDict looks like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 8 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
minFaceWeight 0.02;
maxBoundarySkewness 3;//20
maxInternalSkewness 2;//4
maxConcave 30;//40
minVol 1e-13;
minTetQuality 1e-3;//1e-15
minArea -1;
minTwist 0.02;
minDeterminant 0.01;//0.001
minFaceWeight 0.05;//0.05
minFaceFlatness -1;
minVolRatio 0.01;//0.01
minTriangleTwist -1;
nSmoothScale 8;//8
errorReduction 1.5;//.75
// ************************************************************************* //
I've attached a picture of the mesh.
Best regards,
Vinz
|