The Golden Rule of mesh generation is to produce a mesh that provides a foundation for an accurate and converged computational fluid dynamics (CFD) solution. On the other hand, one might say the Golden Paradox of mesh generation is that everyone believes that meshing experts know how to enforce the Golden Rule omnipresently, while in truth only you, the CFD practitioner, can tell whether a mesh is good. It's your analysis – the physical models, the solver algorithm, the grid type, your computer resources, your desired outputs, your desired level of accuracy, your organization's best practices – that truly determine a grid's acceptability.
Pointwise's Rules command provides you with a tool for monitoring and making this proactive determination. With rules, you can specify precisely what's acceptable to you. At any time during the meshing process, you can verify that the grid meets your criteria.
Let's not digress into a debate on whether a priori mesh quality metrics are useful. And a discussion of which specific metrics (usually based on cell geometry) are most valuable and how to compute them is best left for another day. Let us stipulate the fact that there is practical value to assessing your mesh prior to starting the CFD computations.
Mesh quality metrics are typically evaluated once the mesh is complete. In other words, people generate the entire mesh and then evaluate whether it's any good or not. Most CFD solvers have some built-in mesh diagnostics that will identify issues. The good thing is that the CFD solver will identify the specific issues that are most relevant to its use (for example, cell aspect ratios should be less than five). But the practical problem with using the CFD solver is that your mesh assessment is performed after the fact. You had to finish the mesh, export the mesh, import the mesh, evaluate the mesh, identify any mesh problems, and then go back to the mesh generator to fix the problems (hoping that you could remember where the solver said the problems where).
Most mesh generators, like Pointwise, also include mesh diagnostics that you can evaluate for any part of the mesh at any point during the meshing process to quantify mesh quality using various metrics. This is a more logical place to evaluate mesh quality because you'll be able to fix any problems right away.
But tools that evaluate mesh metrics only on a global scale are somewhat lacking in practicality. Consider for example the mesh shown in Figure 1. What actionable conclusions can you draw from this mass of data? Certainly, the histogram and the probing of individual cells (not illustrated) help. But there's another way to do this.
The good thing about Rules in Pointwise's Examine command is that they are proactive. Instead of looking for problems after the fact, Rules can be evaluated at any time in the meshing process. The advantage is that you can identify issues early and fix them right away, rather than letting them accumulate.
Consider the grid shown in Figure 2 and assume that your organization's best practices for structured grids includes the criterion that the spacing between grid points on connectors shouldn't vary by more than 30 percent from one interval to the next. You can create a Rule for this in the Rules command as listed below and illustrated in Figure 3.
The first thing you'll notice is the addition of an icon to status bar in the lower left corner of the screen. The icon with the ruler (for Rule) and exclamation point (see Figure 4) indicates that a rule is “stale” and needs to be refreshed. That's easily accomplished by pressing the Evaluate button in the Rules panel (see Figure 5).
Now that you've refreshed and updated the rule's computations, you'll notice two things. First, the Display window has been updated and the locations where the rule is violated are displayed in red (see Figure 6). Second, the status icon has changed to a ruler with an “x” meaning that a rule is broken (in other words, there are grids that violate the criterion you set for the rule).
Everything described in the previous section was performed inside the Examine, Rules command but the good news is that it all persists once you close that command and continue meshing. You'll see two buttons in the Rules toolbar for evaluating and showing/hiding rules (see Figure 7).
Suppose now you add more points to some of the connectors in order to eliminate the rule violations (see Figure 6). You'll notice two changes. First, the rule status icon changes back to the stale rule icon (ruler and exclamation point) and the evaluate rule button in the toolbar is now enabled.
You just have to click the evaluate rules button to assess how your changes have improved the grid. This will update the Display window for visual feedback.
As for the visual display of rules, if it ever becomes too complicated you can hide all the broken rule markers on your grid simply by clicking Hide Rules on the toolbar.
In the example described above, you've created one rule. But your organization's best practices probably include many different guidelines for mesh quality. You can create an additional rule for each one in Pointwise. Figure 9 illustrates the addition of a second rule that says the minimum included angle on a surface grid can be no less than 60 degrees and the rule has been given a custom name, My Domain Rule.
Just like with the rule for connector spacing ratios, any cell that breaks the My Domain Rule is drawn in the Display window. Because it was assigned the color yellow instead of the default red (see Figure 9), it's easy to tell the difference between the two, as shown in Figure 10.
When you see broken rules like in Figure 10, you can find out more about exactly where the problems are by going back into Examine, Rules and looking at the table of Rules on the top of the panel. Each rule is listed by name and by opening the rule, you can see a list of every entity to which the rule is applied and the number of and percentage of violating cells (see Figure 11).
Finally, if you're concerned that the Display window will fill up with the display of broken rules you have control over that using setting in the Edit, Preferences command (see Figure 12). The default is to display 1,000 violating cells per rule. When the limit is exceeded, the worst violators are displayed first.
Mesh generation benefits from the imposition of well-defined boundaries. Rules are your way to accomplish this. By creating rules for mesh quality that reflect your organization's best practices, you greatly improve your ability to generate a mesh that can be used for accurate and efficient CFD.
When you use Rules in conjunction with the other mesh quality diagnostic tools in Pointwise (examining quality on a global scale, setting quality targets within certain meshing algorithms), you can remove a lot of the “magic” from mesh generation and turn it into a well-defined engineering process.
And don't forget the Golden Rule: Mesh for others as you would have them mesh for you.
If you'd like to evaluate your mesh's quality using Pointwise or set some rules for generating a new mesh, consider starting a risk-free evaluation of the software.