In this article, we plan to provide some of the basics and best practices you'll need to know for meshing in Fluent. But, just in case you're here because of a specific error, we want to provide some tips and tricks around common errors and troubleshooting first. After that, we'll take a deeper dive into meshing modes and options.
Common Meshing Errors
From time to time, you may find that your model is failing to mesh, or you'd like to understand in more detail why your mesh check is failing. Below are some areas to check to determine better why you see failures.
1. Mesh check failed in Fluent. This error message is usually the result of General to Mesh to Check operation, and the error message is shown in the console (TUI) window.
In order to debug this issue, increase verbosity to 2 (enter the command in the command line: /mesh/check-verbosity):
The message will show in red: Cell has nodes not connected to all faces: Cell 21554, zone 10453, (ID: 21555) at location …
This is usually the result of a hanging node (from O-grid elements around orifices). ANSYS Fluent in Nimbix can handle hanging nodes, so this warning can be ignored.
2. Failed mesh in ANSYS Mesher: Can be identified in yellow color and obsolete mesh in pink.
3. Faulty geometry. Clean your geometry in the Design Modeler. Faulty geometry can be determined using the Design Modeler in Nimbix. Edit your geometry with ANSYS Design Modeler, then go to Tools to Analysis Tools to Fault Detection.
In more general terms, if you're having mesh issues, you should also consider the following.
1. Decrease element size to capture small features and have five elements on the gaps (convection) and three elements on the thickness (conduction) paths to get a fully developed velocity profile and conduction path (will help with convergence and solution errors).
2. Use proximity/curvature mesh vs. adaptive Meshing when using ANSYS Mesher. Proximity and curvature meshing will allow you to capture the small details of the part and the curvature of the solid bodies.
Tips and Tricks for Fluent
Now let's dive into some best practices for meshing in general. We'll even cover some tips and tricks you can use.
ANSYS Fluent is an application for modeling fluid flow, heat transfer, and chemical reactions in complex geometries. It provides complete mesh flexibility, including the ability to solve flow problems using unstructured meshes that can be generated on very complex geometries.
There are two types of systems available within Workbench from where you can access Fluent: analysis systems and component systems.
The Fluent-based systems that are available in Workbench are:
1. The Fluid Flow (Fluent) analysis system enables that allows you to perform a complete CFD analysis and contains cells that allow you to create geometry, generate a mesh, specify settings in Fluent, run the Fluent solver, and visualize the results in CFD-Post.
2. The Fluent component system allows you to access Fluent from within Workbench and contains only the cells needed to specify settings in Fluent and run the Fluent solver. When using a Fluent component system, a mesh must be imported into the system or must be provided through a link from an upstream system.
The Fluid Flow (Fluent) analysis system is found in the Toolbox under Analysis Systems, as shown in the image below:
Fluent-based Analysis Systems
Fluid Flow (Fluent) Analysis System
Since this article is focused on Meshing and problems associated with Meshing, none of the other cells will be described or referred to but the mesh cell.
When you double-click the Mesh cell, it will open ANSYS Meshing (you will need to have created or imported a geometry). On the other hand, you can also import the mesh from a pre-existing Fluent mesh into the system.
The ANSYS Meshing is accessed through ANSYS Mechanical, and after double-clicking the mesh, it should open a window that looks like this:
When clicking on the "Mesh," you will be able to access the "Details of Mesh" window.
Under this "Details of "Mesh"" window, be sure to have selected the Physics Preference as "CFD" in case it doesn't get selected by default. (different types of meshing options are available for different physics).
Important to note:
1. If you Import a Fluent mesh file into the Mesh cell, the Mesh cell will become the starting point for your analysis (and the name of the Mesh cell changes to Imported Mesh). Therefore, the Geometry cell (and data it contains) will be deleted. The deleted Geometry cell can be retrieved by selecting Reset from the context menu of the Imported Mesh cell.
2. If you import a Fluent mesh into the Mesh cell within Workbench, keep in mind that this mesh cannot be modified by the ANSYS Meshing application.
Under the "Details of "Mesh"", it is also very important to decide the element order (lower, higher, or Program controlled). A lower-order element example is a linear element type (no midsize node), and a higher-order element example is a quadratic element type (with midsize node). Higher-order elements can capture curvature effects that linear elements cannot.
"Element size" is also very important as the element size will dictate the number of mesh elements through the thickness (for fluid flow, a bigger number of mesh elements is recommended; therefore, the element size should be changed from the "Default" generated by ANSYS Mechanical.
"Sizing" plays an important role in generating a good quality mesh. The Sizing of the elements can be controlled in very many ways, and one should carefully study and understand the value of element Sizing as well as which feature within the Sizing (s shown in the image below) is important based on the application (it is important to Capture Proximity, or the element size Growth Rate, or should you use Adaptive Meshing, etc.).
If you use "Adaptive Sizing", study and understand the meaning of Resolution (a "0" resolution means coarse mesh and "7" means a fine mesh, etc.).
After you perform the first round of Meshing, be sure to check the Quality of the mesh. A good quality mesh means that mesh quality criteria are within the good range, the mesh is valid for the physics under the study, important geometric details are captured, and the mesh is grid-independent.
The mesh metrics available within Workbench Meshing (under "Details of Mesh"") are:
Element quality, aspect ratio, Jacobian ratio, warping factor, parallel deviation, maximum corner angle, skewness, orthogonal quality, characteristic length.
Refer below to the skewness and orthogonality spectrum (courtesy of Ansys training documentation), which are some of the most important criteria to check for a good mesh:
Fluent-Based Component Systems
The Fluent and Fluent (with Fluent Meshing) component systems are found in the Toolbox under Component Systems as shown in the image below:
The difference between "Fluent" and "Fluent (with Fluent Meshing)" is the fact that for the Fluent, the window looks like this:
In this window, the Setup and Solution cells follow the same workflow as for any Fluent stand-alone setup. However, the mesh must come from a file that was Imported into the Setup cell or within the Fluent application or must come from an upstream link, etc.
When you create a new Fluent (with Fluent Meshing) component system in Workbench, the project has all three cells: Mesh, Setup, and Solution, as shown below:
By double-clicking the Mesh cell, you can access Fluent Meshing, and define and generate a mesh for your project. Fluent Meshing will automatically load either the current mesh data or if the mesh data is not available, the geometry defined in the upstream Geometry cell. Otherwise, you can import input data file(s) directly into Fluent Meshing.
Meshing Mode in Fluent
This is embedded into the Fluent user interface and allows a complete workflow from meshing to solving to postprocessing within the same window. The Fluent Mesher allows the user to Read CAD and surface mesh of complex assemblies, can handle billion of cells, scriptable for batch execution.
Two guided workflows are available: water-tight geometry workflow and fault-tolerant meshing workflow. The water-tight geometry is designed for water-tight CAD geometries that do not require much cleaning or modifications to the geometry. The fault-tolerant meshing workflow is designed for more complicated, non-water-tight CAD geometries, or geometries with defects (overlaps, holes, duplicate faces, etc.). The quality of volume mesh can be generated without having to go and fix the faulty geometry.
For water-tight geometry, the requirements are the following:
1. Clean geometry.
2. Watertight solid or solid and/or fluid regions.
3, Can be meshed by first generating a surface mesh and then a volume filling.
4. Can be a single or multi-body part.
5. Can share topology at the CAD level (such as SpaceClaim or Design Modeler) or at the mesh level.
Important to note here that SpaceClaim is not supported on LINUX, therefore Fluent Meshing cannot import “.scdoc” files on Linux.
There is though a workaround to this drawback:
1. Start Fluent Meshing on Windows and import the “.scdoc” file, during which process Fluent Meshing automatically creates a “.pmdb” file in the same directory as the “.scdoc” file.
2. The “.pmdb” file generated, can be imported to a Fluent Meshing session running on Linux.
Steps for the watertight mesh workflow:
1. Start Fluent in Meshing mode (be sure you select the right dimension, 2D or 3D):
2. In Nimbix the mesh mode launching is done by checking the box marked in the window below:
3. The “Workflow” tab is in the front left of the meshing mode window layout as shown in the image below:
4. From Select Workflow Type, choose Watertight Geometry as shown in the image below:
5. A new window opens, and you need to perform each task individually:
6. Of interest under the scope of this blog is the “Create Surface Mesh” task.
When accessing this task, you will have the opportunity to assign element mesh size, element growth rate, proximity, and curvature, etc. (much as described under the ANSYS Mechanical meshing process above).
Note: If necessary, advanced options enable a high level of control.
Once the Surface mesh is created, you have the option to display the task state, to view any errors or warnings that are generated due to the Surface mesh settings, as shown in the image below:
After generating the surface mesh and completing all other tasks, you will be able to create a volume mesh based on the Surface mesh.
Note: quality check of your mesh follows the same criteria as the mesh generated using the Ansys Mechanical meshing from within the Workbench interface.
Fault-tolerant meshing workflow
In Fluent, select the “Fault-tolerant Meshing” from the Workflow type.
A new window opens with all the tasks needed to generate a mesh, as shown in the image below:
Note: The fault-tolerant meshing process is much more involved and requires separate treatment and it is not under the scope of this brief summary Fluent meshing blog.
Now, the question is this: Which meshing is best to use when I use Fluent CFD simulation?
The answer to this question is: it all depends on what you feel more comfortable with or whether you find one way of meshing easier than another.
If you have used ANSYS Fluent for some time and used ANSYS Meshing or a third party meshing software, and you feel you would like to move to the ANSYS Fluent Meshing to take advantage of the single window ANSYS Fluent workflow, reduced meshing time, create meshes using Mosaic meshing type (available under Fluent meshing), then you should probably consider transitioning to ANSYS Fluent Meshing with Watertight Geometry Workflow.
On the other hand, if you handle dirty, complex CAD assemblies that require taking advantage of the wrapping technology, then you should probably consider using ANSYS Fluent Meshing with Fault-Tolerant Meshing Workflow.
You've made it to the end of the article! Hopefully, you found this interesting, any questions reach out to us at firstname.lastname@example.org.