]> SALOME platform Git repositories - plugins/blsurfplugin.git/blob - doc/salome/gui/BLSURFPLUGIN/input/blsurf_hypo.doc
Salome HOME
COTECH: Update names of DISTENE products
[plugins/blsurfplugin.git] / doc / salome / gui / BLSURFPLUGIN / input / blsurf_hypo.doc
1 /*!
2
3 \page blsurf_hypo_page MG-CADSurf Parameters hypothesis (former BLSURF
4 Parameters)
5
6 \anchor blsurf_top
7
8 \tableofcontents
9
10 \section blsurf_general_parameters General parameters
11
12 \image html blsurf_parameters.png
13
14 - <b>Name</b> - allows defining the name of the hypothesis (MG-CADSurf
15 Parameters_n by default).
16
17 - <b>Physical Mesh</b> - can be set to <em>None</em>, <em>Global size</em>
18   or <em>Local size</em>
19
20   - if set to <em>Global size</em>, only the <b>User size</b>,
21   <b>Max Size</b> and <b>Min Size</b> fields are taken into account.
22
23   - if set to <em>Local size</em>, behaves like <em>Custom</em> mode and takes into
24   account the "Gradation" parameter and the custom elements sizes given in the
25   "Local size" tab.
26
27 - <b>Geometrical mesh</b> - can be set to <em>None</em>, <em>Global size</em>
28
29   - if set to <em>Global size</em>, allows user input in <b>Mesh angle</b>,
30   <b>Mesh distance</b> and <b>Gradation</b> fields. These fields control
31   computation of the element size, so called <i>geometrical size</i>, conform
32   to the surface geometry considering local curvatures. If both the <b>User size</b>
33   and the <i>geometrical parameters</i> are defined, the  eventual element size
34   corresponds to the least of the two.
35
36 - <b>User size</b> - defines the size of the generated mesh elements. If "Relative value"
37 is checked, the value is relative to the diagonal of the shape.
38
39 - <b>Max Size</b> - defines the upper limit of mesh element size. If "Relative value"
40 is checked, the value is relative to the diagonal of the shape.
41
42 - <b>Min Size</b> - defines the lower limit of mesh element size. If "Relative value"
43 is checked, the value is relative to the diagonal of the shape.
44
45 - <b>Gradation</b> - maximum ratio between the lengths of two adjacent edges.
46
47 - <b>Quadratic mesh</b> - if checked, quadratic elements will be generated.
48
49 - <b>Mesh angle</b> - Limiting angle (in degree) between the plane of a triangle of the mesh and each of the tangent planes at the three vertices.
50 The smaller this angle is, the closer the mesh is to the exact surface, and the denser the resulting mesh is.
51
52 - <b>Mesh distance</b> - Maximum desired distance between a triangle and its supporting CAD surface.
53 The smaller this distance is, the closer the mesh is to the exact surface (only available in isotropic meshing).
54
55 - <b>Anisotropic</b> - if checked, this parameter defines the maximum anisotropic ratio of the metric governing the anisotropic meshing process.
56 The default value (0) means that the metric (and thus the generated elements) can be arbitrarily stretched.
57
58 - <b>Remove tiny edges</b> - if checked, the tiny (nano) edges are removed from the generated mesh.
59 The tiny edge value defines the minimal length under which an edge is considered to be a tiny one.
60
61 - <b>Remove bad elements</b> - if checked, the bad elements (slivers) are removed from the generated mesh.
62 The bad element value defines the aspect ratio triggering the "bad element” classification.
63
64 - <b>Mesh optimisation</b> - if checked, the mesh will be optimized in order to get better shaped elements.
65
66 - <b>Allow Quadrangles</b> - if checked, allows the creation of quadrilateral elements.
67
68 \ref blsurf_top "Back to top"
69
70 \section blsurf_advanced_parameters Advanced parameters
71
72 The notion of <i>diag</i> used in the descriptions means the diagonal of the bounding box of the geometrical object to mesh.
73
74 \image html blsurf_parameters_advanced.png
75
76 - <b>PreCAD options</b> -if checked, the PreCAD module will be used. This module has
77 two main goals:
78
79   - Complete missing or inadequate CAD descriptions.
80
81   - Perform topology reconstruction and specific geometry
82   enhancement for mesh generation.
83
84   \n This module requires a specific licence. The following PreCAD
85   options are the most significant and important ones:
86
87     - <b>Merge Edges</b> - allows PreCAD to optimize the geometry by merging some
88     edges. This option is checked by default.
89
90     - <b>Process 3D topology</b> - allows PreCAD to perform the cleanup processing.
91     This option is checked by default.
92
93     - <b>Discard input topology</b> - computes the CAD topology from scratch, 
94     without considering the topological information contained in the original CAD
95     (useful for iges files). This option is unchecked by default.
96
97 - <b>Verbosity level</b> - defines the percentage of "verbosity" of
98 MeshGems-CADSurf and MeshGems-PreCAD [0-100].
99
100 - <b>ExportGMF</b> - saves the computed mesh into a GMF file (.mesh or .meshb).
101
102 - <b>Add option</b> - provides the choice of multiple PreCAD and MG-CADSurf 
103 advanced options, which appear, if selected, in a table where it is 
104 possible to input the value of the option and edit it later.
105
106 - <b>Clear option</b> - removes the option selected in the table.
107
108 The following MG-CADSurf options are commonly usable:
109
110 - \b frontal (integer)
111
112   - 1 - the mesh generator inserts points with an advancing front method.
113
114   - 0 - it inserts them with an algebraic method (on internal edges). This method is
115   slightly faster but generates less regular meshes.
116
117   \n Default is 1.
118
119 - \anchor blsurf_hinterpol_flag \b hinterpol_flag (integer) - determines the computation of an
120 interpolated value <i>v</i> between two points <i>P1</i> and <i>P2</i> on a
121 curve. Let <i>h1</i> be the value at point <i>P1,</i> <i>h2</i> be the value at point
122 <i>P2,</i> and <i>t</i> be a parameter varying from 0 to 1 when moving from <i>P1
123 to</i> <i>P2</i>.
124
125   - 0 - the interpolation is linear: \f$v = h1 + t (h2 - h1 )\f$
126
127   - 1 - the interpolation is geometric: \f$v = h1 \times \left( \frac{h1}{h2} \right)^{t}\f$
128
129   - 2 - the interpolation is sinusoidal: \f$v = \frac{h1+h2}{2} + \frac{h1-h2}{2 \cdot \cos(\pi \cdot t)}\f$
130
131   \n Default is 0.
132
133 - \anchor blsurf_hmean_flag \b hmean_flag (integer) - determines the computation of the average of several
134 values:
135
136   - -1 - the minimum is computed.
137
138   - 0 or 2 - the arithmetic average is computed.
139
140   - 1 - the geometric average is computed.
141
142   \n Default is 0.
143
144 The following PreCAD options are commonly usable. 
145
146 - \b closed_geometry (boolean) - describes whether the working geometry
147 should be closed or not. When activated, this option helps PreCAD to process 
148 the dirtiest geometries. By default this option is 0.
149
150 - \b create_tag_collision (boolean) - creates new tags from original ones in case
151 of collision (entity merge or association for example). By default
152 this option is 1.
153
154 - \b debug (bool) - If debug = 1 PreCAD will be very verbose and will output
155 some intermediate files in the working directory. By default this
156 option is 0.
157
158 - \b manifold_geometry (int) - describes whether the working geometry should be manifold or not.
159 When activated, this option helps PreCAD to process the dirtiest
160 geometries. By default this option is 0.
161
162 - \b periodic_tolerance (real) - defines the maximum distance error accepted between
163 two sets of periodic entities. By default this option is \f$\mathrm{diag} \times 10^{-5}\f$.
164
165 - \b remove_tiny_edges (boolean) -optimize the geometry by removing the nano edges whenever possible.
166 By default this option is 0.
167
168 - \b required_entities (char) -controls the correction operations. Possible values are:
169
170   - "respect" - PreCAD is not allowed to correct or optimize a required edge.
171
172   - "ignore" - PreCAD is allowed to correct a required edge.
173
174   - "clear" - PreCAD will erase "required" status of each required entities, and will thus
175   be allowed to correct a required edge.
176
177   \n By default this option is "respect".
178
179 - \b sewing_tolerance (real) - tolerance of the assembly. It rarely requires to be tuned.
180 By default this option is \f$\mathrm{diag} \times 5 \cdot 10^{-4}\f$.
181
182 - \b tags (char) -controls the optimisation process. Possible values are:
183
184   - "respect" - PreCAD is not allowed to cross the CAD attributes boundaries for optimisation purpose.
185
186   - "ignore" - PreCAD is allowed to cross the CAD attributes boundaries for optimisation.
187
188   - "clear" - PreCAD will erase each tgas of each entities, and will thus
189   be allowed to cross the CAD attributes boundaries in its optimisation purpose.
190
191   \n By default this option is "respect".
192
193 - \b tiny_edge_length (real) -  the length below which en edge is considered as nano for the topology processing.
194 By default this option is \f$10^{-5}\f$.
195
196 \ref blsurf_top "Back to top"
197
198 \section blsurf_local_size Local size
199
200 Local sizes can be defined on faces, edges or vertices:
201
202 - The faces, edges and vertices can belong to the meshed geometrical
203 object or to its sub-shapes (created using <b>Explode</b> command).
204
205 - Groups of faces, edges and vertices are also handled.
206
207 - It is possible to attribute the same size to several geometries using multi-selection.
208
209 - The sizes are constant values or python functions.
210
211 - In case of a python function, the following rules must be respected:
212
213   - The name of the function is f.
214
215   - If geometry is a face or a group of faces, the function is f(u,v).
216
217   - If geometry is an edge or a group of edges, the function is f(t).
218
219   - If geometry is a vertex or a group of vertices, the function is f().
220
221   - The function must return a double.
222
223 3 different types of size maps can be defined:
224
225 -# \ref blsurf_sizemap_computation "Computation of the physical size"
226 -# \ref blsurf_attractor "Advanced maps"
227 -# \ref blsurf_attractor_computation "Computation of attractors"
228
229 \ref blsurf_top "Back to top"
230
231 \subsection blsurf_sizemap_computation Computation of the physical size
232
233 \image html blsurf_parameters_sizemap1.png 
234
235 The physical size is obtained by querying sizemap functions associated
236 to the input CAD object for surfaces, curves and points.
237 Each function can either return a value h (which is then trimmed
238 between the two bounds hphymin and hphymax), or "no answer" (by not
239 assigning a value to h), thus providing great flexibility in the
240 specification of the sizes. The computation depends on whether point P
241 is internal to a surface, internal to a curve, or at the end of
242 several curves:
243
244 - If point P is internal to a surface, the CAD surface size function
245 is queried. If no answer is returned, one interpolates with the values
246 at the vertices of the discretized interface curves.
247
248 - If point P is internal to a curve, the CAD curve size function is
249 queried first. If no answer is returned, the surface size function is
250 queried for every adjacent surface and the mean value of the returned
251 values is computed. If no answer is returned, sizes h1 and h2 at both
252 ends of the curve are considered (see next item) and the interpolated
253 value is computed.
254
255 - If point P is at the extremity of several curves, the CAD point size
256 function is queried first. If no answer is returned, the curve size
257 function is queried for every adjacent curve and the mean value of the
258 returned values is computed. If no answer is returned, the surface
259 size function is queried for every adjacent surface and the mean value
260 of the returned values is computed. If there is still no answer
261 returned, the default value hphydef is kept.
262
263 In order to compute the mean of several values, the arithmetic mean is
264 used by default, but this can be modified by the parameter
265 \ref blsurf_hmean_flag "hmean flag". In the same way, in order to
266 interpolate two values, a linear interpolation is used by default, but
267 this can be modified by \ref blsurf_hinterpol_flag "hinterpol flag". 
268
269 \ref blsurf_local_size "Back to \"Local size\""\n
270 \ref blsurf_top "Back to top"
271
272 \subsection blsurf_attractor Advanced maps
273
274 \image html blsurf_parameters_sizemap2.png 
275
276 More specific size maps can be defined on faces. 
277
278 - <i> Attractors </i> allow to define the size of the mesh elements
279 on a face so that the mesh is the finest on the attractor shape and
280 becomes coarser when getting far from this shape.
281
282   - The selected attractor can be a Vertex, an Edge, a Wire or a
283   Compound mixing several entities of those types.
284
285   - The attractor doesn't have to be a sub-shape of the shape to mesh.
286
287   - The size will grow exponentially (see the formula below) but is
288   bounded by gradation, \n so if you want the formula to be strictly
289   respected, you should set the <i>gradation</i> 
290   to its maximum (2.5) in the <i>arguments</i> tab. 
291
292 - Furthermore you can choose to <i> keep the size constant </i>
293 until a certain distance from a shape. This option can be combined or
294 not with an <i>attractor</i> size map described above. 
295
296   - If the two options are combined the size will remain constant
297   until the distance specified in "constant over" and grow then as
298   prescribed by the attractor function.
299
300   - Else the growing is only controled by the standard arguments of
301   MG-CADSurf (gradation ...).
302
303 \image html blsurf_const_size_near_shape2.png "Example of size map with constant size option, the size is kept constant on the left side of the surface until a certain distance"
304
305 \note The validation of the hypothesis might take a few seconds if
306 attractors are defined or the "constant size" option is used because a
307 map of distances has to be built on the whole surface for each face
308 where such a hypothesis has been defined.
309
310 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including size map.
311
312 \ref blsurf_local_size "Back to \"Local size\""\n
313 \ref blsurf_top "Back to top"
314
315 \subsection blsurf_attractor_computation Computation of attractors
316
317 The size grows exponentially following the equation : 
318 \f$h(d) = \mathrm{User Size} + (\mathrm{h\_start} - \mathrm{User Size}) \times e ^ { - \left( \frac{d}{R} \right) ^ {2} }\f$
319
320 Where :
321
322 - h_start is the desired size on the given attractor shape
323
324 - d is the distance of the current point from the attractor
325 shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed)
326
327 - R is called the distance of influence and allows controlling the growth rate of the mesh
328
329 \image html blsurf_attractors2.png "Example of mesh created using attractors, the attractors here are the side edges and the size grows from the side of the surface towards the apex"
330
331 \ref blsurf_local_size "Back to \"Local size\""\n
332 \ref blsurf_top "Back to top"
333
334 \section blsurf_enforced_elements Enforced vertices
335
336 \image html blsurf_parameters_enforced_vertices.png
337
338 It is possible to define some enforced vertices to MG-CADSurf algorithm.
339 An enforced vertex is defined on a Face or a Compound by
340
341 - selecting an existing Vertex or Compound,
342
343 - or creating a new vertex given its coordinates.
344
345 The enforced vertex is the projection of a point defined by its
346 (x,y,z) coordinates on the selected face.
347
348 - It is possible to define several enforced vertices on a face or a group of faces.
349
350 - If the projected point is on the boundary or outside of the face, it will be ignored.
351
352 - If a group name is specified : If the group exists, the enforced nodes will be added in the existing group, if the group does not exist it will be created.
353
354 All the internal vertices of the faces can be considered as enforced vertices if the corresponding checkbox is checked.
355 A group can optionnaly be defined on those enforced vertices.
356
357 \sa Sample TUI Script of the \ref tui_blsurf "creation of a MG-CADSurf hypothesis", including enforced vertices.
358
359 \ref blsurf_top "Back to top"
360
361
362 \section blsurf_periodicity Periodicity
363
364 \subsection periodicity_introduction Introduction
365
366 Periodicity is used to have the same discretization on two faces (in 3D) or two edges (in 2D).
367 This is useful for instance for a Representative Volume Element so that the translated meshes share the same nodes on the common faces.
368
369 In GUI, periodicity association uses PreCAD (optional MG-CADSurf add-on). Be sure to have a PreCAD license to be able to use it. Otherwise, use \ref periodicity_tui_basic_api_usage "the basic API in TUI" or the \ref periodicity_tui_advanced_api_usage "the advanced API in TUI".
370
371 \image html blsurf_periodicity_translation.png "Two periodic faces (translation)"
372
373 \image html blsurf_periodicity_reflexion.png "Two periodic faces (reflexion)"
374
375 \image html blsurf_periodicity_2D.png "Associations of edges in 2D (both red edges are associated with each other)"
376
377 \subsection periodicity_gui_usage GUI usage
378
379 \image html blsurf_parameters_periodicity.png
380
381 The periodicity association can be defined:
382
383 - on 2 groups of faces (in 3D)
384 - on 2 groups of edges (in 2D)
385
386 If the transformation is a translation, PreCAD makes the periodicity association with only this information.
387
388 Otherwise, for instance a rotation, the user has to define 3 non-colinear vertices and their image by the transformation.
389
390 \subsection periodicity_tui_precad_usage TUI PreCAD usage
391
392 The two methods to define periodicity with PreCAD are:
393 - BLSURFPluginBuilder.BLSURF_Algorithm.AddPreCadFacesPeriodicity 
394 - BLSURFPluginBuilder.BLSURF_Algorithm.AddPreCadEdgesPeriodicity
395
396 List of source and target vertices to define a transformation are optional.
397
398 \sa Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_preCAD "using preCAD".
399
400 \subsection periodicity_tui_basic_api_usage TUI Basic API usage
401
402 In the CADSurf basic API, only available in TUI, the periodicity must be defined face by face, edge by edge and vertex by vertex.
403
404 The methods are:
405 - BLSURFPluginBuilder.BLSURF_Algorithm.AddFacePeriodicity
406 - BLSURFPluginBuilder.BLSURF_Algorithm.AddEdgePeriodicity
407 - BLSURFPluginBuilder.BLSURF_Algorithm.AddEdgePeriodicityWithoutFaces
408 - BLSURFPluginBuilder.BLSURF_Algorithm.AddVertexPeriodicity
409
410 Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_basic "using basic API (without preCAD)".
411
412 \subsection periodicity_tui_advanced_api_usage TUI Advanced API usage
413
414 To ease the periodicity description, the basic API methods can be called through two advanced methods, given two geom groups and a python geom transformation:
415
416 - BLSURFPluginBuilder.BLSURF_Algorithm.AddAdvancedFacesPeriodicity (in 3D)
417 - BLSURFPluginBuilder.BLSURF_Algorithm.AddAdvancedEdgesPeriodicity (in 2D)
418
419 Sample TUI Script of the definition of MG-CADSurf periodicity \ref tui_blsurf_periodicity_advanced "using advanced API (without preCAD)".
420
421 \ref blsurf_top "Back to top"
422
423 */