In the majority of cases, IGES files do not contain any connectivity information and the process of knitting the faces together into a solid object is sensitive to tolerances.
In this example, you can test how the knit tool included with the CAD Import Module can help you with creating a solid object, even though there are gaps between faces due to either design flaws or tolerance issues.
1 Click the New ( ) button on the main toolbar.
2 In the Model Wizard make sure that the space dimension is 3D, then click the Finish button.
3 To add an import feature to the geometry sequence right-click Geometry 1 and select Import.
4 In the Settings window click the Browse button.
5 Locate the course CD on the hard disk and select the file sphere.igs, then click Open.
I M P O R T O F I G E S F I L E S | 11 6 Click Import in the Settings window.
The geometry looks like a solid sphere, whose outer surface is split into two halves.
Continue by creating a simple unstructured tetrahedral mesh.
7 Right-click the Mesh 1 node and select Free tetrahedral. 8 To build the mesh click the Build All button.
The mesh appears in the Graphics window, but a warning is displayed in the Settings window that tetrahedral elements were not created since the geometry contains no domains.
Add a Measurements node to the geometry sequence to examine the imported geometry.
9 Right-click Geometry 1 then select Measurements.
10Click the sphere object in the Graphics window to highlight it. Right-click anywhere to add it to the Selection list.
The following information is displayed in the Measurements window:
The information indicates that the geometry is not a solid object since it does not contain any domains.
By default, during import the CAD Import Module tries to knit faces and form solids. If a solid is not created, it usually means that there were gaps, larger than the default import tolerance of 10-5 in the geometry units, between geometry faces.
In these next steps you will create a surface mesh of the sphere to visualize the gap between the two halves.
11Right-click the Free Tetrahedral 1 node and select Size. 12From the Geometric entity level list select Boundary.
13In the Graphics window click one of the faces of the sphere to highlight it.
Right-click anywhere to add it to the Selection list.
14From the Predefined list select Fine.
I M P O R T O F I G E S F I L E S | 13 15Click the Build All button.
Examine the meshed surfaces, note that the mesh only connects on a portion of the common edge. On the portion where the mesh does not connect there is a narrow gap between the faces.
Even when the geometry includes such a gap you can create a solid by using the knit tool.
16Right-click the Geometry 1 node and select CAD Repair, then Knit to Solid.
The Knit to Solid 1 node is inserted into the geometry sequence after the Import 1 node.
17Select the sphere in the Graphics window, then enter 1e-4 in the Absolute repair tolerance edit field.
18To build the feature click the Build All button.
To check if a solid was indeed created you can use the Measurements tool.
19Right-click the Geometry 1 node and select Measurements.
20Add the sphere to the selection list, by selecting it in the Graphics window.
The displayed information still indicates that there are no domains in the sphere.
This means that the gap was larger than 10-4 m and the tool could not create a solid.
21Click the Knit to Solid 1 node, then enter 1e-2 in the Absolute repair tolerance edit field.
22Click the Build all button to build the feature.
23Right-click the Geometry 1 node and select Measurements, then select the sphere.
This time the object contains a domain, which indicates that a solid object was created by the knit to solid tool.
24Mesh the geometry by clicking the Mesh 1 node, then the Build all button.
This time a properly connected volume mesh for the solid object was created.
M O D E L I N G W I T H A S S E M B L I E S | 15
M o d e l i n g w i t h A s s e m b l i e s
A CAD file which contains an assembly or a multi-body part is a collection of solid bodies. When importing such a design, each body becomes a geometry object in COMSOL Multiphysics. In addition you can have additional geometry objects created by various other features of the geometry sequence.
The collection of geometry objects resulting from the operations in the geometry sequence needs to be prepared for physics modeling. This is done by the last feature node of the geometry sequence, called the Finalize ( ) feature. The Finalize feature cannot be deleted from the sequence, and its label in the Model Builder changes according to the finalization method. There are two methods for finalization of geometry:
• forming a union of all objects, which becomes the modeling domain
- The modeling domain, created by the union operation, consists of domains separated by interior boundaries. COMSOL ensures continuity in the field variables across interior boundaries.
• forming an assembly object for modeling
- The geometry objects become separate domains for modeling. Identity pairs (or contact pairs) need to be defined to ensure continuity.
- Imprints can optionally be created on touching boundaries.
Each of these methods influences the type of mesh you can create. Forming a union imposes the largest constraints on the meshing procedure, while an assembly object without imprints leaves you with maximum freedom for mesh generation.
In the following exercise, you import a 3D CAD assembly and test each of the above methods for handling several geometry objects. You will also be able to test how to prepare the same assembly for contact modeling by setting up contact pairs.
The last exercise of this section will demonstrate how gaps and dimensional mismatches can influence the final mesh of an imported geometry.