Salome HOME
Increment version: 9.6.0
[modules/hexablock.git] / doc / intro_mesh.rst
1 :tocdepth: 3
2
3 .. _mesh:
4
5 ============================
6 Generate the hexahedral mesh
7 ============================
8
9 The main stages to mesh with HexaBlock are:
10
11 - Define all discretization laws, a law is characterized by:
12
13     - A number of nodes
14     - A distribution (uniform, arithmetic, etc.)
15
16 - Apply a law on a set of edges
17
18     - This set of edges has the propagation property
19     - This set is defined directly on the model of blocks
20
21 - Define all groups directly on the model of blocks:
22
23     - Groups of nodes
24     - Groups of segments, of quadrangles, of hexahedra
25
26 - Parametrization of the mesh generation
27
28
29 Define a law of discretization
30 ==============================
31
32 A discretization law is defined by four properties:
33
34 - the name of the law
35 - the number of nodes for the discretization law
36 - the kind of the law 
37     - uniform
38     - arithmetic
39     - geometric
40 - the coefficient for the arithmetic and geometric law.
41
42 Set the propagation laws
43 ========================
44
45 From the model, an edges partition is determined, each part
46 characterizes a propagation set. To each propagation is associated a
47 discretization law and an application way to this law. By default, the
48 law "Default" is applied on every propagation. It is possible to use
49 the same law for different propagations.
50
51
52 .. _generatemesh:
53
54 Generate the mesh
55 =================
56
57 Once the model and its association to the geometry created, the
58 hexahedral mesh can be generated by mentioning:
59
60 - the discretization of the edges thanks to discretization laws
61 - the potential groups
62
63 To discretize, the application proceeds in three steps:
64
65 - the application computes a partition of the model edges, where each sub-set of edges corresponds to the edges related to the propagation,
66
67 - the user defines the needed discretization laws, a law is characterized by:
68
69     * the name of this law,
70     * the number of nodes to compute
71     * a distribution (uniform, arithmetic, etc.)
72
73 - the user (working on the model) apply a discretization law on each sub-set of propagation edges
74
75 The groups are defined on the model of blocks and the main types of groups are:
76
77 - groups of hexahedra
78 - groups of quadrangles
79 - groups of edges
80 - groups of nodes
81
82 .. image:: _static/ex2.png
83    :align: center
84
85 .. centered::
86    Example of propagation-linked edges sub-set 
87
88
89 Mesh Algorithm
90 ===============
91
92 Node generation process follows four steps:
93
94 1. generate all the nodes corresponding to the vertices of the model
95 2. generate all the nodes corresponding to the edges of the model
96 3. generate all the nodes corresponding to the faces of the model
97 4. generate all the nodes corresponding to the blocks of the model
98
99 The nodes generated by the meshing of the edges are determined by the
100 discretization law associate to this edge. The coordinates of these
101 nodes are computed on the geometric edges series associate to this
102 edge. To do so/ a curvilinear abscissa is calculated and based on
103 total length of the 1D geometry associate. The geometric modeler (GEOM
104 of SALOME or CasCade) enables to compute this length.
105
106 The nodes that are generated by meshing of faces are computed in two stages:
107 1. meshing by linear approximation
108 2. refining by projection on the geometry if this geometry exists.
109
110 The meshing by linear approximation performs the three following calculations:
111
112 - computation of node coordinates according to the *i* direction taking into account the discretization law on the *j* direction
113 - computation of node coordinates according to the *j* direction taking into account the discretization law on the *i* direction
114 - the node coordinates are the coordinates of the midpoint of the segment that is formed from the two previous points
115 - if there is a projection step, then the normal at this node is computed 
116
117 The computation of the normal at a node (i,j) is performed thanks to the neighbor nodes:
118
119 - computation of the plan passing through this node and orthogonal to the straight line connecting the nodes (i-1,j) and (i,j+1)
120 - computation of the plan passing through this node and orthogonal to the straight line connecting the nodes (i-1,j) and (i,j+1)
121 - the normal passing through the intersection of the two previous plans
122
123 If the node belongs to a border, the node itself is taken to build the
124 line determining the plan which is perpendicular to it.
125
126 If there is a geometric face (or a list of faces) associate to one
127 face of the model, then an additional projection step (taking into
128 account the normal to the node of the previous step) is computed in
129 order to obtain a node on the geometric face. The coordinates of this
130 node are computed using the intersection of the normal with this face
131 (or this list of faces).
132
133 The nodes generated by the meshing of blocks are determined by the
134 algorithm << i, j, k >> included in the SMESH module of SALOME.
135
136 Examples
137 ========
138
139 Linear approximation of the discretization of faces
140 '''''''''''''''''''''''''''''''''''''''''''''''''''''
141
142 .. image:: _static/meshing1.png
143    :align: center
144
145
146 Geometric face and meshing by approximation
147 ''''''''''''''''''''''''''''''''''''''''''''
148
149 .. image:: _static/meshing2.png
150    :align: center
151
152
153 Geometric face and meshing by approximation and projection
154 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
155
156 .. image:: _static/meshing3.png
157    :align: center
158