CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

snappyHexMesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 30, 2011, 06:05
Default snappyHexMesh
  #1
Member
 
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 5
dhruv is on a distinguished road
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;

// ************************************************** *********************** //
Attached Images
File Type: jpg Mesh.jpg (97.4 KB, 50 views)
File Type: jpg Mesh at corners.jpg (98.3 KB, 56 views)
dhruv is offline   Reply With Quote

Old   October 1, 2011, 16:02
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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

Last edited by wyldckat; October 2, 2011 at 07:00. Reason: missing line break...
wyldckat is offline   Reply With Quote

Old   October 5, 2011, 03:47
Default
  #3
Member
 
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 5
dhruv is on a distinguished road
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 View Post
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 is offline   Reply With Quote

Old   October 5, 2011, 09:27
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,312
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi dhruv,

Quote:
Originally Posted by dhruv View Post
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 View Post
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
wyldckat is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Results With snappyHexMesh calebamiles OpenFOAM Running, Solving & CFD 0 August 14, 2011 16:02
SnappyHexMesh Issues deji OpenFOAM 14 June 18, 2011 04:39
Createpatch and SnappyHexMesh hm86 OpenFOAM Native Meshers: snappyHexMesh and Others 1 February 3, 2011 10:50
stitchMesh and snappyHexMesh gdbaldw OpenFOAM 0 December 23, 2009 03:09
SnappyHexMesh not generate mesh first time mavimo OpenFOAM Mesh Utilities 4 August 26, 2008 07:08


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