|
[Sponsors] |
[snappyHexMesh] Problem with the boundary layer using snappyHexMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 18, 2010, 08:22 |
Problem with the boundary layer using snappyHexMesh
|
#1 |
Member
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 17 |
Hello,
this is my first post here. Currently I am working at a company which provides CFD services mainly for the automotive industry. Right now I am still an intern but shortly will start writing my diploma thesis here. Well my task is to find out what can be done with OpenFoam. Often, when I try to create a mesh with snappyHexMesh I get problems with the boundary layer. And this leads to my first question: Check out the attached picture of a Porsche I have meshed. Why is the boundary layer below the door? In case you think my blockMeshDict is fault, here is the text: Code:
FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1.0; vertices ( ( -70 -70 8.000) ( 300 -70 8.000) ( 300 140 8.000) ( -70 140 8.000) ( -70 -70 100.000) ( 300 -70 100.000) ( 300 140 100.000) ( -70 140 100.000) ); blocks ( hex (0 1 2 3 4 5 6 7) (40 20 10) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet ( (0 4 7 3) ) patch outlet ( (1 2 6 5) ) patch floor ( (0 3 2 1) ) patch sides ( (0 1 5 4) (4 5 6 7) (2 3 7 6) ) ); mergeMatchPairs ( ); Last edited by LVDH; January 18, 2010 at 08:39. |
|
January 19, 2010, 06:07 |
|
#3 |
Member
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 17 |
Hi,
I seem to have solved my first problem. The surrounding box generated by blockMesh cut off a small part of the cars tires. I did this on purpose but enlarging the box and therefor having a levitating car got the boundary layer on the car. Still I have a problem with this boundary layer. It is not to be found everywhere. On some sections it is missing on some others it does not have the desired number of layers. See the attached pictures. Since I have rescaled the 100m long Porsche to a 4m long Porsche my Dicts have changed: Code:
{ version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1.0; vertices ( ( -3 -3 0.25) ( 12 -3 0.25) ( 12 6 0.25) ( -3 6 0.25) ( -3 -3 4.000) ( 12 -3 4.000) ( 12 6 4.000) ( -3 6 4.000) /* ( -70 -70 6.000) ( 300 -70 6.000) ( 300 140 6.000) ( -70 140 6.000) ( -70 -70 100.000) ( 300 -70 100.000) ( 300 140 100.000) ( -70 140 100.000)*/ ); blocks ( hex (0 1 2 3 4 5 6 7) (40 20 10) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet ( (0 4 7 3) ) patch outlet ( (1 2 6 5) ) patch floor ( (0 3 2 1) ) patch sides ( (0 1 5 4) (4 5 6 7) (2 3 7 6) ) ); mergeMatchPairs ( ); Code:
{ version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { porsche.stl { type triSurfaceMesh; name AUTO; } refinementBox { type searchableBox; min (-1 -0.5 0.25); max ( 8 3.5 3); } }; castellatedMeshControls { maxLocalCells 100000; maxGlobalCells 200000; minRefinementCells 10; nCellsBetweenLevels 6; features ( //{ // file "someLine.eMesh"; // level 2; //} ); refinementSurfaces { AUTO { level (4 4); } } resolveFeatureAngle 30; refinementRegions { refinementBox { mode inside; levels ((1E15 2)); } AUTO { mode distance; levels ((0.6 3) (1.1 2)); } } locationInMesh (-2.234 -2.0343 3.43); } snapControls { nSmoothPatch 4; tolerance 4.5; nSolveIter 40; nRelaxIter 6; } addLayersControls { relativeSizes true; layers { AUTO_patch8224 { nSurfaceLayers 5; } } expansionRatio 1.2; finalLayerThickness 0.2; minThickness 0.04; nGrow 1; featureAngle 30; nRelaxIter 3; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 130; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; 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; |
|
January 27, 2010, 00:58 |
|
#4 |
New Member
|
||
January 28, 2010, 08:36 |
|
#5 |
Member
Andre Z
Join Date: Dec 2009
Posts: 75
Rep Power: 17 |
I have tried the tips deducted from that thread.
Now the mesh is getting better. Still there are areas without boundarylayer. I guess I just have to tweak the snappyHexMesh settings a little more. I never had such trouble, but I guess after I finish this mesh my new experience will allow me to get my other stuff meshed a bit faster. Hey, maybe someone else who tried to mesh this car (I have seen a few other meshes) can show me his snappyDict? |
|
March 4, 2010, 08:11 |
|
#6 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Andre,
I have exactly the same problem. I have areas where there is no boundary layers. Did you solve the problem ? Which parameters are important to improve the boundary layers ? Best regards, Stephane. |
|
March 4, 2010, 09:45 |
|
#7 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
I have attached a picture to show again the problem.
There are some areas (corners) where there is no layer. Stephane. |
|
March 10, 2010, 09:46 |
|
#8 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Any ideas how to solve this problem ?
Stephane. |
|
March 15, 2010, 08:47 |
|
#9 |
New Member
Julius
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hello Stephane,
all snappyHexMesh boundary layers were collapsing at the end of a surface, this seems to be normal. Have look at the Porsche above, too. This should be modifyable in a certain range with the featureAngle setting in the "addLayerControls" subdictionary. Good Luck, Julius |
|
March 15, 2010, 09:30 |
|
#10 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Hi Julius,
it seems to work (see attached picture). I have changed the featureAngle value in the "addLayerControls" subdictionary. Default value was 30 New value is 5 To be sure I would like to select only the cells located into the boundary layers. Do you know how to do it with paraview ? Regards, Stephane. |
|
March 15, 2010, 10:19 |
|
#11 |
New Member
Julius
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hello again,
if you're using ParaFoam (paraview with the native OpenFOAM reader) you should be able to select the "include Sets" option. Now the "added Cells - cellSet" and the "layerFaces - faceSet" appear in the "region status" box. The added Cells set should be what you're looking for. Regards, Julius |
|
March 15, 2010, 10:42 |
|
#12 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Julius,
I can't find the "region status" box ! Stephane. |
|
March 15, 2010, 11:30 |
|
#13 |
New Member
Julius
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Stephane,
If you use paraFoam it will look like the following screenshot. There you see the mentioned box and above the "include sets" option checked. In case you don't know how to use / compile paraFoam and the necessary PV3FoamReader please search the forum because this is a common issue. Regards, Julius |
|
March 15, 2010, 11:42 |
|
#14 |
Senior Member
stephane sanchi
Join Date: Mar 2009
Posts: 314
Rep Power: 18 |
Julius,
OK. Thanks. Now I can visualize the boundary layers cells. I use paraFoam 3.6.1. And the box name is mesh parts. Regards, Stephane. |
|
Tags |
snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Triangular elements in boundary layers generated by snappyHexMesh | mike.franky | OpenFOAM Meshing & Mesh Conversion | 0 | June 3, 2018 10:46 |
[cfMesh] boundary layer problem using cfMesh | dupeng | OpenFOAM Community Contributions | 1 | May 28, 2018 16:30 |
[snappyHexMesh] problem with snappyHexMesh | kanes | OpenFOAM Meshing & Mesh Conversion | 10 | January 26, 2016 07:11 |
Validity & transformation of boundary layer equations | Obad | Main CFD Forum | 2 | April 27, 2015 03:59 |
[snappyHexMesh] Problem with snappyHexMesh | samiam1000 | OpenFOAM Meshing & Mesh Conversion | 2 | December 13, 2012 09:41 |