Meshing > Importing and Exporting Meshes > Import

Import
Use an Import node () to import a mesh from a file or from another meshing sequence or mesh part. 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:
Import
In the Source list, choose the type of data to import: Any importable file, Meshing sequence, and COMSOL Multiphysics file are always available. In addition, you can choose STL/VRML file in 3D and NASTRAN file in 2D and 3D.
For file import, specify the file name in the Filename field or click the Browse button. For import from another mesh in the model, select the meshing sequence from the Source 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. If you have changed some property, the software automatically re-imports the mesh when you click a build button.
Properties for NASTRAN Import
You can import 3D meshes (and planar 2D meshes) in the NASTRAN bulk data format, the most common format for exchanging 3D meshes among programs. This format supports hundreds of NASTRAN entries describing elements, loads, and materials, making it possible to define a complete finite element model. When you import a NASTRAN bulk data file into COMSOL Multiphysics, the software imports mesh and material information only.
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 node, which contains all boundary faces associated with PSHELL entries, also appears automatically. If the material data is not required, select Only mesh to import the mesh only.
Mesh information is read from different NASTRAN entries, including those for mesh elements of lower dimension. When this information is not complete in the file, COMSOL Multiphysics enriches the imported mesh data with boundary elements, edge elements, and vertex elements such that a valid mesh object is formed. Each element in the imported mesh object receives a unique entity index.
For information on the NASTRAN entries that COMSOL Multiphysics supports, see Import in the COMSOL Multiphysics Programming Reference Manual (Meshing).
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). Choose Create selections to automatically generate selections corresponding to the groups of domain and boundary elements in the file. These selections become available for specifying geometric entities throughout the component — for instance, in Material nodes and physics interfaces. Choose Allow partitioning of shells to allow the boundary partitioning algorithm to split the boundary entities that are defined based on the data in the file into smaller parts. Both options are selected by default.
To use element types in the file to determine the domain partitioning of the domain elements, select the Partition according to element type check box (not selected by default).
To import the elements in the NASTRAN file as linear elements (that is, ignoring node points not in element vertices), select the Import as linear elements check box (not selected by default).
Boundary Partitioning Properties
These settings are available with the following options from the Source list: COMSOL Multiphysics file, STL/VRML file, and NASTRAN file.
If the partitioning of the boundary elements in the mesh to import into boundaries (faces) is not complete, you can use the Boundary partitioning list to control the partitioning:
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 faces (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.
The partitioning algorithm aims to split boundary elements (edge elements in 2D, face elements in 3D) into boundary entities in such a way that no large angles appear between neighboring elements within the same boundary entity. The maximum accepted neighbor angle can be set using the Maximum boundary neighbor angle field. In 2D, you can limit the angle between any two elements within the same boundary entity using the Maximum angle within boundary field.
If the Detect planar boundaries check box is selected (it is selected by default), the mesh import detects (approximately) straight edges or planar faces. The maximum accepted angle (in degrees) between elements for a boundary to be considered straight or planar can be set using the Maximum neighbor angle field. 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). If the Detect adjacent fillet faces check box is selected, the algorithm also searches for adjacent groups of boundary elements that form cylindrical faces.