This action might not be possible to undo. Are you sure you want to continue?
M I N I C O URSE
- AutoCAD® - Creo™ Parametric - Inventor® - Pro/ENGINEER® - SolidWorks® - SpaceClaim®
COMSOL BV Röntgenlaan 37 2719 DX Zoetermeer The Netherlands +31 (0) 79 363 4230 +31 (0) 79 361 4212 email@example.com www.comsol.nl
COMSOL Multiphysics Pvt. Ltd. Esquire Centre, C-Block, 3rd Floor No. 9, M. G. Road Bangalore 560001 Karnataka +91-80-4092-3859 +91-80-4092-3856 firstname.lastname@example.org www.comsol.co.in
COMSOL Ltd. Broers Building 21 J J Thomson Avenue Cambridge CB3 0FA +44-(0)-1223 451580 +44-(0)-1223 367361 email@example.com www.uk.comsol.com
COMSOL A/S Diplomvej 381 2800 Kgs. Lyngby +45 88 70 82 00 +45 88 70 82 88 firstname.lastname@example.org www.comsol.dk
COMSOL, Inc. 1 New England Executive Park Suite 350 Burlington, MA 01803 +1-781-273-3322 +1-781-273-6603 COMSOL, Inc. 10850 Wilshire Boulevard Suite 800 Los Angeles, CA 90024 +1-310-441-4800 +1-310-441-0868 COMSOL, Inc. 744 Cowper Street Palo Alto, CA 94301 +1-650-324-9935 +1-650-324-9936 email@example.com www.comsol.com For a complete list of international representatives, visit www.comsol.com/contact
COMSOL S.r.l. Via Vittorio Emanuele II, 22 25122 Brescia +39-030-3793800 +39-030-3793899 firstname.lastname@example.org www.comsol.it
COMSOL OY Arabiankatu 12 FIN-00560 Helsinki +358 9 2510 400 +358 9 2510 4010 email@example.com www.comsol.fi
COMSOL AS Postboks 5673 Sluppen Søndre gate 7 NO-7485 Trondheim +47 73 84 24 00 +47 73 84 24 01 firstname.lastname@example.org www.comsol.no
COMSOL France WTC, 5 pl. Robert Schuman F-38000 Grenoble +33 (0)4 76 46 49 01 +33 (0)4 76 46 07 42 email@example.com www.comsol.fr
COMSOL AB Tegnérgatan 23 SE-111 40 Stockholm +46 8 412 95 00 +46 8 412 95 10 firstname.lastname@example.org www.comsol.se
COMSOL Multiphysics GmbH Berliner Str. 4 D-37073 Göttingen +49-551-99721-0 +49-551-99721-29 email@example.com www.comsol.de
COMSOL Multiphysics GmbH Technoparkstrasse 1 CH-8005 Zürich +41 (0)44 445 2140 +41 (0)44 445 2141 firstname.lastname@example.org www.ch.comsol.com
COMSOL User Forums
CAD Import and Meshing Minicourse 2005–2011 COMSOL
Protected by U.S. Patents 7,519,518; 7,596,474; and 7,623,991. Patents pending. This Documentation and the Programs described herein are furnished under the COMSOL Software License Agreement (www.comsol.com/sla) and may be used or copied only under the terms of the license agreement. Portions of this software are owned by Siemens Product Lifecycle Management Software Inc. © 1986–2011. All Rights Reserved. Portions of this software are owned by Spatial Corp. © 1989–2011. All Rights Reserved. COMSOL, COMSOL Desktop, COMSOL Multiphysics, and LiveLink are registered trademarks or trademarks of COMSOL AB. ACIS and SAT are registered trademarks of Spatial Corp.. Parasolid is a registered trademark of Siemens Product Lifecycle Management Software Inc.. Other product or brand names are trademarks or registered trademarks of their respective holders. Version: October 2011 COMSOL 4.2a
C o n t e n t s
Typographical Conventions . . . . . . . . . . . . . . . . . . . Importing CAD Files CAD Geometry for Finite Element Analysis (FEA) . . . . . . . . . . 3 9 9
3D CAD Geometry of a Wheel Rim - The Repair Operation . . . . . . 11 Virtual Geometry Operations 17
3D CAD Geometry of a Wheel Rim - Virtual Geometry Operations . . . 17 Modeling with Assemblies 29
Gaps in Assemblies . . . . . . . . . . . . . . . . . . . . . . 29 The Meshing Sequence 39
Meshing with Default Settings . . . . . . . . . . . . . . . . . . 39 Adding Local Attribute Features . . . . . . . . . . . . . . . . . 41 The Swept Mesher . . . . . . . . . . . . . . . . . . . . . . 42
2 | CONTENTS .
1 Introduction Welcome to this minicourse in CAD import and meshing with COMSOL Multiphysics and the CAD Import Module. To provide you a short introduction on working with these. and know which data must be entered into various data-entry fields. the meshing environment. we have included some exercises about CAD import of parts and assemblies. 3 . repair and defeaturing of imported geometry. and virtual geometry operations. understand what you can expect to see on the Graphical User Interface (GUI). The import and meshing of geometry is an essential part of modeling for which COMSOL Multiphysics provides several tools. We hope you enjoy this course! The COMSOL Team Typographical Conventions All COMSOL user guides use a set of consistent typographical conventions that make it easier to follow the discussion.
As another example. in the corresponding tooltip). When you are using the online help desk in COMSOL Multiphysics. An italic Code (monospace) font indicates user inputs and parts of names that can vary or be defined by the user.” The monospace font also is an indication of programming code. 4 | CHAPTER 1: INTRODUCTION . the instructions might say to click the Zoom Extents button ( ). • A Code (monospace) font indicates you are to make a keyboard entry in the user interface. and this means that when you hover over the button with your mouse. Button: Click a button to perform an action. these conventions are used throughout the documentation: • Click text highlighted in blue to go to other information in the PDF. Usually located on a toolbar (the main toolbar or the Graphics toolbar. Right-click a node to open a context menu and to perform actions. • The names of other items on the COMSOL Desktop that do not have direct labels contain a leading uppercase letter. nowhere on the COMSOL Desktop. the same label displays on the COMSOL Desktop. nor the toolbar itself. or a variable name. includes the word “main. For example.” • The forward arrow symbol > are instructions to select a series of menu items in a specific order. For example.In particular. • An italic font indicates the introduction of important terminology. select Results. For instance. and documentation sets. However. the Model Builder window ( ) is often referred to and this is the window that contains the model tree. or in the upper-right corner of a Settings window.25 in the Current density field. AND ICONS Node: A node is located in the Model Builder and has an icon image to the left of it. BUTTONS. for toolbar buttons. the Main toolbar is often referred to— the horizontal bar containing several icons that are displayed on top of the user interface. Options>Results is equivalent to: From the Options menu. for example). Expect to find an explanation in the same paragraph or in the Glossary. model examples. these links also work to other Modules. The names of other user guides in the COMSOL documentation set also have an italic font. • A boldface font indicates that the given word(s) appear exactly that way on the COMSOL Desktop (or. THE DIFFERENCE BETWEEN NODES. You might see an instruction such as “Enter (or type) 1.
for example. for example: Important Do not select any domains that do not conduct current. These categories are used to draw your attention to the information based on the level of importance. the gas channels in a fuel cell. Caution A Caution icon is used to indicate that the user should proceed carefully and consider the next steps. The information is of higher importance than a note or tip. for example: Caution This may limit the type of boundary conditions that you can set on the eliminated species. Enable. sometimes it simply performs the action indicated (for example. The species selection must be carefully done. design. KEY TO THE GRAPHICS Throughout the documentation. Delete. and the user should endeavor to follow the instructions. that there will be problems with the model solution. additional icons are used to help navigate the information. or solution. or Disable). It might mean that an action is required. | 5 . or if the instructions are not followed.Icon: An icon is an image that displays on a window (for example. Sometimes selecting an item with an icon from a node’s context menu adds a node with the same image and name. the Model Wizard or Model Library) or displays in a context menu when a node is right-clicked. Important An Important icon is used to indicate that the information provided is key to the model building. although it is always recommended that you read these text boxes.
a model is only available if you have a license for a specific Module. the text indicates this. such as geometry objects. In some cases. When the link is outside of the current document.Note A Note icon is used to indicate that the information may be of use to the user. for example: • Theory for the Single-Phase Flow Interfaces See Also • The Laminar Flow Interface in the COMSOL Multiphysics User’s Guide Model The Model icon is used in the documentation as well as in COMSOL Multiphysics from the View>Model Library menu. for example:. Tip A Tip icon is used to provide information. It is recommended that the user read the text. suggestions of how to improve model design. Note Undo is not possible for nodes that are built directly. See Also The See Also icon indicates that other useful information is located in the named section. solutions. These examples occur in the 6 | CHAPTER 1: INTRODUCTION . If you are working on line. meshes. click the hyperlink to go to the information directly. and plots. If you are working online. reminders. complex one. for example: Tip It can be more accurate and efficient to use several simple models instead of a single. click the link to go to the PDF version of the step-by-step instructions. short cuts. and other information that may or may not be useful to the user.
The Model Library path describes how to find the actual model in COMSOL Multiphysics. The extra time spent on simplifying a model is time well spent when solving it. • Acoustics of a Muffler: Model Library path COMSOL_Multiphysics>Acoustics>automotive_muffler Model • If you have the RF Module. feature node. The following tables are examples of these space dimension icons. 1D . which are based on space dimension. 2D Remember that modeling in 2D usually represents some 3D geometry under the assumption that nothing changes in the third dimension. These icons are also used in the documentation to clearly list the differences to an interface. and time to solve. Two-Term Approximation interface is available for 1D models and allows you to study the electron energy distribution function (EEDF) for some assumed discharge conditions. and 3D icons. 1D The Boltzmann Equation.COMSOL Multiphysics User’s Guide. | 7 . 3D 3D models often require more computer power. memory. 2D . see Radar Cross Section: Model Library path RF_Module>Tutorial_Models>radar_cross_section. Space Dimension Icons Another set of icons are also used in the Model Builder—the model space dimension is indicated by 0D . 1D axial symmetry . or theory section. 2D axial symmetry .
8 | CHAPTER 1: INTRODUCTION .
Such an example is illustrated in the figure below. While the CAD Import Module provides tools to detect and remove such faces. a 3D CAD geometry might contain very small gaps. CAD Geometry for Finite Element Analysis (FEA) A geometry created in a 3D CAD software might not automatically be suitable for FEA. After importing a CAD file you continue the modeling process with meshing and analysis in the usual fashion. in some cases the topology of the geometry is such that the sliver face can not be removed by such tools. One reason is that the geometry description requirements are rather stringent. These can make meshing of the imported geometry impossible. | 9 . For example. which are very long and narrow faces. or surfaces that are difficult for the user of the CAD software to control.Importing CAD Files When importing a design into COMSOL Multiphysics from a CAD file. A common type of problem in CAD designs is the presence of sliver faces. edges. the CAD Import Module translates it into a format understood by COMSOL Multiphysics.
Such features could be the subdivision of faces into smaller ones. through making sure that the neighboring fillets have large enough radii. and you can use it as a complement to the tools provided by the CAD Import Module. Most modern CAD packages allow you to save different configurations of a part in the same file. Alternatively the narrow strip can be easily avoided during the design of the geometry in the CAD software. In COMSOL Multiphysics you can quickly create a surface or volume mesh of the part. Touching parts in a CAD assembly might not be accurately positioned or might contain slight mismatches between dimensions. then examine it for areas of dense mesh. which usually indicate small features. fillets and chamfers.After meshing this geometry. Careful design in the CAD software is also important during the design of assemblies. As the example above illustrates. where you 10 | . It is often beneficial to save a configuration specially for FEA. a very dense mesh is unfortunately created to resolve the narrow strip of the face. or smaller holes. meshing can be useful for diagnosing sliver faces and other small features in your geometry. For this reason it is recommended that parts of the CAD assembly are designed in the context of the assembly. This process is made easier by the mesher which lists edges and faces which are too small to be meshed to a good quality. Even geometry features on a larger scale can make meshing of imported geometries difficult. You can usually control these features in the CAD software. Such unintentional errors also lead to the presence of small features and sliver faces in the decomposed geometry.
right-click Geometry 1 2 In the Settings window click the Browse button. The step-by-step instructions below demonstrate one possibility of locating and removing these features. and select Import . Since the settings of the import operation have been tuned to suit the most common cases. the majority of files import simply with the click of a button. which are not removed during import. Model Wizard 1 Double-click the COMSOL Multiphysics icon on the desktop. In this example. click the 3D button and click Finish . You can follow this general workflow: • Import the file • Create a mesh for quick examination of the geometry • Obtain the size of the features you would like to remove • Repair the object • Create a new mesh for comparison. In this example you are only interested in preparing a geometry and can skip the steps of selecting a physics interface and study type. Importing the Geometry 1 Under the Model 1 node.The Repair Operation Importing 3D CAD files into the COMSOL Multiphysics modeling environment is straightforward. since they fall outside the default repair tolerance. the Parasolid file of a wheel rim contains a few small faces and slivers.suppress features not important for the analysis. 3 In your COMSOL installation directory navigate to the folder models/ CAD_Import_Module/Tutorial_Models and double click the file repair_demo_1. This way you can reduce the number of mesh elements and thus the amount of memory needed to solve the problem. | 11 .x_b. 2 In the Model Wizard window. 3D CAD Geometry of a Wheel Rim . During import the geometry is checked for errors and automatically repaired. The repair operation also removes features that fall within the import tolerance.
3 Click the Build All button to create the mesh. In addition. As soon as the mesh is ready the Messages window displays the number of mesh elements. Note The warnings also appear under the Free Triangular 1 feature node in the mesh sequence. You can click on these nodes to get a list of short edges and small faces.As soon as the import is done the geometry appears in the Graphics window. which is about 18. and that there are faces which are smaller than the minimum element size. two warnings appear in the Messages window. These warning indicate that the geometry contains edges that are much shorter than the minimum element size. Creating a Surface Mesh Creating a surface mesh for an imported solid is often the fastest way to assess the quality of the geometry and to identify regions needing repair or defeaturing. 2 Go to the Settings window and from the Selection list box select All boundaries. 1 In the Model Builder right-click the Mesh 1 Triangular node and select More Operations>Free .000. 12 | .
The areas of dense mesh. indicated by the arrows in the figure. Two of these can be found around each bolt hole location. 5 Zoom in on the area around the bolt holes. 4 To examine the mesh without the edges or faces from the warning nodes being highlighted click the Mesh 1 node. 6 On the toolbar above the Graphics window click Select Edges . shown below. Denser mesh usually indicates faces or edges significantly smaller in comparison to the size of the geometry.Next. Zooming in even closer reveals a small triangular face sitting adjacent to a sliver face. | 13 . which COMSOL Multiphysics always retains. examine the mesh and look for areas of denser mesh. then press Ctrl+D on your keyboard. This way you can deselect the last selection. To get a representative size for these faces measure the length of one of the edges. are due to slivers and small faces.
The Messages window displays the length of the edge. rotate. On closer examination you can see that the cause of the dense mesh here is a sliver face.556e-4 m. 14 | . then click Measure on the main toolbar. which is 2. Each spoke contains a dense mesh area just like the ones indicated by the arrows in the figure. 8 Now pan. and zoom the object to take a better look at the area where two adjacent spokes connect to the rim.7 Click on the edge highlighted in the figure below. which you can find at the same location on each spoke.
3 In the Absolute repair tolerance edit field enter 3. The length for edge 958 is 3. 4 Click Build All to perform the operation. click the edge shown in the figure. 5 Examine the geometry.2e-4. then click Measure on the main toolbar.126e-4 m (0. By keeping the repair tolerance close to the size of the features to be removed you can avoid removing anything else and breaking the geometry. Pan and zoom to take a look at the areas | 15 . Repairing the Geometry Now that you know the size of the faces to be removed you can repair the geometry. 1 Right-click the Geometry 1 node and select CAD Repair>Repair .3126 mm).9 To get the width of the sliver face. 2 In the graphics area select the wheel rim to add it to the Input objects list.
As soon as the mesh is created you can see that it now contains about 2000 less surface elements than before the repair. Updating the Mesh 1 Right-click the Mesh 1 node and select Build All . which are now no longer present in the geometry. 16 | .that contained the slivers and small faces.
3D CAD Geometry of a Wheel Rim . such as vertices. The latter is especially important when removing larger faces. you can use virtual geometry operations. edges.Virtual Geometry Operations The wheel rim geometry of the previous exercise contains a few small faces and slivers. click the 3D button and click Finish IMPORTING THE GEOMETRY . To handle more complex cases. and that they keep the curvature of the geometry. or for certain physics applications when altering the curvature of the geometry can for example give rise to stress concentrations. | 17 . Other benefits of using virtual operations is that they work on the finalized geometry. where defeaturing fails. and select Import . The step-by-step instructions below demonstrate one possibility of locating and removing these features. hence the name virtual operations. In this example you are only interested in preparing a geometry and can skip the steps of selecting a physics interface and study type. which are not removed during import.Virtual Geometry Operations The repair and defeaturing tools that find and delete small geometry features can operate only within the limits of what is allowed by the topology of the geometry. MODEL WIZARD 1 Double-click the COMSOL Multiphysics icon on the desktop. or faces. to be ignored by the mesher. right-click Geometry 1 2 In the Settings window click the Browse button. since they fall outside the default repair tolerance. You can follow this general workflow: • Import the file • Create a mesh for a quick examination of the geometry • Apply virtual geometry operations • Create a new mesh for comparison. 1 Under the Model 1 node. With these tools you can set geometric entities. 2 In the Model Wizard window. Since selected elements are “hidden” from the mesher. meshing takes place on a virtual geometry.
4 Click the Import button.x_b.000. CREATING A SURFACE MESH Creating a surface mesh for an imported solid is often the fastest way to assess the quality of the geometry and to identify regions needing repair or defeaturing. In addition. These warning indicate that the geometry contains edges that are much 18 | . 2 Go to the Settings window and from the Selection list box select All boundaries.3 In your COMSOL installation directory navigate to the folder models/ CAD_Import_Module/Tutorial_Models and double click the file repair_demo_1. two warnings appear in the Messages window. 3 Click the Build All button to create the mesh. 1 In the Model Builder right-click the Mesh 1 Triangular node and select More Operations>Free . which is about 18. As soon as the import is done the geometry appears in the Graphics window. As soon as the mesh is ready the Messages window displays the number of mesh elements.
| 19 .shorter than the minimum element size. Note The warnings also appear under the Free Triangular 1 feature node in the mesh sequence. some of which are highlighted in the figure below. Next. You can click on these nodes to get a list of short edges and small faces. These regions usually correspond to a denser mesh. and that there are faces which are smaller than the minimum element size. examine the mesh and look for the areas where the mesher indicates small edges or faces.
On closer examination you can see that several edges in this area are highlighted as being to short to be meshed with the current mesh settings. VIRTUAL GEOMETRY OPERATIONS Instead of repairing or defeaturing the geometry. 20 | . where a spoke connects to the rim. this time you can use the virtual geometry operations to “hide” small geometry features from the mesher while keeping the curvature of the geometry unmodified. 1 Right-click the Geometry 1 node and select Virtual Operations>Ignore Edges. Each spoke contains a dense mesh area due to the small features indicated by the arrows in the figure. zoom to the area shown below.4 Using the Zoom Box button.
2 In the graphics area select the edges 217. 3 Click the Build Selected button. 219. adjacent vertices are no longer part of the geometry which is going to be meshed. 4 Right-click the Geometry 1 node and select Virtual Operations>Form Composite Faces. As an alternative to the Ignore Edges operation you can also use the Form Composite Faces operation. and. highlighted in the figure. where applicable. | 21 . The visualization of the rim in the Graphics window is updated to reflect that the selected edges. to add them to the Edges to ignore list. and 222.
6 Click the Build Selected button. and 126.5 Select faces 112. 122. highlighted in the figure below. The geometry in the Graphics window is updated with the new composite formed faces. 22 | . 118.
| 23 .7 To view the new mesh over this region click the Mesh 1 node. as the mesher no longer sees the short edges. This time the mesh has fewer elements and there are no warnings. then click the Build All button.
222. The short edges in this region form a small face which you remove using the Collapse Edges operation. 10 Select the edges 197 and 198. After this latest addition the list should now include edges 197.8 Click the Zoom Extents button to view the entire rim geometry again. 11 Click the Build Selected button. 219. Then zoom to the region shown below using the Zoom Box button. shown in the figure to the right. then click the Build Preceding State button. 217. 24 | . 198. The long edges of the sliver face can be removed by adding them to the existing Ignore Edges 1 operation in the geometry sequence. 9 Click the Ignore Edges 1 node.
14 Select edges 205-207 highlighted in the figure. 15 Click the Build Selected button. Use the Select Box button to select all three edges at once. 12 Make sure that the next operation will be the last one in the sequence by right-clicking the Form Composite Faces 1 node and selecting Build Selected. Any operations that you add to the sequence will be placed directly after the current node. Before adding the operation to the sequence take a look in the Model Builder window. 13 Right-click the Geometry 1 node and select Virtual Operations>Collapse Edges. which signals that the node needs rebuilding.Now continue by removing the small triangular face. The Form Composite Faces 1 node is marked by a small yellow triangle. | 25 . A green rectangle is displayed around the Ignore Edges 1 node telling you that this is the current node.
16 To build the mesh click first the Mesh 1 node. then the Build All button. The new mesh contains fewer elements since the sliver and small face are no longer visible to the mesher. The last virtual geometry operation you will try in this exercise is the Ignore Vertices operation to remove a short edge from a segmented edge. In this context the operation is equivalent to the Form Composite Edges operation. 26 | .
19 Add the vertex highlighted in the figure to the list of Vertices to ignore.17 Click the Zoom Extents button to view the entire rim geometry. | 27 . 18 Right-click the Geometry 1 node and select Virtual Operations>Form Composite Edges. Then zoom in on the region shown below using the Zoom Box button. then click the Build Selected button.
28 | . which is reflected in the way the elements are laid out in this new mesh.20 To mesh the geometry once more right-click the Mesh 1 node and select Build All. The mesher now sees the two edges as one unit.
which can prevent the creation of a good mesh. 1 Click the New ( ) button on the main toolbar.M od eli n g wi th Asse mbl ie s A CAD file which contains an assembly or a multi-body part is a collection of solid bodies. since gaps and dimensional mismatches can influence the final mesh.The geometry objects become separate domains for modeling. each body becomes a geometry object in COMSOL Multiphysics. Each of these methods influences the type of mesh you can create. One of the parts also contains holes we would like to remove. The collection of geometry objects resulting from the operations in the geometry sequence needs to be prepared for physics modeling. | 29 . .Imprints can optionally be created on touching boundaries. There are two methods for finalization of geometry: • forming a union of all objects. which becomes the modeling domain . and its label in the Model Builder changes according to the finalization method. In addition you can have additional geometry objects created by various other features of the geometry sequence. You can start by importing the CAD file. Forming a union imposes the largest constraints on the meshing procedure. The Finalize feature cannot be deleted from the sequence.The modeling domain. When importing such a design. while an assembly object without imprints leaves you with maximum freedom for mesh generation. Identity pairs (or contact pairs) need to be defined to ensure continuity. Gaps in Assemblies The CAD model in this exercise contains some gaps on the assembly level. consists of domains separated by interior boundaries. called the Finalize ( ) feature. COMSOL ensures continuity in the field variables across interior boundaries. This is done by the last feature node of the geometry sequence. • forming an assembly object for modeling . created by the union operation. Working with imported CAD assemblies can be more difficult than single components.
1 Click Import in the Settings window.x_b. Besides the imported parts.12 30 | . then click the Finish button. 4 In the Settings window click the Browse button. you can continue by creating a block around the objects. Plate 2 has four screw holes. 3 To add an import feature to the geometry sequence right-click Geometry 1 and select Import. 5 Locate the course CD on the hard disk and select the file assembly_gaps. plate 2 plate 1 The assembly consists of two parts. the surrounding air volume is also important for the analysis.01 -0.06 0. Therefore. 2 Right-click the Geometry 1 node and select Block. then click Open. and two feet that fit into corresponding holes on plate 1. plate 1 and plate 2. 3 Use data from the following table to draw a block: POSITION: BASE: CORNER SIZE x y z -0.06 0.03 -0.2 In the Model Wizard make sure that the space dimension is 3D.06 Width Depth Height 0.
The finalize operation is performed automatically as you click the Mesh 1 node. After the meshing is completed.4 Click the Build All ( ) button. 5 Right-click the Mesh 1 node and select Free Tetrahedral. 7 Click the Transparency ( ) button to visualize the inner domains. note that there are about 127. Usually this occurs if small. In this case the clearance between the feet | 31 . Dense mesh regions You can see that there is a very fine mesh in several boundary regions between the two parts of the assembly. During the finalize operation. 6 Click the Build All ( ) button. They might be present in the design to provide important clearance for assembling the final product.000 tetrahedral elements in this seemingly simple geometry. dimensional discrepancies exist between parts. COMSOL Multiphysics determines the geometric difference of the objects and creates one object with three subdomains delimited by single surfaces.
2 Click the Select Objects ( ) button. However. then click the Hide Selected ( 5 Click the Select Boundaries ( ) button to switch back to boundary selection. easily remove both the feet and the slots. DELETING FACES 1 Right-click the Geometry 1 node. ) button. such fine details do not affect the overall physics phenomena. then select CAD Defeaturing>Delete Faces. ) button. To make the selection of faces easier first hide the block and plate 1. 3 In the Graphics window click the block.of plate 1 and the corresponding slots on plate 2 causes a very thin air gap. To this you need to use the defeaturing tools. narrow gaps You cannot change the dimension of imported objects with the CAD Import Module. 32 | . Yet. In the Tools window that appears you can select faces of the geometry to be removed. you can. then click the Hide Selected ( 4 In the Graphics window click plate 1. When a delete operation is completed a feature node will be added to the geometry sequence.
) button. 5. 2. boundaries 1. this time the block and plate 2. to the list of Faces to delete. The default heal method. 7. 8 on object imp1. Hide some objects again to make face selection easier. DELETING HOLES With the feet removed you can continue with removing the corresponding slots on plate 1. then click the Hide Selected ( 4 In the Graphics window click plate 2. 7 Click the Delete Selected button to delete the feet.6 Add the faces highlighted in the figure below. by shrinking and growing neighboring faces to cover the hole. ) button. 3 In the Graphics window click the block. When the operation completes a Delete Faces 1 feature node is added to the Model Builder.separator. heals the wound that results from removing the faces. right after the current feature in the geometry sequence. The selected faces delimit the features to be removed. | 33 . then click the Hide Selected ( 5 Click the Select Boundaries ( ) button to switch back to boundary selection. 6. Patch. ) button. 1 To show all domains again click the Reset Hiding ( 2 Click the Select Objects ( ) button. which was the Block 1 feature.
boundaries 5-8.backside. 9-12 on object imp1. 34 | . 7 Select the Heal as through hole check box.6 Add the faces highlighted in the figure below. to the list of Faces to delete.
) button. 9 To show all domains again click the Reset Hiding ( 10 Click the Select Box ( ) button. Confirm the selection by right-clicking. 11 Repeat the previous step for the other three holes. shown in the figure below. Before continuing with meshing. The last step is to create a new mesh of the geometry. You can easily select the faces delimiting the holes by using the Select Box tool. | 35 . then in the Graphics window draw a rectangle around the faces delimiting one of the holes. 12 The Faces to delete list should now contain faces 7-14 and 17-24 of object dfa1.8 Click the Delete Selected button to delete the holes. you can also delete the four mounting holes. 13 Click the Delete Selected button to delete the holes. since they are assumed to not influence the analysis.
it can easily fixed in a CAD software. The reason for this is a slight difference in width between the two objects. you can export defeatured parts to a Parasolid file. As you can see in the figure. which you can open and edit with a CAD program. 36 | .000 tetrahedral elements. Objects are not of the same width If this dimensional mismatch is unintentional and assumed to not be important for the analysis.14 Right-click the Mesh 1 node in the Model Builder. then select Build All. Dense mesh regions The mesh now consists of about 32. there are still two regions of high mesh density left. With the CAD Import Module.
2 The Input list shows all three objects selected (dfa2.EXPORTING TO PARASOLID FORMAT 1 Right-click the Geometry 1 node and select Export to File. and dfa3). blk1. 6 In the Relative repair tolerance edit field enter 1e-3. then select Build All. enter a file name. then click Save. A D J U S T I N G T H E R E P A I R TO L E R A N C E You can also use the CAD Import Module to fix the dimensional discrepancy. 3 From the Save as type list select either Parasolid binary file or Parasolid text file. 7 Right-click the Mesh 1 node in the Model Builder. 4 Select a directory. As you can see the resulting mesh contains only about 5000 elements. To accept and export the objects click Export. The resulting Parasolid file can be imported into most CAD software. | 37 . by for example using the repair functionality of the Finalize feature. 5 Click the Form Union feature node.
38 | .
Each meshing operation is added to the meshing sequence. 4 In the Settings window click the Browse button. 3 To add an import feature to the geometry sequence right-click Geometry 1 and select Import. then click Open. 10-5 m. then click the Finish button. 6 Click Import in the Settings window. 1 Click the New ( ) button on the main toolbar.The Meshing Sequence COMSOL Multiphysics provides an interactive meshing environment where. Therefore. The final mesh is the result of building all the operations in the meshing sequence. 5 Locate the course CD on the hard disk and select the file solder_joints. change the parameters to your liking. modify this mesh. This example demonstrates how to use the meshing sequence. might be too large for the geometry.x_b. import a 3D CAD geometry and mesh it with the default settings using the free mesher to generate a mesh with tetrahedral elements. if you know that your geometry contains small features you can change the import tolerance in the | 39 . Features smaller than the import tolerance are automatically removed during import. 2 In the Model Wizard make sure that the space dimension is 3D. which includes parts on the order of a tenth of a millimeter in size. you can easily mesh individual faces or domains. and rebuild the mesh. You learn how to mesh certain parts of a geometry. On a realistic geometry you create a mesh consisting of different element types. Meshing with Default Settings To start. Note that for many of the imported objects a warning is displayed that the default import tolerance. with a few mouse clicks.
7 Click the Mesh 1 node. which means that the various objects are combined into the one object with inner boundaries and subdomains. There you also have the option of turning off the repair feature during import. give you control of how well you would like to resolve the geometry. With the default physics-controlled option the mesh sequence is always hidden. in the Sequence type list in the Settings window of the mesh node. As you click the Mesh 1 node the Finalize feature is automatically built. COMSOL automatically creates a mesh adapted for the physics settings in the model. 40 | . A set of nine predefined element sizes.Settings window of the Import feature. With the default Physics-controlled mesh. In this particular case. Electronic component Solder joints Circuit board Continue by creating a simple unstructured tetrahedral mesh. ranging from Extremely fine to Extremely coarse and the default Normal size. In this case you will manually work with the mesh sequence. The geometry represents a small part of a circuit board with an electronic component mounted by means of several solder ball joints. this is not necessary.
9 To build the mesh click the Build All button. and to change the sequence type from physics-controlled to user-controlled. in which case it is called a local attribute feature. While the geometry is resolved quite well by this mesh. since it influences all subsequent operation features in the meshing sequence.000 elements.8 From the Sequence type list select User-controlled mesh. The first Size feature node is called a global attribute feature. Adding Local Attribute Features Assume that you are investigating the solder joints and would therefore like to keep the detailed mesh in the spherical subdomains. but create a mesh with fewer elements in the remaining objects. A default mesh sequence consisting of the Size and Free Tetrahedral 1 nodes appears under the Mesh 1 node. you may want to reduce the number of elements to reduce the memory required for solving the problem. Note that you could have also right-clicked the Mesh 1 node and selected Free tetrahedral to add an unstructured mesh to the sequence. According to information displayed in the Messages window this mesh consists of approximately 35. | 41 . 1 Right-click the Free Tetrahedral 1 feature node and select Size. This first Size feature node cannot be deleted from the meshing sequence. You can also add attribute features under an operation feature node.
According to the Messages window the mesh now consists of approximately 24.000 elements. The Swept Mesher For even fewer elements in the circuit board and electronic component. you can create a swept mesh. This technique sweeps a boundary mesh through the domains to create a structured mesh in the sweep direction. and then sweeping the resulting face mesh through the subdomain to an opposite target 42 | .2 From the Geometric entity level list select Domain. The swept mesher operates on a 3D subdomain by first meshing a source face. 5 Click the Build All button to build the new mesh. which represent the circuit board and the electronic component. 4 From the Predefined list select Coarser. 3 Use the Graphics window to select the domains 1-3.
face. it appears with a quadratic frame around its icon. You can also remove the Size 1 feature node. ) button. 5 Click the Build All ( ) button. or boundary faces. a target face. The Free Triangular 1 feature node is added after the Free Tetrahedral 1 feature node. MESHING A SET OF BOUNDARIES First you can modify the free tetrahedral mesh operation to operate only on the solder joints. To indicate the current feature node. then select Delete. 6 Right-click the Mesh 1 node then select More Operations then Free Triangular. All faces that encompass a domain are classified as either source faces. 2 From the Geometric entity level list select Domain. the Free Triangular 1 node becomes the current feature. COMSOL Multiphysics always inserts new nodes in the meshing sequence after the current feature node. then click the Remove from Selection ( ) button. Click it again | 43 . Build the mesh before continuing. You can now create a coarse mesh on the source boundaries for the sweep mesh operation. 1 Click the Free Tetrahedral 1 feature node. 3 From the Selection list select domains 1. For straight and circular sweep paths. and 3. The boundary faces are the faces connecting the source and target faces.2. As soon as it is inserted. To make selection easier click the Wireframe Rendering ( to turn of wireframe rendering. 4 Right-click the Size 1 node. you can use several connected faces as source faces. 7 From the Graphics window select the two faces (boundaries 2 and 14) highlighted in the figure below.
12 Click the Size node. The mesh is built. 10 Click the Build All ( ) button to build the mesh. 14 From the Predefined list select Normal.8 Right-click the Free Triangular 1 node and select Size. then from the Predefined list select Coarser. the size attribute to the Free Triangular 1 node is no longer necessary. The reason is to avoid bad quality meshes. then specify local size feature nodes for the mesh operations that need finer mesh. 15 Right-click the Size 1 node under the Free Triangular 1 node. but a Warning 1node appears under the Free Triangular 1 feature node. and select Size. 44 | . Since the global setting is Coarser. then select Delete. To avoid this situation a good practice is to set the first global Size setting to the coarsest mesh that you plan to have in the geometry. 13 Right-click the Free Tetrahedral 1 node. 9 From the Predefined list select Coarser. COMSOL Multiphysics generates the warning because the Coarser predefined mesh size you have applied to the two surfaces has been overridden by the relatively finer Normal mesh settings specified in the first Size feature node of the meshing sequence. that may result if the boundary of a domain is meshed with a coarser mesh size than the volume. 11 Click the Warning 1 node to read the message.
In this case the remaining domains correspond to the domains we would like to sweep mesh.16 Right-click the Mesh 1 node then select Build All ( ) to build the mesh. | 45 . The Geometric entity level list is set to Remaining by default for new mesh operations. CREATING A SWEPT MESH Now that the source faces are meshed. Notice that the triangular mesh is coarser this time. you can sweep this mesh through the subdomains. 1 Right-click the Mesh 1 node and select Swept.
3 Right-click the Swept 1 feature node and select Distribution.2 Click the Build All ( ) button to build the mesh. By specifying a distribution for the swept mesher you have the possibility to manually control the number and distribution of elements along the sweep direction. while providing a less dense structured mesh for the remaining subdomains. 4 In the Number of elements edit field enter 2. The swept mesher used the Coarser predefined mesh size to determine the number of elements along the sweep direction. The mesh now consists of approximately 15. 46 | . keeping the higher resolution for the subdomains which are important for the analysis. 5 Click the Build All button to build the mesh.000 elements. This latest mesh consists of approximately 19.000 elements.