|
[Sponsors] |
[snappyHexMesh] How to create layer that is normal to the surface of the geometry? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 27, 2019, 08:52 |
How to create layer that is normal to the surface of the geometry?
|
#1 |
Member
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8 |
I was trying to create a layer that is normal to the geometry edge/surface, which looks like this:
However, what I got is something like this: Can the layer mesh be refined to something like the first figure by adjusting parameters in snappyHexMeshDict? Thanks. |
|
April 27, 2019, 14:35 |
|
#2 |
Member
Join Date: Nov 2014
Posts: 92
Rep Power: 12 |
I cannot see any layer mesh is created on the bike. Can you check or show how many percentage of surface is covering with layer mesh from the mesh log?
|
|
April 28, 2019, 03:45 |
|
#3 | |
Member
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8 |
Quote:
You are absolute right. I used to think those near surface mesh are the boundary layer. I checked the log, it seems the layer mesh could not generate successfully. Could you help me to take a look in it? I will attached the mesh log file, and the below is the snappyHexMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { figure { type triSurfaceMesh; file "figure.stl"; } refinementBox { type searchableBox; min ( 30 180 90); max ( 700 1760 1850); } }; castellatedMeshControls { maxLocalCells 100000; maxGlobalCells 10000000; minRefinementCells 10; maxLoadUnbalance 0.10; nCellsBetweenLevels 3; features ( { file "figure.eMesh"; level 6; } ); refinementSurfaces { figure { level (5 6); patchInfo { type wall; inGroups (figureGroup); } } } resolveFeatureAngle 30; refinementRegions { refinementBox { mode inside; levels ((1E15 4)); } } locationInMesh (402 1802 1002) ; allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 5; tolerance 2.0; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { relativeSizes true; layers { //"(lowerWall|figure).*" "figure.*" { nSurfaceLayers 5; } } expansionRatio 1.2; firstLayerThickness 0.001; minThickness 0.0005; nGrow 0; // Advanced settings featureAngle 60; slipFeatureAngle 30;. nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 15; } meshQualityControls { #include "meshQualityDict" } // Advanced // Write flags writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); mergeTolerance 1e-6; // ************************************************************************* // Last edited by Jinjolee; April 28, 2019 at 11:04. Reason: This comment is no longer updated |
||
April 28, 2019, 04:19 |
|
#4 | |
Member
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8 |
Quote:
https://drive.google.com/open?id=13G...7ODyiq2taBjuOU |
||
April 28, 2019, 11:04 |
|
#5 |
Member
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8 |
Fun fact: I didnt know that when relativeSizes is on, the thickness would not be absolute value anymore. Now I changed firstLayerThickness to 0.3, and now there is 83% of layers generated. Is it possible to enhance the layer %? Since there are some places did not have layer generated properly. It is shown in the image below (notice the layers on the top-left region):
And there is my snappyHexMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { figure { type triSurfaceMesh; file "figure.stl"; } refinementBox { type searchableBox; min ( 30 180 90); max ( 700 1760 1850); } }; castellatedMeshControls { maxLocalCells 1000000; maxGlobalCells 100000000; minRefinementCells 15; maxLoadUnbalance 0.10; nCellsBetweenLevels 3; features ( { file "figure.eMesh"; level 4; } ); refinementSurfaces { figure { level (4 5); patchInfo { type wall; inGroups (figureGroup); } } } resolveFeatureAngle 20; refinementRegions { refinementBox { mode inside; levels ((1E15 4)); } } locationInMesh (402 1802 1002) ; allowFreeStandingZoneFaces true; } snapControls { nSmoothPatch 5; tolerance 1.5; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 10; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { layers { //"(lowerWall|figure).*" "figure.*" { nSurfaceLayers 3; } } expansionRatio 1.1; firstLayerThickness 0.3; minThickness 0.05; nGrow 0; featureAngle 180; slipFeatureAngle 60; nRelaxIter 5; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 130; nBufferCellsNoExtrude 0; nLayerIter 15; } meshQualityControls { #include "meshQualityDict" } // Advanced // Write flags writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); mergeTolerance 1e-6; // ************************************************************************* // |
|
April 28, 2019, 12:34 |
|
#6 | |
Member
Join Date: Nov 2014
Posts: 92
Rep Power: 12 |
Quote:
|
||
April 28, 2019, 12:54 |
|
#7 |
Member
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8 |
||
Tags |
layer, normal to edge, snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh generates not planar surface | krzychu111 | OpenFOAM Meshing & Mesh Conversion | 2 | April 23, 2020 17:38 |
[snappyHexMesh] Problem airfoil snappyhexmesh add layer | bye bye my blue | OpenFOAM Meshing & Mesh Conversion | 1 | May 5, 2017 06:56 |
[snappyHexMesh] SnappyHexMesh: Layer on corners | Pj. | OpenFOAM Meshing & Mesh Conversion | 9 | July 17, 2014 05:26 |
Actuator disk model | audrich | FLUENT | 0 | September 21, 2009 08:06 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |