Preparing PCB Geometries for Simulation
As a first step, it is always beneficial to remove all features from the geometry that are not important for the simulation. This is usually best done in the ECAD software before importing the geometry into COMSOL. Most ECAD or EDA programs support design rule checks (DRC), which test the entire layout and check that all features (vias, conductors, and components) are separated according to certain rules. With such checks, the layout is free from overlapping vias and conductors touching other conductors or vias. This also ensures that the special extrude functionality of the ECAD import works appropriately. If the file contains such design-rule violations, the extrude operation might fail and issue an error message stating that it could not handle the topology of the layout.
The best approach to handle such problems is to perform a DRC with your ECAD software and produce new layout files. If this is not possible, import the layout in 2D and try to identify the problematic features.
When importing to 3D, the import code can extrude the 2D layouts created from the imported data. Alternatively, you can let the import generate surface objects or import the layers onto a work plane in 3D. This can be useful if you want to modify the imported 2D layouts before extruding them.
Before meshing the geometry created from imported ECAD files, it can be helpful to eliminate short edges during the import. Do this by selecting the checkboxes Ignore vertices with continuous tangent and Eliminate short edges in the import settings. Note that you can also remove short edges from the geometry by using the automatic Geometry Cleanup or by manually adding a Remove Details feature; see Remove Details and Geometry Cleanup in the COMSOL Multiphysics Reference Manual.
The imported geometry often consists of objects with very high aspect ratios, which are hard to mesh with a tetrahedral mesh generator. As a result, it is usually necessary to use interactive meshing of the imported geometry in a by-layer fashion. Assume that the top and bottom layers are metal layers. All metal layers can often be meshed using swept meshing, but dielectric layers usually cannot be meshed that way because the source and target boundaries do not look the same. Begin by meshing from the bottom or top layer, starting with a triangular or quadrilateral boundary mesh. Then, mesh layer by layer, where each metal layer gets a swept mesh, and each dielectric layer (with vias) gets an unstructured tetrahedral mesh. When starting with a quadrilateral boundary mesh, the swept mesher generates hex elements, and pyramid elements are automatically inserted when the tetrahedral mesher generates the mesh for the dielectric layers. Finally, if there is a surrounding air domain mesh it using the tetrahedral mesher.
Another possibility is to create the geometry for meshing and physics by forming the assembly of the metal and dielectric objects generated by the import. This can be controlled by the Form Union/Assembly node in the Geometry branch of the model tree. When forming an assembly, identity pairs connect the touching faces between the layers. To generate the mesh for the individual layers, use the swept mesher. By this method it can be easier to resolve details on the copper layers while limiting the number of element layers in the extrusion direction.
Application Library path: ECAD_Import_Module/Tutorials/pcb_import_shell
Application Library path: ECAD_Import_Module/Tutorials/pcb_import_components
Application Library path: ECAD_Import_Module/Tutorials/pcb_import_nets