4.10. Mesh preparation¶
In Mesh module we can mesh different types of geometry. In this HOWTO we will first explain how to mesh geometry files within Mesh module and the we will explain how to import NASTRAN mesh files.
4.10.1. Meshing CAD geometry¶
First we must activate the Geometry module. We can activate the
Geometry module with a click on button from the
toolbar. Then we go to Object Browser
under Geometry. If there are no meshes displayed,
you can right-click on Geometry
and select
Expand All
. Then we go to toolbar of OCC scene and we select
Global panning
to see the selected geometry.
Note
It is also possible to create your own geometry in Geometry module. For more information you should check Salome Documentation.
Now we can move to Mesh module by clicking in toolbar. To create mesh hypothesis of our geometry, we select from mesh toolbar. THe following dialog appears on screen.
In this dialog we define the name of our mesh. Then we select geometry
from Geometry module in Object Browser
that we want to mesh. In
Mesh type
options we select type of mesh and then we can apply
appropriate algorithm for 3D, 2D or 1D mesh. Different algorithms are
possible for each type of mesh. If our mesh type is triangular, we can
choose Mefisto algorithm or more advanced algorithms like 2D
projection, polygons per faces and manually created faces. At the
bottom we have an option assign a set of hypotheses
. When we
select a hypothesis, new dialog appears on screen. In this dialog we
can set name for our hypothesis, number of segments and type of
distribution.
In this dialog we can define mesh density. After we click OK
and then apply, options for the meshing algorithm are stored. To compute a mesh,
we right-click on name of our mesh in Object Browser
under
mesh. From selected options we click
Compute
button and computation starts. When
computation is finished, the dialog with mesh information appears on
screen.
Note
For detailed examples on meshing geometry parts, meaning of meshing algorithms and space modelling check Salome documentation.
Mesh Module - important icons | |
---|---|
Visible mesh | Makes mesh visible in VTK viewer in the Mesh module. |
Global Panning | Resizes VTK viewer to fit current mesh on screen. |
Initialize mesh | Opens dialog to define mesh type and algorithm. |
Compute Mesh | Computes mesh. |
4.10.2. Importing NASTRAN meshes¶
Now we will show how to mesh Inres1 tile from NASTRAN file. Provided
input data are NASTRAN geometry files with .dat
extension, that
contain mesh information for both target and shadow surfaces. Our goal
is to convert those files to SALOME meshes that will be used later on.
To convert NASTRAN file to mesh, we choose
NASTRAN to MESH
function. New dialog Get mesh from NASTRAN file is
created. It contains options for input file and mesh name. If we click
on button, a file browser appears and we
can navigate to appropriate .dat
file. Once the file is chosen, we
can define name for mesh. Then we click Apply. We can see meshes
in Object Browser. To display mesh, we can navigate to mesh module
by right-clicking on Mesh and choosing
Activate Mesh Module
. In Mesh module we click on
next to the name of our mesh to make the
mesh visible in VTK scene. In toolbar of VTK scene we click on
Global Panning
to see the mesh.
4.10.3. Building submeshes¶
In this section we will divide one single mesh into two submeshes. The geometry we will use is ITER first wall panel. We will divide this panel into two subpanels. In the image below we can see the selected panel.
We want to mesh the left and right subpanels separately. To do that, it is the most appropriate to show the panel in \(x\) -direction. To do that, click on the icon as shown in image below.
Let us first create a copy of the existing mesh. To do that, select the chosen mesh in Object Browser and then click icon. New dialog appeares on screen. In the argument section next to Source Object we can see the name of the existing mesh. Below we can insert the name of new mesh. After we are done, we click Apply and Close and new mesh is generated in Object Browser.
Now we can remove elements from existing mesh and create left subpanel.We go to the toolbar and click Modification->Remove->Elements. Then we select elements in the viewer scene that we want to remove with the left mouse click. If we want to select multiple elements, hold down shift while selecting elements. Selected elements are colored in yellow as shown in image. When we are done, we select Apply and Close and selected mesh is now presenting only the left side of the panel. We have to repeat the same process with the copied mesh in order to get the right side of panel.
4.10.4. Building a Compound out of multiple Meshes¶
Suppose we have multiple individual meshes in Mesh
module that we want
to merge into one single mesh. To do that, we have to select meshes in
Object Browser
(To select multiple meshes, hold down ctrl
button and
select meshes with right-click).
After selection we move to header bar and select
.New dialog appears on screen. In the Result name table you can type
the name of a new compound mesh. In the table arguments you see the
selected objects. After you are done with setting options for new
generated mesh, click Apply and Close. A new mesh will appear in
Object Browser
.
4.10.5. Moving Meshes in 3D Space¶
The most important transformation operations in moving meshes are rotation and translation.
4.10.5.1. Translation of Mesh objects¶
To translate object in a certain direction, we must firstly move to toolbar and go to
.When we click on Translation, new dialog opens and in the translation table we can select the type of definition of translation. First option allows us to define translation via two points (starting point and ending point of translation) and second option defines translation via vector. First we have to define Element IDs in Arguments sector that we want to translate. Below this selection we can select a checkbox if we want to translate whole mesh, sub-mesh or group (which is for the majority of cases), otherwise not (for example if we want to move only individual nodes, then this checkbox is unnecessary). Then we type in the coordinates of starting and ending points of translation. For example, if we want to move mesh for 10 mm in \(x\) -direction we would define Point 1 and Point 2 coordinates as
Here only the distance between two points matters. This means that if we changed x coordinates to \(x1\) = 200 mm and \(x2\) = 500 mm, the result would still be the same. Fo you wish to see preview of moved mesh select option Preview in the arguments sector, located at the bottom.
If we want our translated mesh to be stored in study as new mesh, we have to select option Create a new mesh and insert name of new mesh in line next to selected option. If we just want to move already existing mesh, select option Move Elements. If you want to copy elements and generate groups from this new copy, select option Copy Elements and then Generate groups. In the end click Apply and Close. For more help, click Help button. If you selected second option of translating the mesh, the procedure is the same, only here you have to type in the scalar components of translating vector.
4.10.5.2. Rotation of Mesh objects¶
To rotate object around certain vector, we must firstly move to toolbar and go to
.After we click on Rotation, a new dialog appears on screen. In the Arguments sector, we can select Element IDs that we want to rotate. Below this selection we can select a checkbox if we want to rotate the whole mesh, sub-mesh or group (which covers the majority of cases), otherwise not (for example if we want to rotate only individual nodes, then checking this checkbox is unnecessary). In the axis subsection we have to define two main parameters for rotation. Firstly, we have to define a starting point of rotation axis and then a vector that is coincident with the rotation axis. In our case we have defined a starting point at the origin of coordinate system. The rotation vector coincides with z-axis. The value of \(dZ\) must be non-zero and \(dX\) and dY must be zero. Then we must determine the angle of rotation around the chosen axis. In our case this angle is 120 Deg. To see the preview, select option Preview.
If we want our rotated mesh to be stored in a study as a new mesh, we have to select option Create a new mesh and insert the name of new mesh in line next to selected option. If we just want to move an already existing mesh, select option Move Elements. If you want to copy elements and generate groups from this new copy, select option Copy Elements and then Generate groups. In the end click Apply and Close. For more help, click Help button.