Salome HOME
Allow creating smeshBuilder before geomBuilder
[modules/smesh.git] / doc / salome / gui / SMESH / input / 2d_meshing_hypo.rst
1 .. _a2d_meshing_hypo_page:
2
3 *********************
4 2D Meshing Hypotheses
5 *********************
6
7 - :ref:`max_element_area_anchor`
8 - :ref:`length_from_edges_anchor`
9 - :ref:`hypo_quad_params_anchor`
10
11 .. _max_element_area_anchor:
12
13 Max Element Area
14 ################
15
16 **Max Element Area** hypothesis is applied for meshing of faces composing your geometrical object. Definition of this hypothesis consists of setting the **maximum area** of mesh faces, which will compose the mesh of these faces.
17
18 .. image:: ../images/a-maxelarea.png
19         :align: center
20
21 |    
22
23 .. image:: ../images/max_el_area.png 
24         :align: center
25
26 .. centered::
27         In this example, Max. element area is very small compared to the 1D hypothesis
28
29 **See Also** a sample TUI Script of :ref:`tui_max_element_area` hypothesis operation. 
30
31 .. _length_from_edges_anchor:
32
33 Length from Edges
34 #################
35
36 **Length from edges** hypothesis defines the maximum linear size of mesh faces as an average length of mesh edges approximating the meshed face boundary.
37
38 **See Also** a sample TUI Script of :ref:`tui_length_from_edges` hypothesis operation.
39
40 .. _hypo_quad_params_anchor:
41
42 Quadrangle parameters
43 #####################
44
45 .. image:: ../images/ hypo_quad_params_dialog.png 
46         :align: center
47
48 .. centered::
49         Quadrangle parameters: Transition
50
51 **Quadrangle parameters** is a hypothesis for :ref:`quad_ijk_algo_page`.
52
53 **Transition** tab is used to define the algorithm of transition between opposite sides of the face with a different number of segments on them. The following types of transition algorithms are available:
54
55 * **Standard** is the default case, when both triangles and quadrangles are possible in the transition area along the finer meshed sides.
56 * **Triangle preference** forces building only triangles in the transition area along the finer meshed sides.
57
58   .. note:: This type corresponds to **Triangle Preference** additional hypothesis, which is obsolete now.
59
60 * **Quadrangle preference** forces building only quadrangles in the transition area along the finer meshed sides. This hypothesis has a restriction: the total quantity of segments on all four face sides must be even (divisible by 2).
61
62   .. note:: This type corresponds to **Quadrangle Preference** additional hypothesis, which is obsolete now.
63
64 * **Quadrangle preference (reversed)** works in the same way and with the same restriction as **Quadrangle preference**, but the transition area is located along the coarser meshed sides.
65 * **Reduced** type forces building only quadrangles and the transition between the sides is made gradually, layer by layer. This type has a limitation on the number of segments: one pair of opposite sides must have the same number of segments, the other pair must have an even total number of segments. In addition, the number of rows between sides with different discretization should be enough for the transition. Following the fastest transition pattern, three segments become one (see the image below), hence the least number of face rows needed to reduce from Nmax segments to Nmin segments is log<sub>3</sub>( Nmax / Nmin ). The number of face rows is equal to the number of segments on each of equally discretized sides.
66
67 .. image:: ../images/ reduce_three_to_one.png 
68         :align: center
69
70 .. centered::
71         The fastest transition pattern: 3 to 1
72
73 **Base vertex** tab allows using Quadrangle: Mapping algorithm for meshing of trilateral faces. In this case it is necessary to select the vertex, which will be used as the forth degenerated side of quadrangle.
74
75 .. image:: ../images/ hypo_quad_params_dialog_vert.png 
76         :align: center
77
78 .. centered::
79         Quadrangle parameters: Base Vertex
80
81 .. image:: ../images/ hypo_quad_params_1.png 
82         :align: center
83
84 .. centered::
85         A face built from 3 edges
86
87 .. image:: ../images/ hypo_quad_params_res.png 
88         :align: center
89
90 .. centered::
91         The resulting mesh
92
93 This parameter can be also used to mesh a segment of a circular face. Please, consider that there is a limitation on the selection of the vertex for the faces built with the angle > 180 degrees (see the picture).
94
95 .. image:: ../images/ hypo_quad_params_2.png 
96         :align: center
97
98 .. centered:: 
99         3/4 of a circular face
100
101 In this case, selection of a wrong vertex for the **Base vertex** parameter will generate a wrong mesh. The picture below shows the good (left) and the bad (right) results of meshing.
102
103 .. image:: ../images/ hypo_quad_params_res_2.png 
104         :align: center
105
106 .. centered::
107         The resulting meshes
108
109 .. image:: ../images/ hypo_quad_params_dialog_enf.png 
110         :align: center
111
112 .. centered::
113         Quadrangle parameters: Enforced nodes
114
115 **Enforced nodes** tab allows defining points, where the algorithm should create nodes. There are two ways to define positions of the enforced nodes.
116
117 * **Vertices** group allows to set up shapes whose vertices will  define positions of the enforced nodes. Only vertices successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes.
118 * **Points** group allows to explicitly define coordinates of points used to create the enforced nodes. Only points successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes.
119
120 ..  note::
121         **Enforced nodes** cannot be created at **Reduced** transition type.
122
123 Let us see how the algorithm works:
124
125 * Initially positions of nodes are computed without taking into account the enforced vertex (yellow point). 
126
127 .. image:: ../images/ hypo_quad_params_enfnodes_algo1.png
128         :align: center
129
130 .. centered::
131         Initial mesh
132
133 * Then the node closest to the enforced vertex is detected. Extreme nodes of the row and column of the detected node are used to create virtual edges (yellow lines) ending at the enforced vertex. 
134
135         .. image:: ../images/ hypo_quad_params_enfnodes_algo2.png
136                 :align: center
137         .. centered::
138                  Creation of virtual edges
139         
140 * Consequently, the meshed face is divided by the virtual edges into four quadrilateral sub-domains each of which is meshed as usually: the nodes of the row and column of the detected node are moved to the virtual edges and the quadrilateral elements are constructed. 
141         
142         .. image:: ../images/ hypo_quad_params_enfnodes_algo3.png 
143                 :align: center
144         
145         .. centered::
146                 Final mesh
147
148
149 If there are several enforced vertices, the algorithm is applied recursively to the formed sub-domains.
150
151 **See Also** a sample TUI Script of a :ref:`Quadrangle Parameters <tui_quadrangle_parameters>` hypothesis.
152