]> SALOME platform Git repositories - modules/smesh.git/blob - doc/gui/input/1d_meshing_hypo.rst
Salome HOME
Merge branch 'V9_13_BR'
[modules/smesh.git] / doc / gui / input / 1d_meshing_hypo.rst
1 .. _a1d_meshing_hypo_page:
2
3 *********************
4 1D Meshing Hypotheses
5 *********************
6
7 Basic 1D hypothesis specifies:
8         * how a :ref:`Wire Discretization <a1d_algos_anchor>` should divide the edge;
9         * how a :ref:`Composite Side Discretization <a1d_algos_anchor>` should divide the group of C1-continuous edges.
10
11 1D hypotheses can be categorized by type of nodes distribution as follows:
12         * Uniform distribution:
13                 * :ref:`Local Length <average_length_anchor>`
14                 * :ref:`Max Size <max_length_anchor>`
15                 * :ref:`Number of Segments <number_of_segments_anchor>` with Equidistant distribution
16                 * :ref:`Automatic Length <automatic_length_anchor>`
17
18         * Constantly increasing or decreasing length of segments:
19                 * :ref:`Arithmetic Progression <arithmetic_1d_anchor>` 
20                 * :ref:`Geometric Progression <geometric_1d_anchor>`
21                 * :ref:`Start and end length <start_and_end_length_anchor>` 
22                 * :ref:`Number of Segments <number_of_segments_anchor>` with Scale distribution
23
24         * Distribution depending on curvature:
25                 * :ref:`Adaptive <adaptive_1d_anchor>` 
26                 * :ref:`Deflection <deflection_1d_anchor>` 
27
28         * Arbitrary distribution:
29                 * :ref:`Fixed Points <fixed_points_1d_anchor>` 
30                 * :ref:`Number of Segments <number_of_segments_anchor>` with :ref:`Analytic Density Distribution <analyticdensity_anchor>` or Table Density Distribution
31
32
33 .. _adaptive_1d_anchor:
34
35 Adaptive hypothesis
36 ###################
37
38 **Adaptive** hypothesis allows to split edges into segments with a length that depends on the curvature of edges and faces and is limited by **Min. Size** and **Max Size**. The length of a segment also depends on the lengths of adjacent segments (that can't differ more than twice) and on the  distance to close geometrical entities (edges and faces) to avoid creation of narrow 2D elements.
39
40         .. image:: ../images/adaptive1d.png
41                 :align: center
42
43 * **Min size** parameter limits the minimal segment size. 
44 * **Max size** parameter defines the length of segments on straight edges. 
45 * **Deflection** parameter gives maximal distance of a segment from a curved edge.
46
47         .. image:: ../images/adaptive1d_sample_mesh.png 
48                 :align: center
49
50         .. centered::
51                 Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features
52
53 **See Also** a :ref:`sample TUI Script <tui_1d_adaptive>` that uses Adaptive hypothesis.
54
55 .. _arithmetic_1d_anchor:
56
57 Arithmetic Progression hypothesis
58 #################################
59
60 **Arithmetic Progression** hypothesis allows to split edges into segments with a length that changes in arithmetic progression (Lk = Lk-1 + d) beginning from a given starting length and up to a given end length.
61
62 The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use 
63 **Add** button to add the selected edges to the list.
64
65 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
66
67
68 .. image:: ../images/a-arithmetic1d.png
69         :align: center
70
71
72 .. image:: ../images/b-ithmetic1d.png 
73         :align: center
74
75 .. centered::
76         Arithmetic Progression hypothesis - the size of mesh elements gradually increases
77
78 **See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis <tui_1d_arithmetic>` operation.  
79
80 .. _geometric_1d_anchor:
81
82 Geometric Progression hypothesis
83 ################################
84
85 **Geometric Progression** hypothesis allows splitting edges into segments with a length that changes in geometric progression (Lk = Lk-1 * d) starting from a given **Start Length** and with a given **Common Ratio**.
86
87 The splitting direction is defined by the orientation of the underlying geometrical edge.
88 **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list.
89
90 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
91
92 .. image:: ../images/a-geometric1d.png
93         :align: center
94
95 **See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis <tui_1d_arithmetic>` operation.  
96
97 .. _deflection_1d_anchor:
98
99 Deflection hypothesis
100 #####################
101
102 **Deflection** hypothesis can be applied for meshing curvilinear edges composing your geometrical object. It defines only one parameter: the value of deflection (or chord error).
103
104 A geometrical edge is divided into segments of length depending on edge curvature. The more curved the edge, the shorter the segment. Nodes on the edge are placed so that the maximum distance between the edge and a segment approximating a part of edge between two nodes should not exceed the value of deflection.
105
106 .. image:: ../images/a-deflection1d.png
107         :align: center
108
109 .. image:: ../images/b-flection1d.png 
110         :align: center
111
112 .. centered::
113         Deflection hypothesis - useful for meshing curvilinear edges
114
115 **See Also** a sample TUI Script of :ref:`Defining Deflection hypothesis <tui_deflection_1d>` operation.
116
117 .. _average_length_anchor:
118
119 Local Length hypothesis
120 #######################
121
122 **Local Length** hypothesis can be applied for meshing of edges composing your geometrical object. Definition of this hypothesis consists of setting the **length** of segments, which will approximate these edges, and the **precision** of rounding.
123
124 The **precision** parameter is used to round a *number of segments*, calculated by dividing the *edge length* by the specified **length** of segment, to the higher integer if the *remainder* exceeds the **precision** and to the lower integer otherwise. 
125 Use value 0.5 to provide rounding to the nearest integer, 1.0 for the lower integer, 0.0 for the higher integer. Default value is 1e-07.
126
127 For example: if *edge length* is 10.0 and the segment **length**
128 is 3.0 then their division gives 10./3. = 3.33(3) and the *remainder* is 0.33(3).
129 If **precision** is less than 0.33(3) then the edge is divided into 3 segments.
130 If **precision** is more than 0.33(3) then the edge is divided into 4 segments.
131
132
133 .. image:: ../images/image41.gif
134         :align: center
135
136 .. image:: ../images/a-averagelength.png
137         :align: center
138
139 .. image:: ../images/b-erage_length.png 
140         :align: center
141
142 .. centered::
143         Local Length hypothesis - all 1D mesh segments are equal
144
145 **See Also** a sample TUI Script of :ref:`Defining Local Length <tui_average_length>` hypothesis
146 operation.
147
148 .. _max_length_anchor:
149
150 Max Size
151 ########
152
153 **Max Size** hypothesis allows splitting geometrical edges into segments not longer than the given length. Definition of this hypothesis consists of setting the maximal allowed **length** of segments.
154 **Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`Ratio Bounding Box Diagonal / Max Size <diagonal_size_ratio_pref>` preference parameter.
155 **Use preestimated length** check box is enabled only if the geometrical object has been selected before hypothesis definition.
156
157 .. image:: ../images/a-maxsize1d.png
158         :align: center
159
160 .. _number_of_segments_anchor:
161
162 Number of Segments hypothesis
163 #############################
164
165 **Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`Automatic Parameters / Default Number of Segments <nb_segments_pref>` preference parameter.
166
167 The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser.
168
169 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
170
171 You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog box:
172
173 .. image:: ../images/a-nbsegments1.png
174         :align: center
175
176 **Equidistant Distribution** - all segments will have the same length, you define only the **Number of Segments**.
177
178 **Scale Distribution** - length of segments gradually changes depending on the **Scale Factor**, which is a ratio of the first segment length to the last segment length.
179
180 Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is L * (1 - A)/(1 - A**N)
181
182 .. image:: ../images/a-nbsegments2.png
183         :align: center
184
185 .. _analyticdensity_anchor:
186
187 **Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the node distribution as blue crosses.
188
189 .. image:: ../images/distributionwithanalyticdensity.png
190         :align: center
191
192 The node distribution is computed so that to have the density function integral on the range between two nodes equal for all segments.
193
194 .. image:: ../images/analyticdensity.png
195         :align: center
196
197 **Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`Distribution with Analytic Density <analyticdensity_anchor>`. You can select the **Conversion mode** from **Exponent** and **Cut negative**.
198
199 .. image:: ../images/distributionwithtabledensity.png
200         :align: center
201
202 **Beta Law Distribution** - is given by the following formula (see image below) where **t** is the position of the point in the segment [0, 1].
203
204 .. image:: ../images/nbsegment_beta_law_formula.png
205         :align: center
206
207 The beta parameter is usually set between 1.01 (narrow mesh) and 1.00001 (very narrow mesh). 
208 Values between [-1, 1] are forbidden to ensure validity of the log. 
209 Negative values are allowed and result with positions distributed in the opposite direction.
210
211 .. image:: ../images/nbsegments_beta_law_dlg.png
212         :align: center
213
214 Below is an example of **Beta Law Distribution** for a face that was done using default **Expansion coefficient** value 1.01.
215
216 .. image:: ../images/nbsegments_beta_law_example.png
217         :align: center
218
219
220 **See Also** a sample TUI Script of :ref:`Defining Number of Segments <tui_deflection_1d>` hypothesis operation.
221
222 .. note:: The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module).
223
224 .. _start_and_end_length_anchor:
225
226 Start and End Length hypothesis
227 ###############################
228
229 **Start and End Length** hypothesis allows to divide a geometrical edge into segments so that the first and the last segments have a specified length. The length of medium segments changes with automatically chosen geometric progression.
230
231 The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges, for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser.
232
233 :ref:`Helper <reversed_edges_helper_anchor>` group assists you in defining **Reversed Edges** parameter.
234
235
236 .. image:: ../images/a-startendlength.png
237         :align: center
238
239 .. image:: ../images/b-art_end_length.png 
240         :align: center
241
242 .. centered::
243          The lengths of the first and the last segment are strictly defined
244
245 **See Also** a sample TUI Script of :ref:`Defining Start and End Length <tui_start_and_end_length>` hypothesis operation.
246
247
248 .. _automatic_length_anchor:
249
250 Automatic Length
251 ################
252
253 The dialog box prompts you to define the quality of the future mesh by only one parameter, which is **Fineness**, ranging from 0 (coarse mesh, low number of segments) to 1 (extremely fine mesh, great number of segments). 
254
255 .. image:: ../images/automaticlength.png
256         :align: center
257
258 Compare one and the same object (sphere) meshed with minimum and maximum value of this parameter.
259
260 .. image:: ../images/image147.gif
261         :align: center
262  
263 .. centered::
264         Example of a rough mesh at Automatic Length Fineness of 0.
265
266 .. image:: ../images/image148.gif
267         :align: center
268  
269 .. centered::
270         Example of a fine mesh at Automatic Length Fineness of 1.
271
272 .. _fixed_points_1d_anchor:
273
274 Fixed Points hypothesis
275 #######################
276
277 **Fixed Points** hypothesis allows splitting edges through a set of points parametrized on the edge (from 1 to 0) and a number of segments for each interval limited by the points.
278
279 .. image:: ../images/hypo_fixedpnt_dlg.png
280         :align: center
281
282 It is possible to check in **Same Nb. Segments for all intervals** option and to define one value for all intervals.
283
284 The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the Object Browser.
285
286 :ref:`Helper <reversed_edges_helper_anchor>`  group assists in defining **Reversed Edges** parameter.
287
288
289 .. image:: ../images/mesh_fixedpnt.png 
290         :align: center
291
292 .. centered::
293         Example of a sub-mesh on the edge built using Fixed Points hypothesis
294
295 **See Also** a sample TUI Script of a :ref:`Defining Fixed Points <tui_fixed_points>` hypothesis operation.
296
297
298 .. _reversed_edges_helper_anchor:
299
300 Reversed Edges Helper
301 #####################
302
303 .. image:: ../images/rev_edges_helper_dlg.png
304         :align: center
305
306 **Helper** group assists in defining **Reversed Edges** parameter of the hypotheses depending on edge direction.
307
308 **Show whole geometry** check-box allows seeing the whole geometrical model in the 3D Viewer, which can help to understand the location of a set of edges within the model.
309
310 **Propagation chains** group allows defining **Reversed Edges** for splitting opposite edges of quadrilateral faces in a logically uniform direction. When this group is activated, the list is filled with propagation chains found within the shape on which a hypothesis is assigned. When a chain is selected in the list its edges are shown in the Viewer with arrows, which enables choosing a common direction for all chain edges. **Reverse** button inverts the common direction of chain edges. **Add** button is active if some edges of a chain have a different direction, so you can click **Add** button to add them to **Reversed Edges** list.
311
312 .. image:: ../images/propagation_chain.png 
313         :align: center
314
315 .. centered::
316         The whole geometry and a propagation chain
317
318 .. note:: Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`definition of a sub-mesh <constructing_submeshes_page>` on one edge of the chain and assigning a :ref:`Propagation <propagation_anchor>` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field.
319
320