Module: Generate Tetra Grid ()
The Generate Tetra Grid module creates a volumetric tetrahedral grid. Its input is a description of the 3D geometry by triangulated surfaces. The advancing front method is applied to fill each region defined by the surface data with tetrahedra.Tetrahedron generation can be performed on-line or as a batch job. Some fast and easy checks on the triangulated surface can be invoked manually and are performed automatically before any mesh generation. A spreadsheet report is generated (except in batch mode) and might contain some useful information in case of failure of the mesh generation.
Tetrahedron generation is not an easy task, reading the tutorial is a good start. Help can be found in the tutorial, here and in the Surface Editor documentation.
Warning: there are some 'reserved region names' for the exterior region that should not be filled with tetrahedra (otherwise the grid would extend to infinity): no name at all, 'Outside', and all names starting with 'Exterior'. If you choose a different name for the exterior region, tetrahedron generation will fail. Currently, depending on surface generation options, the Generate Surface module does not necesarily create correct names ('Exterior' and 'Exterior2'). Likewise the module Open Inventor Scene To Surface does not create correct names. You can check material names from the Parameter Editor of the generated surface, in the Materials bundle. If necessary, you must edit the region names before applying Generate Tetra Grid to a surface created by the latter modules.
References:
It is based on an advancing front technique, as described in:
- H. Jin and R. I. Tanner.
Generation of unstructured tetrahedral meshes by advancing front technique.
Int. J. Numer. Methods. Eng., 36:217 - 246, 1993- R. Lohner and P. Parikh.
Generation of three-dimensional unstructured grids by the advancing-front method.
Int. J. Numer. Methods. Fluids, 8:1135 - 1149, 1988.Many improvements have been made over the years.
Data [required]
The input surface file.
Region
The menu of this port allows you to specify whether tetrahedra should be generated for all regions or just for one selected region. The latter choice is needed for testing purposes only.Options
If toggle 'improve grid' is set, the quality of the resulting tetrahedral grid will be improved in a post-processing step. A combined smoothing will be applied which includes moving inner vertices and flipping inner edges or faces of the grid.If toggle 'save grid' is set, an additional port Grid will be displayed where you can enter a filename. The resulting tetrahedral grid will be automatically saved under that filename. This toggle must be set if tetrahedron generation shall be performed as a batch job.
Grid
This port is only visible if toggle 'save grid' at port Options is set. Here you can define the filename for the resulting tetrahedral grid. We recommend including a suffix grid in the filename.Action
If you press the Meshsize button, an editor window appears. It allows you to define a desired mesh size for each region. Note that there are predefined values for some materials in 's material database. Check whether these values are appropriate for your application.By default, Generate Tetra Grid generates tetrahedra that have the same mean edge length as the source surface object. By means of the Meshsize editor the 'prescribed' edge length can be modified. The algorithm will then try to change the mean edge length of the tetrahedra by starting with the mean edge length of the surface at the periphery of the region and increasing/decreasing it towards the center of the region so that in the center of the region the meshsize will match the value of parameter 'MeshSize' of the Meshsize editor. The current mean edge length of a region is queried by <surface-object> getMeanEdgeLength <n> in the console window, with <n> being the material number (0 = Exterior).
Pressing the Check button will invoke some fast and easy checks on the triangulated surface. Some tests are necessary conditions for the tetrahedron generation but passing these checks does not garantee that the generation will succeed. A spreadsheet report is generated. Properties checked are:
- Closedness of the surface (required for tetrahedron generation)
- Volume (required to be positive for tetrahedron generation)
- Intersection of triangles (required not to occur for tetrahedron generation)
- Orientation of triangles (required to be consistant for tetrahedron generation)
- Mean edge length of the surface triangles
- Mesh size, which is the estimated mean length of the inner edges to be created
- Estimated cell number to be created
- Largest triangle aspect ratio, which is the ratio of the radii of the circumcircle and the incircle of the surface triangles. The largest aspect ratio should be below 30 and is considered critical between 20 and 30.
- Smallest dihedral angle, which is the angle between two adjacent triangles at their common edge. The smallest dihedral angle should be above 3 degrees and is considered critical between 3 and 10.
- Largest tetrahedron aspect ratio, which is the estimated aspect ratio of the tetrahedron which will probably be created. The largest tetrahedron aspect ratio should be below 50 and is considered critical between 25 and 50. If you find a critical largest tetrahedron aspect ratio, you could try typing "Generate Tetra Grid" setMaxDiamRatio 35 in the console window. This will cause Generate Tetra Grid to accept tetrahedron aspect ratio up to 35 (the default is 25) but remember that increasing this value will noit solve all problems as the resulting mesh might not be a good starting point for a numerical simulation.
The last three tests are not necessary conditions for the mesh generation but in case the generation fails they can provide useful information. So if a surface does not pass one of the last three tests, please refer to the Surface Editor documentation for help.
After you have set up the simulation, you can commit it by pressing the Run batch or the Run now button. If the file specified at port Grid already exists, a warning message is issued. If you don't want to overwrite the file, press Cancel and change the filename.
If you press the Run batch button, the job dialog window appears, showing the status of the job queue. If you press the Start button, the first pending job of the queue starts running.
If you press the Run now button, tetrahedron generation will be performed on-line. This may take some time for large surfaces. The progress bar indicates the current region and which part of its volume is already filled with tetrahedra. The same checks as those performed when pressing the Check button are performed. A report spreadsheet is generated and might contain some useful information in case of failure during the mesh generation.
setVerbosityMode {0|1|2}
Prints important (1) debugging information in the console, or all (2) or none (0 by default).