CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   problem with adding layer in SHM (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/115897-problem-adding-layer-shm.html)

s.m April 9, 2013 02:33

problem with adding layer in SHM
 
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.

laurent98 April 9, 2013 08:08

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

MadsR April 12, 2013 03:32

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

Haces April 15, 2013 05:47

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

s.m April 16, 2013 06:11

adding layer with refineWallLayer
 
2 Attachment(s)
Quote:

Originally Posted by Haces (Post 420611)
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:

Haces April 16, 2013 06:34

Hi s.m,

You added two layers at the beginning try adding only one.

laurent98 April 16, 2013 19:27

hello S.m.
did you try to play with feature angle?
i had good results with feature angle= 10 ...
hope it s help LL

s.m April 18, 2013 02:09

Quote:

Originally Posted by laurent98 (Post 421069)
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 April 18, 2013 02:15

2 Attachment(s)
Quote:

Originally Posted by Haces (Post 420879)
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!?

Haces April 18, 2013 03:04

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

s.m April 21, 2013 03:36

Quote:

Originally Posted by Haces (Post 421420)
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;

Haces April 21, 2013 16:46

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

laurent98 April 21, 2013 19:39

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 April 21, 2013 21:02

1 Attachment(s)
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...

s.m April 22, 2013 02:55

Quote:

Originally Posted by laurent98 (Post 422193)
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 April 22, 2013 03:00

2 Attachment(s)
hi foamers,
i have another setting for SHM parameters, and i get me the following trailing edge :

laurent98 April 22, 2013 20:53

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

s.m April 23, 2013 02:18

Quote:

Originally Posted by laurent98 (Post 422454)
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 April 23, 2013 02:57

1 Attachment(s)
Quote:

Originally Posted by Haces (Post 422169)
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?


Haces April 23, 2013 03:30

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


All times are GMT -4. The time now is 06:56.