|
[Sponsors] |
[snappyHexMesh] high skewness and random triangles issue on structured stl mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 23, 2024, 01:02 |
high skewness and random triangles issue on structured stl mesh
|
#1 |
New Member
Join Date: Mar 2024
Posts: 18
Rep Power: 2 |
Hi,
I'm desperate needing some help. I'm trying to use snappyHexMesh to mesh around a rigid body with structured grid. It worked fine before. It's a rectangular shape with a rounded bottom body. After I adjusted the size of the body, no matter how carefully I calculated the cell number to make sure the edge of the body lies on the cell edge, the snappyHexMesh just keep throwing me random triangle cells. It's driving me nuts, I have tried to changed the nSmoothPatch, minVol, minArea, maxBoundarySkewness, maxNonOrtho, it is still the same. I'm running out of options. please help me if anyone has any clues. Thanks for any help. Code:
castellatedMesh true; snap true; addLayers false; geometry { body.stl { type triSurfaceMesh; name body; regions { body { name body; } } } BoxRefinement { type box; min ( 7.83 -0.56 -0.44); max ( 8.01 0.56 0.13 ); } }; castellatedMeshControls { maxLocalCells 100000000; maxGlobalCells 500000000; minRefinementCells 20; nCellsBetweenLevels 3; maxLoadUnbalance 0.1; allowFreeStandingZoneFaces true; resolveFeatureAngle 30; features ( { file "body.eMesh" ; level 0 ; } ); refinementSurfaces { body { level (0 0); regions { body { level (0 0); } } } } refinementRegions { BoxRefinement { mode inside; levels ((1 1)); } } locationInMesh ( 7.85 -0.53 -0.42 ) ; } snapControls { tolerance 2; implicitFeatureSnap false; explicitFeatureSnap true; multiRegionFeatureSnap true; detectNearSurfacesSnap true; nSmoothPatch 3; nSolveIter 50; nRelaxIter 5; nFeatureSnapIter 10; nSmoothInternal 3; nFaceSplitInterval 5; } addLayersControls { layers { "(body)" { nSurfaceLayers 4; } } relativeSizes true ; expansionRatio 1.1 ; firstLayerThickness 0.8 ; featureAngle 85; slipFeatureAngle 30; nGrow 0; nBufferCellsNoExtrude 0; minMedialAxisAngle 90; maxFaceThicknessRatio 0.2; maxThicknessToMedialRatio 0.3; minThickness 1e-06; nLayerIter 50; nRelaxIter 5; nSmoothSurfaceNormals 10; nSmoothNormals 3; nSmoothThickness 10; nRelaxedIter 10; nMedialAxisIter 10; } meshQualityControls { minVol 1e-6; //1e-20; minTetQuality 1e-6; //1e-20; minArea 5e-6; //1e-20; minTwist 0.1; //0.05; minDeterminant 1e-5; //1e-06; minFaceWeight 0.1; //0.02; minVolRatio 0.1; //0.01; minTriangleTwist -1; minFlatness 0.5; maxNonOrtho 20; //30; //60; maxBoundarySkewness 2; //12; maxInternalSkewness 2; //4; maxConcave 80; nSmoothScale 4; errorReduction 0.75; relaxed { minVol 1e-6; //1e-30; minTetQuality 1e-6; //1e-30; minArea 1e-5; //1e-30; minTwist 0.05; //0.001; minDeterminant 1e-5; //1e-06; minFaceWeight 1e-5; //1e-06; minVolRatio 0.1; //0.01; minTriangleTwist -1; minFlatness 0.5; maxNonOrtho 20; //30; //75; maxBoundarySkewness 2; //20; maxInternalSkewness 2; //8; maxConcave 80; nSmoothScale 4; errorReduction 0.75; } } mergeTolerance 1e-06; debug 0; |
|
October 23, 2024, 02:40 |
|
#2 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
||
October 23, 2024, 05:19 |
|
#3 |
Senior Member
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13 |
Btw, using such tough meshQuality targets as maxNonOrtho 20; can lead to adverse effects for more complex geometries.
Give the mesher some room to work by allowing for a certain non orthogonality and skewness. Non-orthogonality arises already when you use different cell levels (at the transition), now add some inclined faces and you already top 20 degrees. The default I think is 65, which is absolutely fine. Skewness of 2 is also quite low, up to 12 and even beyond (sometimes) is a save range from my experience. At least for OpenFOAM. |
|
October 23, 2024, 14:11 |
|
#4 | |
New Member
Join Date: Mar 2024
Posts: 18
Rep Power: 2 |
Quote:
Hi Ingo, Thanks for the quick response! I'm using Paraview 5.13 the newest version, I have enabled the full mode for setting, but I don't see any options for 'decompose polyhedra'. And I can't find the crinkle stuff. I was using clip for mesh visualization. I have used all the default values for maxNonOrtho, degree, skewness, it was still the same issue. So you think it's just a visualization issue? How can I make it display the mesh better without all the noise triangles? Thank you so much for helping me out!! I really appreciate it!! |
||
October 26, 2024, 06:37 |
|
#5 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello,
This is without doubt a visualization issue. In ParaView 5.13, there is no more "decompose polyhedra" option and polyhedra are not decomposed anymore. On your clip, you need to tick "crinkle clip". Same thing with "crinkle slice" if you are using the slice filter. Cheers, Yann |
|
October 28, 2024, 11:35 |
|
#6 | |
New Member
Join Date: Mar 2024
Posts: 18
Rep Power: 2 |
Quote:
Thank you so much for pointing out this is visualization issue! I turned on the Crinkle clip option on Paraview. The mesh looks so much better now!!! The only issue now is that the mesh does show some extra layer of cells on the clip face, do I need to worry about it or it is totally okay? |
||
October 28, 2024, 13:23 |
|
#7 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hello panda,
During the meshing process, snappyHexMesh do some mesh morphing operations when snapping the mesh onto the geometry surface. This leads to moving nodes/cells, which are not perfectly aligned anymore, as it was in the initial background mesh. When you slice or clip the mesh, the lines you see in your original screenshots are cells which have been cut by ParaView in order to produce the slice/clip. The crinkle option allow to display the cells intersecting the slicing/clipping plane instead of cutting it. The extra cells you see on your last screenshot are those cells which are itersecting the plane which are now displayed instead of being cut (if you untick the crinkle option, you will probably see lines where you have the extra cells). You can try it with a slice instead of a clip, maybe it will help you to visualize what is going on. Try to slightly move the position of your clipping/slicing plane and those will disappear. (others might appear) Anyway, this is only a visualization matter, nothing to worry about. Cheers, Yann |
|
October 31, 2024, 09:46 |
|
#8 | |
New Member
Join Date: Mar 2024
Posts: 18
Rep Power: 2 |
Quote:
Thanks for the detailed explanation!! That is good to know that it is just a visualization issue. The mesh looks much better with crinkle slice. Thank you!! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] [ANSYS Meshing] Fixing high skewness on simple elbow pipe | luzikato | ANSYS Meshing & Geometry | 2 | May 10, 2020 03:34 |