Importing 3MF, PLY, STL, and VRML Meshes
Use an Import node () to import a mesh from a 3MF, PLY, STL, or VRML file. When you import a mesh, you can position, rotate, and scale the mesh by using one or several Transform attributes.
Figure 8-22: The fluid region in the tutorial Analyzing Porous Structures on the Microscopic Scale is imported from an STL file.
To import additional meshes, add another Import node. Then COMSOL Multiphysics adds the elements of the newly imported mesh to the existing mesh.
Meshes from different Import nodes form an assembly. See Conforming, Nonconforming, and Nonmatching Meshes for more information about assembly type meshes.
The Import operation will change the number of entities in the mesh, so unless the meshing sequence is defining its own geometric model, a new meshing sequence of this type will be set up automatically. Then, the Import node will be added in the new sequence.
See The Mesh Node to read more about the meshing sequence and meshes that define their own geometric models.
Imported Meshes and Element Orders for information about curved elements.
Meshes on the format 3MF, PLY, STL, and VRML typically contain triangle elements with small angles, large angles, and the mesh elements often vary a lot in size. Such meshes are not well suited for simulations and need to be remeshed or modified before generating a volume mesh.
Enter the properties for the import using the following sections:
Import
Specify the filename in the Filename field or click the Browse button. You can also click the downward arrow beside the Browse button and choose Browse From () to open the fullscreen Select File window. Click the downward arrow for the File Location Actions menu () to choose Show in Auxiliary Data () to move to the row for this file in the Auxiliary Data window, Copy File Location (), and (if you have copied a file location) Paste File Location ().
If you have changed some property, the software automatically reimports the mesh when you click a build button. For import of a meshing sequence, select Build source mesh automatically (selected by default) to automatically build the source sequence and reimport the current version of the mesh. This is required when running a parametric sweep over some parameter that affects the source mesh.
Boundary Partitioning Properties
When a mesh is imported into COMSOL Multiphysics, the operation automatically determines a partitioning of the mesh into domains, boundaries, edges, and points. If the automatically performed partitioning does not match the requirements, you can modify the face partitioning by manually adjusting the corresponding parameters. For details, see the section Boundary Partitioning Properties.
Repair Tolerance and Selection for STL (Stereolithography) Files
These settings are available when the Source list is set to STL file for import of stereolithography files in 3D. Such files contain data for an unstructured triangulated surface.
The Create selections check box is selected by default to create a boundary selection of every solid section in the file during import. Typically, there is only one such section. In that case, a selection of the entire boundary is created. This happens also when the STL file is binary and can by definition have no solid sections. The created selections appear in a table in the Boundary Selections section that appears below the Import section. The table has two columns. In the right column, the name of the solid section that the selection has been created from appears. If the section is unnamed or if the file is binary, the name is empty. The selections appear in the same order as the corresponding sections in the file. In the left column, the name of the selection appears. By this name, which can be changed, as well as dimension of the selection, you can find the selection in the model.
The repair tolerance assures that the imported mesh contains no holes and no triangles with sides shorter that the tolerance. From the Repair tolerance list, select one of these options:
Automatic (the default), to use a default tolerance value (108).
Relative, to specify a Relative tolerance (default: 108). The relative tolerance value must be smaller or equal to 1.
Absolute, to specify an Absolute tolerance (default: 108). The length unit specified in the Settings window for the Geometry node is used.
Entity Selections
These sections appear after the Import has been built. For details, see Entity Selections.
See Analyzing Porous Structures on the Microscopic Scale:
Application Library path Porous_Media_Flow_Module/Fluid_Flow/pore_scale_flow_3d.
See STL Import 1 — Generating a Geometry from an Imported Mesh:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_import.
See STL Import 2 — Remeshing an Imported Mesh:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_mesh_import.