CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] snappyHexMesh (https://www.cfd-online.com/Forums/openfoam-meshing/92971-snappyhexmesh.html)

dhruv September 30, 2011 06:05

snappyHexMesh
 
2 Attachment(s)
Hi,

I am using OF 2.0 and sHM. I have a rectangular channel with some internal thickness. I want to have boundary layers on the inside walls of this channel. When I do the meshing with snappy using the featureEdge, the boundary layers are not extended through the entire length of the channel, especially near the corners of the geometry. I am attaching pictures of the generated Mesh. Can anyone tell me how to make a consistent layer? I am also attaching the sHMDict file.
Quote:

*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap true;
addLayers true;


// ************************************************** **************************
geometry
{
geo.stl
{
type triSurfaceMesh;
name geo;
}
refBox
{
type searchableBox;
min (-20 0 -20);
max (855 850 850);
}
}
// ************************************************** **************************
castellatedMeshControls
{
maxLocalCells 5000000;
maxGlobalCells 10000000;
minRefinementCells 5;
//maxLoadUnbalance 0.10;
nCellsBetweenLevels 3;

features
(

{
file "geo.eMesh";
level 2;
}

);

refinementRegions
{
refBox
{
mode inside;
levels ((0.1 1));
}
}
refinementSurfaces
{
geo
{
level (1 2);
}
};
resolveFeatureAngle 150;

locationInMesh (50 50 50);
allowFreeStandingZoneFaces true;
}

// ************************************************** **************************
snapControls
{
nSmoothPatch 5;
tolerance 4.0;
nSolveIter 30;
nRelaxIter 5;
nFeatureSnapIter 10;
}

// ************************************************** **************************
addLayersControls
{
layers
{
"geo_walls"
{
nSurfaceLayers 10;
}


}
relativeSizes true;
expansionRatio 1.05;
finalLayerThickness 0.1;
minThickness 0.1;
nGrow 1;
featureAngle 150;
nRelaxIter 5;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 130;
nBufferCellsNoExtrude 0;
nLayerIter 50;
nRelaxedIter 20;
}

// ************************************************** **************************
meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minFlatness 0.5;
minVol 1e-13;
minTetQuality 1e-30;
minArea -1;
minTwist 0.05;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
relaxed
{
}
}

debug 0;

mergeTolerance 1e-6;

// ************************************************** *********************** //


wyldckat October 1, 2011 16:02

Greetings dhruv,

Try checking first the resolution after only running the castellatedMesh phase. Either put the other two to false or run snappyHexMesh without "-overwrite".

Then check the level of resolution in that area that is missing the very refined zone. That kind of stopping the layer before reaching the corner, is usually due to some parameter (that I don't know about); but basically, it stops 1 cell before the corner. By looking at the attached images, there is additional refinement after the snapping, which enhances the resolution near the corners, but still has that previous limitation.

Either way, try the isolate-and-conquer process ;)

Best regards,
Bruno

dhruv October 5, 2011 03:47

Hi Bruno,

Thanks for the reply. Do you mean that I should run each step separately without overwriting the constant/polyMesh dir? Will it make a difference to the final Mesh?

Dhruv

Quote:

Originally Posted by wyldckat (Post 326371)
Greetings dhruv,

Try checking first the resolution after only running the castellatedMesh phase. Either put the other two to false or run snappyHexMesh without "-overwrite".

Then check the level of resolution in that area that is missing the very refined zone. That kind of stopping the layer before reaching the corner, is usually due to some parameter (that I don't know about); but basically, it stops 1 cell before the corner. By looking at the attached images, there is additional refinement after the snapping, which enhances the resolution near the corners, but still has that previous limitation.

Either way, try the isolate-and-conquer process ;)

Best regards,
Bruno


wyldckat October 5, 2011 09:27

Hi dhruv,

Quote:

Originally Posted by dhruv (Post 326730)
Do you mean that I should run each step separately without overwriting the constant/polyMesh dir?

The idea is to have access to the intermediate meshes, in order to figure out in which stage things get broken. The meshes for each stage will be saved in a time snapshot/instance.

Quote:

Originally Posted by dhruv (Post 326730)
Will it make a difference to the final Mesh?

It might make a difference, but AFAIK the main difference would only be that some cells wouldn't get removed.

Good luck!
Bruno


All times are GMT -4. The time now is 03:37.