Hex Meshing

Introduction

img 5958eb3a47960

In the Hex Meshing panel, the finite volume mesh is created based on the provided geometry. The mesh generation process is semi-automatic and produces hex-dominant mesh based on arbitrary geometry.

Meshing Process

introduction scheme

Geometry

aircraft profile geometry

At this stage the geometries should be ready for meshing (Geometry Panel). All geometries are visible in a Meshing Properties list. Each geometry can be used for different purposes while meshing. The base one is to determine the boundaries of the mesh domain. Geometries can be also used as a tool for creating refinement regions or cell zones. In some cases, geometries may not be needed for the meshing process, but are necessary for further operations such as extracting boundaries, setting initial conditions, etc. In these cases, geometries can be ignored at this stage of setup.

geometry meshing options

Geometry tab is used for assigning meshing properties for each of the geometry. In the Meshing Properties list, you can enable geometry meshing options using four buttons located next to the geometry name:

  • img 5958efc5e0a06 Mesh Geometry - use the geometry to cut mesh and conform its shape to the geometry surface
  • img 5958efd30335f Create Boundary Layer Mesh - (visible when Mesh Geometry is enabled) inflate boundary layer at selected geometry face groups
  • img 5958efe85b7f9 Create Cell Zone - (visible when Mesh Geometry is enabled) instead of using the geometry to define mesh boundary, creates a cell zone inside this geometry. Creating cell zone during meshing allows adapting mesh cells shape to the geometry used.
  • img 5958eff664120 Refine Geometry - uses this geometry to mark a location for mesh refinement

To display detail meshing inputs click the geometry name with meshing options enabled.

Mesh Geometry

mesh geometry

Mesh Geometry option allows to set the geometry as a mesh boundary. The geometry along with the boundaries of the base mesh should form a closed surface. The meshing algorithm uses this geometry to cut a mesh and conform its shape to it. Two additional options are available:

  • Refinement - define the minimum and maximum level of mesh refinement on the geometry surface. Refinement level increases the base mesh density in the area of the geometry border. Maximum refinement level is applied to the region with geometry features (high curvature, edges, wholes), while the minimum level is applied to the whole surface. The refinement level denotes number of times a cell edge will be split in half. It is possible to control how fast the mesh is coarsened from the refinement region. To define the count of the buffer cells between each refinement level go to Meshing Settings . Cells Between Levels parameter determines the width of the transition zone between refined and background mesh. Lowering this parameter will reduce the overall cells count.
refinement level
  • Create Baffle - option allowing to create an infinitely thin wall inside the mesh. The cells will not be removed from the inside(outside) the geometry, but internal boundary matching the geometry shape will be created. Because the internal boundary is immersed inside the mesh as the result the mesh will consist of two boundaries representing the back and the front side of the geometry.

Create Boundary Layers Mesh

aircraft profile bl

Boundary Layer feature is an optional meshing stage used to better resolve the flow in the viscous layer near the walls. At this stage, the mesh is shrunk and additional mesh layers are inflated to increase mesh density near the boundary.

bounday layer

Boundary Layer option is available for meshed geometry (Mesh Geometry has to be enabled). The following options allow to specify the sizing of the boundary layer:

  • No. of Layers - specify the number of mesh layers that should be created between the wall and nominal mesh
  • Expansion Ratio - this factor determines the distribution of layers thickness. The cell size near the wall should be small and gradually increase further away. This parameter controls the thickness ratio between every two adjacent layers when moving away from the wall.
  • First Layer Thickness - determine the thickness of the first layer in the boundary layer. This dimension is by default relative to the size of the first mesh cell adjacent to a wall.
  • Face Groups - this option allows enabling or disabling the boundary layer addition to individual face groups by toggling the img 5958efd30335f Create Boundary Layer on This Group button.

Create Cell Zone

cell zone

Create Cell Zone is an optional meshing feature used to mark sub-volume of the mesh. This option is only visible when Mesh Geometry is enabled. Instead of using this geometry to remove cells, cells will remain inside this geometry (similarly to Create Baffle). The mesh cells will adapt to the geometry surface, but the mesh boundary will not be created in the geometry location. All the cells located inside the geometry will be marked as a Cell Zone and the cell zone will derive name from the geometry.

It is possible to create a cell zone the meshing by extracting cells from an existing mesh. However, defining the cell zone during meshing allows adapting cells to the cell zone geometry.

Tip
You can find an example usage of this utility in the Catalytic Converter Tutorial

Refine Geometry

refinement aircraft

Refine Geometry uses the geometry to mark a volume refinement. Mesh density inside the geometry can be increased by multiple times relative to the base mesh (higher refinement level). Outside the geometry the mesh is smoothly coarsen by decreasing refinement level. The refinement transition region size (and thus the total cell count) can be controlled by using Cells between Levels option under Meshing Settings panel.

refinement

The following options are available for the Refine Geometry tool:

  • Limit Refinement input - allows you to limit mesh refinement level to the specified value
  • Refine Mode input - specifies the area where the mesh should be refined in relation to the geometry
    • Inside - create refinement inside the geometry
    • Outside - create refinement outside the geometry
    • Distance - at a specified distance from the geometry boundary (in both directions - inside and outside). This option requires setting the Distance parameter defined in meters.
  • Level - defines the level of mesh refinement. Refinement level increases the base mesh density in the selected area. At each refinement level, the cell edges are split in half.
refinement level
  • Gap Refinement - additional refinement scheme, that refines mesh only in small gaps in the geometry. If you select a mode other than none , you will additionally have to specify Number of Cells in (across) Gap and Maximum Gap Refinement Level.

Copy Meshing Properties

It is possible to apply the same meshing properties to multiple geometries. For this purpose use the Copy Meshing Properties button. All meshing settings will be copied from the source to the destination geometries.

copy meshing properties 1

To copy meshing properties follow these steps:

  • 1 Select the source geometry
  • 2 Click Copy Meshing Properties

The Copy Properties panel will appear to the left.

copy meshing properties 2
  • 3 Select the destination geometries. To help to select multiple geometries use a drop-down list.
  • 4 Click Copy button to confirm.

Base

aircraft profile base mesh

Base Mesh is an initial mesh that fills the analyzed fluid domain. It is the first stage of the mesh generating process. Base mesh is a background mesh from which the final mesh is "cut out" using geometry and refined according to geometry configuration.

base mesh

Base Mesh is defined by the four parameters group:

  • 1 Base Mesh Type - determines the general shape of the domain
  • 2 Geometry - determines the size of the domain
  • 3 Mesh - sets the mesh density by applying divisions in the directions specific for the current base mesh type
  • 4 Boundaries - specify the initial mesh boundaries.
Note
If the mesh is created inside the geometry the base mesh boundaries are irrelevant. The base mesh boundaries are most commonly used for the external flow meshes.

Base Mesh Type allows to select one of four available base mesh types (shapes):

  • Box
  • Cylinder
  • Plate
  • Wedge

Box

box type

The Box base mesh is a simple and most commonly used for creating general 3D meshes. Box type has a cuboid shape where the edges are parallel to the global coordinate system axes. The Box base mesh type is selected by default. Depending on which type is selected the suitable parameters will be shown below.

box panel

Box Geometry

box geometry

There are two ways to define the Box geometry:

  • Specify its span along the all coordinate system axes
    • Min [m] - the minimum coordinates along each of the global coordinate axes
    • Max [m] - the maximum coordinates along each of the global coordinate axes
  • Press Autosize button to fit the box to enclose all the visible geometries. The box will be 5% bigger than visible geometries.

Box Mesh

box mesh

To define the density of the mesh, specify the number of cells along each of the box dimensions and its distribution.

  • Division - number of cells along each dimension of the box
  • Grading - mesh grading along each direction. The grading value defines ratio of the size between subsequent cells
  • Cell Size [m] - preview of the estimated cell size

The base mesh with 3 size adjustment arrows will be presented in the 3D window. The preview will display size and cells according to the current setup.

box 3d

Box Boundaries

box boundaries

Box consists of six boundaries with normals pointing forward and backward along each of the axes of the global coordinate system. Each of the faces requires a name and a type defined. If multiple faces have the same name, they will be combined into a single boundary. By default, Box will have all its six faces put into a boundary named boundaries.

box b name

You can change face name by selecting one of the predefined names, or by typing your own custom name.

box b type

You can change face type using the drop-down list. When you change the type of boundary, this new type will be automatically applied to the other faces with the same name.

Cylinder

cylinder type

The Cylinder base mesh is typically used for axis-symmetric geometries such as rotors or impellers. Topologically cylinder consists of five boxes connected in such a way that the mesh can have a cylindrical shape with good cells quality.

cylinder topology

While selecting the base mesh type the suitable parameters will be shown below. These parameters are characteristic dimensions of the selected shape.

cylinder panel

Cylinder Geometry

cylinder geometry

Cylinder can be oriented along one of the axes of the global coordinate system.

  • Axis - axis along which the cylinder should be oriented
  • Origin [m] - location of the cylinder from the global center point along cylinder axis.
  • Length [m] - length of the cylinder
  • Radius [m] - radius of the cylinder
  • Radial Fraction [-] - fraction of the radial boxes compared to the cylinder radius
  • Autosize - tool to fit the cylinder in order to enclose all the visible geometries.

Cylinder Mesh

cylinder mesh

To define the mesh, specify the number of cells along the length of the mesh, the number of cells for the radial boxes and the central box.

  • Radial Division - division along the radial direction
  • Radial Grading - grading along the radial direction
  • Axial Division - division along the axis of the cylinder
  • Axial Grading - grading along the axis of the cylinder
  • Central Division - division of the central box

The cylinder base mesh with 3 size adjustment arrows will be presented in the 3D window. The preview will display size and cells according to the current setup.

cylinder 3d

Cylinder Boundaries

cylinder boundaries

Cylinder consists of three faces - two disks with normals pointing forward and backward along cylinder axis and a cylindrical face. Each of the faces needs to have a name and a type defined. If multiple faces have the same name, they will be combined into a single boundary. By default, Cylinder will have all its three faces put into a boundary named boundaries.

cylinder b name

You can change face name by selecting one of the predefined names, or by typing your own custom name.

cylinder b type

You can change face type using the drop-down list. When you change the type of boundary, this new type will be automatically applied to other faces with the same name.

Plate

plate type

The Plate base mesh is used for generating 2D meshes. It is essentially a two-dimensional version of Box placed in an X-Y plane. All geometries in SimFlow are 3D, and thus the geometry must be located in the way it will cut through the Plate plane. SimFlow only operates on 3D meshes, and despite the Plate will be used for 2D simulation the mesh will still remain 3D. The mesh will be one cell wide in the Z direction. To enforce 2D flow a special Empty boundary condition type will be assigned to the front and back of the Plate mesh (boundaries for the Z direction). User have freedom to choose appropriate boundary conditions to the sides (X min/max and Y min/max edges).

plate panel

While selecting the base mesh type the suitable parameters will be shown below. These parameters are characteristic dimensions of the selected shape.

Plate Geometry

plate geometry

The Plate base mesh is defined by its sizes along the X and Y axes of the coordinate system.

  • Min [m] - the minimum coordinates along the X and Y axes
  • Max [m] - the maximum coordinates along the X and Y axes
  • Autosize button fits the plate to enclose all the visible geometries.

Plate Mesh

plate mesh

To define the mesh divisions the number of cells along the X and Y should be specified.

  • Division - number of cells along X and Y direction
  • Grading - mesh grading along each direction
  • Cell Size [m] - estimated cell size in X and Y direction

The Plate base mesh with 2 size adjustment arrows will be presented in the 3D window. The preview will display size and cells according to the current setup.

plate 3d

Plate Boundaries

plate boundaries

Plate consists of four faces (edges) with normals pointing forward and backward along the X and Y axes of the global coordinate system. Each of the faces needs to have a name and a type defined. If multiple faces have the same name, they will be combined into a single boundary. By default, Plate will have all its four faces put into a boundary named boundaries .

plate b name

You can change face name by selecting one of the predefined names, or by typing your own custom name.

plate b type

You can change face type using the drop-down list. When you change the type of the face, this new type will be automatically applied to other faces with the same name.

Wedge

wedge type

The Wedge base mesh is used to create 2D axis-symmetric meshes. It is essentially a section of a Cylinder placed in an X-Y plane.

wedge scheme

The mesh consists of one cell in the third dimension in which the fluid dynamics equations will not be solved. This base mesh type will automatically take care of preparing appropriate boundaries for the Z-direction. Special Wedge boundary conditions are automatically assigned to both sides of the computational domain to enforce 2D axis-symmetric flow.

wedge panel

Wedge Geometry

wedge geometry

Wedge is placed in the X-Y plane with the axis pointing in the X-direction.

  • Origin [m] - location along the cylinder axis where the cylinder begins
  • Length [m] - length of the cylinder
  • Radius [m] - radius of the cylinder
  • Autosize button fits the wedge to enclose all the visible geometries.

Wedge Mesh

wedge mesh

To define the fineness of the mesh you just need to specify the number of cells along the axial and radial directions of the wedge.

  • Radial Division - division along the radial direction
  • Radial Grading - grading along the radial direction
  • Axial Division - division along the axis of the cylinder
  • Axial Grading - grading along the axis of the cylinder

You can preview the base mesh in the 3D window.

wedge 3d

Wedge Boundaries

wedge boundaries

Wedge consists of three faces - two disk sections with normals pointing forward and backward along the cylinder axis and a face with normal pointing in the positive Y direction that represents cylinder. Each of the faces needs to have a name and a type defined. If multiple faces have the same name, they will be combined into a single boundary. By default, Wedge will have all its six faces put into a boundary named boundaries .

wedge b name

You can change face name by selecting one of the predefined names, or by typing your own custom name.

wedge b type

You can change face type using the drop-down list. When you change the type of the face, this new type will be automatically applied to other faces with the same name.

Point

aircraft profile mat point

Material Point indicates on which side of the geometry the mesh is to be retained. If the simulation considers the flow around a geometry (external flow), material point should be located outside the geometry but still inside the base mesh. In this case both the base mesh boundaries (outer boundaries) and the geometry surface (inner boundary) will form mesh boundaries.

valve material point

In the opposite case, when the internal flow is considered, the material point should be located inside the geometry. If the geometry is fully enclosed inside the base mesh the mesh boundaries will be determined only by the geometry (the mesh will not spill out of the geometry). In a case when the base mesh sides overlaps the geometry (for instance the base mesh side is a symmetry plane) the resulting mesh will consist of boundaries derived from both, the geometry and the base mesh as well.

material point panel

In the Point tab, the Material Point location can be specified either by point’s coordinates or by dragging the material point in the 3D window.

To drag the point press CTRL key and drag the arrows to the destination.

The material point can be also associated with the geometrical point. To move it to the specific point, click the icon pick location from 3d view icon and select the point in 3D view (to select hold CTRL pressed). A material point must be always be located inside the base mesh.

material point 3d

Multi-Zone Mesh

multi zone mesh

Usually, the mesh is created inside a geometry defining a single volume. However, in certain situations, multiple separate regions can be used. A typical example would be a simulation of a flow where part of the domain is a porous region. The porous region in this case would be another volume unconnected to the whole fluid domain. Another example can be a Conjugate Heat Transfer (CHT) simulation. In this case often the fluid domain is defined by the separate geometry per each region - fluid and solid. For those situations, the simplest option is to create a Multi-Zone Mesh.

When you enable Multi-Zone Mesh a list of Material Points will be displayed. There you can add multiple material points. Each material point should have a name that will be used to create a cell zone named after that material point. If a material point is named none, the mesh will be assigned to default region and will not be put into any cell zone. Each of the material points should be located in a separate, unconnected region of the geometry.

multi zone mesh comparison

Note, the multi-zone mesh removes walls between zones but adapts cells to match wall location. Generated mesh will consist of a single mesh region and multiple cell zones representing separate volumes. This feature is useful for the conjugate heat transfer simulation. All the subregions can be created in a single meshing step instead of meshing each region separately. Having multiple cell zones allows to convert the mesh into multiple subregions - appropriate boundaries between cell zones will be created and by default coupled with its neighbour located in second subregion. To create a subregions from the cell zones use the Cell Zones to Regions option from the MESH panel.

Meshing

mesh tab

The Mesh tab is used to start the meshing process. Additional inputs that control the meshing process itself are listed under this section.

Meshing In Parallel

mesh cpu

In the CPU tab you can set the number of processors used for meshing. Serial (1 processor) is set as default. If you have a multi-core processor, you can use the parallel option to perform meshing in parallel. Meshing in parallel is performed by decomposing mesh into multiple subdomains and then meshing each subdomain using own processor.

  • serial - single-core operation
  • parallel - multi-core operation
  • Number of Processors (only for parallel)- how many processors to use for meshing

Meshing Settings

mesh settings

Settings tab contains additional global meshing options. The most commonly used parameters are visible under the Settings tab, while a more advanced options can be accessed from Advanced Meshing Options.

  • Meshing Stages allows choosing meshing stages (Base , Mesh and Layers) that should be performed.
  • Snap Tolerance is responsible for adjusting mesh to the geometry. Maximum relative distance for nodes to be attracted by geometry. The displacement distance is the specified value times local maximum edge length
  • Cells Between Levels determines the width of the transition zone between refined and background mesh. number of buffer layers between different refinement levels. The higher number the slower transition from dens to coarse mesh.

The meshing process can be split into three stages: Base , Mesh and Layers. Meshing Stages define which of the stages should be performed. Each stage can be performed separately or some stages can be omitted. The following options are available:

  • All Stages (default) - all meshing operation will be performed
  • Skip Layers - create mesh without boundary layers
  • Skip Base - if the background mesh was created in a previous step, execute the next stages. This option can be also used when you intend to use imported mesh as a base for cutting operation.
  • Only Base - create the background mesh only
  • Only Mesh - if the background mesh was created in a previous step, execute the cutting mesh and snapping step (without creating boundary layers)
  • Only Layers - add the boundary layers to the existing mesh

Notification

mesh notify me

If the meshing process takes a long time, it is comfortable to set the notification after the meshing process is finished. To activate this option check Notify me when meshing is finished and type your e-mail address. You will receive a notification when the mesh will be ready.

Start Meshing

start meshing

Mesh button starts the meshing process. Depending on the mesh settings and hardware, the mesh generation can take from a few seconds to even a few hours.

If you are generated mesh more than once, for example, you decided to increase mesh density, the Restore Previous Mesh will become active. By clicking this button you will replace the current mesh with the previous one. You can think about this option as a one-level undo.

Advanced Meshing Options

preferences

In the Hex Meshing panel user can access the most important parameters controlling the meshing process. Apart from those there are many more which can be modified, but usually users do not need to change them. The advanced options are available in the Preferences panel. In order to access these options follow the below steps:

  • 1 Go to File at the top menu
  • 2 Select Preferences
  • 3 All parameters are grouped in a navigation panel on the left. Expand the Meshing group to display all parameters related to the meshing process.

Mesh parameters are split into several groups:

  • General
  • Parallel - set the default compute settings (default number of CPUs)
  • Snappy Hex Mesh - set the default and advanced meshing parameters
    • Snap - control nodes morphing algorithm for fitting mesh to the geometry
    • Refinement - advanced parameters related to refinement
    • Layers - modify boundary layer addition. It is possible to use absolute boundary layer thickness instead of default relative sizing (relative to first cell thickness) and change layer addition algorithm and its properties.
    • Quality - define mesh cells quality controls criteria for the iterative meshing algorithm
  • Reconstruction
  • Split Zones

Some of these parameters can be accessed from the Hex Meshing panel directly, while in this window you can change their default values.