Salome HOME
Be able to use library by setting MG_Hybrid_Parameters.SetToUseLibrary(True)
[plugins/hybridplugin.git] / doc / salome / gui / HYBRIDPLUGIN / input / hybrid_hypo.doc
1 /*!
2
3 \page hybrid_hypo_page HYBRID Parameters hypothesis
4
5 \anchor hybrid_top
6 HYBRID Parameters hypothesis works only with <b>MeshGems-Hybrid</b> 
7 algorithm. This algorithm is a commercial software.
8
9 To get a license, visit https://www.spatial.com/products/3d-precise-mesh
10
11 \tableofcontents
12
13 \section hybrid_general_parameters General parameters
14
15 MG-Hybrid allows to generate meshes with:
16 - tetrahedral or hexahedral elements for the main core of the shape,
17 - prismatic layers (prisms or hexahedra) depending on the surface mesh (triangles or quadrangles)
18 - pyramids doing the junction if needed between tetrahedra (or prisms) and hexahedra.
19
20 \image html hybrid_tetra_dominant.png "Tetra dominant"
21
22 \image html hybrid_hexa_dominant.png "Hexa dominant"
23
24 \image html hybrid_cartesian_core.png "Cartesian core"
25
26 \image html hybrid_hypothesis_arguments.png "Hybrid arguments"
27
28 - <b>Number of boundary layers</b> - Sets the number of boundary layers to add.
29
30 - <b>Size mode</b> - Define where to sets the boundary layers:
31
32   - <b>Global</b> - Define the layers on all the faces
33
34   - <b>Local</b> - Define the layers on selected faces. To be selected on the tab <b>Faces with layers</b>
35
36 - <b>Height of first layer</b> - Define the height of the first layer
37
38 - <b>Height relative to local surface</b> - If set to yes, the given size is relative to the surface size
39
40 - <b>Growth of boundary layers</b> - Define if the boundary layers will be added inside the domain (<b>Downward growth</b>) or outside the domain (<b>Upward growth</b>).
41
42 - <b>Maximal element angle (degrees)</b> - Sets the maximum internal angles of elements (in degree).
43 This setting applies to the boundary layer elements only.
44
45 - <b>Geometric progression</b> - Sets the geometric progression for all the boundary layer growths.
46
47 - <b>Imprinting</b> - If set to yes, allows to define where the boundary layers will be imprinted (the inlets and oulets in a CFD study). These faces are to be selected in the <b>Faces with imprinting</b> tab.
48
49 - <b>Snapping</b> - If set to yes, allows to define where the boundary layers are already imprinted on the 2D mesh (the inlets and oulets in a CFD study). These faces are to be selected in the <b>Faces with snapping</b> tab.
50
51 \ref hybrid_top "Back to top"
52
53 \section hybrid_advanced_parameters Advanced parameters
54
55 \image html hybrid_hypothesis_advanced.png
56
57 \subsection advanced_meshing_options Advanced meshing options
58
59 - A table allows to input in the command line any text
60   for hybrid argument from "mg-hybrid.exe help", and future advanced options... <br>
61 <b>Add option</b> - adds a line to the table where you can type an option and its value as text.
62 A check box in the first column activates/deactivates the option of the current row. A deactivated option will be erased upon pressing \a Ok.
63
64 - <b>Add multi normals</b> - Add extra normals at opening ridges and
65 corners.
66
67 - <b>Collision mode</b> - Sets the behavior in case of collision between layers.
68
69   - <b>decrease</b> - keeps the number of desired layer but decreases the height of the layers to
70              avoid any collision
71
72   - <b>stop</b> - stops locally the generation of layers to avoid collisions; the number of
73              generated layers may differ from the specified desired number
74
75 - <b>Gradation</b> - Sets the desired maximum ratio between 2 adjacent edges.
76   It applies only to the edges which belong to the tetrahedra.
77
78 - <b>Maximum number of threads</b> - Sets the maximum number of threads to be used in parallel.
79
80 - <b>Multi normal angle threshold</b> - Set the maximum angle (in
81   degrees) between the multiple normals at opening ridges.
82
83 - <b>Smooth normals</b> - Smooth normals at closed ridges and corners.
84
85 \subsection log Logs and debug
86
87 - <b>Working directory</b> - allows defining the folder for input and output
88 files of hybrid software, which are the files starting with "HYBRID_" prefix.
89
90 - <b>Verbose level</b> - to choose verbosity level in the range from
91 0 to 10.
92
93   - 0, no standard output,
94
95   - 2, prints the data, quality statistics of the skin and final
96   meshes and indicates when the final mesh is being saved. In addition
97   the software gives indication regarding the CPU time.
98
99   - 10, same as 2 plus the main steps in the computation, quality
100   statistics histogram of the skin mesh, quality statistics histogram
101   together with the characteristics of the final mesh.
102
103 - <b>Print log in a file</b> - if this option is checked on the log is printed in a
104 file placed in the working directory, otherwise it is printed on the standard output.
105
106 - <b>Remove log on success</b> - if this option is checked on the log file is kept only
107 if an error occurs during the computation. This option is only available if <b>Print log in a file</b>
108 is enabled (there must be a log file to delete it) and <b>Keep all working files</b> is disabled
109 (in this case the log file is always kept).
110
111 - <b>Keep all working files</b> - allows checking input and output files
112 of hybrid software, while usually these files are removed after the
113 launch of the mesher. The log file (if any) is also kept if this option is checked.
114
115 - <b>Use library</b> - allows to call MG-Hybrid by library instead of executable.
116 You can also set the environment variable <b>MG_HYBRID_USE_LIB</b> to change this default behaviour.
117
118 \ref hybrid_top "Back to top"
119
120 \section hybrid_layers_faces Faces with layers
121
122 \image html hybrid_hypothesis_layers.png
123
124 In case of a mesh based on geometry, if <b>Size mode</b> is set to
125 <b>Local</b>, this tab becomes activated. You can specify geometrical
126 faces on which boundary layers should be constructed (i.e. corresponding to the walls in a CFD study).
127 After clicking
128 \a Selection button (arrow) you can select faces either in the
129 Viewer or in the Object Browser. \b Add button adds IDs of the
130 selected faces to the <b>Face IDs</b> list. \b Remove button removes
131 selected IDs from the list.
132
133 \section hybrid_layers_faces Faces with imprinting
134
135 \image html hybrid_hypothesis_imprinting.png
136
137 If *Imprinting* is set to yes, this tab becomes activated. You can select the faces
138 where the layers will be imprinted (i.e. corresponding to the inlets and outlets in a CFD study).
139
140 \section hybrid_layers_faces Faces with snapping
141
142 \image html hybrid_hypothesis_snapping.png
143
144 Instead of letting MG-Hybrid do the imprinting on faces, you can tell to use existing faces where
145 cells corresponding to the imprinting are already present (created by the surface mesh generation
146 with dedicated algorithms).
147
148 <br><b>See Also</b> a sample TUI Script of the \ref tui_hybrid "creation of a MG-Hybrid hypothesis".
149
150 \ref hybrid_top "Back to top"
151
152 \section hybrid_all_parameters All MG-hybrid parameters
153
154 - <b>Hybrid parameters</b> - See documentation in $MESHGEMS_ROOT_DIR/Docs/mg-hybrid_user_manual.pdf
155 or MG-Hybrid help command:
156
157 \verbatim
158
159 $> mg-hybrid.exe --help
160
161     ============================================
162     MG-Hybrid -- MeshGems 2.15-1 (January, 2023)
163     ============================================
164
165
166         Running MG-Hybrid (Copyright 2014-2023 by Dassault Systemes SE)
167            date of run: 06-Jun-2024 AT 13:13:22
168            running on : Linux 5.11.12-300.fc34.x86_64 x86_64
169            using modules: 
170                 MeshGems-Core 2.15-1
171
172         MeshGems is a commercial trademark of Dassault Systemes SE
173
174
175
176 MG-HYBRID USAGE
177     mg-hybrid.exe [-h] [-v <verbose>] [-i <filein>] [-o <fileout>] \
178         [--global_physical_size <size>] \
179         [--max_number_of_threads <maxthreads>] \
180         [--boundary_layer_size_mode <mode>] \
181         [--boundary_layer_height_relative_to_local_surface_size <yes|no>] \
182         [--number_of_boundary_layers <number>] \
183         [--boundary_layer_global_initial_height <height>] \
184         [--boundary_layer_surface_tags <list>] \
185         [--boundary_layer_initial_height_on_surface_tags <list>] \
186         [--boundary_layer_geometric_progression <real>] \
187         [--boundary_layer_max_element_angle <size>] \
188         [--boundary_layer_imprinting <boolean>] \
189         [--boundary_layer_imprinting_tags <list>] \
190         [--boundary_layer_snapping <boolean>] \
191         [--boundary_layer_snapping_tags <list>] [--normal_direction <dir>] \
192         [--gradation <real>] [--element_generation <type>] \
193         [--collision_mode <mode>] [--add_multinormals <yes|no>] \
194         [--multinormal_angle_threshold <angle>] [--smooth_normals <yes|no>] \
195         [--optimisation <type>]
196
197   -h --help
198           prints this help.
199
200   -v --verbose <verbose>
201           Sets the verbosity level parameter.
202           The <verbose> parameter must be in the range 0 to 10:
203             0 : no detail
204             10 : very detailed
205           Default: 3
206
207   -i --in <filein>
208           Sets the input file.
209           (MANDATORY)
210
211   -o --out <fileout>
212           Sets the output file.
213           If unset, _hybrid is appended to the input file basename.
214           Using an existing file is forbidden.
215           Using the same file as --in is forbidden.
216
217      --global_physical_size <size>
218           Sets the global physical size.
219           Default: no default.
220
221      --max_number_of_threads <maxthreads>
222           Sets the maximum number of threads to be used in parallel.
223           Default: 4
224
225      --boundary_layer_size_mode <mode>
226           Sets the behavior for the boundary layer sizes.
227           If <mode> is:
228             global: the boundary_layer_global_initial_height is used to compute
229              the layer heights
230             local: the boundary_layer_surface_tags and
231              boundary_layer_initial_height_on_surface_tags are used to compute
232              the layer heights
233           Default: global
234
235      --boundary_layer_height_relative_to_local_surface_size <yes|no>
236           If set to yes, the given sizes are relative to the surface size
237           Default: no
238
239      --number_of_boundary_layers <number>
240           Sets the number of boundary layers.
241           Default: 0
242
243      --boundary_layer_global_initial_height <height>
244           Sets the height of the first layer.
245
246      --boundary_layer_surface_tags <list>
247           Comma separated list of surface references to be used to grow
248           boundary layers.
249
250      --boundary_layer_initial_height_on_surface_tags <list>
251           Comma separated list of initial heights to be used to grow boundary
252           layers.
253
254      --boundary_layer_geometric_progression <real>
255           Sets the geometric progression for all the boundary layer growths
256           (position of layer number i is h * g^(i-1)).
257           Default: 1.0
258
259      --boundary_layer_max_element_angle <size>
260           Sets the maximum internal angles of elements (in degree). This
261           setting applies to the boundary layer elements only.
262           Default: 165.
263
264      --boundary_layer_imprinting <boolean>
265           Activates the imprinting of the boundary layers. The parts of the
266           surface where the layers have to be imprinted are defined through the
267           option --boundary_layer_imprinting_tags
268           Default: no imprinting
269
270      --boundary_layer_imprinting_tags <list>
271           Comma separated list of surface references that have to be imprinted
272           by boundary layers.
273
274      --boundary_layer_snapping <boolean>
275           Activates the snapping of the generated boundary layers on the
276           surface. The parts of the surface where the layers have to be snapped
277           into are defined through the option --boundary_layer_snapping_tags
278           Default: no snapping
279
280      --boundary_layer_snapping_tags <list>
281           Comma separated list of surface references that are imprinted by
282           boundary layers.
283
284      --normal_direction <dir>
285           Specifies whether mg-hybrid should use the surface normals or the
286           inverse of the surface normals.
287           if <dir> is:
288              1 : means the layers grow in the same direction as the normals to
289              the surface
290             -1 : means the layers grow in the opposite direction to the normals
291              of the surface
292           Default: 1
293
294      --gradation <real>
295           Sets the desired maximum ratio between 2 adjacent edges. It applies
296           only to the edges which belong to the tetrahedra.
297           Default: 2.0
298
299      --element_generation <type>
300           Sets the element type for the mesh generation.
301           If <type> is:
302             tetra_dominant : prismatic or hexahedral elements in the boundary
303              layers, tetrahedra in the remaining volume
304             hexa_dominant : prismatic or hexahedral elements in the boundary
305              layers, mixture of hexahedra and tetrahedra in the remaining
306              volume
307             cartesian_core : cartesian hexa core with tetrahedra and pyramids
308              in the remaining volume
309             extrusion_only : only prismatic or hexahedral elements near the
310              boundary are generated. The remaining volume is not filled.
311           Default: tetra_dominant
312
313      --collision_mode <mode>
314           Sets the behavior in case of collision between layers.
315           If <mode> is:
316             decrease : keeps the number of desired layer but decreases the
317              height of the layers to avoid any collision
318             stop : stops locally the generation of layers to avoid collisions;
319              the number of generated layers may differ from the specified
320              desired number
321           Default: stop
322
323      --add_multinormals <yes|no>
324           Add extra normals at opening ridges and corners.
325           Default: no
326
327      --multinormal_angle_threshold <angle>
328           Set the maximum angle between the multiple normals at opening ridges.
329           Default: 30
330
331      --smooth_normals <yes|no>
332           Smooth normals at closed ridges and corners.
333           Default: no
334
335      --optimisation <type>
336           sets the optimisation type.
337           If <type> is:
338               no : no optimisation is applied
339              yes : optimisation is performed upon mesh generation 
340             only : only optimisation is performed to an existing volume mesh.
341           Default: yes.
342
343
344 ====================================================================================
345                     MG-Hybrid -- MeshGems 2.15-1 (January, 2023)
346       END OF SESSION - MG-Hybrid (Copyright 2014-2023 by Dassault Systemes SE)
347                      compiled Jan 18 2023 13:33:47 on Linux_64
348              MeshGems is a commercial trademark of Dassault Systemes SE
349 ====================================================================================
350
351
352 \endverbatim
353
354 \ref hybrid_top "Back to top"
355
356 */