websights

Fill out the form to download

Required field
Required field
Not a valid email address
Required field
Required field
  • Set up your own cloud-native simulation in minutes.

  • Documentation

    Advanced Settings for Hex-Dominant Parametric

    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)

    Castellated mesh controls

    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.

    Max Number of Cells Per Processor (maxLocalCells)

    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) .

    Important

    The optimum value is between 3-5 million cells

    Global Max Number of Cells (maxGlobalCells)

    This specifies the maximum overall number of cells during the refinement phase. Refinement process will be 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)

    Important

    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

    Cell Limit for Refinement Termination (minRefinementCells)

    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.

    Max Processor Load Imbalance (maxLoadUnbalance)

    This specifies the maximum unbalance for processors in parallel meshing process. A value of 0 forces to balance always.

    Buffer Cell Count between Refinement Levels (nCellsBetweenLevels)

    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 affect the mesh size.

    The figure below shows the difference in volume mesh around the object with a Buffer Cell Count between Refinement Levels (nCellsBetweenLevels) values of 1 and 3.

    hex dominant parametric buffer level
    Figure 1: Hex dominant parametric buffer level comparison for levels 1 and 3

    Important

    For intermediate size of mesh a value of 3 is recommended.

    Minimum Angle for Feature Detection (resolveMax Face Angle For Layer Generation (featureAngle))

    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.

    Allow Free Standing Zone Faces

    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.

    Snap controls

    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.

    Mesh-to-Geometry Conformation Iterations (nSmoothPatch)

    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.

    Important

    For better and smooth snapping a value of 5 is recommended.

    Max Relative Distance for Snap Point Search (tolerance)

    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.

    Important

    For better snapping a value between 2-5 is recommended.

    Max Iterations for Meshing Algorithm (nSolveIter)

    This specifies the number of iterations of the overall snapping algorithm. Higher values lead to better mesh quality, more equidistant mesh but longer meshing time.

    Important

    A value of 300 is recommended.

    Max Iterations for Removal of Bad Cells (nRelaxIter)

    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.

    Important

    A value between 5-8 is recommended.

    Max Iterations for Mesh Conformation (nFeatureSnapIter)

    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.

    Implicitly Detect Features for Snapping (implicit Feature Snap)

    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.

    Use “Feature Refinement” for Snapping (explicit Feature Snap)

    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.”

    Detect Features between Multiple Surfaces (multiRegion Feature Snap)

    This is relevant for meshes with multiple regions e.g. fluid region and solid region for a conjugate heat transfer simulation or similar.

    Layer adding controls

    Use Relative Size for Layers (relativeSize)

    This specifies the method with which layer parameters, mainly Thickness of the Final Layer (finalLayerThickness) and Minimum Overall Layer Thickness (minThickness), are defined:

      • True: layer parameters are relative to the volume mesh cells size closest to the surface. In this case, the value would be the product of the specified value and cell size outside layers.
      • False: layer parameters are defined directly by the value in absolute units i.e.meters.

    Expansion Ratio for Layer Cell Thickness (expansionRatio)

    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.

    Thickness of the Final Layer (finalLayerThickness)

    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.

    Minimum Overall Layer Thickness (minThickness)

    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.

    Max Cancelled Layers near Sharp Features (nGrow)

    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.

    Max Face Angle For Layer Generation (featureAngle) [°]

    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.

    hex dominant parametric  feature angle
    Figure 2: Layer generation for a Feature Angle of 60 and 180 degrees

    Important

    An optimum value of 180 or higher is recommended to grow layers at corner edges.

    SlipMax Face Angle For Layer Generation (featureAngle) [°]

    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).

    Important

    An optimum value between 70-80 is recommended to limit sliding of layers.

    Max Iterations for Removal of Bad Cells (nRelaxIter)

    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.

    Max Smoothing Iterations for Surface Normals (nSmoothSurfaceNormals)

    This specifies the number of iterations to smooth the surface normals for extrusion of layers. Higher values result in better extrusion of layers.

    Max Smoothing Iterations for Internal Mesh (nSmoothNormals)

    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.

    Max Smoothing Iterations for Layer Thickness (nSmoothThickness)

    This specifies the number of iterations for smoothing of the overall layer thickness over different surface patches.

    Max Face Aspect Ratio for Layers (maxFaceThicknessRatio)

    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.

    Max Ratio of Layer Thickness to Medial Length (maxThicknessToMedialRatio)

    This specifies the maximum ratio of thickness to medial distance. Layer growth is reduced where the ratio is larger than specified value.

    Strictness for measuring Medial Length (minMedianAxisAngle) [°]

    This specifies the Angle used to pick up medial axis points.

    Buffer Cells for Faces where Layers Terminate (nBufferCellsNoExtrude)

    This specifies the number of buffer cells for termination of layers.

    Max Overall Iterations for Layer Addition (nLayerIter)

    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.

    Max Iterations with Strict Quality Controls (nRelaxedIter)

    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.

    Disclaimer

    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.

    Last updated: April 18th, 2023

    Contents