Mesh Cleanup

Once a mesh has been created or imported, Trelis has tools to both manually and automatically improve the quality of a mesh. Mesh Cleanup is the name for the automatic tools which automatically find bad elements and fixes them by both recomputing node locations (i.e. smoothing) AND redefining the local element connectivity. To automatically cleanup a mesh, use the following command:

Cleanup {Volume|Block} <id_range> [angle <value=150>]

This command will cleanup either a tet or a hex mesh as described below.

Cleaning Up a Tetrahedral Mesh

An alternative to the remesh command for tetrahedral meshes is the cleanup command. For this command the existing mesh is validated and "optimized" by the tetmesher, instead of being deleted and replaced with a different mesh.

To cleanup a tetrahedral volume mesh use the following command:

Cleanup {Volume|Block} <id_range>

A second variation of the Cleanup command allows remeshing of tetrahedra that are either part of a free mesh (not owned by a volume) or are a subset of the tetrahedra in the volume. The command is:

Cleanup Tet <id_range> [Free]

For example, the command

cleanup tet all free

will gather all tetrahedra in a free mesh or single volume, generate a triangle boundary surface, and "optimize" the mesh, ignoring any volume or blocks. Without the optional free keyword, the tets will be processed volume by volume or block by block retaining the boundary between adjacent volumes or blocks.

Also, the command

cleanup tet 200 to 300

will gather the tetrahedra in the range [200, 300], generate a triangle boundary surface, and "optimize" the mesh. If the tetrahedra in the range are disjointed, i.e., multiple, independent sets, this operation may fail. It is best to specify a contiguous set of elements.

Note: Trelis will issue an error if the tetrahedra are owned by more than one volume or mesh container.

Cleaning Up a Hexahedral Mesh

The command to cleanup a hex mesh is:

Cleanup Volume <id_range> [angle <value=150>]

The GUI Command panel is accessed via Mesh/Volume/Mesh Cleanup:

 

Hexahedral mesh cleanup is newer to Trelis and currently only a single type of bad element is found and fixed. The hex mesh quality configuration that is currently implemented is when a column of hex elements is on the boundary of a volume, the hexes in the column each have 2 adjacent quad faces on the boundary, and the dihedral angle between those 2 faces is greater than the specified angle tolerance. This situation is illustrated in Figure 1 where the red column of hexahedra has a good angle on the source surface, which flattens out to 180 degree angle on the target creating inverted hex elements. The angle parameter determines how large the angle can get before being cleaned up.

Figure 1. Example of hexahedral mesh with case handled by hex mesh cleanup.

Figure 2 illustrates the result of hex mesh cleanup. Internally, Trelis finds the column of hexahedra with the bad elements, as well as an adjacent column of hexahedra, and then automatically performs some hex column operations followed by smoothing to improve the quality of the elements locally.

Figure 2. The mesh from Figure 1 after hex mesh cleanup.