This chapter gives brief details of the advanced settings for the snappyHexMesh. These settings are generally not required to be changed by the user and are by default set to recommended values.
(Please note that you can find the original parameter names of snappyHexMesh in brackets)
The parameters listed below are related to the refinement process. That is the number of cells generated in the splitting and refinement of the base volume mesh.
This specifies the maximum number of cells per processor during the refinement phase. If local number of cells is greater than Max Number of Cells Per Processor (maxLocalCells) on any processor the algorithm switches from refinement followed by balancing (current method) to balancing before refinement (weighted) .
The optimum value is between 3-5 million cells
This specifies the maximum overall number of cells during the refinement phase. Refinement process will terminated immediately when the overall cells during refinement exceed this number. In this case it may be that the refinement level might not complete. (for example some region refinements are not carried out)
This is the number of cells before removal of cells in castellated mesh step. The final number of cells might be less. The optimum value is between 10-15 million cells. (for an expected large mesh size the meshing job with higher processors (higher RAM) should be selected e.g. 16 or 32
This specifies the minimum number of cells during the refinement phase. For instance the surface refinement algorithm might spend lots of iterations refining just a some cells. This setting will cause refinement to stop if cells to be refined are less than specified value Note: at least one iteration will be done, unless the number of cells to refine is 0.
This specifies the maximum unbalance for processors in parallel meshing process. A value of 0 forces to balance always.
This specifies the exact Number of buffer volume mesh cell layers between different levels of refinement. 1 means that if required only a single intermediate layer is added to match the refinement difference. Larger values like 5, will add more intermediate cell layers to gradually cover the refinement difference but greatly effect the mesh size.
The figure below shows the difference in volume mesh round the object with a Buffer Cell Count between Refinement Levels (nCellsBetweenLevels) value of 1 and 3.
For intermediate size of mesh a value of 3 is recommended.
This specifies the feature angle value for refinement up to the maximum level. This is used if minimum and maximum refinement level of a surface differ. The meshing algorithm applies maximum refinement to cells whose intersections exceed resolveMax Face Angle For Layer Generation (featureAngle) value. All features below this angle are applied with the minimum refinement level.
This option selects whether any faceZones (as specified in the refinementSurfaces) are only on the boundary of corresponding cellZones or also allow free-standing zone faces. Not used if there are no faceZones.
The snapping process is governed by the following parameters that control the number of iterations and Max Relative Distance for Snap Point Search (tolerance) between mesh and object surface.
This specifies the number of iterations for the smoothing of mesh to conform it to the geometry surface. Higher values will lead to better snapping and a smoother mesh but will be more time consuming.
For better and smooth snapping a value of 5 is recommended.
This specifies the relative distance that the algorithm would search for a point to snap, the distance will be the value times the local cell length. A minimum value of 1 is required, while higher values lead to better snapping.
For better snapping a value between 2-5 is recommended.
This specifies the number of iteration of the overall snapping algorithm. Higher values lead to better mesh quality, more equidistant mesh but longer meshing time.
A value of 300 is recommended.
This specifies the maximum number of relaxing iterations to remove bad cells or mesh points. The relaxing process will stop immediately when the specified number of iterations are done even if the mesh still has bad cells. Thus, higher values will ensure better mesh quality but be more time consuming.
A value between 5-8 is recommended.
This specifies the number of iterations within main snapping iterative process, to attract mesh points to surface and avoid sharp edges. This is done using the extracted feature edges in the castellated mesh step.
The implicit method does not require the user to extract features. Instead, it uses the resolveMax Face Angle For Layer Generation (featureAngle) keyword entry to identify surface geometric features, e.g. creases in the geometry. Rather than snapping directly to an edge geometry, as supplied explicitly in the previous method, the implicit method snaps to a representation of the feature, calculated from local surface topology.
For this method a feature refinement can be added under mesh refinements to specify feature extraction for snapping. The method can handle snapping features that represent the intersection between boundary patches that are even in the same plane.
From OPENFOAM® official site “The explicit method offers greater control and, from our experience, provides slightly better feature conformation. The implicit method has the advantage of being fully automated.”
This is relevant for meshes with multiple regions e.g. fluid region and solid region for a conjugate heat transfer simulation or similar.
This specifies the method with which layer parameters, mainly Thickness of the Final Layer (finalLayerThickness) and Minimum Overall Layer Thickness (minThickness), are defined:
Specifies the growth of successive layers. The larger the value the greater the difference in height of the layers. This default value is overwritten by Layer refinement under Mesh refinements in Main Settings for Hex-dominant parametric.
Specifies the height (thickness) of the layer that is furthest away from the surface. This default value is overwritten by Layer refinement under Mesh refinements in Main Settings for Hex-dominant parametric.
This specifies the overall minimum thickness of all the layers. This value must be less than the total thickness of all the layers. Otherwise, layers will not be generated. This default value is overwritten by Layer refinement under Mesh refinements in Main Settings for Hex-dominant parametric.
This specifies the number of layers of connected faces that are not grown. This helps in convergence of the layer addition process close to features.
This specifies the angle after which surfaces will not be extruded and layers will not be generated. This is a vital parameters to check if layer addition fails.
The figure below shows the difference in layer generation for a Feature Angle of 60 and 180 degrees.
An optimum value of 180 or higher is recommended to grow layers at corner edges.
This specifies the angle between the patch on which layers are added and its neighboring patch after which sliding will occur. Therefore, it will allow mesh to slip if extrusion direction makes angle larger than slipMax Face Angle For Layer Generation (featureAngle).
An optimum value between 70-80 is recommended to limit sliding of layers.
This specifies how many times the mesh will run a relaxing script for the layer snapping process. The process stop after the given value even if the mesh has bad cells.
This specifies the number of iterations to smooth the surface normals for extrusion of layers. Higher values result in better extrusion of layers.
This specifies the number of iterations of the interior mesh movement direction. Higher values provide better mesh but longer finishing times. A value of 3 is recommended.
This specifies the number of iterations for smoothing of the overall layer thickness over different surface patches.
This specifies the maximum allowable value of aspect ratio. Sometimes (especially in corners) the layers must be generated over highly warped cells. The layer generation will stop for cells where aspect ratio is higher than this value.
This specifies the maximum ratio of thickness to medial distance. Layer growth is reduced where the ratio is larger than specified value.
This specifies the Angle used to pick up medial axis points.
This specifies the number of buffer cells for termination of layers.
This specifies the overall layer addition algorithm iterations. The algorithm will stop immediately after the specified value even if the mesh has bad cells. A value of 50-60 is recommended.
This specifies the maximum number of iterations after which relaxed mesh quality controls will be used. Up to Max Iterations with Strict Quality Controls (nRelaxedIter) value the algorithm uses the settings in mesh quality controls, after these iterations it uses the relaxed mesh quality control values.
This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software.