Meshing is the process of dividing fluid domain into small volumes to solve equations using Computational Fluid Dynamics (CFD). It is one of the biggest bottlenecks and remains mostly a manual process in the CFD workflow.
Every CFD engineer at some point has spent painful hours trying to achieve a mesh that the solver will eventually approve. This happens more often if you are not following the unwritten rules of meshing. Over the last ten years, I have worked with a wide range of CFD meshing tools, both commercial and open source. Based on my experience, I believe that efficient CFD meshing requires understanding the tools/strategies just as much as the algorithm requirements/robustness needed down the workflow. I have seen the same mistakes committed during the meshing process, time and time again.
This blog post will not teach you how to mesh or what meshing tool/strategy you should adopt, but rather highlight some mistakes to avoid to keep your solver happy and have a simulation report ready for the next meeting.
1. Never use the first iteration of automatically-generated mesh:
Many of today’s meshing tools provide the ability to automatically generate CFD meshes without much manual intervention, like sizing specifications. However, the first iteration of automated meshes is often unusable for any meaningful CFD simulations. In fact, in many cases the simulation would diverge immediately. The problem should not and cannot be addressed by fine-tuning parameters/settings during simulations.
Diagram Above: Grids shown from automatic-generator (left) and fine-tuned (right)
2. Don’t fill the domain with a ridiculous number of tetrahedrons:
So many times, I see meshing engineers filling up their CFD domains with a large number of tetrahedrons (tets) and then struggling to get simulation results on time. Understanding mesh density requirements are essential for solution accuracy and computational time minimization, which also requires an understanding of the flow physics.
In general, using structured hexahedrons reduces the cell count in the model and is more solution-friendly. Multi-block strategies, creating hexahedrons in simpler geometric regions, and tets in geometrically complex regions, are beneficial as well. Many meshing tools can generate such combination of structured and unstructured meshes, also called a hybrid meshing strategy.
Additionally, if your software comes with the capability, converting tets into polyhedrons gives some significant advantages. For node-centered codes, the tetrahedral mesh is already solving on polyhedrons. For more, see the discussion here.
Diagram Above: Hybrid mesh for wind study in an urban area
3. Don’t forget Cartesian mesh also exists:
It would not be an exaggeration if I said Cartesian mesh is highly under-used within the CFD community. There are many benefits of Cartesian meshing. Most CFD codes support them (some call them cut-cells, trimmed, etc.). Cartesian meshes are easy and fast to generate, as well as efficient for both the data storage and the solution stage due to a simpler octree-type structure. Mesh refinement at run-time can also be achieved efficiently with Cartesian cells.
Diagram Above: Grids showing non-uniform cartesian mesh
4. Don’t underestimate the importance of grid-convergence:
Grid-convergence is controversial. I have been told many times, even by veterans of CFD, that grid-independence studies belong to academia. Really? So, don’t we want accurate results for industrial CFD? Experience-based judgment on mesh refinements is good but not sufficient to ensure the reliability of simulation output. It is possible, with many CFD tools, to automate the whole grid-convergence process. If your CFD results are not grid-independent, your design decisions are based on misleading information.
5. Don’t hit ‘Run’ without a mesh quality inspection:
This one should be obvious. Even when in a hurry to get results faster, CFD folks forget to check mesh quality. Depending on the robustness of the solution schemes, this could cause serious issues like straightaway divergence of the solution. Many times CFD engineers miss this and then need to go back to mesh spending and waste time. There are several quality metrics that need attention depending on mesh type and flow problem. Some of these metrics include skewness, aspect ratio, orthogonality, negative volume, etc.
6. And the last one, don’t let AMR go wild:
Adaptive mesh refinement (AMR) or dynamic mesh adaption, gradient-based run-time refinement, etc. is still not very widespread in the general industrial CFD community. However, some users may be using it quite often. Not many popular CFD codes offer this capability but if you use this in your CFD workflow, be aware of some tricky things involved. Don’t forget to put a limit on the maximum number of cells, refinement levels, and refinement zones. The total cell count may go crazy if you don’t ensure the limits are reasonable to your problem and hardware infrastructure.
The list is definitely not exhaustive, and the discussion above is primarily focused on the general state of CFD meshing technology without going into details of specific workflows and capabilities of the various software.
What are the mistakes you think meshing engineers must avoid? How do you ensure your mesh works in perfect harmony with the solver? Share your thoughts and experiences in the comments!
Show Comments (0)