The Part Libraries window () (Figure 7-2) contains sets of parts that you can use as custom geometric parts representing common parts or components within an application area. Some of the add-on modules include their own part libraries with parts adapted for use within their respective application areas. The location of the corresponding MPH-files is, for the Ray Optics Module, for example, C:\Program Files\COMSOL\COMSOL52a\Multiphysics\parts\Ray_Optics_Module
Figure 7-2: The Part Libraries window with a Spherical Equi-Concave Lens 3D part from the Ray Optics Module selected.
•
•
•
•
•
• If you have added a linked part, by clicking Replace from Library in a Linked Part node’s Settings window.You can set the root directory and create and remove a user-defined part library using The Preferences Dialog Box as described next.Open The Preferences Dialog Box and click Part Libraries to edit the following. The buttons are located at the bottom of the Part Library folders tree.Click the Add User Library button () to add customized folders. In the User Part Library tree in the Browse for Folder dialog box, navigate to a location on your computer where you want to create a custom part library folder. Or click Make New Folder. Click OK to save the changes and exit, or Cancel to exit without saving.
Click the Set Library Root button () to edit or set the root folder. This redirects COMSOL to a different folder where customized geometry models can be stored.
In the Part Library Root tree in the Browse for Folder dialog box, navigate to the new root folder location or click Make New Folder. Click OK to save the changes and exit, or Cancel to exit without saving.This button is enabled after a User Part Library folder is created. Click any folder corresponding to a user part library, and then the click Remove Selected () button to remove it from the part libraries.
Once you have located the part you want to add to the geometry — for example, you used a search and it was successful (see Searching the Part Libraries), or you browsed the Part Libraries tree — then to use the part:
• Select the part, then click () Add to Geometry if opened from the Geometry branch or Add to Model if opened from the Global Definitions branch.
• Right-click the part, then from the context menu select Add to Geometry if opened from the Geometry branch or Add to Model if opened from the Global Definitions branch.The part then appears as a Loaded Part node under Parts () and also, if added to a geometry, in a Part Instance node (
) under the Geometry node in the Component. That Part Instance node calls the loaded part to create an instance of the part with the input parameters that you define under Input Parameters in the Part Instance node’s Settings window, when you build that node or all objects in the geometry.
When you replace a part in a loaded part, you click or select Replace in Model instead.
When using a part in 3D, you can position it by matching a work plane in the part with a work plane in your model using the settings in under Position and Orientation of Output in the Part Instance node’s Settings window (see Part Instance).You can Search the part libraries to find parts. For example, enter all or part of the part name or any other phrase or words and click Search.By default, the search includes all words in the Search field.
COMSOL part models are named using an underscore between words (for example, straight_pipe) because the part model name is also the name of the corresponding MPH-file. The underscore is required to form a valid filename, so it is recommended that you, if you are not sure of the full name, enter only the first word in the Search field when searching for a part name.
• To search for part models by filename only, use the prefix “@name:”, for example @name:straight_pipe. You can also use the wildcard character ‘*’ at the beginning and the end of the search expression, for example @name:*pipe.
• To search for a specific built-in geometric primitive or feature, use the scoping syntax @geom:<name>. For example, enter @geom:rot to find all part models that include rotations. Note, however, that the geometry features for a geometry model are part of the implementation and not directly visible.
• To search for a phrase, enclose it in quotation marks (for example, "bent pipe"). The words can be part of the part model’s name or description.If the search does not return any results, the Part Libraries window contains the message No Matching Model Found. Click the Refresh button () under the tree to return to the root Part Libraries folder list.