5 Most Important Steps in CF-MESH+

For the mesher to do its work the best it can and create high-quality meshes, it is necessary to follow some CFD meshing guidelines. Our experience taught us about the 5 most important steps and features in CF-MESH+ you should consider, depending on your meshing case:

  1. Prepare your geometry and clean the surface
  2. Define feature edges
  3. Use the outer boundary layers option
  4. Use multi-domain meshing
  5. Analyse mesh quality metrics

1. Prepare your geometry and clean the surface

Certain requirements need to be met when preparing a geometry for meshing. It is possible to do so with some tips and tricks for a high-quality meshing process.

Here are our five tips to make your meshing as smooth as possible:

  • Apply cell size smaller than half of the gap dimension.
  • Modify the geometry where the feature size tends to zero.
  • Delete duplicate faces and resolve self-intersections/overlaps in the geometry using the surface cleaner. This is especially beneficial for multi-material cases.
  • Select feature edges where they are needed

All of these tips are explained in detail with examples in one of our previous posts.

Resolved CubeCylinder.fms geometry

Starting with version 5.0, CF-MESH+ now offers a new utility called “Surface Cleaner”. Guided by a user-defined relative and angle tolerance, this algorithm handles overlaps and intersections, simplifying the surface mesh for improved volume mesh generation. Users now can perform cleanup of duplicate facets and overlaps, resolve intersections, remove unnecessary parts, and close simple holes, all within CF-MESH+.

2. Use feature edges

geometry with feature edges

The feature edges are surface mesh sub-elements whose existence is often very important in the meshing process – where they are treated as constraints. These are the sharp corners/edges in the domain which, when specified as feature edges, cause the software to closely capture them during the meshing process. We always highly recommend creating the feature edges before starting the meshing process. Here you can find a tutorial on how to create feature edges.

3. Use the outer boundary layers option

The outer boundary layer is a very useful option in our boundary layer library. Mostly it is used in aerodynamic and heat transfer applications, where a fine boundary layer near the wall is desired. Its role is to provide a smooth transition between the finer inner part of the layer and the internal mesh. Here you can find the outer boundary layer option thoroughly explained, using a NACA series airfoil as an example.

4. Multi-domain meshing

multi-domain multi-material meshing

CF-MESH+ multi-domain feature enables you to create meshes with conformal interfaces between the multiple domains present in the geometry. You can easily create both patches or face zones at a multi-material interface. This is crucial for complex simulations of real-life examples like calculating the hydrodynamic performance of boats, turbine performance, or examples of heat exchange in multi-material simulations e.g. cooling of electric vehicle batteries with air/fluids. Here you can find a detailed tutorial on how to use multi-domain feature.

If you do not use the multi-domain meshing, by default, CF-MESH+ generates the mesh in the volume consisting of the largest number of cells. In addition, it only takes cells completely inside the mesh into your volume mesh (you can override this behaviour by using “keepCellsIntersectingBoundary” and”keepCellsIntersectingPatches”). It does not use advanced detection of interfaces inside the mesh and it is therefore less sensitive to the quality of the input geometry and shall be used when multi-material meshes are not needed.

5. Analyse mesh quality metrics

It is very important to understand what’s going on in your Finite-Volume CFD code and how to interpret mesh quality checks for your particular problem.

Please bear in mind the following:

  • Non-orthogonality, skewness, and uniformity do not affect the accuracy of source terms. The accuracy depends only on the size of the cells and the error tends to zero with mesh refinement. This means that when the source terms behave in an obscure manner, it makes sense to refine the mesh or revise their linearisation practice.
  • Non-orthogonality does not affect accuracy on divergence, gradient, and source terms and is not the most important quality metric for convection-dominated flows. It is an important measure in the viscous part of the boundary layer.
  • Skewness and uniformity affect the accuracy of divergence and gradient terms. It is important to note that this is only the case in regions where the solution is not uniform! In practice, this means that the mesh shall be of high quality in shear layers, and jets, where the solution exhibits rapid variation!
  • CF-MESH+ offers various meshing workflows and our experience shows that Cartesian 3D and 2D meshes are the best compromise between the accuracy and the required number of cells for most problems. Hex-meshes are needed for solvers that do not accept arbitrary polyhedra. Polyhedral mesher is benefical for geometries without many feature edges. Tet-mesher shall only be used in solvers that do not support other cell types. More about the theory behind this behaviour can be found in the post about cell types.

If this has made you curious, you can try out CF-MESH+. You can also subscribe to our newsletter to stay informed on our newest developments.

Choose your best solution

cfMesh (open source)

cfMesh is an open-source library for mesh generation implemented on top of the OpenFOAM® framework. Read more here.

Note: None of the OpenFOAM® related offering by Creative Fields Holding Ltd is approved or endorsed by OpenCFD, Ltd. (ESI Group), producer of the OpenFOAM® software. OpenFOAM® and OpenCFD® are registered trade marks of ESI Group.

Basic automatic cell sizing

Boundary layers

Cartesian 2D + 3D

Open source

Polyhedral meshing

Tetrahedral meshing

CF-MESH+ (pro)

Discover superior boundary layer generation capabilities, all in an affordable, automated, easy-to-use software.

Basic automatic cell sizing

Cartesian 2D + 3D

Commercial

Polyhedral meshing

Tetrahedral meshing

Advanced control of layer topology

Advanced control of mesh quality

Advanced control for automatic cell sizing

Advanced selection of domains that shall be meshed

CAD import

Hexahedral meshing

Robust algorithms for mesh quality control

Support included (except the hourly licenses)