Salome HOME
dae274524c680fc16dc57c43c4a403f73330e062
[modules/homard.git] / doc / en / intro.rst
1 .. _intro:
2
3 Introduction
4 ############
5
6 General presentation
7 ********************
8 The software HOMARD is intended to adapt the meshes within the framework of the computer codes by finite elements or finite volumes. This software, carried out by EDF R&D, proceeds by refinement and unefinement of the two-dimensional or three-dimensional meshes. It is conceived to be used independently of the computer code with which it is coupled.
9
10 To refine the mesh means to cut out elements indicated according to indications provided by the user. Unrefine the mesh means to reconsider behind cuttings previously carried out: thus, to in no case HOMARD cannot simplify an existing mesh which will have been created too fine. Unrefinement takes all its importance in calculations when the zone of interest moves during calculation: one will not hold any more account of refinements previously carried out and which become useless. One will find of it an illustration with the bottom of this page.
11
12 HOMARD can treat meshes into 2 or 3 dimensions and comprising the following elements:
13    - mesh-points
14    - segments
15    - triangles
16    - quadrangles
17    - tetrahedra
18    - hexahaedra
19    - prisms
20
21 These elements can be present simultaneously. For example, HOMARD will be able to adapt a comprising mesh of the triangles and the quadrangles.
22 The accepted nodes are obviously the nodes which are the vertices of the elements, which corresponds to a traditional description "in degree 1". If the elements are described "in degree 2", the additional nodes are managed. On the other hand, elements described in degree 1 and others described in degree 2 cannot be inthe same mesh. Lastly, HOMARD can take into account isolated nodes, which would not belong to any definition of elements: they will arise such as they are from the process of adaptation.
23
24 The case of the pyramids is except for. For a comprising mesh of the hexahedrons or the prisms, the setting in conformity of the mesh resulting from refinement creates pyramids to ensure the connection between two areas of different levels of refinement. These pyramids are managed like all the elements of transition and are no more split thereafter. On the other hand, if the initial mesh contains pyramids, HOMARD will not be able to adapt it and will transmit an error message. In certain typical cases, one will be able nevertheless to treat such a mesh, as it is described in the heading advanced options of the creation of a case.
25
26 Several motivations appear to adapt a mesh:
27
28   - one wants to simplify the realization of the mesh of a complex geometry: one starts from a coarse mesh and one entrusts to an automatic process the load to refine it.
29   - one wants to make sure of the convergence of the numerical solution: rather than to realize with the hand of the increasingly fine meshs, one lets the software seek itself the places where it would be necessary to refine the mesh to increase the precision of the result.
30   - the conditions of calculation change during time: the zones which must be with a mesh finely move. If the mesh is fine everywhere as of the beginning, the mesh is too large. While adapting progressively, the mesh will be fine only at the places necessary: its size will be reduced and the quality of the solution will be good.
31
32 In all the cases, the principle of the adaptation of mesh remains the same one. On the starting mesh, one carries out standard calculation. With an analysis of the numerical solution obtained, one estimates the error which was made compared to the real solution. This estimate is represented by a value of indicator of error in each element of calculation. From there, the following principle is applied: the elements where the indicator of error is strong should be smaller and, reciprocally, the elements where the indicator of error is low could be larger. With this information, one feeds HOMARD which will modify the mesh consequently. On the new mesh, calculation then will be started again.
33
34 Broadly speaking, an iteration for meshing adaptation is as shown on the figure below. The finite element software calculates the numerical solution on meshing Mk, then, from that, deduces the values for the error indicator over the whole meshing. Based on the knowledge of meshing #k and indicator #k, HOMARD generates a new meshing #k+1.
35
36 .. image:: images/intro_1.png
37    :align: center
38
39 The complete chain starts from the initial meshing, then incorporates successive links (calculation of indicator / adaptation).
40
41 .. image:: ../images/intro_2.png
42    :align: center
43
44 Some variations may exist. If no error indicator is available, another field can be used to drive the adaptation. A stress field in mechanics can be used: the refinement of the elements where the stress is high is often efficient to improve the quality of the results. It is also possible to drive the adaptation according the variation of a field from one element to its neighbours. The refinement can be filtered by zones or groups of elements.
45
46 .. note::
47   For a extensive description of HOMARD, see :download:`Description of HOMARD <../files/HOMARD_0.pdf>`.
48
49 .. note::
50   To quote HOMARD, please refer to:
51
52   G. Nicolas and T. Fouquet, Adaptive Mesh Refinement for Conformal Hexahedral Meshes, "*Finite Elements in Analysis and Design*", Vol. 67, pp. 1-12, 2013, doi:10.1016/j.finel.2012.11.008
53
54   `Available here <http://dx.doi.org/10.1016/j.finel.2012.11.008>`_
55
56 .. index:: single: YACS
57
58 .. note::
59   This alternation (computation/adaptation) suits in the :ref:`yacs` schemes.
60
61
62 Methods for splitting the elements
63 **********************************
64 .. index:: single: splitting
65 .. index:: single: conformity
66
67 All in all, the process of meshing adaptation by splitting element is a two-tier process. First, all element specified by the error indicator are split. The resulting meshing is uncorrect : nodes are pending at the junction between areas to be refined, and an area to be retained. The second stage aims at solving all of these conformity problems.
68
69 There are different splitting methods for the two phases. During the first phase, all of the element are split in the same manner ; this is the so-called standard splitting. During the second phase, some of the meshing conformity conflicts in the junction area are settled by the same standard splitting of element, while others are settled by special splitting.
70
71 The various splitting modes have been choosen to preserve the mesh quality, all along the adaptive process.
72
73 Standard splitting
74 ==================
75 Standard element splitting is carried out with a view to restricting the number of cases. Thus, edges are split into two equal sections.
76
77 To split a triangle, the three edges are split into two sections each, thus producing four similar triangles. They retain the same quality.
78
79 .. image:: ../images/dec_tria_1.gif
80    :align: center
81    :alt: Découpage standard d'un triangle
82    :width: 399
83    :height: 88
84
85 To split a quadrangle, the four edges are split into two sections each, thus producing four non-similar quadrangles with different quality.
86
87 .. image:: ../images/dec_quad_1.png
88    :align: center
89    :alt: Découpage standard d'un quadrangle
90    :width: 399
91
92 Tetrahedrons are split in eight. First, each of the triangular faces is split into 4 similar triangular faces.
93
94 .. image:: ../images/dec_tetr_1.gif
95    :align: center
96    :alt: Découpage standard d'un tétraèdre - 1
97    :width: 328
98    :height: 115
99
100 Face splitting produces four tetrahedrons at the angles of the initial tetrahedron. It should be noted that the four new tetrahedrons are homothetic to the initial tetrahedron. Therefore, they retain the same qualities.
101
102 .. image:: ../images/dec_tetr_2.gif
103    :align: center
104    :alt: Découpage standard d'un tétraèdre - 2
105    :width: 201
106    :height: 159
107
108 At the core of the tetrahedron, there remains a block shaped like two pyramids joined at their bases. An edge is generated using one of the three possible diagonals, then the four faces containing the edge, and two external edges.
109
110 .. image:: ../images/dec_tetr_3.gif
111    :align: center
112    :alt: Découpage standard d'un tétraèdre - 3
113    :width: 244
114    :height: 74
115
116 This, in turn, creates 4 new tetrahedrons. It should be noted that they are similar two by two but that they can never be similar to the initial tetrahedron. They can therefore never have the same quality as the initial tetrahedron. However, different results are obtained, depending on the diagonal selected for splitting the internal pyramidal block. Where quality is concerned, it is always best to select the smallest of the three possible diagonals.
117
118 .. image:: ../images/dec_tetr_4.gif
119    :align: center
120    :alt: Découpage standard d'un tétraèdre - 4
121    :width: 229
122    :height: 116
123
124 Hexaedrons are split in eight. Each of the quadrangular faces is split into 4 quadrangular faces. Edges are created connecting each centre of opposite faces. This generates a new point located at the centre of the hexaedron.
125
126 .. image:: ../images/dec_hex.png
127    :align: center
128    :alt: Découpage standard d'un hexaèdre
129    :scale: 70
130
131 Pentaedrons are split in eight. Each of the quadrangular faces is split into 4 quadrangular faces and the two triangles are split into 4. Edges are created connecting each centre of quadrangular faces. Those 3 edges create 4 triangles at the centre of the pentaedron. Six quandrangular faces are created to complete the construction of the height pentaedrons.
132
133 .. image:: ../images/dec.pent.png
134    :align: center
135    :alt: Découpage standard d'un pentaèdre
136    :scale: 20
137
138 Splitting for the conformity
139 ============================
140
141 Splitting for conformity is applicable to the elements at the interface between two different levels of refinement. Such splitting may produce element of lower quality compared to the initial element, and in the general algorithm, one sees how this drawback is reckoned with to reduce its consequences.
142
143 For triangles, one of the three edges is split in two. Its middle is joined to the opposite vertex to form two additional triangles.
144
145 .. image:: ../images/dec_tria_2.gif
146    :align: center
147    :alt: Découpage de conformité d'un triangle
148    :width: 399
149    :height: 88
150
151 For quadrangles, one of the four edges is split in two. Its middle is joined to the opposite vertex to form three triangles. The mesh obtained is then mixed.
152
153 .. image:: ../images/dec_quad_2.png
154    :align: center
155    :alt: Découpage de conformité d'un quadrangle
156    :width: 399
157
158 For a tetrahedron with three split edges, this is possible only if the edges are concurrent. Therefore, one of the four faces is split in four. The middles of the split edges are joined to the opposite vertexes. The three other faces are thus split in two, and four tetrahedrons are created.
159
160 .. image:: ../images/dec_tetr_5.gif
161    :align: center
162    :alt: Découpage de conformité d'un tétraèdre - 1
163    :width: 116
164    :height: 116
165
166 For a tetrahedron with two split edges, this is possible only if the edges are opposite. All the middles of these edges are joined to the other apexes, as well as the edge middles. The four faces are split in two, and four tetrahedrons are created.
167
168 .. image:: ../images/dec_tetr_6.gif
169    :align: center
170    :alt: Découpage de conformité d'un tétraèdre - 2
171    :width: 116
172    :height: 116
173
174 For a tetrahedron with one split edge, the middle of the split edge is joined to the opposite apex, and two tetrahedrons are created.
175
176 .. image:: ../images/dec_tetr_7.gif
177    :align: center
178    :alt: Découpage de conformité d'un tétraèdre - 3
179    :width: 116
180    :height: 116
181
182 The conformal strategy for the hexaedrons is based on tetraedrons and pyramids. The situation depends on the number of non conformities.
183
184 For an hexaedron with one face cut, we create 4 edges, 4 tetraedrons and 5 pyramids.
185
186 .. image:: ../images/hexaface.png
187    :align: center
188    :alt: Découpage de conformité d'un hexaèdre - 1 face
189    :width: 384
190    :height: 101
191
192 For an hexaedron with only one edge cut, we create deux internal edges and four pyramids.
193
194 .. image:: ../images/hexa1arete.png
195    :align: center
196    :alt: Découpage de conformité d'un hexaèdre - 1 arête
197    :width: 384
198    :height: 101
199
200 For an hexaedron with two edges cut, we create one central point 10 edges, 12 tetraedrons and 2 pyramids.
201
202 .. image:: ../images/hexa2aretes.png
203    :align: center
204    :alt: Découpage de conformité d'un hexaèdre - 2 arêtes
205    :width: 384
206    :height: 101
207
208 For an hexaedron with three edges cut, we create one central point, 11 edges and 18 tetraedrons.
209
210 .. image:: ../images/hexa3aretes.png
211    :align: center
212    :alt: Découpage de conformité d'un hexaèdre - 3 arêtes
213    :width: 384
214    :height: 101
215
216
217
218 Algorithm
219 *********
220 .. index:: single: algorithm
221
222 The strategy adopted for the algorithm in HOMARD consists in forcing splitting in four for all faces with two hanging nodes. Eventually, only the faces with non conformity points are faces where one and only edge is split. The simplest possible solution is thus used for conformity as seen before. The latter stage of conformity introduces element of modified quality compared to that of the element it originated from. This drawback remains under control as we have chosen to grant a temporary status to the conformity element: they exist to produce a meshing acceptable by the calculation softwares, but they disappear if they are required to be further split. As a consequence, quality loss does not propagate along iterations of meshing adaptation, and remains restricted in value as well as in number of element concerned.
223
224 The algorithm is:
225
226    * Transfer of refining or coarsening indications over element into decisions to split or group edges, triangles and quadrangles.
227    * Removal of temporary compliance element.
228    * By considering all triangles and quadrangles from the lowest splitting level to the highest splitting level, conflict solving on coarsening using the basic rules.
229    * By considering all triangles and quadrangles from the lowest splitting level to the highest splitting level, conflict solving on refining using the basic rules.
230    * Effective generation of new meshing : standard splitting, compliance tracking.
231
232
233 Some illustrations of adapted meshes
234 ************************************
235 .. index:: single: illustration
236
237 Some examples of use cases can be found in the web page of `HOMARD <http://www.code-aster.org/outils/homard/en/applications.html>`_
238
239 +---------------------------------------------------------------+
240 +---------------------------------------------------------------+
241 |                                                               |
242 | .. image:: ../images/intro_3.png                              |
243 |    :align: center                                             |
244 |                                                               |
245 +---------------------------------------------------------------+
246 |                                                               |
247 | .. image:: ../images/intro_4.png                              |
248 |    :align: center                                             |
249 |                                                               |
250 +---------------------------------------------------------------+
251 |                                                               |
252 | .. image:: ../images/intro_5.png                              |
253 |    :align: center                                             |
254 |                                                               |
255 +---------------------------------------------------------------+
256 |                                                               |
257 | .. image:: ../images/intro_6.png                              |
258 |    :align: center                                             |
259 |                                                               |
260 +---------------------------------------------------------------+
261 |                                                               |
262 | .. image:: ../images/intro_7.png                              |
263 |    :align: center                                             |
264 |                                                               |
265 +---------------------------------------------------------------+
266 |                                                               |
267 | .. image:: ../images/intro_8.gif                              |
268 |    :align: center                                             |
269 |                                                               |
270 +---------------------------------------------------------------+
271