*tetmesh

Creates tetra meshes and CFD tetra meshes (with boundary layers).

Syntax

*tetmesh entity_type1 mark_id1 mode1 entity_type2 mark_id2 mode2 string_array number_of_strings

Type

HyperMesh Tcl Modify

Description

A general single tetra mesh operation can involve a command block consisting of zero or more calls to *tetmesh_set_input followed by one call to *tetmesh. *tetmesh can take up to two different entity input/selections and *tetmesh_set_input supplies additional entity selections (up to four more) to *tetmesh.

The following discussion applies to the entire tetra mesh command block.

In the command argument list each triplet entity_type mark_id mode specifies a set of entity input that either define a part of the boundary of the meshing volumes or the element size control boxes.

An entity input with mark_id as 0 or mode as -1 is considered an inactive input. Inactive inputs are ignored inside the commands. However, for an inactive input, entity_type still must be a valid entity name. An input can be empty and still active. An empty active input with mode 6 will be auto filled internally.

If there are inputs with mode 2 or 3, the resulting mesh is called a CFD mesh. Otherwise, it is called a non-CFD mesh.

Also, note that not all combinations of the triplet values are valid. The general rules for all active entity inputs and the internal handling of these inputs are as follows and all must be satisfied:
  • Must have at least one active input.
  • Up to 7 inputs can be used but, each active mode value can appear no more than once.
  • Modes 0, 1, 2, 3 and 6 are for boundary inputs of the meshing volumes. For these modes, inputs with entity_type as elems or comps are boundary inputs by elems; inputs with entity_type as solids or surfs are boundary inputs by geoms. All boundary inputs must be either all by elems or all by geoms.
    • For an input by elems with modes 0, 2 and 3, all elems other than 2D elems are ignored.
    • For an input with mode 1, both 1D (plotel) and 2D elems are acceptable. In this case, 1D elems specify the elem edges that must appear in the final mesh.
    • For an input with mode 6, all elems other than 3D elems are ignored.
  • For inputs by geoms, all surfs without a pre-existing mesh are treated as float regardless of the mode of input. Internally, these surfs are auto-meshed with the 2D meshing parameters passed in through the string_array argument.
  • There can be no more than one input with entity_type as solids. That is, if there is one solids input, all other boundary inputs must have entity_type as surfs. It is further required that all these surfs selections are on the selected solids (other surfs are silently ignored).
  • For mode 4, entity_type must be comps. The selected entities must be the specially constructed components for size control boxes (others are silently ignored).
  • For mode 5, entity_type must be nodes. The nodes that are too close to other anchor nodes or that are outside of the meshing volumes or too close to the boundary of the meshing volumes are ignored.
  • For an input with mode 6, all boundary inputs must be by elems. All other boundary inputs are considered as 2D baffles (and 1D constraints). An empty input with mode 6 will be auto filled internally by the inputs of baffles (modes 0, 1, 2 and 3), size control boxes (mode 4) and anchor nodes (mode 5). Otherwise, all entities with input modes 0-5 that fall outside of the 3D selection or too close to the boundary of the 3D selection are ignored.
  • If a single command has two active entity inputs, the mark_ids must be different.
  • Inputs with different modes are allowed to have overlapping selections. The overlaps are resolved inside the command. The general rule is that the input in an earlier command has the higher priority; while within a command the later input has the priority. If an input has ent=solids, it always has the lowest priority regardless its position in the input order.

Inputs

entity_type1
The first entity type. Valid values are nodes, elems, comps, surfs, and solids.
mark_id1
The mark ID containing the first entities. Valid values are 0 (inactive input), 1 and 2.
mode1
  • -1 - Ignored (inactive input)
  • 0 - Float without boundary layer
  • 1 - Fixed without boundary layer
  • 2 - Float with boundary layer
  • 3 - Fixed with boundary layer
  • 4 - Size control boxes
  • 5 - Anchor nodes
  • 6 - 3D re-mesh
  • 7 - 3D re-mesh with free boundary swappable-float.
  • 8 - 3D re-mesh with free boundary remeshable-float.
  • 9 - Remeshable-float without BL
  • 10 - Remeshable-float with BL,
  • 11 - Elem input for fluid volume selection. Either touched (or normal pointed into) are fluid volumes.
Note: If one of the float inputs is set to remeshable by either a mode listed above or by the "shell_remesh" parameter in the "pars:…" string, all float inputs are set to remeshable. Otherwise, all floats are swappable only except for the non-BL input that receives BL imprinting.
entity_type2
The second entity type. Valid values are nodes, elems, comps, surfs, and solids.
mark_id2
The mark ID containing the second entities. Valid values are 0 (inactive input), 1 and 2.
mode2
  • -1 - Ignored (inactive input)
  • 0 - Float without boundary layer
  • 1 - Fixed without boundary layer
  • 2 - Float with boundary layer
  • 3 - Fixed with boundary layer
  • 4 - Size control boxes
  • 5 - Anchor nodes
  • 6 - 3D re-mesh
  • 7 - 3D re-mesh with free boundary swappable-float.
  • 8 - 3D re-mesh with free boundary remeshable-float.
  • 9 - Remeshable-float without BL
  • 10 - Remeshable-float with BL,
  • 11 - Elem input for fluid volume selection. Either touched (or normal pointed into) are fluid volumes.
string_array
The ID of the string array that contains the array of meshing parameters. The string array is created using the *createstringarray command. This should always be set to 1.
Each argument can be either space or comma separated.
Tetra meshing parameters that control the tetra core part of the mesh. This is required for all meshing types:
"tet: tet_opts growth_rate uniform_layers max_size qt_ratio min_size"
tet_opts
Tetra mesh options. Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2 + 32*Bit5 + 64*Bit6 + 128*Bit7 + 256*Bit8).
Bit0-Bit2: Core tetra mesh and optimization method.
  • 0 – Unused.
  • 1 – Normal.
  • 2 – Optimize for performance.
  • 3 – Optimize for quality.
  • 4 – Generate boundary layer only. Valid only if there are boundary layer inputs.
Bit5-Bit7: Quad transition settings. Used only if there are fixed quad inputs.
  • 0 – Keep quads as-is. Only valid for BL only mode.
  • 32 – Build a layer of 1 pyramid per quad transition.
  • 64 – Build a layer of 5 pyramids and 2 tetras per quad transition.
  • 96 – BL hexas are split into prisms for all layers.
  • 128 – BL elems are split into tetras for all layers.
Bit 8: Elems-to-geometry flag. Effective only for non-CFD meshes with inputs by geoms. For CFD mesh, the elems are always placed in fixed comps with special names. For all other cases, elems go to the current comp.
  • 0 – Elements to current component.
  • 256 – Elements to geometry component.
growth_rate
The tetra mesh elem size growth rate for the boundary (typical 1.2, range >1.0).
uniform_layers
The number of tetra layers that are to have uniform elem sizes (typical 2.0, range >0).
max_size
The limit on the max elem size. A value of 0.0 means no limit (typical 0.0).
qt_ratio
Affect only the quad transition layer. This determines the layer height as a fraction of the local 2D elem size (typical 0.8).
min_size
The nominal lower bound for the element size. A value of 0.0 means not bounded (typical 0.0).
CFD boundary layer meshing parameters. This is only required if one or more boundary selections are of mode=2 or mode=3:
"cfd: cfd_opts bl_thick0 bl_thicktotal bl_growthrate size_trans_flag"
cfd_opts
Flags for smooth/native boundary layer meshes.
Bit0: Split mode. Effective only for native boundary layers or when size_trans_flag=1.
  • 0 – All 3D non-tetra elems are split into tetras.
  • 1 – Prism and pyramid elems in the boundary layer are not split into tetras.
Bit1: The main boundary layer mode.
  • 0 – Native boundary layer method is used.
  • 2 – Smooth boundary layer method is used.

Examples

Tetra mesh:
*createstringarray 1 "tet: 579 1.2 2 0 0.8 0 0"
*createmark comps 2 "inlet" "outlets" "wall" "wall_cyl"
*tetmesh comps 2 0 elems 0 -1 1 1
Tetra re-mesh with fixed baffles:
*createstringarray 1 "tet: 579 1.2 2 0 0.8 0 0"
*createmark comps 2 "some_3d_elems"
*createmark comps 1 "some_baffle_elems"
*tetmesh comps 2 6 comps 2 0 1 1
Tetra mesh by geometries:
*createstringarray 2 "tet: 547 1.2 2 0 0.8 0 0" "2d: 1 0 1 4 0.8 30"
*createmark solids 1 4 5
*tetmesh solids 1 1 elems 0 -1 1 2
CFD mesh:
*createstringarray 2 "tet: 579 1.2 2 0 0.8 0 0" "cfd: 86 0.2 1 1.2 0"
*createmark comps 2 "inlet" "outlets"
*createmark comps 1 "wall" "wall_cyl"
*tetmesh comps 2 0 comps 1 2 1 2

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

11.0