Creating 3D Geometries Using the Model Builder

CREATING A BASIC 3D GEOMETRY MODEL
1 Double-click the COMSOL icon to launch COMSOL.
2 In the Model Wizard on the Select Space Dimension page, click the 3D button.
3 Click the Finish button ( ).


This model
geometry can
be used in a
future
exercise in
the Free
Meshing and
Structured
Meshes
sections of
this guide. It
is
recommended
you save the
model for this
purpose
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
USING WORK PLANES TO CREATE A BÉZIER POLYGON
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, under Model 1, 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 Plane Geometry and select Bézier Polygon ( ).
4 On the Bézier Polygon settings window, 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 xw field.
b In row 2, enter -4e-3 in the xw 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 yw field.
8 Click Add Linear to add Segment 3 (linear) to the Added segments list.
a In row 2, enter -2e-3 in the xw field.
b In row 2, enter 4e-3 in the yw 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 yw field.
11
Click Close Curve then click the Build Selected button ( ) and the Zoom Extents button ( ).

REVOLVING A 2D OBJECT TO CREATE 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.


The
Revolution
Axis
corresponds
to the
position of
the y-axis
in the work
plane’s 2D
coordinate
system
3 Under General, clear the Unite with input objects check box. Work Plane 1 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 Plane, enter -2e-2 in the Distances row.
3 Click the Build Selected button ( ) and the Zoom Extents button ( )to view the object ext1.

4 In the Model Builder, under Model 1, 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 field, enter 1e-2.
b In the y field, enter 1e-2.
6 Click the Build Selected button ( ) and the Zoom Extents button ( ) to view the object rot1.

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 field, enter 1e-2.
b In the y field, enter 1e-2.
6 Click the Build Selected button ( ).
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.
CREATING WORK PLANE 2 AND ADDING 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 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 ( ). 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 Plane Geometry and select Square ( ).
The Square page opens in the settings window.
5 Under Size, enter 2.4e-2 in the Side length field.
6 Under Position:
a Select Center from the Base list.
b In the xw field, enter 1e-2.
c In the yw field, enter 1e-2.
7
Click the Build Selected button ( ) and the Zoom
Extents button ( ).

TRIMMING THE SQUARE TO FIT USING THE FILLET OPERATION
1 In the Model Builder, under Work Plane 2, right-click Plane 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 field.
4 Click the Build Selected button.( )

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 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.

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 field.
3
From the 3D projection list, Entire 3D geometry is selected by default, and this visualizes 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 Plane Geometry and select Square ( ).
7 Under Size, enter L2 in the Side length field.
8 Click the Build Selected button ( ) to create square sq1 with side length L2.

ADDING ARRAYS
1 In the Model Builder, under Work Plane 3, right-click Plane Geometry and select Transforms>Array ( ).
2 Add the object sq1 to the Input objects section under Input.
3 Under Size:
a In the xw size field, enter 3.
b In the yw size field, enter 3.
4 Under Displacement:
a In the xw field, enter 1e-2-L2/2.
b In the yw 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 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 ( ).
5 Add all the objects (uni4 and all the ext3 just built) to the Input objects list under Union.
6
Click the Build All button ( ) to complete the heat sink geometry.

THE GEOMETRY SEQUENCE
Figure 5-10 shows the list of the geometry in the Model Builder used to create Figure 5-9. 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.

Figure 5-10: Sample 3D Model Builder Geometry Sequence. From the Busbar model in the COMSOL Multiphysics Model Library.
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
L1 1.2e-2
0.012 Pillar thickness (in the heat sink)
L2
2e-
3
0.0020
Pillar Length (in the
heat sink
3 In the Model Builder, click Geometry 1.
4
Click the Build All button ( ) and the Zoom Extents button ( ) to view the geometry as defined by the new
parameters.






















Drawing on the 2D Work Plane in 3D


Work Plane in the COMSOL Multiphysics Reference Guid
When using the Work Plane ( ) node to define 2D objects in 3D (for example, to extrude into a 3D object), one
of the features available with the 3D projection settings enables you to draw on the work plane in 3D. These
instructions are an example of this feature. When this check box is selected, two additional buttons are made
available in the Graphics window—the Align with Work Plane button ( ) and the Work Plane Clipping button
( ). The standard 2D model geometry draw toolbar (Figure 5-1) is also available for use..


Some computer graphic cards may not be able to run the work plane rendering. In these cases, the
work plane is rendered as in previous versions of COMSOL (it displays as a blue plane). It is possible
to go to the 3D work plane but it is not possible to draw on the plane


If you prefer to draw on the work plane in 3D, you can change the default to always select the draw
on work plane in 3D option by selecting the Draw on work plane in 3D check box in the Geometry
section of the Preferences dialog box
1 Create a model and add a geometry (for example, a Sphere).
2 Right-click to add a Work Plane node under the main Geometry node.
3
On the Work Plane settings window under Work Plane>3D projection, select the Draw on work plane in 3D
check box. See Figure 5-2 and Figure 5-3 to see what happens when the check box is selected.
4
Under Work Plane, click the Plane Geometry node. The geometry displays in the Graphics window. See
Figure 5-3 for an example.
-
Click the Align with Work Plane button ( ) to rotate and move the camera to see the work plane from the top
down.
-
Click to toggle the Work Plane Clipping button ( ) ON and OFF. When ON, use it to cut away all geometries
above the work plane and make it easier to draw when objects are overlapping within the work plane. The clipping
is not done when looking at the work plane from the side.


Drawing on the work plane works just as drawing in 2D. The 3D work plane adapts its size to the
drawn geometry. It is also possible to select and transform objects

Figure 5-2: The Graphics window displaying the Work Plane Geometry without the Draw on work plane in 3D check box selected.

Figure 5-3: The Graphics window displaying the Work Plane Geometry with the Draw on work plane in 3D check box selected.

Figure 5-4: Click the Align with Work Plane button to display the geometry from the top down.

Figure 5-5: Click to turn on the Work Plane Clipping button and cut away all geometries above the work plane.