Hex-dominant parametric: Rotating geometries


The content of this tutorial is not up to date with the current live version of SimScale. The tutorial setup and the results are still valid! Please do not get confused if styles like buttons and entity names have changed in the meantime.

This tutorial demonstrates how you can use the full Hex-dominant parametric operation to create a mesh which supports the simulation of rotating systems. These meshes are required when you want to simulate a turbines, pumps and other systems which contain a rotor.

Where’s the difference to “normal meshing”?

Actually it’s not very different if you are already familiar with the normal Hex-dominant operation. The only thing you need to do in addition is to make sure that a “cell zone” is created within a certain part of your mesh.

Hands-on example: a mesh for a propeller

Geometry preparation

The geometry needs to be prepared in a special way so that a rotating zone mesh can be produced: A cylinder needs to be placed around the rotor. All cells within the cylinder will later be treated as rotating. The cylinder needs to be defined as a solid body. That means that you will have one solid inside another solid (the rotor inside the cylinder).

For this tutorial, you can import the tutorial project containing the geometry into your ‘Dashboard’ via the link below.

Import tutorial project into workbench

  • Once imported, the ‘Work bench’ is open and you will be in the ‘Mesh creator’ tab.

A cylinder has been put around the rotor to define the rotating zone. One face of the cylinder is made invisible so that the rotor inside can be seen

A cylinder has been put around the rotor.

Note: For your goemetries, construct an assembly (some CAD programs call it ‘compound’) from both bodies, export it (preferably in the STEP format) and upload it to SimScale.

Mesh setup

Use the Hex-dominant meshing algorithm to create a mesh for the geometry. The most notable parameters you need to adjust are the numbers of cells in x/y/z direction (they determine the overall cell count of the final mesh), the dimensions of the background mesh bounding box and the location inside the mesh.

Setting mesh parameters.


By default, there will be one predefined geometry primitive called “_BaseMeshBox”. It is automatically associated with the mesh operation. The coordinates of its corner points define the maximum area within the mesh will be created. For example when performing external aerodynamics, it represents the air volume around the structure. In most cases it should be sized well larger than the geometry itself. It is also a test to make sure whether your geometry is scaled correctly. The viewer gives you a visual feedback of the box. The length units are the same as in the geometry. If you find there’s a discrepancy to what you expected, please check if the geometry has been scaled correctly. If you find that the geometry needs to be scaled (for example by a factor of 0.001 to convert from millimeters to meters), use the “Scaling” geometry operation.

Define the _BaseMeshBox(domain around the geometry in which fluid flows) by giving proper dimensions.

The base mesh box was defined around the rotor.

The base mesh box was defined around the rotor.

Specify the material point as shown in the figure below.

The material point.

The material point for the mesh.

The rest of the parameters should work in most cases. If you are not satisfied with the quality of the mesh, please contact us for assistance or reach out for help on the many OpenFOAM forums on the internet.

Mesh refinements

The mesh refinements are amongst the most important parameters to set up for Hex-dominant. In this example, a total of 5 refinements will be used.

1. Feature refinement

The feature refinement is easy to define. All features (i.e. edges) of the geometry will be extracted using a feature angle criterion and a certain refinement is then prescribed at the edges.

It is generally desirable to have a feature refinement.

Setting up a feature refinement.

A feature refinement is used to refine near all edges of the geometry.

2. Region refinement

A region refinement is used to refine the mesh within a volume. The cylinder around the propeller will define a zone within the cells will be more refined than in the rest of the mesh.


Use the viewer to select a volume. Over the viewer there are 4 buttons which toggle the selection mode. If you set it to ‘volume’, you can select volumes by clicking in the viewer with the left mouse button. Then, use the ‘+ Add selection from viewer’ button to perform the assignment and save.

Setting up a region refinement.

A region refinement is used to refine the cells near the rotor.

3. Surface refinements

The surface refinements are the most important ones. We use 2 surface refinements:

  • On the rotor to refine the cells near the blades and
  • On the cylinder to define the rotating zone.

Refinement for blade surfaces

This refinement enforces that the cells near the propeller surface will get refined.

Setting up a surface refinement on the blade surface.

A surface refinement is used to refine the cells on the rotor surface.

Refinement for the rotating (MRF/AMI) zone

This step is crucial to correctly define the cell zone which will rotate.

To achieve this, the option ‘Create cellZone’ is set to ‘true’ and a name (e.g. ‘MRF’) is given to the zone.

Now assign the cylinder “volume or volume set” as the assigned entity.


It should be noted that to create a MRF cell zone the assigned entity should only be a ‘volume or volume set‘ and Not a face or face set. Further, please make sure that the name of the cell zone does not start with a number and does not contain spaces. For example, valid names would be “MRFZone”, “MRFZone_1”, “rotating_cells” and Not “1MRFZone”, “MRF zone”.

Setting up a surface refinement on the cylinder such that a cellZone will be constructed.

A surface refinement is used to create a cellZone within the cylinder. Later, these cells will be declared as rotating and propulsion effects will result.

4. Layer refinement

Layer refinements are used to create boundary layers near solid walls. When considering turbulent effects, boundary layer refinement is required in order to obtain a correct solution.

Create a new layer refinement and assign all faces of the propeller.

Setting up a layer refinement.

A layer refinement is used to create boundary layers near the rotor.

Computing the mesh

Once the mesh is fully set up, the mesh operation can be started. In this case, the computation ran on 4 cores for about XXX minutes. Whilst the meshing is running, you can view the meshing log to see what’s happening. If any errors occur, you can inspect the log file to obtain hints as to what may have caused the error. If in doubt, please contact the SimScale support team and attach the contents of the log file or share your project with us.

Inspecting the result

When the mesh has been finished, you can inspect it in the viewer. The result is depicted in the following picture. The mesh clip filter has been applied to cut through the middle plane of the mesh and see how the mesh looks near the rotor.

Cross-section through the final mesh.

A cross-section through the final mesh.

Mesh quality of fan can be inspected by hiding the surrounding walls and MRF region. All the mesh refinement operations can be adjusted to obtain the desired mesh quality.

Meshed fan.

Meshed fan.