The Hex-dominant meshing operation type is currently based on SnappyHexMesh, a mesh generation tool part of the OPENFOAM® open-source software. This tool generates three-dimensional unstructured or hybrid meshes consisting of hexahedra (hex) and split-hexahedra (split-hex) elements.
Generally, a reference base mesh is used to project and snap cells onto the geometry. Mesh refinements can flexibly be specified on edges, surfaces, and inside or outside volumes to obtain optimum geometry feature resolution and final mesh quality. Parallel computing is fully supported with a load balancing at every iteration.
In case you’re interested to learn more details about how the hex-dominant algorithm works, take a look the Background for Hex-dominant article in our SimWiki. The article presents a brief background of the meshing methodology used by the snappyHexMesh algorithm.
To choose the automatic hex-dominant meshing mode, select Hex-dominant (only CFD) as meshing algorithm. The automated Hex-dominant operation reduces the parameter set of the Hex-dominant parametric operation (below) to a minimum and sets the rest of it automatically based on the CAD domain. Use this operation to get a quick mesh in order to run preliminary CFD analyses. For fine tuning the mesh for more detailed analyses the Hex-dominant parametric operation (below) provides all detailed parameters.
The meshing mode defines how the mesher should generate the mesh. Internal meshing will place the mesh inside of the body. If the CAD consists of multiple solids, the mesher will attempt to create a multiregion mesh which is suitable for conjugate heat transfer, e.g. in electronics cooling. The Internal meshing mode is typically used for CAD geometries that already represent the final fluid domain.
Conversely, External meshing will create the mesh outside of the bodies. The overall dimension of the resulting mesh is defined by the Background Mesh Box (accessible as Geometry primitive in the meshing tree). It is typically used for aerodynamic flows, e.g. around vehicles or buildings.
Another way of extracting the fluid volume from the CAD geometry is to use the Flow volume extraction feature.
Generally it is recommended that the extents be at least 2-3D upstream, 6-8D downstream and 2-3D in the lateral directions, where D is the object reference length.
The option Material point defines a point inside the domain where the mesh will be placed. The mesh will surround the material point and extend until the boundaries of the body. The material point position can be defined in the Material point geometry primitive in the meshing tree.
The Sizing defines how coarse or fine the discretization of the input geometry will be. The sizing control can be set to automatic, where local properties are adjusted automatically based on geometrical estimations or a manual sizing can be applied where minimal and maximal edge length may be defined.
For the automatic sizing only a global mesh fineness needs to be set and all additional parameters will be set automatically according to the geometry features and the chosen fineness. Its value basically defines the characteristic element size for each solid, ranging from 1 – very coarse to 5 – very fine. A fine mesh will result in a better resolution of small geometric features, but will also increase computation time and memory demand of the derived simulation run. The standard setting 2 – coarse will in most cases result in a discretization that represents a good compromise between accuracy and resource consumption and should be chosen for a first trial. For mesh independence or convergence studies the sizing can be refined in later stages.
With the manual sizing the user gains full control over all details of the element sizing setup. This option provides a global minimum and maximum element edge length setting for cells of the mesh.
Besides the automatic Hex-dominant (only CFD) meshing algorithm, a parametric option called Hex-dominant parametric (only CFD) is available as well. The parametric mode exposes all parameters to the user which are also available in the original “SnappyHexMesh” tool from OpenFOAM. This meshing algorithm allows you to create high-quality hex-dominant meshes for arbitrary geometries with optionally refined boundary layers.
A detailed documentation of the available settings can be found in two parts:
Please note that all operations based on snappyHexMesh create polyhedral meshes which means that they can include cells of arbitrary shape. Therefore these meshes can not be used for Finite Element analysis but only for Finite Volume based solvers like OPENFOAM®.
Mesh refinements can be used to refine (or coarsen) the mesh locally and only where it is needed. This enables the generation of very efficient meshes with respect to considerations about result accuracy versus computational resource demand.
A mesh refinement can be added via the Refinements node in the meshing tree. Current mesh refinement types allowed are Feature refinement, Region refinement, Surface refinement, Boundary layer inflation and Bounding box layer addition.
Local settings will always override the global setup for the assigned entities. If multiple refinements of the same type are defined on the same entities this might lead to conflicts and thus should be avoided.
A feature refinement can be used to refine the geometry’s feature edges. All edges whose adjacent surface normals have an angle less than 150° are marked for extraction and refinement.
Refinement settings include Distance and the Length. The edge and surface mesh will then be refined up until the specified distance in all directions from the extracted edges. The length parameter determines the intended cell edge length.
A default feature refinement is always included when using the Hex-dominant automatic meshing type. This refinement type can be used to modify the default behavior.
The region refinement is used to refine the volume mesh for one or more user specified volume regions. It’s possible to assign CAD entities as well as user-defined geometry primitives. One of the following refinement modes can be used:
A surface refinement can be applied to refine cells on specific surfaces of the geometry. Both geometry faces and/or volumes can be selected for refinement. If a volume has been assigned, the refinement is applied to all surfaces of that volume. Surface refinements can also be used to group cells together – such a group of cells is called a cell zone.
It’s required to specify two refinement levels, the minimum cell edge length and the maximum cell edge length. In a first step, a refinement up to the maximum length is applied across all of the assigned surfaces. Further refinement up to the minimum cell edge length is only applied to cells in areas where the normals form an angle greater than 30°. Therefore, in the following cases, only the first refinement step is applied:
It is recommended that the maximum level be set to give a cell size in the order of the minimum surface dimension.
By default, the option to create a cell zone is inactive. For a cell zone to be created, a closed volume needs to be assigned to the surface refinement and the cell zone option needs to be enabled. If successful, all cells enclosed by the assigned volume will be grouped together.
Cell zones are required to assign specific properties to a sub-set of cells, like defining it as rotating region (MRF (Multiple Reference Frame) or AMI (Arbritrary Mesh Interface)), a momentum source, a heat source or as a passive scalar source. If the geometry that is being meshed is of STL format, the user can also assign a list of faces that form a closed volume to create a cell zone.
The surface refinement will be overwritten by a feature refinement at the geometry edges up to the specified feature refinement distance.
The layer refinement adds a volume mesh with cells aligned to the surface to all assigned surfaces. Only faces of the geometry domain can be assigned for refinement. The following four parameters are required inputs:
The layer mesh will be inserted between surface and first volume cell layer by pushing the existing mesh out. To keep mesh distortion effects small, the total layer mesh thickness should not exceed the thickness of the first volume cell layer thickness.
A list of meshing tutorials can be found in the tutorial section.
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.