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

problem with adding layer in SHM

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 9, 2013, 02:33
Default problem with adding layer in SHM
  #1
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 08:08
Default
  #2
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 65
Rep Power: 5
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, 03:32
Default
  #3
Senior Member
 
MadsR's Avatar
 
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 175
Rep Power: 8
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 06:57.
MadsR is offline   Reply With Quote

Old   April 15, 2013, 05:47
Default
  #4
New Member
 
David Haces
Join Date: Mar 2013
Posts: 26
Rep Power: 4
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, 06:11
Default adding layer with refineWallLayer
  #5
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 56 views)
File Type: jpg 2.jpg (40.2 KB, 52 views)
s.m is offline   Reply With Quote

Old   April 16, 2013, 06:34
Default
  #6
New Member
 
David Haces
Join Date: Mar 2013
Posts: 26
Rep Power: 4
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, 19:27
Default
  #7
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 65
Rep Power: 5
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, 02:09
Default
  #8
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 02:15
Default
  #9
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 31 views)
File Type: jpg 77.jpg (28.6 KB, 27 views)
s.m is offline   Reply With Quote

Old   April 18, 2013, 03:04
Default
  #10
New Member
 
David Haces
Join Date: Mar 2013
Posts: 26
Rep Power: 4
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, 03:36
Default
  #11
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 16:46
Default
  #12
New Member
 
David Haces
Join Date: Mar 2013
Posts: 26
Rep Power: 4
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, 19:39
Default
  #13
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 65
Rep Power: 5
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, 21:02
Default
  #14
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 65
Rep Power: 5
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, 39 views)
laurent98 is offline   Reply With Quote

Old   April 22, 2013, 02:55
Default
  #15
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 03:00
Default
  #16
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 31 views)
Attached Files
File Type: txt snappyHexMeshDict.txt (10.0 KB, 5 views)
s.m is offline   Reply With Quote

Old   April 22, 2013, 20:53
Default
  #17
Member
 
laurentL
Join Date: Oct 2011
Location: new caledonia
Posts: 65
Rep Power: 5
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, 02:18
Default
  #18
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 02:57
Default
  #19
s.m
Senior Member
 
saeideh mohamadi
Join Date: Aug 2012
Posts: 229
Rep Power: 5
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, 25 views)
s.m is offline   Reply With Quote

Old   April 23, 2013, 03:30
Default
  #20
New Member
 
David Haces
Join Date: Mar 2013
Posts: 26
Rep Power: 4
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
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
Fail to create boundary layers during sHM farahiam OpenFOAM Native Meshers: snappyHexMesh and Others 13 October 15, 2014 19:46
Mixed Convection Turbulent Boundary Layer Problem deji OpenFOAM 14 May 29, 2014 09:51
Problem with snappyHexMesh samiam1000 OpenFOAM 2 December 13, 2012 09:41
Flat plate boundary layer problem student Main CFD Forum 3 May 21, 2007 13:10
errors Fahad Main CFD Forum 0 March 23, 2004 14:20


All times are GMT -4. The time now is 11:45.