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

[snappyHexMesh] problem with adding layer in SHM

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2013, 03:33
Default problem with adding layer in SHM
  #1
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Hello,

I am using SnappyHexMesh with OF 2.0.1 to study a simple 2D wing. In order to use SnappyHexMesh, it is in fact a 3D case with a thin "wind tunnel". But SnappyHexMesh doesn't succeed in adding several layers in the boundary layer,can anyone tell me what should i do for giving good layers near the airfoil. i use low Re number turbulence models and i need to have small layer distance near the airfoil surface. please help me.
Regards.
s.m is offline   Reply With Quote

Old   April 9, 2013, 09:08
Default
  #2
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
hi sm
i am actually working on a 2D case, have a look on the post nCellsBetweenLevels problem
will keep you up date as soon avery thing works...
LL
laurent98 is offline   Reply With Quote

Old   April 12, 2013, 04:32
Default
  #3
Senior Member
 
MadsR's Avatar
 
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 17
MadsR is on a distinguished road
s.m,

maybe you could use a newer version of OF? A lot has happened to snappyHexMesh since 2.0.1. If your virtual wind tunnel is very thin there is a risk that the problem will persist, though.

Mads
__________________
Online free airfoil-mesher for OpenFOAM here

Last edited by MadsR; April 15, 2013 at 07:57.
MadsR is offline   Reply With Quote

Old   April 15, 2013, 06:47
Default
  #4
New Member
 
David Haces
Join Date: Mar 2013
Posts: 28
Rep Power: 13
Haces is on a distinguished road
Hi s.m,

What you can do is add one layer with snappy and then add the rest of the layers running the application refineWallLayer. I solve the same problem as you doing this. Hope this helps.

Best,
David
Haces is offline   Reply With Quote

Old   April 16, 2013, 07:11
Default adding layer with refineWallLayer
  #5
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by Haces View Post
Hi s.m,

What you can do is add one layer with snappy and then add the rest of the layers running the application refineWallLayer. I solve the same problem as you doing this. Hope this helps.

Best,
David
hi David
i did what you tell me, but my layers at the trailing edge got damaged as you see in the pictures in following:
Attached Images
File Type: jpg 11.jpg (63.5 KB, 105 views)
File Type: jpg 2.jpg (40.2 KB, 96 views)
s.m is offline   Reply With Quote

Old   April 16, 2013, 07:34
Default
  #6
New Member
 
David Haces
Join Date: Mar 2013
Posts: 28
Rep Power: 13
Haces is on a distinguished road
Hi s.m,

You added two layers at the beginning try adding only one.
Haces is offline   Reply With Quote

Old   April 16, 2013, 20:27
Default
  #7
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
hello S.m.
did you try to play with feature angle?
i had good results with feature angle= 10 ...
hope it s help LL
laurent98 is offline   Reply With Quote

Old   April 18, 2013, 03:09
Default
  #8
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by laurent98 View Post
hello S.m.
did you try to play with feature angle?
i had good results with feature angle= 10 ...
hope it s help LL
hi laurent;
thanks a lot for replying me, would you please tell me more about feature angle in SHM, what is the difference between feature angle=10 and e.g. feature angle=180?
s.m is offline   Reply With Quote

Old   April 18, 2013, 03:15
Default
  #9
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by Haces View Post
Hi s.m,

You added two layers at the beginning try adding only one.
hi David;
thanks a lot for replying me, i did what you tell me and these are the results, thanks agian David, the results makes me happy
but i do not know why my trailing edge is deforming in this way!?
Attached Images
File Type: jpg 66.jpg (30.6 KB, 54 views)
File Type: jpg 77.jpg (28.6 KB, 45 views)
s.m is offline   Reply With Quote

Old   April 18, 2013, 04:04
Default
  #10
New Member
 
David Haces
Join Date: Mar 2013
Posts: 28
Rep Power: 13
Haces is on a distinguished road
Hi,
Are you sure that this is not a problem in the sapping? Run the castellated mesh and the snapping. See the results and then add the layers
Haces is offline   Reply With Quote

Old   April 21, 2013, 04:36
Default
  #11
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by Haces View Post
Hi,
Are you sure that this is not a problem in the sapping? Run the castellated mesh and the snapping. See the results and then add the layers
hi Davi;
it seems that my SHM doesn’t snapp well, my snapControls in my SHM is in the following:
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;

//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0;

//- Number of mesh displacement relaxation iterations.
nSolveIter 30;

//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;

//- Highly experimental and wip: number of feature edge snapping
// iterations. Leave out altogether to disable.
//nFeatureSnapIter 10;
}

would you please tell me how should i change the numbers of it's parameters for having a good trailing edge in my airfoil.
thanks o lot

p-s: the whole file of my SHM is :

castellatedMesh true;
snap true;
addLayers true;


geometry
{
airfoil.stl
{
type triSurfaceMesh;
name airfoil;
}

refinementBox
{
type searchableBox;
min (-1 -1 -1);
max ( 5 1 1);
}
};


castellatedMeshControls
{

maxLocalCells 100000; // 2500000;


maxGlobalCells 2000000; // 10000000;


minRefinementCells 100; // 0;


nCellsBetweenLevels 6; //8;

features
(
{
file "airfoil.eMesh";
level 0;
}
);


{
airfoil
{

level (4 4);
}
}


resolveFeatureAngle 30;


refinementRegions
{
refinementBox
{
mode inside;
levels ((1e15 3));
}
}


locationInMesh (-0.5 -0.1 0);



allowFreeStandingZoneFaces true;
}



snapControls
{

nSmoothPatch 3;


tolerance 4.0;


nSolveIter 30;

nRelaxIter 5;


//nFeatureSnapIter 10;
}




addLayersControls
{

relativeSizes true;


layers
{
"airfoil.*"
{
nSurfaceLayers 1;
}
}

expansionRatio 1.2;

finalLayerThickness 0.6;

minThickness 0.1;


featureAngle 60;

nRelaxIter 5;

nSmoothSurfaceNormals 1;

nSmoothNormals 3;

nSmoothThickness 10;
maxFaceThicknessRatio 0.5;

maxThicknessToMedialRatio 0.3;

minMedianAxisAngle 90;

nBufferCellsNoExtrude 0;

nLayerIter 50;
}



meshQualityControls
{
maxNonOrtho 45;

maxBoundarySkewness 2;
maxInternalSkewness 2;

maxConcave 80;

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;
}

debug 0;

mergeTolerance 1e-6;
s.m is offline   Reply With Quote

Old   April 21, 2013, 17:46
Default
  #12
New Member
 
David Haces
Join Date: Mar 2013
Posts: 28
Rep Power: 13
Haces is on a distinguished road
Hi s.m,

It looks that it was working because in the previous images the edge is well snapped.
Try relaxing the meshQualityControls: maxNonOrtho 65; maxInternalSkewness 4; You can also play with the feature angle
Haces is offline   Reply With Quote

Old   April 21, 2013, 20:39
Default
  #13
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
hi sm
sorry i gave you bad information, you should try to augment featureAngle up to 100 or even 355...
i have made to try on a case it works fine
hope it help LL
laurent98 is offline   Reply With Quote

Old   April 21, 2013, 22:02
Default
  #14
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
hi sm
here a exemple... the telling edge of my .stl file is 10 deg but featureAngle concern cells angles... it s a limit above witch layer are not include ...
hope it help...
Attached Images
File Type: jpg fa100.jpg (80.8 KB, 68 views)
laurent98 is offline   Reply With Quote

Old   April 22, 2013, 03:55
Default
  #15
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by laurent98 View Post
hi sm
here a exemple... the telling edge of my .stl file is 10 deg but featureAngle concern cells angles... it s a limit above witch layer are not include ...
hope it help...
HI laurentL
would you please put your SHM here?
my turbulence models are LowRe number models so i have to have y+<1
for this purpose i use refineWallLayer Utility after running the SHM, but now it seems that the parameters of SHM are not consistent to each other so gain bad tarailing edge meshing.
thanks.
s.m is offline   Reply With Quote

Old   April 22, 2013, 04:00
Default
  #16
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
hi foamers,
i have another setting for SHM parameters, and i get me the following trailing edge :
Attached Images
File Type: jpg 4.jpg (43.9 KB, 60 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (10.0 KB, 14 views)
s.m is offline   Reply With Quote

Old   April 22, 2013, 21:53
Default
  #17
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 73
Rep Power: 14
laurent98 is on a distinguished road
hi sm
please try your shmDict with feature angle 150
instead of 60 as i can see

//- When not to extrude surface. 0 is flat surface, 90 is when two faces
// make straight angle.
featureAngle 60
laurent98 is offline   Reply With Quote

Old   April 23, 2013, 03:18
Default
  #18
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by laurent98 View Post
hi sm
please try your shmDict with feature angle 150
instead of 60 as i can see

//- When not to extrude surface. 0 is flat surface, 90 is when two faces
// make straight angle.
featureAngle 60
hi laurent,
i change my featureAngle to 150 as you said but i doesn't change at all,
i have one airfoil with two different snappyHexMeshDict but none of them give me a right mesh at the trailing edge !!
what should i do to have a better meshing on airfoil?
s.m is offline   Reply With Quote

Old   April 23, 2013, 03:57
Default
  #19
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 14
s.m is on a distinguished road
Quote:
Originally Posted by Haces View Post
Hi s.m,

It looks that it was working because in the previous images the edge is well snapped.
Try relaxing the meshQualityControls: maxNonOrtho 65; maxInternalSkewness 4; You can also play with the feature angle
hi David
i set maxNonOrtho 65; maxInternalSkewness 4; and also featureAngle 150; as laurentL said me, the result is really nice as you see:
Dear David would you please tell me more explanation about maxNonOrtho and maxInternalSkewness?

Attached Images
File Type: jpg sa.jpg (25.1 KB, 52 views)
s.m is offline   Reply With Quote

Old   April 23, 2013, 04:30
Default
  #20
New Member
 
David Haces
Join Date: Mar 2013
Posts: 28
Rep Power: 13
Haces is on a distinguished road
Hi,
If you set restrictive parameters in the quality controls the quality of the mesh will be better but it will create more problems during the snapping
s.m likes this.
Haces is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Error defining boundary layer around cube snappyHexMesh crizpi21 OpenFOAM Meshing & Mesh Conversion 5 October 16, 2021 11:56
[snappyHexMesh] adding layers on complex terrain surface in SHM potac OpenFOAM Meshing & Mesh Conversion 1 November 9, 2020 07:40
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 08:55
[snappyHexMesh] Adding Layer Problem talatgokcer OpenFOAM Meshing & Mesh Conversion 0 December 4, 2015 02:23
Prismatic boundary layer KateEisenhower enGrid 5 September 15, 2015 08:48


All times are GMT -4. The time now is 16:27.