2. How does HOMARD work?#
HOMARD is a software developed by EDF R&D. A presentation of it can be found on its website [bib1] and in its own documentation [bib2].
2.1. The scope of use of HOMARD#
The*Code_Aster* command that allows access to these functions is MACR_ADAP_MAIL. It is documented in [bib3].
HOMARD knows how to deal with meshes in 2 or 3 dimensions, in degree 1 or degree 2 and comprising the following elements:
mesh-dots
segments
triangles
quadrangles
tetrahedra
hexahedra
These elements may be present simultaneously. For example, HOMARD will know how to adapt a mesh with triangles and quadrangles.
The accepted nodes are obviously the nodes that are the vertices of the cells, which corresponds to the classical description « in degree 1 ». If the meshes are described « in degree 2 », that is to say with the presence of nodes in the middle of the edges, these complementary nodes are managed. On the other hand, there cannot be a cohabitation of cells described in degree 1 and cells described in degree 2. Finally, HOMARD knows how to take into account isolated nodes, which would not belong to any definition of meshes: they will emerge as they are from the adaptation process.
A particular case: pentahedra. At the date of writing this document, HOMARD knows how to deal with meshes containing pentahedra but only to do uniform refinement. Free refinement will be available at the end of 2011.
2.2. A word about the ways in which elements are divided#
It is interesting here to know how the meshes are cut in HOMARD so as not to be surprised possibly by the new mesh. We will only give an example in 2D; for the 3D, the reader will consult the HOMARD website [bib1].
Among the various possible techniques for adapting a mesh, HOMARD uses refinement and deraffination by cutting the meshes.
The standard division is the one that applies to any mesh in the heart of an area to be refined: a triangle is cut into four triangles (Figure 2.2-a) and a quadrangle is divided into four quadrangles (Figure 2.2-b). In 3 dimensions, a tetrahedron is divided into eight tetrahedra, a hexahedron into eight hexahedra, a pentahedron into eight pentahedra. Each cut is based on the middle of the edges bordering the mesh.
Figure 2.2-a : Standard division of triangles
Figure 2.2-b: Standard division of quadrangles
How does HOMARD manage compliance?
Let’s start with a situation like the one in Figure 2.2-c representing a two-dimensional mesh composed of quadrangles and triangles. The error indicator will have required refinement on the shaded areas.
Figure 2.2-c: Example of a refinement request
The strict application of the principle of cutting the meshes designated by the error indicator produces the mesh of the Figure 2.2-d:
Figure 2.2-d: Example of gross nonconformal refinement
To manage compliance, the rule is as follows:
If an uncut mesh is attacked from at least two sides, it is also cut in four;
If a mesh is attacked from one side only:
if it is a triangle, it is cut in half,
if it is a quadrangle, it is divided into three triangles
For our example, this is as follows:
Figure 2.2-e: Final compliance
Comment about the quality of the meshes resulting from cutting:
During standard slicing, the triangles produced are exactly the same as the starting triangles. There is a perfect homothety and therefore identity of the qualities of the meshes. For quadrangles, the situation is not as simple. If the quadrangle is a parallelogram, the quadrangles produced are also homothetic. So this is the case for a square or a rectangle. The mesh quality then remains the same. On the other hand, as soon as the quadrangle is random, the 4 sons never resemble the father: the quality changes.
For final compliance cuts, it is obvious that they change the quality of the stitches. An equilateral triangle will have two flattened wires; a regular tetrahedron will have tapered wires. Conversely, a triangle that is flattened and cut by its long side will have two fairly regular threads, and so on. So we have favorable situations and others that are less favorable. If we do nothing, we run the risk of seeing the quality of the mesh deteriorate. Indeed, let us imagine the case of an area where refinement indications would lead to the subdivision of a compliance triangle. After a few adaptations, the quality of the mesh would be completely degraded. HOMARD manages these difficulties using a special algorithm that ensures that the angles do not flatten out over the course of iterations. We thus limit changes in the quality level of the mesh: the quality of the mesh, at any level of adaptation, remains comparable to the quality of the initial mesh.
We refer the reader to [bib2] for a detailed description of this mesh quality analysis, illustrated by typical cases.
2.3. The different ways of adaptation#
There are several choices for controlling an adaptation through the MACR_ADAP_MAIL command documented in [bib3].
First, we find the adaptation modes that are driven by a field or the derivative of this field, for example an error indicator (keywords” RAFFINEMENT “,” DERAFFINEMENT “and” RAFF_DERA “). This field can be expressed on nodes or elements. In other words, the decision to (de) refine a mesh is taken according to the value of this field calculated previously on this mesh or on the jump of this field from one cell to its neighbors. The choice of refinement or deraffination thresholds is made in three forms:
an absolute threshold value for this field (keyword “CRIT_RAF_ABS”): we will refine all the cells where the field value is greater than this threshold value.
a relative field value (keyword “CRIT_RAF_REL”): we will refine the meshes where the field value is greater than x% of the maximum value.
a fraction of elements (keyword “CRIT_RAF_PE”): we will refine the x% of cells where the field value is the most important.
Note:
When you apply a de-refinement option, you’re just going back to previous refinements. This option should be understood as de-refinement. In particular, it will never be possible to obtain a coarser mesh than the initial mesh.
If the control field is set to the nodes, HOMARD will cut in half all the edges whose nodes have field values greater than the requested criterion.
Depending on the types of problems, one or the other of the strategies is preferable; it is the know-how specific to each discipline that makes it possible to define good practices. However, you must be careful and not ask for too much refinement when working with conformal meshes. In fact, the threshold will trigger the mandatory refinement of the designated meshes. But to ensure compliance, there will necessarily be additional refinements to connect areas at different levels. In the end, we will always have more stitches cut than those that were originally requested. Experience has shown us that it is more effective for the precision of the solution to chain 3 refinements in a row by asking to refine 1% of the meshes rather than to do only one refinement by requiring 5%.
Second, it is possible to decide to refine the mesh in geometric areas defined by boxes (keyword “RAFF_DERA_ZONE”). All the stitches where one of the knots is present in one of these boxes will be refined. This allows refinements to be made a priori, without having done any calculations. The areas are 2D rectangles or circles, parallelepipeds, or 3D spheres. It is possible to define several boxes, which may or may not be superimposed.
Finally, it is possible to activate a uniform adaptation of a mesh (keyword “RAFFINEMENT_UNIFORME” and “DERAFFINEMENT_UNIFORME”). In other words, all the meshes in the mesh are treated in the same way, without taking into account a field that serves as a criterion for (de) refining.
Note:
The characteristics of the meshes are preserved: a mesh that is cut transmits to its daughters its properties of orientation or belonging to sub-domains. This is especially true for the dashboards that are used to apply loads: the group that defines them is restored and there is no need to reorient them
2.4. Other possible options#
The various options that can be activated in MACR_ADAP_MAIL:
HOMARD updates real fields from the old to the new mesh when they are defined on the nodes (MAJ_CHAM keyword). This makes it possible, during a transitory calculation, to start from the solution previously calculated but expressed on the new mesh. In general, it is also recommended to update the fields via HOMARD rather than projecting them from one mesh onto another then in the calculation software. In fact, HOMARD remembers the parentage of all the knots and meshes: it will therefore only do the calculations that are strictly necessary and only through analytical formulas. Currently, you cannot update fields at Gauss points (such as internal variables for example).
HOMARD has mesh analysis functions: connectivity (the software provides information on the number of disjoint blocks that form the global mesh), size (calculation of the sizes of the various 1D, 2D or 3D sub-domains), quality (determination of the quality of 2D or 3D elements, determination of the quality of 2D or 3D elements, extreme values and distribution), interpenetration (control of the non-overlap of elements). These functions can be activated during an adaptation. They can also be used without any adaptation to check a mesh. They help the user to verify that the mesh is correct and to identify errors in its creation. These features on mesh quality can be found in command MACR_INFO_MAIL [bib4].
The user has the possibility to track borders (keywords MAILLAGE_FRONTIERE and/or FRONTIERE_ANALYTIQUE). If one of the boundaries of the computing domain is curved and a mesh touching this border is refined, HOMARD will know how to place the new nodes on the « real » edge. This option makes it possible to « erase » the geometric particularities as they are cut (see example of the rotor in paragraph 6).
When you adapt a mesh to degree 2 using the command MACR_ADAP_MAIL, you produce the new mesh in degree 2 at the output. Optionally (keyword MAILLAGE_NP1_ANNEXE), the same mesh will also be produced in degree 1. This option is interesting during a thermomechanical calculation where a linear mesh in thermal and quadratic in mechanics is recommended.
The keywords NIVE_MAX and NIVE_MIN make it possible to control the maximum level of refinement, respectively of deraffination, of a mesh during the adaptation process.
The DIAM_MIN keyword allows you to control the minimum size of a mesh during the adaptation process.