By Kevin Colburn
Senior Applications Engineer, Computational Engineering International, Inc.
Appropriate grid generation is a key aspect to obtaining a high quality CFD solution in an efficient manner. Inspection of grids to assess element quality, grid density, and grid placement is critical to the setup of computational models. The visual and computational capability of EnSight allows users to inspect, visualize, and quantify the quality of the grid used in a simulation. Engineers at CEI have developed these tools to help users understand the grid they have generated and will be using with their CFD solver. EnSight can visualize, quantify, and illustrate grid metrics for any type of grid exported from Pointwise, but it is particularly useful when inspecting recombined T-Rex grids, which are generated on export from Pointwise. In this article, we will highlight three common tools you can utilize in EnSight: coloring grid by element type, mesh display attributes, and element metrics inspection.
EnSight 10 includes a new calculator function that can be used to determine the element type within a domain, and create a new color attribute for elements based on this element type. EnSight's Python scripting language was used to create a tool that invokes this calculator function, colors the elements, and creates a legend with the element types. The tool can be placed in either EnSight's UserDefinedTools area or within the main icon bar of EnSight (See the note at the end of this article on where/how to install these tools). Once installed, you will see the tool as shown below:
When this tool is executed on this sample recombined T-Rex grid, we can quickly inspect the topology of various grids used.
We also developed a new tool/macro to provide further options for grid overlay display in EnSight. The effect is similar to a “hidden line” display in EnSight, but allows for more coloring options and edge display. To achieve this easily, we have developed a tool/macro for this operation as well. Once downloaded and installed (see note at end of article), you should see a new tool available:
In addition to turning on the “grid overlay display” in EnSight, you can either color the grid by a constant color (gray, black, white, etc.) or you can have different parts of the grid displayed in different colors as shown in Figure 2.
EnSight can not only visualize but also analyze and quantify the grid and solution. We have extended this capability to the grid quality by developing a tool that computes the Element Metrics based on the Sandia Verdict Library. There are approximately 30 different element metrics that this routine will calculate, depending upon the grid type used. We implemented this as a general purpose calculator function wrapped with a Python-based macro to add further ease of use and end-user functionality. This macro is called “EleMetric_Histogram”, and it performs the following on the selected parts in EnSight:
After downloading and installing (see instructions below), you will have an entry in your User Defined Tools area like:
Double clicking on this utility will launch a GUI (Figure 3) with some basic user controls:
The “EleMetric_Histogram.txt” file lists all the variables computed. If the minimum and maximum are the same, we simply report that. Otherwise, the distribution is given as well:
In EnSight, the user now has access to the variable information computed, and can clip the domain (perhaps a crinkly clip would be best) and color it by the grid metric of interest:
The current Sandia Verdict Library operates on triangle (3 node) and quadrilateral (4 node) 2D elements; tetrahedral (4 node) and hexahedral (8 node) 3D elements. It does not, however, contain metrics for pyramid (5 node) or prism (6 node) elements. We are discussing with Pointwise on how to enhance the routine to work on a broader range of element types.
If you would like to generate your meshes using Pointwise request a free evaluation today.