5.9.17. Improving the Mesh by Smoothing and Swapping

Smoothing and face swapping are tools that complement mesh adaption by increasing the quality of the final numerical mesh. Smoothing repositions the nodes, and face swapping modifies the cell connectivity to achieve these improvements in quality.


Important:  Only smoothing that is based on quality is recommended; face swapping and smoothing based on skewness or a Laplacian operator have more limitations, and support for them may be removed in a future release.



Important:  Face swapping is applicable only to meshes with triangular or tetrahedral cells.



Important:  Face swapping and smoothing based on skewness or a Laplacian operator are available only for serial cases; only quality-based smoothing can be used for parallel cases.


For additional information, see the following sections:

5.9.17.1. Smoothing

The three smoothing methods that are available in ANSYS Fluent are:

  • quality-based smoothing

    This method is the only recommended method, and is available for all types of meshes in serial and parallel.

  • Laplacian smoothing

    This method is not recommended, though it is available for all types of meshes in serial (and is best suited for quadrilateral and hexahedral meshes).

  • skewness-based smoothing

    This method is not recommended, though it is available for triangular and tetrahedral meshes in serial; it can be used alternatively with face swapping (see Combining Skewness-Based Smoothing and Face Swapping).

5.9.17.1.1. Quality-Based Smoothing

Smoothing that is based on quality is performed using the Improve Mesh Dialog Box (Figure 5.80: The Improve Mesh Dialog Box).

 Setting Up Domain → Mesh → Improve...

Figure 5.80:  The Improve Mesh Dialog Box

The Improve Mesh Dialog Box

ANSYS Fluent divides the mesh into a number of “bins”, each of which contain a certain number of cells. Improvements are attempted on the cells in those bins that exhibit the lowest orthogonal quality (as defined in Mesh Quality). As part of this method, you specify the percentage of the total number of cells, in order to determine how many bins are modified.

Note that this smoothing is similar to when you use the mesh/repair-improve/improve text command. The advantage of using the Improve Mesh dialog box rather than the text command is that you can control the percentage of the cells that ANSYS Fluent attempts to improve.

To perform quality-based smoothing, do the following steps:

  1. In the Improve Mesh Dialog Box (Figure 5.80: The Improve Mesh Dialog Box), enter the Percentage of Cells to be Improved.


    Important:  Quality-based smoothing will be CPU intensive if you specify a large value for the Percentage of Cells to be Improved. It is recommended that you enter a small value initially, and then perform the smoothing process multiple times, if necessary. Note that the maximum percentage allowed is 10%.


  2. Specify the number of successive smoothing sweeps to be performed on the mesh in the Number of Iterations number-entry box. The default value is 4.

  3. Click the Improve button.

5.9.17.1.2. Laplacian Smoothing

When you use this method, a Laplacian smoothing operator is applied to the unstructured mesh to reposition nodes. The new node position is the average of the positions of its node neighbors. The computed node position increment is multiplied by the relaxation factor (which is set to a value between 0.0 and 1.0). A value of zero for the relaxation factor results in no movement of the node, and a value of unity results in movement equivalent to the entire computed increment. Figure 5.81: Result of Smoothing Operator on Node Position illustrates the new node position for a typical configuration of quadrilateral cells. The dashed line is the original mesh and the solid line is the final mesh.

Figure 5.81:  Result of Smoothing Operator on Node Position

Result of Smoothing Operator on Node Position

This repositioning strategy improves the skewness of the mesh, but relaxes the clustering of node points. In extreme circumstances, the present operator may create mesh lines that cross over the boundary, creating negative cell volumes. This is most likely to occur near sharp or coarsely resolved convex corners, especially if you perform multiple smoothing operations with a large relaxation factor. Figure 5.82: Initial Mesh Before Smoothing Operation illustrates an initial tetrahedral mesh before one unrelaxed smoothing iteration creates mesh lines that cross over each other (Figure 5.83: Mesh Smoothing Causing Mesh-Line Crossing).

Figure 5.82:  Initial Mesh Before Smoothing Operation

Initial Mesh Before Smoothing Operation

Figure 5.83:  Mesh Smoothing Causing Mesh-Line Crossing

Mesh Smoothing Causing Mesh-Line Crossing

The default smoothing parameters are designed to improve mesh quality with minimal adverse effects, but it is recommended that you save a case file before smoothing the mesh. If you apply a conservative relaxation factor and start with a good quality initial mesh, the frequency of failure due to smoothing is extremely low in two dimensions. However, corruption of the mesh topology occurs much more frequently in three dimensions, particularly with tetrahedral meshes.

The smoothing operator can also be applied repeatedly, but as the number of smoothing sweeps increase, the node points have a tendency to pull away from boundaries and the mesh tends to lose any clustering characteristics.

To perform Laplacian smoothing, enter the mesh/smooth-mesh text command in the console and respond to the prompts as follows:

  1. Enter "laplace" for the type of smoothing.

  2. Specify the number of successive smoothing sweeps to be performed on the mesh in response to the number of iterations prompt. The default value is 4.

  3. Specify the factor by which to multiply the computed position increment for the node in response to the relaxation factor prompt. The lower the factor, the more reduction in node movement.

5.9.17.1.3. Skewness-Based Smoothing

When you use skewness-based smoothing, ANSYS Fluent applies a smoothing operator to the mesh, repositioning interior nodes to lower the maximum skewness of the mesh. ANSYS Fluent will try to move interior nodes to improve the skewness of cells with skewness greater than the specified “skewness threshold”. This process can be very time consuming, so perform smoothing only on cells with high skewness.

Improved results can be obtained by smoothing the nodes several times. There are internal checks that will prevent a node from being moved if moving it causes the maximum skewness to increase, but it is common for the skewness of some cells to increase when a cell with a higher skewness is being improved. Thus, you may see the average skewness increase while the maximum skewness is decreasing.


Important:  Carefully consider whether the improvements to the mesh due to a decrease in the maximum skewness are worth the potential increase in the average skewness. Performing smoothing only on cells with very high skewness (for example, 0.8 or 0.9) may reduce the adverse effects on the average skewness.


To perform skewness-based smoothing, enter the mesh/smooth-mesh text command in the console and respond to the prompts as follows:

  1. Enter "skewness" for the type of smoothing.

  2. Specify the number of successive smoothing sweeps to be performed on the mesh in response to the number of iterations prompt. The default value is 4.

  3. Specify the minimum cell skewness value for which node smoothing will be attempted in response to the skewness threshold prompt. ANSYS Fluent will try to move interior nodes to improve the skewness of cells with skewness greater than this value. By default, skewness threshold is set to 0.4 for 2D cases and 0.8 for 3D cases.

5.9.17.2. Face Swapping

While it is not recommended over smoothing (and support for it may be removed in future releases), face swapping can be used to improve the quality of a triangular or tetrahedral mesh in the serial version of ANSYS Fluent.

To perform face swapping, enter the mesh/swap-mesh-faces text command repeatedly until the console report declares that 0 faces were swapped out. The console report will display the total number of faces that were visited and tested for possible face swapping.

5.9.17.2.1. Triangular Meshes

The approach for triangular meshes is to use the Delaunay circle test to decide if a face shared by two triangular cells should be swapped. A pair of cells sharing a face satisfies the circle test if the circumcircle of one cell does not contain the unshared node of the second cell. Figure 5.84: Examples of Cell Configurations in the Circle Test illustrates cell neighbors in the circle test. In cases where the circle test is not satisfied, the diagonal or face is swapped, as illustrated in Figure 5.85: Swapped Faces to Satisfy the Delaunay Circle Test.

Figure 5.84:  Examples of Cell Configurations in the Circle Test

Examples of Cell Configurations in the Circle Test

Figure 5.85:  Swapped Faces to Satisfy the Delaunay Circle Test

Swapped Faces to Satisfy the Delaunay Circle Test

Repeated application of the face-swapping technique will produce a constrained Delaunay mesh. If you have a Delaunay mesh, it is a unique triangulation that maximizes the minimum angles in the mesh. Thus, the triangulation tends toward equilateral cells, providing the most equilateral mesh for the given node distribution. For more information on Delaunay mesh generation, see Generating Tetrahedral Meshes in the Fluent Meshing User’s Guide.

5.9.17.2.2. Tetrahedral Meshes

For tetrahedral meshes, face swapping consists of searching for configurations of three cells sharing an edge and converting them into two cells sharing a face to decrease skewness and the cell count (see Figure 5.86: 3D Face Swapping).

Figure 5.86:  3D Face Swapping

3D Face Swapping

5.9.17.3. Combining Skewness-Based Smoothing and Face Swapping

As mentioned in Skewness-Based Smoothing, skewness-based smoothing should usually be alternated with face swapping. Guidelines for this procedure are presented here.

  • Perform four smoothing iterations using a skewness threshold of 0.8 for 3D cases, or 0.4 for 2D cases.

  • Swap until the number of faces swapped decreases to 0.

  • For 3D meshes, decrease the skewness threshold to 0.6 and repeat the smoothing/swapping procedure.


Release 18.2 - © ANSYS, Inc. All rights reserved.