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

[snappyHexMesh] snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 30, 2011, 06:05
Default snappyHexMesh
  #1
Member
 
supercommandodhruv
Join Date: Sep 2011
Posts: 57
Rep Power: 14
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, 52 views)
File Type: jpg Mesh at corners.jpg (98.3 KB, 59 views)
dhruv is offline   Reply With Quote

Old   October 1, 2011, 16:02
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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: 14
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
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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


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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 06:01
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing peterhess OpenFOAM Meshing & Mesh Conversion 2 January 3, 2018 02:54
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. jasv OpenFOAM Meshing & Mesh Conversion 4 May 10, 2016 02:55
[snappyHexMesh] snappyhexmesh doesn't creat mesh in parallel issue? klausb OpenFOAM Meshing & Mesh Conversion 1 March 7, 2015 11:55
[snappyHexMesh] stitchMesh and snappyHexMesh gdbaldw OpenFOAM Meshing & Mesh Conversion 0 December 23, 2009 02:09


All times are GMT -4. The time now is 08:43.