Creating a 2D Geometry Model This section describes how to build a 2D cross section of a heat sink and introduces 2D geometry operations in COMSOL. At this time, you do not model the physics that describe the operation of the heat sink. Assume that you want to estimate the maximum amount of heat dissipated by a heat sink placed around a resistor for high-power applications. The heat sink consists of an extruded aluminum profile as in Figure 5-1. If you neglect the effects at the ends of the elongated heat sink, you can simplify the model and obtain a decent estimate of the heat dissipated by creating a 2D cross section. Figure 5-1: Example of a 3D heat sink model with cross section. CREATING A BASIC 2D GEOMETRY MODEL 1 Double-click the COMSOL icon to launch COMSOL. The Model Wizard opens. 2 On the Select Space Dimension page, click the 2D button. 3 Click the Finish button ( ). CREATING PARAMETERS FOR GEOMETRY PARAMETERIZATION The following steps explain how to create two circles to form the core of the heat sink in Figure 5-1. To investigate different dimensions of the heat sink, parameterize the geometry. Start by defining the radius of the outer arc of the heat sink, the radius of the inner arc, and the thickness and the length of the heat sink flanges. 1 218 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S 1 In the Model Builder, right-click Global Definitions ( ) and select Parameters ( ). 2 In the Parameters table, enter these settings: NAME EXPRESSION VALUE DESCRIPTION R1 5[mm] 0.0050 m Radius Circle 1 R2 2.5[mm] 0.0025 m Radius Circle 2 d 1[mm] 0.0010 m Height L 5[mm] 0.0050 m Width A D D I N G TWO C I R C L E S W I T H P R E D E F I N E D P A R A M E T E R S 1 In the Model Builder, right-click Geometry 1 and select Circle ( ). 2 Under Size, enter R1 in the Radius field. 3 Click the Build Selected button ( ). A circle with radius R1 displays in the Graphics window. 4 Right-click Geometry 1 and select Circle ( ). 5 Under Size, enter R2 in the Radius field. 6 Click the Build Selected button ( ). A circle with radius R2 displays in the Graphics window. Click the Zoom Extents button ( ) to see both circles. SUBTRACTING THE SMALLER CIRCLE 1 In the Model Builder, right-click Geometry 1 and select Boolean Operations> Difference ( ). 2 Under Difference, click the Activate Selection button ( ) to activate the Objects to add list for choosing objects. 3 In the Graphics window, select the object c1 (the larger circle) by left- and then right-clicking it. C1 is highlighted in red, then blue and added to the Objects to add list. 4 Click the Activate Selection button ( )to activate the Objects to subtract list. 5 Select the object c2 (the smaller circle) by left- and then right-clicking it. C2 is highlighted in red, then blue and added to the Objects to subtract list. 2 CREATING A 2D GEOMETRY MODEL | 219 6 Click the Build Selected button ( ). The object dif1 is created by subtracting the smaller circle from the larger circle. INTERSECTING WITH RECTANGLE 1 In the Model Builder, right-click Geometry 1 and select Rectangle ( ). 2 Under Size: a In the Width field enter 2*R1. b In the Height field, enter R1. 3 Under Position, enter -R1 in the x field. 4 Click the Build Selected button ( ). The interaction operation creates the object r1 (not related to the circle radius), which coincides with the intersecting area of the two input objects. 5 In the Model Builder, right-click Geometry 1 and select Boolean Operations> Intersection ( ). 6 Select both objects, dif1 (the combined circle) and r1 (the rectangle), by left-clicking and then right-clicking them. Each object is highlighted in red, then blue and added to the Input Objects list. 3 220 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S 7 Click the Build Selected button ( ) to create the object int1. ADDING A RECTANGLE TO CREATE A FLANGE 1 In the Model Builder, right-click Geometry 1 and select Rectangle ( ). 2 Under Size: a In the Width field, enter L. b In the Height field, enter d. 3 Under Position: a In the x field enter -(2/3*R1+L). b In the y field enter -d/2. 4 Click the Build Selected button ( ). The object r2 (not related to the circle radius) is created. Next, round the sharp edges of the flange by using fillets. Click the Zoom Extents button ( ). ADDING A FILLET TO ROUND THE FLANGE EDGES 1 In the Model Builder, right-click Geometry 1 and select Fillet ( ). 2 Select Vertices 1 and 4 (the left-hand corners) on object r2 (the small rectangle). 3 Click the Add to Selection button ( ) to add these points to the Vertices to fillet section. 4 On the Fillet page, under Radius, enter d/3 in the Radius field. 4 CREATING A 2D GEOMETRY MODEL | 221 5 Click the Build Selected button ( ) to create object fil1. ADDING ROTATE OPERATIONS TO CREATE FIVE FLANGES Rotate the flange 45 degrees and keep the original input object to create five flanges on top of the heat sink. Adding Rotate 1 to Create Object Rot1 1 In the Model Builder, right-click Geometry 1 and select Transforms>Rotate ( ). 2 Select object fil1 (the filleted rectangle) and add it to the Input Objects list. 3 On the Rotate page, under Input, select the Keep input objects check box. 4 Under Rotation Angle, enter -45 in the Rotation field. 5 Click the Build Selected button ( button ( ) to create object rot1. Click the Zoom Extents ). Adding Three More Rotations to the Model 1 In the Model Builder, right-click Geometry 1 and select Transforms>Rotate ( ). 2 Select the object rot1 (the resulting rotated filleted rectangle) to add it to the Input Objects list. 3 On the Rotate page, under Input, select the Keep input objects check box. 4 Under the Rotation Angle section, enter -45 in the Rotation field. 5 Click the Build Selected button ( ). to create object rot2. 5 222 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S 6 Repeat the above steps to create object rot3 and rot4. Use object rot2 to create rot3 and object rot3 to create rot4. 7 When done, click the Zoom Extents button ( ) to view the completed object. REMOVING INTERIOR BOUNDARIES IN UNION OPERATIONS 1 In the Model Builder, right-click Geometry 1 and select Boolean Operations> Union ( ). 2 Select the objects int1, fil1, rot1, rot2, rot3, and rot4. 3 Under Union, click to clear the Keep interior boundaries check box to remove the internal boundaries in the union operation. 4 Click the Build All button ( ). Click the Zoom Extents button ( geometry is shown in Figure 5-2. ). The final Figure 5-2: Final 2D object created in the Model Builder. VIEWING THE GEOMETRY SEQUENCE Figure 5-3 shows the geometry sequence used to create Figure 5-2. All primitive objects and the fillet operation are parameterized through the radius of the inner and outer heat sink arcs, the length and thickness of the flanges, and the radius of the fillets. You can change the parameter values in the Parameters table or for any object to create 6 CREATING A 2D GEOMETRY MODEL | 223 alternative heat sink geometries. The sequence still remains and when you click the Build All button ( ) a new geometry is created. Figure 5-3: an example of a 2D geometry sequence. RE-RUNNING THE GEOMETRY SEQUENCE WITH DIFFERENT PARAMETERS 1 In the Model Builder, under Global Definitions, click Parameters ( ). 2 Under Parameters, enter the following settings in the table. Replace the previous data:. NAME EXPRESSION VALUE DESCRIPTION R1 4e-3[m] 0.0040 m Radius Circle 1 R2 2.5e-3[m] 0.0025 m Radius Circle 2 d 1e-3[m] 0.0010 m Height L 7e-3[m] 0.0070 m Width 3 In the Model Builder, click Geometry 1. 7 224 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S 4 Click the Build All button ( ). Click the Zoom Extents button ( geometry as defined by the new parameters. ) to view the 8 CREATING A 2D GEOMETRY MODEL | 225 Creating a 3D Geometry Model Figure 5-4 shows the geometry of a heat sink used for cooling microprocessors. This section describes the steps to create this geometry and introduces 3D drawing tools and techniques. Figure 5-4: Example of a 3D heat sink model. Creating 3D Geometries Using the Model Builder CREATING A BASIC 3D GEOMETRY MODEL 1 Double-click the COMSOL icon to launch COMSOL. The Model Wizard opens. 2 On the Select Space Dimension page, click the 3D button. 3 Click the Finish button ( ). CREATING PARAMETERS FOR GEOMETRY PARAMETERIZATION 1 In the Model Builder, right-click Global Definitions and select Parameters ( ). 2 In the Parameters table, enter these settings: NAME EXPRESSION VALUE DESCRIPTION L1 1.5e-2 0.015 Pillar thickness (in the heat sink) L2 3e-3 0.0030 Pillar Length (in the heat sink) 9 226 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S U S I N G WO R K P L A N E S T O C RE A T E A B É Z I E R PO LY G O N Use work planes to create 2D geometries, which you then extrude or revolve to create 3D objects. Creating a Bézier Polygon 1 In the Model Builder, right-click Geometry 1 and select Work Plane ( ). 2 Under Work Plane, select xz-plane from the Plane list. 3 Under the Work Plane 1 node, right-click Geometry and select More Primitives>Bézier Polygon ( ). 4 On the Bézier Polygon page, under Polygon Segments, click Add Linear. Segment 1 (linear) displays in the Added segments list. 5 Under Control points: a In row 1, enter -2e-3 in the x edit field. b In row 2, enter -4e-3 in the x edit field. 6 Click Add Linear to add Segment 2 (linear) to the Added segments list. Some of the Control points are automatically filled in with values; the control points from the previous line are already filled in as the starting points for the next line. 7 Under Control points, in row 2, enter 2e-3 in the y field. 8 Click Add Linear to add Segment 3 (linear) to the Added segments list. a In row 2, enter -2e-3 in the x edit field. b In row 2, enter 4e-3 in the y edit field. 9 Click Add Linear to add Segment 4 (linear) to the Added segments list. 10 Under Control points, in row 2, enter 0 in the y edit field. 11 Click Close Curve. 10 CREATING A 3D GEOMETRY MODEL | 227 12 Click the Build Selected button ( ) and the Zoom Extents button ( ). REVOLVING A 2D OBJECT TO CREAT E A 3D OBJECT 1 In the Model Builder, right-click Work Plane1 and select Revolve ( ). The Revolve page opens in the Settings window and the 2D Bézier Polygon displays in the Graphics window. 2 On the Revolve page, under Revolution Angles, enter 90 in the End angle field. Note: The Revolution Axis corresponds to the position of the y-axis in the work plane’s 2D coordinate system. 3 Under General, select the Keep input objects check box. Work Plane1 is required for the next steps. 4 Click the Build Selected button ( ) and the Zoom Extents button ( ) to view the object rev1. ADDING AN EXTRUSION AND UNION 1 In the Model Builder, right-click Work Plane1 and select Extrude ( ). 2 Under Distances from Work Plane, enter -2e-2 in the Distances row. 11 228 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S 3 Click the Build Selected button ( ) and the Zoom Extents button ( )to view the object ext1. 4 In the Model Builder, right-click Geometry 1 and select Boolean Operations> Union ( ). 5 Select the objects rev1 and ext1 and add them to the Input objects section. 6 On the Union page, under Union, click to clear the Keep interior boundaries check box to remove the interior boundary between the corner section and the edge section of the heat sink. 7 Click the Build Selected button ( ). Objects rev1 and ext1 are combined to create object uni1. ADDING A ROTATION TO THE 3D OBJECT 1 In the Model Builder, right-click Geometry 1 and select Transforms>Rotate ( ). 2 Select the object uni1 and add it to the Input objects section under Input. 3 Select the Keep input objects check box to leave the input object intact as a rotation of the object is created. 4 Under Rotation Angle, enter -90 in the Rotation field. 5 Under Point on Axis of Rotation: a In the x edit field, enter 1e-2. b In the y edit field, enter 1e-2. 6 Click the Build Selected button ( ) and the Zoom Extents button ( ) to view the object rot1. 12 CREATING A 3D GEOMETRY MODEL | 229 CREATING UNION 2 1 In the Model Builder, right-click Geometry 1 and select Boolean Operations> Union ( ). 2 Select the objects uni1 and rot1 and add them to the Input objects section on the Union page. 3 Under Union, click to clear the Keep interior boundaries check box. 4 Click the Build Selected button ( ) to create object uni2. ADDING A SECOND ROTATION 1 In the Model Builder, right-click Geometry1 and select Transforms>Rotate ( ). 2 Select the object uni2 and add it to the Input objects section under Input. 3 Select the Keep input objects check box. 4 Under Rotation Angle, enter -180 in the Rotation field. 5 Under Point on Axis of Rotation: a In the x edit field, enter 1e-2. b In the y edit field, enter 1e-2. 6 Click the Build Selected button ( ). 13 230 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S CREATING UNION 3 1 Right-click Geometry 1 and select Boolean Operations>Union. The Union page opens in the Settings window. 2 Select the objects uni2 and rot2 and add them to the Input objects section under Union. 3 Click to clear the Keep interior boundaries check box. 4 Click the Build Selected button ( ) to create object uni3. C RE AT I N G WO R K P L A N E 2 A N D A DD I N G A S Q U A RE 1 In the Model Builder, right-click Geometry 1 and select Work Plane. The Work Plane page opens in the Settings window and a Work Plane 2 node is added in the Model Builder. 2 Click the Build Selected button ( ). 3 To the right of the Settings window, click the Show Work Plane button ( ). Note that you can use the projection of the 3D geometry on the xy-plane as a guide for creating the middle section of the heat sink base. 4 In the Model Builder, under Work Plane 2, right-click Geometry and select Square. The Square page opens in the Settings window. 5 Under Size, enter 2.4e-2 in the Side length edit field. 6 Under Position: a Select Center from the Base list. b In the x edit field, enter 1e-2. c In the y edit field, enter 1e-2. 7 Click the Build Selected button ( ) and the Zoom Extents button ( ). 14 CREATING A 3D GEOMETRY MODEL | 231 TR I M M I N G T H E S Q U A RE T O F I T U S I N G T H E F I L L E T O P E R A T I O N 1 In the Model Builder, under Work Plane 2, right-click Geometry and select Fillet ( ). 2 Add points 1, 2, 3, and 4 on the object sq1 to the Vertices to fillet section under Points. 3 Under Radius, enter 2e-3 in the Radius edit field. 4 Click the Build Selected button.( ) 15 232 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S ADDING EXTRUDE 2 AND COMBINING OBJECTS TO COMPLETE THE BASE 1 In the Model Builder, right-click Geometry 1 and select Extrude ( ). 2 Under Distances from Work Plane, enter 4e-3 in the Distances row. 3 Click the Build Selected button ( ). 4 In the Model Builder, right-click Geometry 1 and select Boolean Operations> Union ( ). 5 Select the objects uni3 and ext2 to add to the Input objects section under Union. 6 Click the Build Selected button ( ) to create object uni4. This completes the base of the heat sink. 16 CREATING A 3D GEOMETRY MODEL | 233 DRAWING THE UPPER PART OF THE HEAT SINK Creating a Work Plane and a Square 1 In the Model Builder, right-click Geometry 1 and select Work Plane ( ). The Work Plane page opens in the Settings window and a Work Plane 3 node is added in the Model Builder. 2 Under Work Plane, enter 4e-3 in the z-coordinate edit field. 3 From the 3D projection list, select Entire 3D geometry to visualize the projected edges of the heat sink’s base in the work plane. 4 Click the Build Selected button ( ). 5 To the right of the Settings window, click the Show Work Plane button ( ). 6 In the Model Builder, under Work Plane 3, right-click Geometry and select Square ( ). 7 Under Size, enter L2 in the Side length edit field. 8 Click the Build Selected button ( ) to create square sq1 with side length L2. 17 234 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S ADDING ARRAYS 1 In the Model Builder, under Work Plane 3, right-click Geometry and select Transforms>Array ( ). 2 Add the object sq1 to the Input objects section under Input. 3 Under Size: a In the x edit field, enter 3. b In the y edit field, enter 3. 4 Under Displacement: a In the x edit field, enter 1e-2-L2/2. b In the y edit field, enter 1e-2-L2/2. 5 Click the Build Selected button ( ). Adding Extrude 3 and Combining Objects (Union) 1 In the Model Builder, right-click Geometry 1 and select Extrude ( ). 2 Under Distances from Work Plane, enter L1 in the Distances row. 3 Click the Build Selected button ( ) and the Zoom Extents button ( 4 Right-click Geometry 1 again and select Boolean Operations>Union ( ). ). 18 CREATING A 3D GEOMETRY MODEL | 235 5 Add all the objects to the Input objects list under Union. 6 Click the Build All button ( ) to complete the heat sink geometry. THE GEOMETRY SEQUENCE Figure 5-5 shows the list of the geometry in the Model Builder used to create Figure 5-4. You can edit any node for each of the drawing operations. In this case, the upper part of the heat sink is parameterized, through the thickness and height of the heat sink pillars. You can edit the parameter values defined previously to change the heat sink geometry. 19 236 | C H A P T E R 5 : G E O M E T R Y M O D E L I N G A N D C A D TO O L S