Use an Import node (
) to import a mesh from a file, from another meshing sequence or mesh part, or from a
Filter or
Partition dataset. It is only possible to import a mesh to a meshing sequence under a
Mesh node if the geometry sequence is empty. If the sequence already contains a mesh, the imported mesh is added to the existing mesh, forming an assembly. If you use this
Import node in a mesh part, you can then use it in a geometry sequence through an
Import node under a
Geometry node.
To import a mesh, right-click a Mesh node or a
Mesh Part node and select
Import. Then enter the properties for the import using the following section:
In the Source list, choose the type of data to import:
Any importable file,
Meshing sequence (if applicable meshing sequences are available), and
COMSOL Multiphysics file are always available. In addition to the native file formats, you can choose
STL file (stereolitography file),
VRML file (Virtual Reality Modeling Language file),
PLY file (Polygon File Format or Stanford Triangle Format file), and
3MF file (3D Manufacturing Format file), and
NASTRAN file and
Sectionwise file in 2D and 3D. Choose
Dataset to import the visualization mesh of a Filter or Partition dataset. This option is only available if there is at least one
Filter or
Partition node under
Datasets in
Results.
For file import, specify the filename in the Filename field or click the
Browse button. For import from another mesh in the model, select a meshing sequence or mesh part from the
Mesh list below. To import a meshing sequence, click the
Import button. For a mesh part, the
Import button is not needed and is therefore disabled. For import of a dataset in the model, select a Filter or Partition dataset from the
Dataset list below.
In 3D, you can import 3D meshes and planar 2D meshes from COMSOL Multiphysics files (.mphtxt or
.mphbin). Planar 2D meshes, imported to a 3D component, always appear at
z = 0.
When you import a mesh from a COMSOL Multiphysics file that contains mesh selections, you need to select the Import selections check box (selected by default) to import the selections together with the mesh. If you choose to import mesh selections, corresponding selections are created and appear in the
Domain Selections,
Boundary Selections,
Edge Selections, or
Point Selections sections, depending on space dimension and the entity level for the imported selections. You can use the imported selections, for example, to add as a selection to a dataset or plot during postprocessing. See also
Domain Selections, Boundary Selections, Edge Selections, and Point Selections below.
In 2D and 3D, it is possible to import the result of a Filter or
Partition dataset evaluation. An example of where import of a dataset is used is when setting up a verification study for topology optimization results.
Select the Import selections check box (selected by default) to also import the selections defined by the component corresponding to the dataset. If you choose to import these selections, they will appear in the
Domain Selections,
Boundary Selections,
Edge Selections, or
Point Selections sections, depending on space dimension and the entity level for the imported selections. You can use the imported selections, for example, to add as a selection to a dataset or plot during postprocessing. See also
Domain Selections, Boundary Selections, Edge Selections, and Point Selections below.
Select the Import domain elements check box (cleared by default) to import domain mesh elements from the dataset. Domain mesh elements can only be imported if the result that the dataset is evaluated on is defined a domain mesh.
To import mesh and material data from a NASTRAN file, select Mesh and materials in the
Data to import list. In this case, COMSOL Multiphysics creates
Material nodes corresponding to the data in any MAT1 and MAT10 entries in the file. Furthermore, the thickness data of any PSHELL entry in the file is stored in a
Variables node as long as it is greater than zero. To simplify the use of this data in physics interfaces, such as the
Shell interface, an
Explicit selection, which contains all boundary faces associated with PSHELL entries, also becomes available. If the material data is not required, select
Only mesh to import the mesh only.
To use material data in the file to determine the partitioning of the elements, select the Partition according to material data check box (selected by default). The
Create selections check box is selected by default to automatically generate selections deduced from the file. Domain, boundary, and edge selections are created for each property id (PID) of the elements in the file. Mesh elements associated with RBE entries (RBE2 and RBE3) can form selections of all geometric entity levels. The created selections appear in
Domain Selections,
Boundary Selections,
Edge Selections, and
Point Selections sections, depending on their entity levels. The origin of each created selection is described in the
Source in file column. These selections become available for specifying geometric entities throughout the component — for instance, in Material nodes and physics interfaces. The
Allow partitioning of shells check box is selected by default to allow the boundary partitioning algorithm to split the boundary entities that are defined based on the data in the file into smaller parts.
These settings are available with the following options from the Source list:
COMSOL Multiphysics file,
Dataset,
STL file,
VRML file,
NASTRAN file,
PLY file,
Sectionwise file, and
3MF file.
•
|
Select Automatic to let the software partition the boundary elements into boundaries automatically (the default setting).
|
•
|
Select Minimal to make a minimal boundary partitioning. This is useful when you import a mesh from a measured geometry or a NASTRAN mesh with a predefined boundary partitioning. The automatic face partitioning is not desired then.
|
•
|
Select Manual (in 2D) or Detect boundaries (in 3D) to manually control the partitioning. Both choices add a set of parameters, which make it possible to influence the result of the partitioning algorithm; for the Detect boundaries case in 3D, the Detect Faces and Detect Edges sections appear, containing settings for controlling the face and edge partitioning, respectively.
|
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.
•
|
Automatic (the default), to use a default tolerance value ( 10−8).
|
•
|
Relative, to specify a Relative tolerance (default: 10−8). The relative tolerance value must be smaller or equal to 1.
|
•
|
Absolute, to specify an Absolute tolerance (default: 10−8).
|
If the Detect planar faces check box (3D) or the
Detect straight edges check box (2D) is selected (both are selected by default), the mesh import detects (approximately) planar faces or straight edges, respectively. The minimum size of a straight or planar boundary entity, relative to the entire boundary, can be set using the
Minimum relative length field (2D) and
Minimum relative area field (3D). The maximum accepted angle (in degrees) between elements for a boundary to be considered straight or planar can be set using the
Maximum deviation angle field. If the
Detect adjacent fillet faces check box (3D) is selected, the algorithm also searches for adjacent groups of boundary elements that form cylindrical faces.
If the Detect planar edges check box is selected (it is selected by default), the mesh import detects (approximately) planar edges. The
Detection parameter specifies to which extent the operation should search for planar edges. Use the slider to tune the detection level, where
Strict means that only fully planar edges are searched for, and
Tolerant means that the algorithm searches for planar edges with a wider tolerance. You can also enter the parameter value directly as a value between 0 (strict) and 1 (tolerant).
If the Detect straight edges check box is selected (it is selected by default), the mesh import detects (approximately) straight edges. The
Detection parameter specifies to which extent the operation should search for straight edges. Use the slider to tune the detection level, where
Strict means that only fully straight edges are searched for, and
Tolerant means that the algorithm searches for straight edges with a wider tolerance. You can also enter the parameter value directly as a value between 0 (strict) and 1 (tolerant).
From the Minimum edge length list, choose one of the following options:
Automatic (the default),
Relative, or
Absolute to specify the minimum required length of an edge to be detected. If you select
Relative, specify a minimum relative length in the
Minimum relative length field that appears, and if you select
Absolute, specify a minimum absolute length in the
Minimum absolute length field that appears.
In these sections, imported mesh selection appear. In the Name column, the name of each selection appears. For COMSOL Multiphysics file import, each name is by default the name of the selection in the imported file, which appears in the
Name in file column. For STL and NASTRAN import, the source of each selection appears in
Source in file column (that is, which information in the imported file that was used to generate the selection). Select the name in the
Name column to highlight the selection in the
Graphics window. You can change the name of a selection by editing the corresponding table entry in the
Name column. Note that not all of these selection sections are available for all space dimensions.
|
•
|
See From Surface Mesh to Geometry: STL Import of a Vertebra: Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_import.
|
•
|
For the Optimization Module, see Bracket — Topology Optimization: Application Library path Optimization_Module/Topology_Optimization/bracket_topology_optimization_stl
|
|