Generating Anisotropic Triangles Using 2D T-Rex
When creating unstructured domains on surfaces with significant curvature, resolving the regions of high curvature can be difficult. One solution to this problem is to generate a 2D T-Rex domain on these surfaces. A T-Rex mesh allows you to grow anisotropic triangles off edges of a domain for a certain number of layers then fill in the remainder of the domain with isotropic triangles. The end result is a mesh that resolves the spacing and curvature near the domain edge while using isotropic triangles to reduce cell count in the roughly planar regions of the domain. Not only does T-Rex provide viscous resolution for 2D grids, but can also be used to generate match domains for full 3D anisotropic grids.
To learn how to use T-Rex on an unstructured domain with high curvature, begin with a geometry like the example shown below of a wing. Unstructured domains have already been created on the existing database. The goal is to resolve the curvature on the leading edge of the wing to reduce the faceting caused by the isotropic triangles.
Refer to the example and apply the steps to your own geometry. Note that the numbers in the following steps apply to the example; you will need to determine which settings work best for your own grid.
The first step is to select the desired domains and set the T-Rex attributes for the grids.
Max. Layers sets the maximum number of anisotropic layers you wish to have on the domains. This number does not guarantee the total number of anisotropic layers, but sets the limit on the total number of layers generated. Full Layers tells the T-Rex solver to generate this number of layers without removing triangles from or adding triangles to the layer front. In other words, this is the number of complete anisotropic triangle layers generated. Growth Rate is set to 1.3 by default, which is a 30% growth rate. To change the default, uncheck Use Default and enter your own value.
Now that the T-Rex attributes have been set, boundary conditions need to be applied to the domains' edges so the solver will know how they should be handled. For example, you may have some edges grow anisotropic triangles, but keep some edges isotropic.
Notice that all domain edges are set to the Unspecified BC for which the Type is Off. This means that, by default, isotropic triangles will be generated off all edges.
Edges with this BC Type applied to them will grow anisotropic triangles.
This value will be the initial height for the first layer of anisotropic cells.
The BC has been applied to the selected connectors. Notice that the Unspecified BC has been decreased by two.
Edges with this BC Type will act as guides for the anisotropic triangles grown off the Wall BC edges.
Two different BCs can be set to the shared edge of two domains, one for each side of the edge. For this example, we will set both sides of the edge to the same BC.
The BC has been applied to the selected connectors. Notice that the Unspecified BC has been decreased by four.
There are two connectors, the trailing edges, which still remain in the Unspecified BC. We want isotropic triangles generated off these edges, so we will leave them in this BC which is set to Off.
The boundary conditions are set, so now we are ready to initialize the domains.
Use Initialize when initializing your domain for the first time. But if you make changes in the Attributes, T-Rex, or Boundary Conditions tabs, use Refine to modify the domains.
But notice that the Chordwise Connectors near the leading edge do not have the same initial spacing or growth rate as the T-Rex grids. This can easily be fixed by applying a growth distribution function to the connectors. For more information on this technique, please go to Applying the Growth Distribution Function to Connectors (2D T-Rex).
Following this example, you can see how a T-Rex mesh can help you create an unstructured mesh, while also resolving areas of high curvature.
Back to the main DIY training page.
If you have questions about the steps outlined above or on any other meshing topic, please contact us via one of the following methods.