Pointwise The Choice For CFD Meshing The Connector newsletter Pointwise Facebook Pointwise GitHub Pointwise Instagram Pointwise LinkedIn Another Fine Mesh blog Pointwise Pinterest Pointwise Twitter Pointwise YouTube Y+ Calculator
 
   
   
 
Get a Free Trial



The Connector, the newsletter for CFD Mesh Generation from Pointwise

July / August 2013

Playing by the Rules – Proactive Mesh Quality Assessment

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.

Assessing Mesh Quality Metrics

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.

example of global mesh quality visualization

Figure 1: Examining mesh quality on the global level provides a lot of feedback, but how easy is it to find the bad cells in this image? +

Set Precise Mesh Criteria

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.

structured hex grid for a flange

Figure 2: Structured grid for a flange. +

  1. Under the Examine menu, open the Rules panel.
  2. Click the Connector icon. This means the rule is to be applied only to connectors and limits the metrics to those that apply to connectors.
  3. Choose the function Connector Length Ratio I from the drop-down menu.
  4. For the Limit, choose < (Less Than) from the drop-down menu and set the value to 1.3. (In other words, the rule says that all grid length ratios should be less than 1.3.)
  5. Press the Save Rule button.
the controls used to create a rule

Figure 3: These are the controls for creating and editing a rule. +

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).

the icon indicating stale rules

Figure 4: The icon on the far right indicates that a rule (or rules) is stale and needs to be evaluated.

the controls used to evaluate and update rules

Figure 5: You press the Evaluate button to refresh the metric computations for a rule. +

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).

the controls used to evaluate and update rules

Figure 6: Locations where the connector rule for length ratio is broken are displayed in red. +

Using Rules the Easy Way

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).

the rules toolbar with evaluate inactive

Figure 7: The Rules toolbar has a button for evaluating rules (left) and showing and hiding rules (right).

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.

the rules toolbar with evaluate active

Figure 8: The evaluate rules button (left) is enabled whenever the rules become stale.

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.

More Advanced Use of Rules

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.

optional controls can be applied to customize rules

Figure 9: Color and naming options help you distinguish one rule from another. +

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.

two rules applied to the same grid

Figure 10: Cells that break rules are drawn on the grid using their assigned color. In this case, the connector rule is red and the domain rule is yellow. +

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).

a table of rules violations for each rule and each grid

Figure 11; The table of rules show how many cells violate each rule and in which grid. +

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.

there's a preference for rules display

Figure 12: You can limit the number of symbols displayed for rule violations using the Preferences command.

Summary

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.


◀ Previous Article     ▲ Contents     Next Article ▶

      e-email