Meshing Complex CAD Geometry Using Models and Quilts
We have a bone to pick with complex CAD geometry - it is a real challenge for mesh generation. If your experiences are like ours, you often import a CAD model only to be confronted by something like the surfaces illustrated in Figure 1.
Figure 1: The arrangement of B-Spline surfaces in this CAD model of a bone is completely irrelevant to mesh generation.
The number and arrangement of surfaces for this bone have nothing to do with its geometry. Instead, they are simply an artifact of how the geometry was created, in this case from a 3D scan of the physical object. Furthermore, organic shapes like this lack feature lines that help constrain the mesh topology. All we want to do is generate a mesh that is independent of this rather arbitrary surface topology.
This is the problem that Pointwise's solid meshing feature suite is intended to solve - the highly automated generation of surface meshes that are independent of CAD topology. Instead of working with the complex surface topology in Figure 1, solid meshing automatically creates a model of your geometry during import so that it appears as a single entity like the one in Figure 2.
Figure 2: Solid meshing automatically assembles the surfaces in the CAD geometry into a single solid model.
With your CAD model assembled as a single solid model, generating a surface mesh is as simple as setting your desired edge length and clicking the surface meshing button. The resulting CAD-independent surface mesh is shown in Figure 3.
Figure 3: A single, CAD-independent surface mesh is generated virtually automatically on the model.
Let's look behind the scenes to see how this all works.
Surfaces, Trimmed Surfaces, and Models
Before proceeding, we need to define some terminology. Within Pointwise, we refer to the geometry on which the mesh is to be generated as the database. The database consists of many types of geometric and topological entities. The entities relevant to this discussion are surfaces, trimmed surfaces, and models and are illustrated in Figure 4.
Figure 4: A surface (left) is trimmed (middle) and assembled with other quilts into a model (right).
A surface is relatively straight forward: it is 3D geometry that has a 2D parametric representation. Surfaces are created by well-defined procedures such as rotating a line around an axis, sweeping a line along a curve, or interpolating between two or more curves.
A trimmed surface is a topological entity built upon a surface. As the name implies, trimming involves cutting off portions of the surface such as slicing off a corner or cutting a hole in the middle.
A solid model is a topological entity consisting of trimmed surfaces that are knit together to enclose a volume. The implication of the term "solid" is that geometry has no holes or gaps and is watertight. As an analogy, you could fill the volume with water and none would leak out. Pointwise's implementation of solid models is actually a bit more flexible - models do not have to form a closed solid.
Quilts and Trimmed Surfaces
The three entity types described above are well known in the world of CAD. A quilt on the other hand is a topological entity invented specifically for meshing. A quilt consists of several trimmed surfaces that are to be meshed with a single surface mesh.
Consider how a model is meshed. Because it is watertight, it solves the problems of gaps and overlaps that plague surface meshing of CAD geometry. When a model is meshed, all the resulting surface meshes connect precisely along all the edges so that you then can generate a volume mesh on the model's interior. However, there will be a one-to-one correspondence between the surface meshes and the model's trimmed surfaces. This is not always desirable (see Figure 1).
By assembling trimmed surfaces into quilts (each of which is meshed with a single surface grid), you get CAD-independent mesh topology, which is often most desirable.
A Rubik's Cube (Figure 5) helps clarify how quilts are used. If each of the nine squares on the face of the cube is a trimmed surface, you will end up with 54 surface meshes when this model is meshed. More than likely, all that you really care about is meshing the six faces of the cube. To accomplish this, you would assemble the nine trimmed surfaces into a quilt. With your model now consisting of six quilts (one for each face), you will get six surface meshes.
Figure 5: A Rubik's Cube (left) illustrates how quilts give you a mesh that is simpler than merely mimicking the CAD topology (six meshes on the right versus 54 in the middle). (Mesh clustering has been exaggerated to illustrate the differences.)
How Quilts and Models Work
Let's see how this works in practice for the bone example in Figure 1. During import, you choose the IGES file to import and then you can set parameters telling Pointwise how to assemble quilts and models (Figure 6).
Figure 6: You control how quilts and models are formed automatically during import.
The Model Assemble Tolerance is the distance below which gaps between surfaces can be considered to be zero. To assemble the bone model in Figure 2, we used 0.001. Quilt assembly is based on the angle between normal vectors of adjacent surfaces. Because a quilt is meshed with a single surface grid, you typically want to have quilt boundaries align with feature lines or "hard edges" in the geometry. In other words, you do not want hard edges in the middle of a mesh because they will be smoothed over. Those edges are identified by the Quilt Assemble Angle in degrees. Because the bone is an organic shape with no hard edges, we used a value of 180, which means "join all quilts".
Quilts and Models for a Designed Geometry
Let us look at another example, this time for an insulator - a designed geometry with plenty of hard edges. The organic example of the bone used above lacked hard edges. But otherwise, it is similar to a lot of CAD models we see in CFD in which the geometry is defined by a patchwork of quilts, such as an airplane's wing or an automobile's exterior surfaces. The left side of Figure 7 shows the CAD geometry before quilt assembly.
Figure 7: The 62 CAD entities for this insulator (left) are reduced to only 22 (right) by assembling the surfaces into quilts. Because there's a one-to-one correspondence between quilt and mesh, the mesh topology is simplified also.
Instead of assembling quilts and models automatically during import, this time we will do it manually. The first step is to assemble the geometry in a single model (or models if you're working with a CAD assembly). This is done by selecting all the model entities and using the Assemble Models command (Figure 8). For the insulator in Figure 7, the entire geometry is assembled into a single closed model, using the default assembly tolerance.
Figure 8: The Assemble Models command panel provides the controls and feedback for assembling your CAD geometry into a watertight solid model.
With the model assembled, the next step is to assemble quilts according to your meshing requirements. For this insulator, the mesh needs to conform to hard edges. First, select all the model's quilts and then use the Assemble Quilts command (Figure 9). We used an assembly angle of 20 degrees, meaning that two adjacent surfaces would only be assembled into a quilt if their normal vectors differed by less than 20 degrees. This preserved the hard edges around all the bevels and holes and resulted in the topology shown on the right of Figure 7. The original 62 quilts were combined into only 22. At this point, meshing proceeds as usual.
Figure 9: The Assemble Quilts command provides the controls and feedback for assembling your CAD surfaces into quilts for easier and better meshing.
Where Are All the Trimmed Surfaces?
One of the first things Pointwise users notice is that the list of database entities does not include trimmed surfaces any more. It is not that they are gone. Rather, the software now treats each trimmed surface as a model consisting of a single quilt. The first step, whether it is during import or any time afterward, is to assemble the geometry into a model. The second step is to assemble quilts on which to generate your meshes.
Just start thinking of your trimmed surfaces as quilts and you are halfway to mastering solid meshing.
Of course, you will find several other features in Pointwise for working with quilts and models, including trimming, splitting, and joining, so you can create precisely the CAD topology you need for your meshing.
The Benefits of Solid Meshing
Pointwise has several techniques for dealing with complex CAD geometry, but there are several distinct benefits to using solid meshing.