Will Automated Meshing Spoil the Next Generation of CFD Engineers?
Mesh generation is where you, the user, have the most impact on the convergence and accuracy of your computational fluid dynamics (CFD) solution. After all, the numerical algorithms and physical models have been selected for you by the CFD solver. Your ingenuity and expertise are expressed and the resulting CFD solution influenced through mesh type, topology, and cell quality - not to mention, how long the whole analysis will take.
But in the headlong rush to automate mesh generation, will these last vestiges of control be ripped from your hands? Will you lose an appreciation for the importance of the mesh and relinquish the ability to control it with perhaps deleterious effects on your simulations? When meshing is taken out of your hands, will a valuable engineering skill set be lost forever?
Automatic Versus Automated
When you look up “automatic” in the dictionary, one definition you will find is “without human intervention.” That jibes with NASA's CFD Vision 2030 Study (Reference 1) in which the authors write “ultimately the mesh generation process should be invisible to the CFD user.”
However, we cannot in general easily apply the literal definition of “automatic” to technology. Fred Brooks in his classic book on software engineering (Reference 2) writes that “automatic” has always been a euphemism for doing better than we're doing now. Furthermore, in my experience the implied caveat of automatic mesh generation is that the desired mesh is generated without human intervention and also with the same result had the user generated the mesh entirely by hand. We want to have our cake and eat it too.
Paradoxically, even a quantitative assessment such as “1-click” (i.e. automatic) meshing depends on when you start and stop counting clicks. How many times have we all heard statements like these:
Creating an automatic mesh generator - one that supports geometry of any format, type, or quality; understands diverse configurations ranging from biological to automotive to chemical process to aerospace; generates topology and cells supported by all available CFD solvers (especially yours); and exports or shares data with your particular solver - is not an easy job.
Further, automatic methods are plagued by the inevitable dead ends where 90 percent of the mesh is generated automatically but the last 10 percent is either virtually impossible to complete or consumes days or even weeks of time.
But creating an automated mesh generator is a much more tractable task, especially when automation is coupled with or built upon manual techniques that serve as backups when automation goes astray. So let us explore how automation has been implemented in Pointwise, starting from the very beginning with CAD model import.
Automated Solid Model Assembly
Import and preparation of geometry is the bane of mesh generation. The main issue is one of sloppiness: the gaps and overlaps between what should be adjacent surfaces. These gaps and overlaps cause the mesher to see each surface as an isolated, disjoint piece rather than part of a whole (Figure 1). When you mesh sloppy CAD, there is no guarantee that component meshes will match across surface boundaries.
Fortunately, during CAD file import Pointwise automatically assembles the surfaces from your CAD file (e.g. STEP, SolidWorks) into a topological solid (Figure 2).
Figure 2: Setting a single parameter, Model Assemble Tolerance, during CAD file import enables automatic solid model assembly.
The resulting solid model has neither gaps nor overlaps (Figure 3). All its surfaces are part of the whole. (Of course, Pointwise will directly import all solid models encountered in the CAD file.)
The significance of meshing a solid model is that when you mesh the model, all the component meshes - one per CAD surface - will knit together seamlessly while still respecting the geometric intent. This in turn makes the surface meshes immediately suitable for volume meshing.
On the other hand, when solid model assembly does not work fully or at all during import due to excessive sloppiness, Pointwise gives you the ability to manual perform the assembly operation with full control over tolerances and the surfaces to assemble.
Automated Surface Meshing
Surface meshing can often represent a challenge. Ensuring points are properly projected to complex CAD geometry and dealing with CAD surface artifacts like slivers or overlaps often forces you to resort to manual techniques.
Fortunately, with a single button click Pointwise can mesh all the CAD surfaces and, as shown in Figure 4, have them all fully connected. You can set many default meshing attributes to ensure the resulting meshes meet your requirements for geometric resolution and cell size (Figure 5).
Figure 5: Here are just a few of the default meshing attributes that you can set for surface meshing.
While the surface mesh in Figure 4 is quite suitable, it also probably is not exactly what you want for CFD because the mesh topology obviously mimics, surface for surface, the CAD topology. The latter is simply an artifact of how the CAD software creates and exports the geometry and has nothing to do with the true nature of the geometry or the needs of CFD.
Fortunately, Pointwise offers yet another automated tool for recovering from the CAD geometry what we refer to as the engineering geometry. Using a single angular tolerance (see Quilt Assemble Angle in Figure 2) the solid model can be subdivided into topological entities called quilts during automatic assembly. (The term quilts was introduced in Reference 3.) Think of a quilt as a collection of surfaces on which a single mesh will be generated. As shown in Figure 6 for our launch vehicle, the quilts represent the fuselage, tail, upper and lower wings, wing tip, and nozzle exit (not shown). This engineering geometry better reflects the goals of the CFD simulation.
Now when meshing the model, each of its quilts is covered with a single surface mesh that blends smoothly across seams between surfaces and is likely better suited for CFD (Figure 7).
On the other hand, Pointwise offers a full suite of model and quilt assembly tools to tune the engineering topology to your requirements along with an even more robust suite of meshing attributes. These can all be applied manually at your discretion.
Automated Volume Meshing
Structured & Unstructured Meshes
Pointwise's structured (quad, hex) and unstructured (tri, tet) meshing techniques are applied automatically at the time meshes are created (with user-specified default parameters) and are adjusted automatically whenever the mesh topology is edited.
What is probably of utmost importance during the meshing process - which often takes a meandering path with edits and changes and updates - is ensuring that the mesh cells still meet your quality criteria after all this poking and prodding.
Fortunately, Pointwise offers Rules, an automated method for proactively monitoring mesh quality. You can create a rule that sets a limit on any supported mesh metric as illustrated in Figure 8.
Figure 8: This panel illustrates the creation of a rule that limits the minimum included angle on any cell in a surface mesh (domain) to be no less than 60 degrees.
Once rules have been created, any meshing or topology operation that breaks any rule will automatically post a flag on the screen. You can then refresh the Rule's graphics to see specifically where it is broken as shown in Figure 9.
On the other hand, because you often want a more detailed view of mesh quality from histograms to single cells, Pointwise includes a full suite of mesh diagnostic and visualization tools that you can apply at any time to any meshes.
The structured and unstructured meshing techniques described in the previous section work very closely with volume mesh topology. But hybrid meshes such as those generated by Pointwise's anisotropic tetrahedral extrusion (T-Rex) have less reliance on volume mesh topology and thus can be generated much more automatically.
As an extrusion technique, T-Rex begins with surface meshes like those described in the section above. The technique marches outward from the surface meshes creating layers of anisotropic tetrahedra (with included right angles) that can be later post-processed into stacks of prisms or hexes. Along the way, the T-Rex technique automatically accounts for:
The results are rapid generation of high density, boundary layer refined meshes as illustrated in Figure 10.
Automated Meshing via Scripted Templates
The best approach for truly automatic meshing - at least in the near future - is to target specific applications such as airfoils, wings, exhaust nozzles, blade passages, etc. Of course, no one relishes writing a complete meshing application from scratch for each of these applications so the key to success is having a common, core mesher that is extensible.
Fortunately, Pointwise's Tcl-based scripting language, Glyph, was designed specifically for extending Pointwise via macros (to encapsulate frequently performed sets of operations), extensions (to create new commands that are not part of the baseline code), and templates (complete meshing applications).
Figure 11 is a screen shot of a Glyph app for meshing the exhaust nozzle of a jet engine. As you can see, the app is written entirely in terms of design parameters; no meshing expertise required. All of the meshing parameters and techniques (i.e. the user's best practices) are captured in the script that you never see. The end result is a mesh formatted for your CFD solver.
On the other hand, apps like these are subject to break whenever they are applied to cases at the edge of the design envelope. In these instances, the full Pointwise application is ready to take over where the app leaves off.
Try Automated Meshing for Yourself
Obviously, this article's title was a little tongue-in-cheek. No one wants to make meshing invisible more than Pointwise. What is important is the realization that invisibility comes at a price; confidence that the mesh you did not make and cannot see is suitable for your simulation and ensuring that you always have a path to complete a mesh by building automated tools on top of a full-feature mesh generation platform like Pointwise where you have the opportunity to automate a lot of the process while retaining the control to ensure the mesh precisely meets your requirements.
If you want to take control of your meshing using Pointwise's automated methods, you can request a no-cost, no-obligation trial today.