General parameters
- Name - allows defining the name of the hypothesis (MG-CADSurf Parameters_n by default).
- Physical Size group defines a physical sizemap.
- Geometrical Size group defines a geometrical sizemap.
- User size - defines the size of the generated mesh elements. If "Relative value" is checked, the value is relative to the diagonal of the shape.
- Max Size - defines the upper limit of mesh element size. If "Relative value" is checked, the value is relative to the diagonal of the shape.
- Min Size - defines the lower limit of mesh element size. If "Relative value" is checked, the value is relative to the diagonal of the shape.
- Mesh angle - Limiting angle (in degree) between the plane of a triangle of the mesh and each of the tangent planes at the three vertices. The smaller this angle is, the closer the mesh is to the exact surface, and the denser the resulting mesh is.
- Mesh distance - Maximum desired distance between a triangle and its supporting CAD surface. The smaller this distance is, the closer the mesh is to the exact surface (only available in isotropic meshing).
- Quadratic mesh - if checked, quadratic elements will be generated.
- Gradation - maximum ratio between the lengths of two adjacent edges.
- Mesh optimisation - if checked, the mesh will be optimized in order to get better shaped elements.
- Allow Quadrangles - if checked, allows the creation of quadrilateral elements.
- Anisotropic - if checked, this parameter defines the maximum anisotropic ratio of the metric governing the anisotropic meshing process. The default value (0) means that the metric (and thus the generated elements) can be arbitrarily stretched.
- Optimize tiny edges - if checked, the tiny (nano) edges are removed from the generated mesh during local mesh optimization. The tiny edge will be removed only if the local quality is improved by the deletion. The tiny edge value defines the minimal length under which an edge is considered to be a tiny one.
- Remove tiny edges - if checked, the tiny (nano) edges are removed from the generated mesh without taking into account the local quality around the edge. The tiny edge value defines the minimal length under which an edge is considered to be a tiny one.
- Remove bad elements - if checked, the bad elements (slivers) are removed from the generated mesh. The bad element value defines the aspect ratio triggering the "bad element” classification.
- Correct surface intersections - if checked, the mesher will try to prevent all surface intersections, which is useful for future volume mesh generation. The value defines the time that will be spent in the intersection prevention process. For example, the value 3 means that the time of the intersection removal process won't be more than 3 times the time required to mesh without processing the intersections.
- Volume Gradation - maximum ratio between the lengths of two adjacent edges affecting quality of a future volume mesh, specially in thin volume areas. The volume gradation parameter must be greater than 1, and should be greater or equal to the value of the classic surface gradation (at the risk of increasing the time of convergence of the gradation process). The closer it is to 1, the smoother the final volume mesh you will build should be.
Back to top
Advanced parameters
The notion of diag used in the descriptions means the diagonal of the bounding box of the geometrical object to mesh.
Advanced page tab expose mostly useful advanced options. Initially, default values of the options are displayed and they are not modifiable. If an option is activated using a check-box, its value becomes modifiable.
Meshing options
- Enforce CAD edge sizes - Relaxes the given sizemap constraint around CAD edges to allow a better element quality and a better geometric approximation. It is only useful in combination with the gradation option.
- Priority of geometry over Jacobian - This parameter determines whether or not the geometry accuracy is more important than the negative Jacobian correction. When this parameter is set to 0, MeshGems-CADSurf is allowed to lose the CAD-mesh associativity in order to correct the last negative Jacobians.
- Maximal number of points per patch - This parameter controls the maximum amount of points MeshGems-CADSurf is allowed to generate on a single CAD patch. For an automatic gestion of the memory, you can set this parameter to ”0”.
- Rectify Jacobian - The quadratic elements generation is a processing of the MeshGems-CADSurf meshing process which inserts the extra nodes on the CAD. This parameter determines whether MeshGems-CADSurf will try to correct or not all the elements of the surface mesh with negative Jacobians by moving the internal nodes of the mesh.
- Respect geometry - This patch independent option can be deactivated to allow MeshGems-CADSurf to lower the geometry accuracy in its patch independent process.
- Tiny edges avoid surface intersections - This option defines the priority between the tiny feature suppression and the surface intersection prevention. By default, MeshGems-CADSurf gives the priority to the surface intersection prevention rather than to tiny edge or bad surface element removal. These mesh features are then removed only if it does not lead to surface intersections. This behaviour can be deactivated by setting this parameter to 0, giving priority to the tiny edge or bad surface element removal.
- use deprecated patch mesher - This option reproduces the mesher behaviour of previous MG-CADSurf versions (MeshGems before 2.3, i.e. before SALOME 8.2). This has proved useful on some particular cases such as very small local size on a vertex situated on a border curve.
CAD preprocessor options. The CAD preprocessor (formerly known as PreCAD) has two main goals:
- Complete missing or inadequate CAD descriptions.
- Perform topology reconstruction and specific geometry enhancement for mesh generation.
All options are unchecked by default. No cleanup is made by default so that the mesh matches the shape. If the user has a bad shape (e.g. imported shape), he can activate some options to improve the mesh.
- Closed geometry - describes whether the working geometry should be closed or not. When activated, this option helps PreCAD to process the dirtiest geometries.
- Debug - If debug = yes PreCAD will be very verbose and will output some intermediate files in the working directory.
- Discard input topology - compute the CAD topology from scratch, without considering the topological information contained in the original CAD (useful for iges files). This option is unchecked by default.
- Merge Edges - optimize the geometry by merging some edges.
- Periodic tolerance - This parameter defines the maximum size difference between two periodic edges and also the maximum distance error between two periodic entities.
- Remove duplicate CAD faces - optimize the geometry by merging the duplicate CAD faces. This option is unchecked by default.
- Required entities - The required entities control the correction operations. Accepted values for this parameter are:
- respect : MeshGems-CADSurf is not allowed to alter any required entity, even for correction purposes,
- ignore : MeshGems-CADSurf will ignore the required entities in its processing,
- clear : MeshGems-CADSurf will clear any required status for the entities. There will not be any entity marked as required in the generated mesh.
- Sewing tolerance - tolerance of the assembly. It rarely requires to be tuned.
- Tags - controls the optimisation process. Possible values are:
- "respect" - PreCAD is not allowed to cross the CAD attributes boundaries for optimisation purpose.
- "ignore" - PreCAD is allowed to cross the CAD attributes boundaries for optimisation.
- "clear" - PreCAD will erase each tgas of each entities, and will thus be allowed to cross the CAD attributes boundaries in its optimisation purpose.
- Verbosity level - defines the percentage of "verbosity" of MeshGems-CADSurf [0-10].
- ExportGMF - saves the computed mesh into a GMF file (.mesh or .meshb).
Back to top
Local size
Local sizes can be defined on faces, edges or vertices:
- The faces, edges and vertices can belong to the meshed geometrical object or to its sub-shapes (created using Explode command).
- Groups of faces, edges and vertices are also handled.
- It is possible to attribute the same size to several geometries using multi-selection.
- The sizes are constant values or python functions.
3 different types of size maps can be defined:
- Computation of the physical size
- Advanced maps
- Computation of attractors
Back to top
Computation of the physical size
The physical size is obtained by querying sizemap functions associated to the input CAD object for surfaces, curves and points. Each function can either return a value h (which is then trimmed between the two bounds hphymin and hphymax), or "no answer" (by not assigning a value to h), thus providing great flexibility in the specification of the sizes. The computation depends on whether point P is internal to a surface, internal to a curve, or at the end of several curves:
- If point P is internal to a surface, the CAD surface size function is queried. If no answer is returned, one interpolates with the values at the vertices of the discretized interface curves.
- If point P is internal to a curve, the CAD curve size function is queried first. If no answer is returned, the surface size function is queried for every adjacent surface and the mean value of the returned values is computed. If no answer is returned, sizes h1 and h2 at both ends of the curve are considered (see next item) and the interpolated value is computed.
- If point P is at the extremity of several curves, the CAD point size function is queried first. If no answer is returned, the curve size function is queried for every adjacent curve and the mean value of the returned values is computed. If no answer is returned, the surface size function is queried for every adjacent surface and the mean value of the returned values is computed. If there is still no answer returned, the default value hphydef is kept.
In order to compute the mean of several values, the arithmetic mean is used by default, but this can be modified by the parameter hmean flag. In the same way, in order to interpolate two values, a linear interpolation is used by default, but this can be modified by hinterpol flag.
Note: on some particular configurations, the mesher behaviour is not the same as before (SALOME versions before 8.2 i.e. MeshGems before 2.3). For a small local size defined on a point situated on a border curve, the previous mesher behaviour may be prefered: see "use deprecated patch mesher" on advanced tag.
Back to "Local size"
Back to top
Advanced maps
More specific size maps can be defined on faces.
Example of size map with constant size option, the size is kept constant on the left side of the surface until a certain distance
- Note
- The validation of the hypothesis might take a few seconds if attractors are defined or the "constant size" option is used because a map of distances has to be built on the whole surface for each face where such a hypothesis has been defined.
- See Also
- Sample TUI Script of the creation of a MG-CADSurf hypothesis, including size map.
Back to "Local size"
Back to top
Computation of attractors
The size grows exponentially following the equation :
Where :
- h_start is the desired size on the given attractor shape
- d is the distance of the current point from the attractor shape. The distance is the geodesic distance (i.e. calculated by following the surface to be meshed)
- R is called the distance of influence and allows controlling the growth rate of the mesh
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
Back to "Local size"
Back to top
Enforced vertices
It is possible to define some enforced vertices to MG-CADSurf algorithm. An enforced vertex is defined by
- selecting an existing Vertex or Compound,
The enforced vertex is the projection of a point defined by its (x,y,z) coordinates on the closest face found by the application.
- It is possible to define several enforced vertices.
- If the projected point is on the boundary or outside of the face, it will be ignored.
- 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.
All the internal vertices of faces can be considered as enforced vertices if the corresponding checkbox is checked. A group can optionnaly be defined on those enforced vertices.
- See Also
- Sample TUI Script of the creation of a MG-CADSurf hypothesis, including enforced vertices.
Back to top
Periodicity
Introduction
Periodicity is used to have the same discretization on two faces (in 3D) or two edges (in 2D). This is useful for instance for a Representative Volume Element so that the translated meshes share the same nodes on the common faces.
Periodicity association uses PreCAD (MG-CADSurf preprocessor). You don't need an extra PreCAD license. It is included in MG-CADSurf since MeshGems V2.2.
Two periodic faces (translation)
Two periodic faces (reflexion)
Associations of edges in 2D (both red edges are associated with each other)
GUI usage
The periodicity association can be defined:
- on 2 groups of faces (in 3D)
- on 2 groups of edges (in 2D)
If the transformation is a translation, PreCAD makes the periodicity association with only this information.
Otherwise, for instance a rotation, the user has to define 3 non-colinear vertices and their image by the transformation.
TUI PreCAD usage
The two methods to define periodicity with PreCAD are (the former name of MG-CADSurf is BLSURF and names of the corresponding classes and modules still include "BLSURF"):
List of source and target vertices to define a transformation are optional.
- See Also
- Sample TUI Script of the definition of MG-CADSurf periodicity using preCAD.
Hyper-patch
Hyper-patch tab page allows defining faces that will be meshes together as part of a global hyper-patch.
- Hyper-patch IDs table - shows IDs of faces of defined hyper-patches.
- Face selection - activates selection of faces in the VTK Viewer.
- Group selection - activates selection of faces and groups of faces in the Object Browser.
- IDs - allows typing IDs of faces composing a hyper-patch and shows IDs of faces selected in the Viewer or the Object Browser.
- Add - adds a new row to the table and moves IDs there.
- Remove - removes selected hyper-patches from the table.
Back to top
For more information on MeshGems-CADSurf, you can read its documentation at $MESHGEMS_ROOT_DIR/Docs/mg-cadsurf_user_manual.pdf