Share This Article
Controlling Localized Element Size Gradation in an Unstructured Mesh
A mesh generated for computational fluid dynamics (CFD) must be fine enough to accurately resolve the flowfield and be coarse enough for the simulation to converge in a reasonable amount of time. Therefore, mesh cell sizes should vary throughout the computational domain, with smaller cells used where required for accuracy and larger cells use elsewhere for computational efficiency. An additional requirement is that the cell size blends smoothly from fine to coarse.
Obviously, finer cells will be used in the boundary layer regions of viscous simulations. And equally obviously, the no-slip walls of the geometry provide a guide to placing and sizing those cells. But other flow features needing resolution (vortices and shock waves, for example) lack a priori geometric cues that can guide meshing.
One approach to mesh gradation for flow resolution is the posteriori clustering of the mesh to features derived from the ongoing flow solution (in other words, adapting the mesh to gradients, error estimates, adjoint techniques). This work takes the opposite approach and explores how to best implement user controllable, a priori mesh size gradation in a tetrahedral volume mesh.
The subject method is being implemented in the Pointwise software which, for consistency's sake, requires consideration of several design factors.
Mesh Control: In a bottom-up mesh generator such as Pointwise, the volume meshing is truly a boundary value problem - the volume mesh's cell sizes are driven by the surface element sizes and user-controllable blending functions. Any additional controls for cell size gradation must integrate smoothly into that bottom-up paradigm.
Mesh Robustness: The cell size gradation method must be able to work with meshes in which relevant length scales vary by six or more orders of magnitude as driven by both the geometry and the flow physics. Examples of such meshes include viscous simulations of fully appended aircraft and submarines.
Mesh Quality: The element size, shape, and gradation must not negatively impact the flow solver's convergence or solution accuracy.
Approaches to Cell Size Gradation
The simplest method of grading a mesh's cell size in a bottom-up method is through the mesh's topology; apply a cell size gradation to the mesh's boundaries and blend those gradations onto the interior. While this method is quite robust, its effects are very local. In order to make its effects more global, one must create and interact with the mesh's topology which can be quite cumbersome.
Octree methods have the proven ability to resolve both local and global effects. A minor limitation is the fact that mesh gradation must follow level set rules.
This work uses a network of radial basis functions (RBFs) to achieve mesh gradation. RBFs can be formulated as a simple interpolation scheme that provides local control. By extending the method to a network of RBFs, global influence can be had on the mesh's gradation. A further benefit of RBFs for a prior mesh size gradation is the ability to implement them in a manner that is interactive and easily controlled by the user.
Radial Basis Functions for Mesh Size Gradation
For the purposes of mesh size gradation, we seek an RBF that will yield a specified element size at a source location (ds) and smoothly blends to a background element size (dB) at a certain distance from the source. The smooth blending borrows from other point distribution techniques in Pointwise and is based on a geometric growth rate (G). Those three parameters can be combined to define the effective radius of a source, rB (in other words, the distance from a source at which the mesh size has reached the background size).
Then the basis function used for computing the cell edge length d at any distance from the source is simply:
Now consider a network of such sources as shown in Figure 1 where the green points are the sources and the black circles denote their radius of influence. The mesh size at the starred location is therefore only influenced by the points with blue arrows instead of all of them. Also, the void area on the right side of the image is where the mesh size is simply the background value because it lacks source influence.
Figure 1: The RBFs limit the influence of the green points' mesh size on the starred point to only those indicated by the blue arrows.
Sources and Shapes
With the mathematics of the RBF defined, one needs only a method for defining the source. In this implementation, sources are defined by geometric primitives called shapes. Shapes can be 0-D (point), 1-D (line, curve, circle), 2-D (circle, quad, disk, polygon) or 3-D (sphere, box, frustum, cylinder, cone, swept polygon). These shapes are created in a sketch-based interface and can overlap with each other and the geometry of the object being meshed.
One or two mesh size attributes are applied to the source. If only one is applied, the source's mesh size takes on that constant value throughout its interior. If two attributes are applied, the mesh size varies linearly across the shape. Figure 2 illustrates how this cell size variation is computed for a line source.
Note that a shape can be a volumetric region (a box, for example) but an RBF is a point based measure. As part of the implementation of source shapes, the shape is converted into a point-based field through a sampling technique that is unique to the geometric primitive in an attempt to preserve its intent. Therefore, the line shape in Figure 2 is converted into a string of points, each of which has a spacing size as illustrated.
Examples of Source Shapes
For a more complicated example of a source shape, consider wake refinement behind an automobile as shown in Figure 3. Two cell sizes are specified on the source with a smaller one immediately behind the automobile and a larger one downstream.
Figure 3: A box source in the wake region behind an automobile. Source cell sizes at the box's ends are denoted by the yellow circles. Radius of the circle denotes the relative magnitude of the mesh cell size.
As a final example of source shapes, consider the two volume sources behind the aircraft in Figure 4. These two sources overlap not only each other but the aircraft geometry as well.
Controlling Source Influence
The effect of the blending factor G on the transition from the source spacing to the background spacing is illustrated in the following figures where the sources are the surface mesh points on the aircraft. The left side of each image uses G = 1.1 (in other words, a 10 percent increase in cell size as the mesh steps away from the source) and is compared to G = 1.2, 1.3, and 1.4, respectively. Increasing G causes the mesh to grade more rapidly to the background spacing.
Examples of Source Shapes
The shape examples illustrated above when applied as sources to the mesh yield the results below for the automobile case (Figure 8) and aircraft case (Figure 9).
This implementation of radial basis functions and source shapes has proven to be an effective method for users to apply a priori element size gradation to a tetrahedral mesh. Future work involves speeding up the manner in which the RBFs are computed and introducing a tensor implementation to obtain anisotropic sizing. Also, a new “cloud of points” shape type is being contemplated as a mechanism for coupling this technique to a flow solver for a posteriori mesh adaption.
Shapes and sources are currently planned for release in Pointwise V18.
This work was originally published as Element-Size Gradation in an Unstructured Tetrahedral Mesh Using Radial Basis Functions by Nick Wyman, Michael Jefferies, Steve Karman, and John Steinbrenner at the MeshTrends10 Symposium in July 2015.
Try Pointwise Yourself
If you would like to generate your meshes using Pointwise request a free evaluation today.