|
[Sponsors] |
May 22, 2024, 08:38 |
refine only one dirextion
|
#1 |
New Member
Huang, Ching-Chan
Join Date: Jan 2023
Posts: 16
Rep Power: 3 |
Is anyone know how to correctly refine with x or y direction, rather than z direction, I have try levelIncrement, but it still have z direction cell to refine. I dont want to use extrudeMesh.
Here is my snappyHexMeesh code: FoamFile { format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; geometry { "airfoil.stl" { type triSurfaceMesh; name wing; } cylinder1 { type searchableCylinder; point1 (0.025 0 0); point2 (0.025 0 0.001); radius 0.1; } cylinder2 { type searchableCylinder; point1 (0 0 0); point2 (0 0 0.001); radius 0.3; } cylinder3 { type searchableCylinder; point1 (0 0 0); point2 (0 0 0.001); radius 0.4; } }; castellatedMeshControls { maxLocalCells 10000000; maxGlobalCells 200000000; minRefinementCells 100; nCellsBetweenLevels 50; features ( ); refinementSurfaces { wing { // Surface-wise min and max refinement level level (3 3); levelIncrement (3 3 (3 3 0)); } } resolveFeatureAngle 30; refinementRegions { cylinder1 { mode inside; levels ((1.0 2)); levelIncrement (2 2 (3 3 0)); gapLevel (5 0 10); gapMode inside; } cylinder2 { mode inside; levels ((1.0 1)); levelIncrement (1 1 (2 2 0)); } cylinder3 { mode inside; levels ((1.0 0)); levelIncrement (0 0 (2 2 0)); } } locationInMesh (-0.5 0 0); allowFreeStandingZoneFaces true; } snapControls { nSmoothPatch 5; tolerance 3.0; nSolveIter 30; nRelaxIter 8; nSmoothIntrnal 5; } addLayersControls { relativeSizes true; layers { wing { nSurfaceLayers 10; } } expansionRatio 1.3; finalLayerThickness 1; minThickness 2; nGrow 0; featureAngle 60; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; // Reduce layer growth where ratio thickness to medial // distance is large maxThicknessToMedialRatio 0.3; minMedialAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 50; } meshQualityControls { //- Maximum non-orthogonality allowed. Set to 180 to disable. maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; 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; } mergeTolerance 1e-6; // ************************************************** *********************** // |
|
May 23, 2024, 03:29 |
|
#2 |
Senior Member
Will Kernkamp
Join Date: Jun 2014
Posts: 372
Rep Power: 14 |
You can make cells smaller in z direction in blockMesh. That should also make them smaller in snappy in z direction.
|
|
May 23, 2024, 07:33 |
|
#3 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
You can use directional refinement in snappyHexMesh; only in the ESI distribution, though.
Then I think you have some errors. When using directional refinement, you must basically disable the "level" by using something like Code:
levels ((1E30 0)) Code:
levelIncrement (2 2 (3 3 0)); What you want is probably something like Code:
levelIncrement (2 2 (1 1 0)); For directional refinement, the thing you get is always relative to the level you had on this position before. If your refinement includes a near wall region where you have 1 on the wall and then you use (2 2 (1 1 0)), nothing will happen. To get this level 1 also to 3 3 2, you have to add another refinement with the setting (1 1 (2 2 1)). If you include more levels in the selection min/max, e.g. (1 2 (2 2 1)), the cells of level 1 get split to 3 3 2 and the ones of level 2 get split to 4 4 3. You see, that if your refinement region contains different cell sizes, you cannot bring them all to the same levels with just one definition, you need to handle them separately. Hope this helps to understand the parameters. P.S. I have never used directional refinement for surfaces, I doubt it works at all, or if it does, it probably gives you quite bad cell quality. |
|
Tags |
extrudemesh, refine, snappyhexmesh, snappyhexmesh 2d |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Refine near wall layers | zxj160 | OpenFOAM Meshing & Mesh Conversion | 2 | August 25, 2022 08:57 |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
How to refine the mesh only on a specific region on a part | mazhar16823 | Main CFD Forum | 0 | June 22, 2020 07:49 |
[snappyHexMesh] SHM refine domain wall | Tomatenbart | OpenFOAM Meshing & Mesh Conversion | 0 | July 10, 2017 11:54 |
Overset: refine background mesh without resetting the mesh | JohnAB | STAR-CCM+ | 6 | May 19, 2014 14:48 |