
[Sponsors] 
[snappyHexMesh] Help with Snappy: no layers growing 

LinkBack  Thread Tools  Search this Thread  Display Modes 
November 16, 2017, 07:52 
Help with Snappy: no layers growing

#1 
New Member
Gian Maria Ferrighi
Join Date: Feb 2017
Posts: 1
Rep Power: 0 
Hi all, first time posting on forums but an avid reader
I have been trying to get layers to grow on a wing that is not perfectly aligned with the background mesh (created with blockMesh). I have been successful in the past when the wing was perpendicular to the part but cannot get it to work in this case. I have attached my snappyHexMeshDict and snappyHexMesh report below. Any help is really appreciated. As I understand it it seems that edge intersection testing is the main reason the thing isn't working but I could be wrong as i am pretty new to snappy Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: dev   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; // 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 { Hor.stl { type triSurfaceMesh; name Hor; } }; // Settings for the layer addition. addLayersControls { // Are the thickness parameters below relative to the undistorted // size of the refined cell outside layer (true) or absolute sizes (false). relativeSizes false; // Per final patch (so not geometry!) the layer information layers { "(Hor).*" { nSurfaceLayers 1; } } // Expansion factor for layer mesh expansionRatio 1.3; // Wanted thickness of final added cell layer. If multiple layers // is the thickness of the layer furthest away from the wall. // Relative to undistorted size of cell outside layer. // See relativeSizes parameter. finalLayerThickness 0.001; // Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. // Relative to undistorted size of cell outside layer. minThickness 0.01; // If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 1; // Advanced settings // When not to extrude surface. 0 is flat surface, 90 is when two faces // are perpendicular featureAngle 60; // At nonpatched sides allow mesh to slip if extrusion direction makes // angle larger than slipFeatureAngle. slipFeatureAngle 30; // Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 30; // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 1; // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 3; // Smooth layer thickness over surface patches nSmoothThickness 10; // Stop layer growth on highly warped cells maxFaceThicknessRatio 0.5; // Reduce layer growth where ratio thickness to medial // distance is large maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; // Overall max number of layer addition iterations. The mesher will exit // if it reaches this number of iterations; possibly with an illegal // mesh. nLayerIter 150; } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { #include "meshQualityDict" // Advanced // Number of error distribution iterations nSmoothScale 8; // Amount to scale back displacement at error points errorReduction 0.5; } // Advanced // Write flags writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1e6; // ************************************************************************* // Code:
Shrinking and layer addition phase  Using mesh parameters { maxNonOrtho 70; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minVol 1e013; minTetQuality 1e015; minArea 1; minTwist 0.02; minDeterminant 0.005; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist 1; nSmoothScale 8; errorReduction 0.5; } Merging all faces of a cell   which are on the same patch  which make an angle < 60 degrees (cos:0.5)  as long as the resulting face doesn't become concave by more than 90 degrees (0=straight, 180=fully concave) Merging 3555 sets of faces. Edge intersection testing: Number of edges : 3786657 Number of edges to retest : 19959 Number of intersected edges : 165712 Undo iteration 0  Checking faces in error : nonorthogonality > 70 degrees : 42 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 18 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 8 Masters that need to be restored:76 Edge intersection testing: Number of edges : 3786825 Number of edges to retest : 757 Number of intersected edges : 165880 Undo iteration 1  Checking faces in error : nonorthogonality > 70 degrees : 0 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 Merging all points on surface that  are used by only two boundary faces and  make an angle with a cosine of more than 0.5. Removing 3913 straight edge points ... Edge intersection testing: Number of edges : 3786825 Number of edges to retest : 29893 Number of intersected edges : 165880 Undo iteration 0  Checking faces in error : nonorthogonality > 70 degrees : 6 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 Detected 4 error faces on boundaries that have been merged. These will be restored to their original faces. Edge intersection testing: Number of edges : 3786825 Number of edges to retest : 46 Number of intersected edges : 165880 Undo iteration 1  Checking faces in error : nonorthogonality > 70 degrees : 2 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 1 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 Detected 0 error faces on boundaries that have been merged. These will be restored to their original faces. Detected 3 error faces in mesh. Restoring neighbours of faces in error. Edge intersection testing: Number of edges : 3786825 Number of edges to retest : 124 Number of intersected edges : 165880 Checking mesh manifoldness ... Checking initial mesh ... Checking faces in error : nonorthogonality > 70 degrees : 0 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Adding in total 0 interprocessor patches to handle extrusion of nonmanifold processor boundaries. Handling points with inconsistent layer specification ... Handling nonmanifold points ... Checking patch manifoldness ... Outside of local patch is multiply connected across edges or points at 0 points. Set displacement to zero for all 0 nonmanifold points Handling feature edges ... Growing nonextrusion points by one layer ... Set displacement to zero for an additional 0 points. patch faces layers avg thickness[m] nearwall overall      motorBike 166049 1 0.001 0.001 Selecting externalDisplacementMeshMover displacementMedialAxis displacementMedialAxis : Calculating distance to Medial Axis ... displacementMedialAxis : Smoothing normals ... Iteration 0 residual 0.0147636 displacementMedialAxis : Inserting points on patch atmosphere if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch outlet if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch inlet if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch bottom if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch side if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch midPlane if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Smoothing normals in interior ... Iteration 0 residual 0.039521 Layer addition iteration 0  Determining displacement for added points according to pointNormal ... Detected 886 points with point normal pointing through faces. Reset displacement at 886 points to average of surrounding points. displacementMedialAxis : Smoothing using Medial Axis ... displacementMedialAxis : Reducing layer thickness at 0 nodes where thickness to medial axis distance is large displacementMedialAxis : Removing isolated regions ... displacementMedialAxis : Number of isolated points extrusion stopped : 0 displacementMedialAxis : Smoothing field ... Iteration 0 residual 0 displacementMedialAxis : Moving mesh ... displacementMedialAxis : Iteration 0 Moving mesh using displacement scaling : min:1 max:1 Checking faces in error : nonorthogonality > 70 degrees : 0 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 displacementMedialAxis : Successfully moved mesh displacementMedialAxis : Finished moving mesh ... truncateDisplacement : Unextruded 0 faces due to nonconsecutive vertices being extruded. truncateDisplacement : Unextruded 0 faces due to stringed edges with inconsistent extrusion. Setting up information for layer truncation ... Checking mesh with layer ... Checking faces in error : nonorthogonality > 70 degrees : 0 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Extruding 0 out of 166049 faces (0%). Removed extrusion at 0 faces. Added 0 out of 166049 cells (0%). Edge intersection testing: Number of edges : 3786825 Number of edges to retest : 0 Number of intersected edges : 165880 Doing final balancing  Writing 0 added cells to cellSet addedCells Writing 0 faces inside added layer to faceSet layerFaces Writing fields with layer information: nSurfaceLayers : actual number of layers thickness : overall layer thickness thicknessFraction : overall layer thickness (fraction of desired thickness) patch faces layers overall thickness [m] [%]      motorBike 166049 0 0 0 Layer mesh : cells:1188561 faces:3786825 points:1437885 Cells per refinement level: 0 239693 1 5384 2 12869 3 36171 4 116321 5 480434 6 297689 Writing mesh to time constant Wrote mesh in = 20.108 s. Layers added in = 20.108 s. Checking final mesh ... Checking faces in error : nonorthogonality > 70 degrees : 0 faces with face pyramid volume < 1e013 : 0 faces with facedecomposition tet quality < 1e015 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.005 : 0 Finished meshing without any errors Finished meshing in = 547.434 s. End Finalising parallel run PS: I am currently downloading Salome and will try to see if improving my stl will make a difference. 

December 12, 2017, 04:44 

#2 
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 8 
Welcome to these forums, Gian.
These two lines might be the problem: Code:
finalLayerThickness 0.001; minThickness 0.01; Let me know if that works! 

September 23, 2020, 08:26 

#3  
New Member
Uttam
Join Date: May 2020
Posts: 7
Rep Power: 3 
Quote:
I believe that finalLayerThickness is the ratio of the thickness of the last layer to the size of the surface on which the layers have been added. Consider a cube and one of its surfaces to be 0.1m wide. If you set finalLayerThickness to 0.01, that would mean that the thickness of the final layer in add layers will be 0.01 x 0.1 = 0.001m. 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[snappyHexMesh] Snappy add layers failed  mqsim  OpenFOAM Meshing & Mesh Conversion  1  January 24, 2021 15:02 
[snappyHexMesh] snappy works but does not add layers...why?  sandy13  OpenFOAM Meshing & Mesh Conversion  33  November 19, 2020 15:23 
[snappyHexMesh] Layers not growing at all  zonda  OpenFOAM Meshing & Mesh Conversion  12  June 6, 2020 11:28 
[ICEM] Surface/Volume orientation errors growing prism layers  jlichtwa  ANSYS Meshing & Geometry  17  September 25, 2018 00:41 
[snappyHexMesh] Layers in snappy collapse in some places of my solid  Yuby  OpenFOAM Meshing & Mesh Conversion  0  March 8, 2015 15:44 