CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

fail adding layers

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 1, 2013, 07:38
Smile fail adding layers
  #1
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi everyone,

I am making my first steps in snHM and I am getting crazy. Two things I donīt understand:

1. Which parameters have I to play with to preserve planes from my stl geometry in the final mesh generated by snappy? At first I increased nSmoothPatch, but doesnīt worked. I have a geometry with two plane inlets and one plane outlet and I guess it is good to preserve it. I donīt want to modify so much my stl because itīs a small geometry (so little changes can let to false simulation results...)

2.How about addLayers? I saw in the forum that a lot of people have problems with this issue (me too). I want to make the same thickness of the first layer all over the domain close to the wall, so

-relativeSizes=false
-expansionRatio=1.5
-finalLayerThickness=1e-05 (I computed it from BL theory)
-minThickness=1e-06 (a value lower than first layer thickness)

Is this OK? Snappy is not doing anything with those settings. Should I play with feature angle or ngrow?Or maybe the problem is meshQualityCOntrols (maybe the quality requirements are too high so donīt allow the creation of layers, I set it to the default values of 20,4 and 2 for maxNonOrth,maxBoundarySk and maxInternalSk).

I can attach many logs (I am making a lot of meshes by trial and error) if its needed.

Any help will be really much appreciated (I switched to sHM from Engrid because it crashes my stl geometry in same cases, due to the sharp issues...and now I am stuck with sHM too )
Tensian is offline   Reply With Quote

Old   November 4, 2013, 10:09
Default
  #2
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
Hey Tensian,
I am also new to sHM perhaps i can help you with my knowledge what i could get so far.
First of all check if the "addLayers" step is activated in your sHMDict.
Can you please attach your sHMDict file? i would say that the meshQualityControls shouldnt be the prob but better let snappy run with the option : "snappyhexmesh > log.randomname" and post this logfile also here.

Remind when you cannot attach files or get any errors change the filetype to ".txt"

Greetings
gelbebanane is offline   Reply With Quote

Old   November 4, 2013, 12:22
Default
  #3
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi Phil, thanks for your reply.

I attach some snappyHexMeshDict I have used with wrong results.

Unfortunatly I don have the log file (it seems that I have runned sHM in parallel and I forgot to take it to a text file, just see it in the screen). But I will execute it again this week and then I will be able to attach the log file.

In all executions the number of faces added to layers are 0 and added layers are 0 too.I tried to use absolute sizes for layers, but failed.

Thanks.

/*--------------------------------*- C++ -*----------------------------------*\
| o | |
| o o | HelyxOS |
| o O o | Version: v1.0.3 |
| o o | Web: http://www.engys.com |
| o | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object snappyHexMeshDict;
}

castellatedMesh true;
snap true;
addLayers true;
geometry
{
in_left.stl
{
type triSurfaceMesh;
name in_left;
}

in_right.stl
{
type triSurfaceMesh;
name in_right;
}

out.stl
{
type triSurfaceMesh;
name out;
}

wall.stl
{
type triSurfaceMesh;
name wall;
}

}

castellatedMeshControls
{
features
(
);
refinementSurfaces
{
in_left
{
level (5 5 );
regions
{
}

}

in_right
{
regions
{
}

level (5 5 );
}

out
{
regions
{
}

level (10 15 );
}

wall
{
regions
{
}

level (8 12 );
}

}

refinementRegions
{
}

locationInMesh (0.0807128 0.0096 0.0117277 );
maxLocalCells 1000000;
maxGlobalCells 5000000;
minRefinementCells 1;
nCellsBetweenLevels 3;
resolveFeatureAngle 30;
allowFreeStandingZoneFaces false;
}

snapControls
{
nSolveIter 300;
nSmoothPatch 10;
tolerance 1.0;
nRelaxIter 5;
nFeatureSnapIter 10;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap false;
}

addLayersControls
{
layers
{
"wall._*"{
nSurfaceLayers 5;
}
}

relativeSizes false;
expansionRatio 1.5;
finalLayerThickness 0.01;
minThickness 0.0000001;
nGrow 2;
featureAngle 180;
slipFeatureAngle 30;
nRelaxIter 5;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 90;
nBufferCellsNoExtrude 0;
nLayerIter 50;
nRelaxedIter 20;
}

meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minFlatness 0.5;
minVol 1.00E-13;
minTetQuality -1e30;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
}

debug 0;
mergeTolerance 1E-6;


__________________________________________________ _____________

/*--------------------------------*- C++ -*----------------------------------*\
| o | |
| o o | HelyxOS |
| o O o | Version: v1.0.3 |
| o o | Web: http://www.engys.com |
| o | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location system;
object snappyHexMeshDict;
}

castellatedMesh true;
snap true;
addLayers true;
geometry
{
in_left.stl
{
type triSurfaceMesh;
name in_left;
}

in_right.stl
{
type triSurfaceMesh;
name in_right;
}

out.stl
{
type triSurfaceMesh;
name out;
}

wall.stl
{
type triSurfaceMesh;
name wall;
}

}

castellatedMeshControls
{
features
(
);
refinementSurfaces
{
in_left
{
level (7 7 );
regions
{
}

}

in_right
{
regions
{
}

level (7 7 );
}

out
{
regions
{
}

level (10 12 );
}

wall
{
regions
{
}

level (10 12 );
}

}

refinementRegions
{
}

locationInMesh (0.0807128 0.0096 0.0117277 );
maxLocalCells 2000000;
maxGlobalCells 6000000;
minRefinementCells 1;
nCellsBetweenLevels 2;
resolveFeatureAngle 30;
allowFreeStandingZoneFaces false;
}

snapControls
{
nSolveIter 300;
nSmoothPatch 5;
tolerance 1.0;
nRelaxIter 10;
nFeatureSnapIter 10;
implicitFeatureSnap false;
explicitFeatureSnap true;
multiRegionFeatureSnap false;
}

addLayersControls
{
layers
{
"wall_.*"{
nSurfaceLayers 5;
}
}

relativeSizes true;
expansionRatio 1.5;
finalLayerThickness 0.50625;
minThickness 0.0000001;
nGrow 0;
featureAngle 180;
slipFeatureAngle 30;
nRelaxIter 5;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 90;
nBufferCellsNoExtrude 0;
nLayerIter 50;
nRelaxedIter 20;
}

meshQualityControls
{
maxNonOrtho 50;
maxBoundarySkewness 2;
maxInternalSkewness 2;
maxConcave 80;
minFlatness 0.5;
minVol 1.00E-13;
minTetQuality -1e30;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
}

debug 0;
mergeTolerance 1E-6;
Tensian 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
chtMultiRegionSimpleFoam samiam1000 OpenFOAM Running, Solving & CFD 28 May 16, 2015 11:33
Fail to create boundary layers during sHM farahiam OpenFOAM Native Meshers: snappyHexMesh and Others 13 October 15, 2014 19:46
Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Native Meshers: snappyHexMesh and Others 1 April 22, 2013 02:32
SnappyHexMesh doesn't succeed in adding several layers eti0123456789 OpenFOAM Native Meshers: snappyHexMesh and Others 5 April 9, 2013 02:36
Effect of adding layers with sHM Nucleophobe OpenFOAM Native Meshers: snappyHexMesh and Others 4 August 20, 2012 16:45


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