PDF

Importing and Meshing a PCB Geometry from an ODB++ Archive1
Introduction
This tutorial demonstrates how to import data from an ODB++ archive to generate the geometry for a printed circuit board (PCB) that is suitable for simulation assuming that the copper traces can be modeled as shell geometry. Such a simulation is, for example, a heat transfer in solids analysis where the difference in thermal conductivity between the copper and the surrounding FR4 dielectric is so large that we can neglect the temperature difference and heat flux across the copper layer. The tutorial further demonstrates how to remove small details such as short edges from the generated geometry, and how to generate a mesh with adjusted element size parameters to resolve the small features of the copper traces.
Copper Layers
The copper layers in an ODB++ archive contain geometric shapes that when united during import result in the final geometric objects for the copper traces. The image to the left in the figure below depicts shapes from the ODB++ archive used in this tutorial. The copper pads are represented by circles and rectangles and the lines by the elongated rectangles with fully rounded short edges.
During import of the copper layers the individual shapes are united and the internal edges are removed to reduce the complexity of the geometry. The final geometry objects for the copper traces are shown to the right in the figure above. The short edge, which is highlighted above in the magnified section of the copper trace, is a result of two overlapping copper lines.
Edges corresponding to such overlaps can become significantly shorter than the typical line width of the copper, and can be automatically detected and removed before meshing the geometry.
Model Definition
The ODB++ archive imported in this tutorial contains a PCB with two copper layers connected by vias.
During import, geometry objects are generated for the copper layers (surface objects), the dielectric layer (solid object) and vias (solid objects). The solid object for the dielectric layer is created according to the shape of the board as defined in the ODB++ archive. The vias are generated as solid cylinders. To get the geometry for simulation, the objects for the dielectric material are united with the copper surface objects, and the cylinders for the vias are subtracted from the result.
The ODB++ archive also contains some disconnected copper surfaces that are located outside the PCB, and need to be deleted after the import.
Even though the PCB consists of many geometric entities, the geometry can be set up very quickly by leveraging the layer selections generated by the import and the available selection operations. In addition to generating the geometry, the step-by-step instructions also result in domain and boundary selections that are available as input for material and physics settings.
The last part of the instructions cover meshing of the PCB geometry to demonstrate how to find and remove details such as short edges before meshing, and how to adjust the maximum and minimum element size parameters to resolve the small details in the copper layers.
Application Library path: ECAD_Import_Module/Tutorials/pcb_import
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  3D.
2
Geometry 1
In the Settings window for Geometry, locate the Advanced section. From the Geometry representation list, if it is visible, choose the COMSOL kernel.
Import 1 (imp1)
1
In the Home toolbar, click  Import.
2
In the Settings window for Import, locate the Import section.
3
Click Browse.
4
5
Find the Layers to import subsection. In the table, select to import only the following layers:
6
From the Type of import list, choose Metal shell.
Using this option the copper traces are generated as surface objects with zero thickness.
Copper layers in PCB files often include text and other shapes that are positioned outside the boundaries of the board. Select the Ignore objects outside of board check box to automatically exclude the text boxes that are located outside the outline of this PCB.
7
Select the Ignore objects outside of board check box.
Note that in the Selections of Resulting Entities section the Layer selections check box is already selected, and the Show in physics list is set to All levels. The selections generated for each imported layer are available for downstream geometry operations, and also for any applicable physics, mesh or other model setting. The following steps illustrate how you can use the layer selections to generate the final geometry in an efficient way.
8
Click Import.
As the geometry import completes note the information displayed in the Messages window. In total four objects are imported: one solid object each for the dielectric and the vias, and one surface object each for the copper layers.
Due to the high aspect ratio of the imported geometry it is not possible to see the vias that are inside the dielectric. To make this possible create a second view.
Definitions
View no scaling
1
In the Model Builder window, expand the Component 1 (comp1)>Definitions node, then click View 1.
2
In the Settings window for View, type View no scaling in the Label text field.
View automatic scaling
1
Right-click View no scaling and choose Duplicate.
2
In the Model Builder window, click View no scaling 1.
3
In the Settings window for View, type View automatic scaling in the Label text field.
Camera
1
In the Model Builder window, click Camera.
2
In the Settings window for Camera, locate the Camera section.
3
From the View scale list, choose Automatic.
4
Click  Update.
5
Click the  Go to Default View button in the Graphics toolbar.
6
Click the  Transparency button in the Graphics toolbar.
The geometry should now fill the Graphics window, just as it is displayed in the figure below.
Geometry 1
PCB Domain
1
In the Geometry toolbar, click  Selections and choose Union Selection.
You can now configure this union selection to contain the objects for the dielectric and copper layers, then set it to be visible for physics features as a domain selection.
2
In the Settings window for Union Selection, type PCB Domain in the Label text field.
3
Locate the Geometric Entity Level section. From the Level list, choose Object.
4
Locate the Input Entities section. Click  Add.
5
In the Add dialog box, in the Selections to add list, choose TOP (Import 1), BOTTOM (Import 1), and TOP.DIEL (Import 1).
It is important that this selection includes all dielectric and copper objects as you will use it further ahead as the input for the union operation that combines the objects of the geometry.
6
7
In the Settings window for Union Selection, locate the Resulting Selection section.
8
From the Show in physics list, choose Domain selection.
9
Click  Build Selected.
Copper Boundaries
1
In the Geometry toolbar, click  Selections and choose Union Selection.
This second union selection gathers all copper surfaces into one selection that you can use when assigning the material properties.
2
In the Settings window for Union Selection, type Copper Boundaries in the Label text field.
3
Locate the Geometric Entity Level section. From the Level list, choose Boundary.
4
Locate the Input Entities section. Click  Add.
5
In the Add dialog box, in the Selections to add list, choose TOP (Import 1), BOTTOM (Import 1), and DRILL.TOP.DIEL (Import 1).
6
7
In the Settings window for Union Selection, click  Build Selected.
Union 1 (uni1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Union.
2
In the Settings window for Union, locate the Union section.
3
From the Input objects list, choose PCB Domain.
4
Click  Build Selected.
Difference 1 (dif1)
1
In the Geometry toolbar, click  Booleans and Partitions and choose Difference.
Using this difference operation you can subtract the cylinders of the vias from the board geometry to get the final geometry where the vias are represented only by the vertical faces of the holes.
2
In the Settings window for Difference, locate the Difference section.
3
From the Objects to add list, choose PCB Domain.
4
Find the Objects to subtract subsection. Select the  Activate Selection toggle button.
5
From the Objects to subtract list, choose DRILL.TOP.DIEL (Import 1).
6
In the Geometry toolbar, click  Build All.
Now that the geometry is complete you can assign materials for the dielectric domain and the copper faces using the selections defined in the geometry sequence.
Add Material
1
In the Home toolbar, click  Add Material to open the Add Material window.
2
Go to the Add Material window.
3
In the tree, select Built-in>FR4 (Circuit Board).
4
Click  Add to Component 1 (comp1).
5
In the tree, select Built-in>Copper.
6
Click  Add to Component 1 (comp1).
7
In the Home toolbar, click  Add Material to close the Add Material window.
Materials
FR4 (Circuit Board) (mat1)
1
In the Settings window for Material, locate the Geometric Entity Selection section.
2
From the Selection list, choose PCB Domain.
Copper (mat2)
1
In the Model Builder window, click Copper (mat2).
2
In the Settings window for Material, locate the Geometric Entity Selection section.
3
From the Geometric entity level list, choose Boundary.
4
From the Selection list, choose Copper Boundaries.
As expected the material is assigned to the top and bottom copper traces and the vertical walls of the vias.
5
Click the Go to View No Scaling button in the Graphics toolbar.
Mesh 1
1
In the Home toolbar, click  Build Mesh.
Since no physics interface has been added in the model the mesh is generated with the default general settings. When physics interfaces are present the mesh settings can depend on the physics settings, and the resulting mesh can be different from the one generated here.
According to the information in the Messages window, the mesher generated a mesh of approximately 130000 domain elements, and also resulted in four warning nodes. Proceed with reviewing these warnings to get an insight into the various issues associated with meshing this PCB geometry.
The first warning node lists those edges that are much shorter than the minimum element size used by the mesher.
Warning 1
1
In the Model Builder window, expand the Mesh 1 node, then click Warning 1.
2
In the Settings window for Warning, locate the Geometric Entity Selection section.
3
4
Click  Zoom to Selection.
To get a better view of the selected edge first turn off mesh rendering, then use the mouse to zoom out until you get the view displayed in the figure below.
5
Click the  Mesh Rendering button in the Graphics toolbar.
The highlighted edge is one of the segments of a polygon that represents a circular edge in the top copper layer. Such polygons can occur often in PCB data, and are one of the sources for short edges in the generated geometry.
6
In the Mesh toolbar, click  Measure.
The length of the edge, 0.015 inches, is displayed in the Messages window. This length is similar to the width of the copper traces.
It is usually good practice to measure the length of various short edges to get an understanding of the feature size in the geometry.
7
Click the  Go to Default View button in the Graphics toolbar.
Warning 2
This warning node contains a list of faces that are identified as much smaller, or as having narrow regions that are much smaller, than the minimum element size parameter for the mesh.
Warning 3
The message in this warning node warns that the domain is too thin compared to the minimum element size parameter.
Warning 4
In the last warning node you can see that the mesh contains some very low quality elements. This is due to the issues listed in the previous warning nodes.
While all these warnings can be overwhelming, they can be expected when meshing with default mesh settings for general physics a PCB geometry such as the one in this tutorial. The minimum and maximum element sizes for the mesh are determined based on the largest dimensions of the geometry, and produce too large elements to resolve the small details in the geometry. The PCB is a few inches in the x- and y-directions, but has a thickness of only a few thousands of an inch, which is similar to the size of the small details found on the copper layers.
To get rid of the warnings and generate a mesh with higher quality you can do two things: remove small details that are not needed, and allow the mesher to generate smaller elements to better resolve the small details that are needed for the geometry.
Geometry 1
Remove Details 1 (rmd1)
1
In the Geometry toolbar, click  Remove Details.
Using this operation you can automatically find and remove small details from the geometry.
Configure the operation to remove short edges and points that are adjacent to continuous edges only. Other details, such as thin domains, small and sliver faces could be actual features of the copper layers and should not be removed.
2
In the Settings window for Remove Details, locate the Details to Remove section.
3
Clear the Small faces check box.
4
Clear the Sliver faces check box.
5
Clear the Narrow face regions check box.
6
Clear the Thin domains check box.
7
Locate the Parameters section. From the Detail size list, choose Absolute.
8
In the Maximum absolute size text field, type 0.008[in].
Edges that are shorter than this length are going to be collapsed into a point by the remove details operation. The number you enter here should be smaller than the size of any details that you would like to keep in the geometry.
9
In the Continuous tangent tolerance text field, type 16[deg].
By increasing the default angular tolerance you ensure that the vertices of the polygons illustrated earlier are going to be removed.
10
Click  Build Selected.
After the operation is completed you can see under the Information section of the Settings window that 2299 vertices and 3 edges were removed. To do this the automatic removal tool used two types of operations, one that ignores vertices and another for collapsing the edges. These operations are added under the Remove Details 1 node in the geometry sequence, and they are hidden in automatic mode.
11
Right-click Remove Details 1 (rmd1) and choose Edit Generated Sequence.
As the individual operations become visible note that the sequence contains six ignore vertices operations. These correspond to the number of passes made by the automatic removal when increasing the angular tolerance for removing vertices, and then making a final pass to remove vertices after collapsing edges. In manual mode you can modify each operation, for example to exclude entities that you would like to be left in the geometry.
Ignore Vertices 4 (aigv4)
1
In the Model Builder window, click Ignore Vertices 4 (aigv4).
2
In the Settings window for Ignore Vertices, locate the Input section.
3
Find the Vertices to ignore subsection. Select the  Activate Selection toggle button.
4
5
Click  Zoom to Selection.
The selected vertex is between two segments of the polygon that you have examined earlier in one of the warnings from the mesher.
6
Click the  Go to Default View button in the Graphics toolbar.
Switch back to automatic mode for the remove details operation, and then continue with generating a new mesh.
Remove Details 1 (rmd1)
1
In the Model Builder window, click Remove Details 1 (rmd1).
2
In the Settings window for Remove Details, locate the Automation section.
3
From the Mode of operation list, choose Automatic.
4
Click  Build Selected.
Mesh 1
To manually edit the element size settings for the mesh switch to user-controlled mesh.
1
In the Model Builder window, under Component 1 (comp1) click Mesh 1.
2
In the Settings window for Mesh, locate the Mesh Settings section.
3
From the Sequence type list, choose User-controlled mesh.
Size
1
In the Model Builder window, under Component 1 (comp1)>Mesh 1 click Size.
2
In the Settings window for Size, locate the Element Size section.
3
Click the Custom button.
4
Locate the Element Size Parameters section. In the Maximum element size text field, type 0.7[in].
5
In the Minimum element size text field, type 0.07[in].
The first Size node in the meshing sequence is a global size node that applies to all downstream mesh operations. The maximum and minimum element sizes you specify here are much closer than the default parameters to the size of small details in the PCB geometry.
Size 1
1
In the Model Builder window, right-click Free Tetrahedral 1 and choose Size.
By adding a local size node that applies only to the faces on the top and bottom of the PCB you ensure that the copper traces and surrounding faces are meshed with the appropriate detail.
2
In the Settings window for Size, locate the Geometric Entity Selection section.
3
From the Geometric entity level list, choose Boundary.
4
From the Selection list, choose TOP.DIEL (Import 1).
This automatically generated selection contains all horizontal boundaries adjacent to the dielectric.
5
Locate the Element Size section. Click the Custom button.
6
Locate the Element Size Parameters section. Select the Maximum element size check box.
7
8
Select the Minimum element size check box.
9
10
Click  Build All.
11
Click the  Mesh Rendering button in the Graphics toolbar.
This final mesh has approximately 265,000 domain elements. Warnings are no longer displayed by the mesher as the applied maximum and minimum element size parameters are now much closer to the size of the small details of the geometry.
 

1
The file is provided courtesy by Hypertherm, Inc., Hanover, NH, USA.