|
[Sponsors] |
[Other] Distorted snapping for increasingly finer meshes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 28, 2018, 13:55 |
Distorted snapping for increasingly finer meshes
|
#1 |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 8 |
Hi everyone,
I've been trying to mesh a nozzle for an LES case. The coarsest mesh is 1.5M cells (first image below - its a slice of the nozzle contraction and exit). Then I refined the blockMesh so as to produce 3M and 6M cell meshes (second and third images). As you can see the outline becomes increasingly crooked in the contraction and sharp edge of the exit. It is as if the snapping processes did not work correctly for the finer meshes and it no longer follow the STLs. This can be seen clearly in the fourth image, which is a detail view of the nozzle exit for the 6M mesh. The snapping is distorted and is much worse than in the 1.5M mesh in the fifth image. In case there is an error in the snappyHexMeshDict, I have included it below: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers true; geometry { inj.stl { type triSurfaceMesh; name inj; } nozExt.stl { type triSurfaceMesh; name nozExt; } nozInt.stl { type triSurfaceMesh; name nozInt; } nozCon.stl { type triSurfaceMesh; name nozCon; } refinement1 { type searchableCylinder; point1 (0.0 0.0 0.0); point2 (0.142711875 0.0 0.0); radius 0.035; } refinement2 { type searchableCylinder; point1 (0.02 0.0 0.0); point2 (0.11 0.0 0.0); radius 0.025; } auxHollowCylinder.stl { type triSurfaceMesh; name auxHollowCylinder; } refinement5 { type searchableCylinder; point1 (0.0 0.0 0.0); point2 (0.065 0.0 0.0); radius 0.006; } refinement6 { type searchableCylinder; point1 (0.025 0.0 0.0); point2 (0.030 0.0 0.0); radius 0.0025; } }; castellatedMeshControls { maxLocalCells 10000000; maxGlobalCells 20000000; minRefinementCells 0; nCellsBetweenLevels 2; features ( {file "nozExt.eMesh";level 3;} {file "nozInt.eMesh";level 4;} {file "nozCon.eMesh";level 5;} {file "inj.eMesh";level 3;} ); refinementSurfaces { nozExt { level (3 3); patchInfo { type wall; } } nozInt { level (4 4); patchInfo { type wall; } } nozCon { level (5 5); patchInfo { type wall; } } inj { level (3 3); patchInfo { type patch; } } } resolveFeatureAngle 30; refinementRegions { refinement1 { mode inside; levels ((1E15 2)); } refinement2 { mode inside; levels ((1E15 3)); } auxHollowCylinder { mode inside; levels ((1E15 5)); } refinement5 { mode inside; levels ((1E15 4)); } refinement6 { mode inside; levels ((1E15 4)); } nozCon { mode distance; levels ((0.0007 5)); } } locationInMesh (0.05 -0.0000 -0.0000); allowFreeStandingZoneFaces true; } snapControls { nSmoothPatch 3; tolerance 1; nSolveIter 300; nRelaxIter 10; nFeatureSnapIter 15; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap false; } addLayersControls { relativeSizes true; layers { nozInt { nSurfaceLayers 5; finalLayerThickness 0.3; minThickness 0.05; } walls { nSurfaceLayers 5; finalLayerThickness 0.3; minThickness 0.05; } nozCon { nSurfaceLayers 5; finalLayerThickness 0.3; minThickness 0.05; } } expansionRatio 1.2; finalLayerThickness 0.3; minThickness 0.05; nGrow 0; featureAngle 180; slipFeatureAngle 30; nRelaxIter 10; nSmoothSurfaceNormals 1; nSmoothNormals 3; nSmoothThickness 10; maxFaceThicknessRatio 0.5; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 90; nBufferCellsNoExtrude 0; nLayerIter 150; } meshQualityControls { maxNonOrtho 60; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minVol 1e-13; minTetQuality 1e-15; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; nSmoothScale 4; errorReduction 0.75; } writeFlags ( ); mergeTolerance 1E-6; // ************************************************************************* // |
|
October 29, 2018, 02:23 |
|
#2 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27 |
Hi
If I were you I would try with cfmesh instead. It's faster, better captures features and are better at layer coverage. https://www.openfoam.com/releases/op...processing.php https://cfmesh.com/meshing-software/ I'm in no way affiliated with them, but from my findings it makes a good mesh. Automatic meshing strategies
__________________
Linnemann PS. I do not do personal support, so please post in the forums. |
|
November 7, 2018, 08:32 |
|
#3 |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 8 |
Hi Niels,
Thanks for you advice. Indeed cfmesh produced much better quality in an incredibly smaller amount of time (1 min vs 1 hour!) I would recommend anyone stuck with snappy to try it out |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mapping (interpolation) between two meshes | Ebrahim | OpenFOAM Programming & Development | 2 | June 15, 2020 13:31 |
[snappyHexMesh] snappyHexMesh creates inverted meshes | emat | OpenFOAM Meshing & Mesh Conversion | 3 | March 27, 2017 08:50 |
How can I put the data of adpated meshes on the original unadapted meshes? | xh110120 | FLUENT | 2 | March 11, 2016 02:00 |
Hex and Tet meshes - simplefoam comparison | danvica | OpenFOAM Running, Solving & CFD | 10 | January 4, 2013 01:18 |
[ICEM] Hexa Meshes Distorted Surface | wildabyss | ANSYS Meshing & Geometry | 2 | December 24, 2011 11:44 |