|
[Sponsors] |
[snappyHexMesh] Bumpy Wing with snappyHexMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 24, 2012, 13:07 |
Bumpy Wing with snappyHexMesh
|
#1 |
New Member
Ian
Join Date: Nov 2011
Posts: 5
Rep Power: 15 |
I have been trying to mesh a wing in a wind tunnel using snappyHexMesh. I have an issue where I end up with bumps on the wing. Initially I had problems resolving the sharp discontinuities but overcame these using a mixture of edge snapping and mesh refinement.
The resultant leading edge was highly faceted so I added a searchableCylinder along the leading edge with an extra layer of refinement. When doing this bumps appeared on the upper surface (as shown in the figure). The settings for SHM are shown below. I would prefer not to have a fine mesh over the whole surface as the cell count when we do full aircraft analyses would be too high. Any ideas or solutions would be welcome. Ian Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object autoHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers false; // Geometry. Definition of all surfaces. All surfaces are of class // searchableSurface. // Surfaces are used // - to specify refinement for any mesh cell intersecting it // - to specify refinement for any mesh cell inside/outside/near // - to 'snap' the mesh boundary to the surface geometry { GLC305_Main.stl { type triSurfaceMesh; name Main; } GLC305_Tip.stl { type triSurfaceMesh; name Tip; } GLC305_Trailing.stl { type triSurfaceMesh; name Trailing; } //- Refine a bit extra around the small centre hole // refinementBox // { // type searchableBox; // min (0.6 -0.1 -0.1); // max (1.1 1.6 0.1) ; // } refineLE { type searchableCylinder; point1 (0.026982 0. -0.0000064); point2 (0.81033 1.524 0.001); radius 0.0275; } refineTE { type searchableCylinder; point1 (0.64 0. 0.); point2 (1.06636 1.524 0.); radius 0.006; } }; // Settings for the castellatedMesh generation. castellatedMeshControls { // Refinement parameters // ~~~~~~~~~~~~~~~~~~~~~ // While refining maximum number of cells per processor. This is basically // the number of cells that fit on a processor. If you choose this too small // it will do just more refinement iterations to obtain a similar mesh. maxLocalCells 1000000; // Overall cell limit (approximately). Refinement will stop immediately // upon reaching this number so a refinement level might not complete. // Note that this is the number of cells before removing the part which // is not 'visible' from the keepPoint. The final number of cells might // actually be a lot less. maxGlobalCells 2000000; // The surface refinement loop might spend lots of iterations refining just a // few cells. This setting will cause refinement to stop if <= minimumRefine // are selected for refinement. Note: it will at least do one iteration // (unless the number of cells to refine is 0) minRefinementCells 0; // Number of buffer layers between different levels. // 1 means normal 2:1 refinement restriction, larger means slower // refinement. nCellsBetweenLevels 1; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies a level for any cell intersected by its edges. // This is a featureEdgeMesh, read from constant/triSurface for now. features ( { file "GLC305Wing.eMesh"; level 6; } ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies two levels for every surface. The first is the minimum level, // every cell intersecting a surface gets refined up to the minimum level. // The second level is the maximum level. Cells that 'see' multiple // intersections where the intersections make an // angle > resolveFeatureAngle get refined up to the maximum level. refinementSurfaces { Main { // Surface-wise min and max refinement level level (5 6); } Tip { // Surface-wise min and max refinement level level (6 6); } Trailing { // Surface-wise min and max refinement level level (6 6); } } resolveFeatureAngle 20; // Region-wise refinement // ~~~~~~~~~~~~~~~~~~~~~~ // Specifies refinement level for cells in relation to a surface. One of // three modes // - distance. 'levels' specifies per distance to the surface the // wanted refinement level. The distances need to be specified in // descending order. // - inside. 'levels' is only one entry and only the level is used. All // cells inside the surface get refined up to the level. The surface // needs to be closed for this to be possible. // - outside. Same but cells outside. refinementRegions { // refinementBox // { // mode inside; // levels ((1E15 7)); // } refineLE { mode inside; levels ((1E15 7)); } refineTE { mode inside; levels ((1E15 7)); } } // Mesh selection // ~~~~~~~~~~~~~~ // After refinement patches get added for all refinementSurfaces and // all cells intersecting the surfaces get put into these patches. The // section reachable from the locationInMesh is kept. // NOTE: This point should never be on a face, always inside a cell, even // after refinement. // This is an outside point locationInMesh (-0.033 -0.033 0.0033); locationInMesh (-0.1 0.1 0.43); // Inside point // Whether any faceZones (as specified in the refinementSurfaces) // are only on the boundary of corresponding cellZones or also allow // free-standing zone faces. Not used if there are no faceZones. allowFreeStandingZoneFaces true; } // Settings for the snapping. 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 1.0; //- Number of mesh displacement relaxation iterations. nSolveIter 300; //- 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; } |
|
May 25, 2012, 04:00 |
|
#2 |
Member
|
HI Ian,
I suppose that the quality controls in SHM will filter a few bad cells (unfortunately you didn't post those settings). When iterating, SHM will try to fill those gaps from the filtered cells which leads to your "bumps" on the surface. Try to switch off all quality controls and see where that gets you. Be sure to run "checkMesh" after SHM which will create "sets" of the bad cells that you may view in paraview/paraFoam. Then slowly raise the quality settings until "checkMesh" tells you an "OK". Greets, Jan
__________________
~~~_/)~~~ |
|
May 25, 2012, 07:22 |
|
#3 |
New Member
Ian
Join Date: Nov 2011
Posts: 5
Rep Power: 15 |
Hi Jan,
Thanks for the response. I did a few parametric runs this morning varying quality parameters and the quality controls seem to have little impact on the output. The area with the bumps seems to occur where the streaks across the surface meet the refined leading edge area (See bumpywing2.jpg not very clear). So I don't know if there is an issue due to it merging an area with a refinement of level 8 coming into an area where the level is lower. Ian |
|
May 26, 2012, 08:15 |
|
#4 |
Member
|
Hey Ian,
in your SHMDict you are using feature edges: are any of those possibly running across that part of the surface? Have you had a look at the SHM output esp. at the snapping iterations? You are using 300 iterations for the moving mesh, but only 5 relaxations during one iteration: see if the mesh snaps correctly during those relaxations after a few iterations (IMHO 300 iterations are quite a lot). Jan
__________________
~~~_/)~~~ |
|
May 26, 2012, 15:41 |
|
#5 |
New Member
Ian
Join Date: Nov 2011
Posts: 5
Rep Power: 15 |
Hi Jan,
The feature edges just define the trailing edges and the tip aerofoil section with nothing on the wing. I agree that the 300 iterations are a lot but I have been trying different SHMDict files to see if any of them worked. I usually run with about 20 to 30. I will check the log files on Monday to see if it snaps correctly. If I run the meshing process without the refined leading edge, I don't get the same effect but I do get a rough leading edge. I wondered if it is possible to run the snap in two sections, first to get a basic mesh then a second iteration that refines the leading edge. When I have tried it, when I run the second snapping run it doesn't seem to refine the leading edge. Another that I might try is to reduce the diameter as it is only really the very leading edge that looks rough therefore it might look better. Thanks for your input. Ian |
|
May 29, 2012, 06:18 |
|
#6 |
New Member
Ian
Join Date: Nov 2011
Posts: 5
Rep Power: 15 |
Hi Jan
I think that I have solved the problem and your first thoughts on the quality settings seemed to be correct. I had used the quality settings from the tutorial examples. The change I had to make was to minTetQuality, in the examples this is set to 1E-30. If I increase this number (initially set to 0.5) the surface bumps disappear. I am still having issues regarding mesh quality output in checkMesh but I think that I should be able to overcome these issues. Ian |
|
May 29, 2012, 12:16 |
|
#7 |
Member
|
great to hear my note was of help! Happy snapping!
__________________
~~~_/)~~~ |
|
June 20, 2012, 05:43 |
similar issue
|
#8 |
New Member
Sebastian W
Join Date: Nov 2009
Location: Germany
Posts: 16
Rep Power: 17 |
Hi folks,
I'm experiencing the same kind of bumps when meshing a (non-circular) pipe. Unfortunately I couldn't fix it by changing the mesh quality settings. Also, the meshed surface is perfect, if I mesh the outer region, not the inside. Not very useful for an internal flow problem, though... Any suggestions how to tackle this problem? Or any ideas for a workaround, like splitting the mesh after meshing inside and outside? Help would be greatly appreciated! Cheers, naval edit: flipping the stl's surface normals didn't change a thing |
|
June 20, 2012, 05:59 |
|
#9 |
New Member
Ian
Join Date: Nov 2011
Posts: 5
Rep Power: 15 |
Hi Sebastian,
The settings that I used to achieve a good mesh and pass the checkMesh (except for 8 skewed cells) include setting minTetQuality -1.E+30 (not 0.5 as I originally set in my reply the parameter seems to be highly non-linear and avoiding it seems to work okay). I tried to keep the mesh resolution down to about 1 or 2mm then gradually coarsen the resolution until it becomes poor, then I step back a stage. In the end I had up to 12 mesh refinement levels on the surface. Another area that we found was that the fineness of the underlying stl seemed to impact the resulting mesh so I used an FE preprocessor to put a fine surface triangulation down then exported this. Another thing to check is that your locationInMesh point is inside the mesh for when you are meshing the inside of the tube. I hope this helps, Ian |
|
June 20, 2012, 06:30 |
|
#10 |
New Member
Sebastian W
Join Date: Nov 2009
Location: Germany
Posts: 16
Rep Power: 17 |
Thanks for the quick reply!
It turned out to be the blockMeshDict, though. I did set inlet and outlet to type empty (to apply wallLayers there as well), that seems to mess up everything. A little disturbing, though. And a bit of a problem, since that is the only way I know to generate proper wallLayers close to another patch. Cheers, naval |
|
Tags |
bumpy, openfoam, snappyhexmesh, wing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh - 3D Wing Meshing Setup & Trials | denbjornen | OpenFOAM Meshing & Mesh Conversion | 1 | May 25, 2020 12:14 |
Ffd_control_point_2d | feiyi | SU2 | 4 | September 30, 2019 13:42 |
[snappyHexMesh] bumpy on the surface of 3D wing in addlayer step with snappyHexMesh | Kim sung hwan | OpenFOAM Meshing & Mesh Conversion | 2 | April 21, 2015 04:51 |
[snappyHexMesh] SnappyHexMesh and Snapping | thomasr | OpenFOAM Meshing & Mesh Conversion | 5 | March 15, 2012 12:07 |
[snappyHexMesh] Meshing 3D wing (hydrofoil) fails | klausb | OpenFOAM Meshing & Mesh Conversion | 0 | December 28, 2011 15:26 |