The volume mesher mode type
This mode is used to create volume (block) grid entities from surface (domain) grid entities.
Unlike other modes, the state of the mode is saved when it is ended and subsequent modes will be created with the same state. This state is also saved in the application project file, so a new mode created after a file is loaded will have the same state as the last mode ended before saving the file.
To create a mode of this type, use the pw::Application.begin command with the mode VolumeMesher specified, like this:
set mesher [pw::Application begin VolumeMesher $domains]
To modify a volume using this mode, use the pw::Application.begin command with the mode VolumeMesher specified, like this:
set mesher [pw::Application begin VolumeMesher $unstructuredBlock]
pw:: | The volume mesher mode type |
Instance Attributes | |
MeshType | This attribute controls the mesh type that will be produced. |
FarfieldShapeType | This attribute controls the shape type that will be used on the farfield of the volume mesh. |
SymmetryMode | This attribute controls how the shape handles symmetry conditions of the enclosed mesh. |
SymmetryPlane1 | This attribute controls the placement of the first symmetry plane. |
SymmetryPlane2 | This attribute controls the placement of the second symmetry plane. |
SizeFieldDecay | This attribute controls the size field decay factor used when a size field is generated for this entity. |
SizeFieldBackgroundSpacing | This attribute is the size background spacing when a size field is generated for this entity. |
ShapeAlignment | This attribute controls which primary axes the shape is aligned with. |
FarfieldLength | This attribute controls the length dimension of the farfield. |
FarfieldWidth | This attribute controls the width dimension of the farfield. |
FarfieldHeight | This attribute controls the height dimension of the farfield. |
FarfieldCapRadii | This attribute controls the radii of the farfield caps. |
FarfieldRadius | This attribute controls the radius of the farfield. |
BoundaryLayerType | This attribute controls the boundary layer type to be applied to resulting volume meshes. |
WallNormalSpacing | This attribute controls the wall normal spacing to be applied to the nearfield boundary mesh. |
GrowthRate | This attribute is the growth rate of T-Rex layers of an unstructured block when it is created. |
CollisionBuffer | This attribute is the minimum buffer to be maintained between encroaching extruded tetrahedrals of an unstructured block when it is created. |
FinalCellAspectRatio | This attribute specifies the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation, decimation or refinement. |
MaxIncludedAngle | This attribute specifies the maximum included angle quality threshold for T-Rex cells. |
CentroidSkewness | This attribute specifies the maximum centroid skew quality threshold for T-Rex cells. |
VoxelMinimumSize | This attribute is the minimum voxel size of the voxel mesh. |
VoxelMaximumSize | This attribute is the maximum voxel size of the voxel mesh. |
VoxelTransitionLayers | This attribute is the number of layers between voxel size transitions of the voxel mesh of this block. |
Instance Actions | |
createGridEntities | This command creates the volume grid entities according to the attributes applied to the pw::VolumeMesher mode such as mesh type, farfield shape, symmetry specifications, size field decay, etc. |
addBoundaryConditionFilter | This command creates a new boundary condition filter. |
deleteBoundaryConditionFilter | This command deletes a boundary condition filter. |
getBoundaryConditionFilterNames | This command gets all boundary condition filter names. |
setBoundaryConditionFilterName | This command updates a boundary condition filter’s name. |
setBoundaryConditionFilterType | This command sets the boundary condition filter’s T-Rex type. |
getBoundaryConditionFilterType | This command gets the boundary condition filter’s T-Rex type. |
setBoundaryConditionFilterAdaptation | This command sets the boundary condition filter’s adaption type. |
getBoundaryConditionFilterAdaptation | This command gets the boundary condition filter’s adaption type. |
setBoundaryConditionFilterValue | This command sets the boundary condition filter’s T-Rex condition value. |
getBoundaryConditionFilterValue | This command gets the boundary condition filter’s T-Rex condition value. |
setBoundaryConditionFilterPatterns | This command sets the boundary condition filter’s patterns. |
getBoundaryConditionFilterPatterns | This command gets the boundary condition filter’s patterns. |
getBoundaryConditionFilterGroups | This action returns a list of domains associated with a boundary condition filter. |
setBoundaryConditionFilterPriority | This action sets the priority of one or more existing boundary condition filters. |
$mesher get/setMeshType mesh
This attribute controls the mesh type that will be produced.
This attribute is a string with options < Unstructured | Voxel >.
The default for this attribute is Unstructured
$mesher get/setFarfieldShapeType shape
This attribute controls the shape type that will be used on the farfield of the volume mesh.
This attribute is a string with options < Box | Cylinder | Sphere | None >. If None is specified, then the volume will be created solely from the domains supplied when the mode began with the requisite that the domains must form a watertight surface.
The default for this attribute is Box
$mesher get/setSymmetryMode mode
This attribute controls how the shape handles symmetry conditions of the enclosed mesh. If set to automatic, then symmetry will be automatically detected and applied to the resulting block. If set to manual, then symmetry will be applied according to the specified symmetry plane attributes.
This attribute is not applicable with the farfield shape type of None is specified.
This attribute is a string with options < Automatic | Manual >.
The default for this attribute is Automatic
$mesher get/setSymmetryPlane1 plane
This attribute controls the placement of the first symmetry plane.
This attribute is only applicable when the symmetry mode is set to manual and the farfield shape type is not set to None.
This attribute is a string with options < None | +X | -X | +Y | -Y | +Z | -Z >.
The default for this attribute is None
$mesher get/setSymmetryPlane2 plane
This attribute controls the placement of the second symmetry plane.
This attribute is only applicable when the symmetry mode is set to manual and the farfield shape type is not set to None.
This attribute is a string with options < None | X+ | X- | Y+ | Y- | Z+ | Z- >.
The default for this attribute is None
$mesher get/setSizeFieldDecay < Automatic | value >
This attribute controls the size field decay factor used when a size field is generated for this entity. The size field will use this decay for entities added to the size field that don’t have a explicitly assigned decay.
This attribute is not applicable if the farfield shape type of None is specified.
This attribute is either the string “Automatic” or a float with the range [0.0, 1.0].
The default for this attribute is the value is Automatic.
$mesher get/setSizeFieldBackgroundSpacing < Automatic | value >
This attribute is the size background spacing when a size field is generated for this entity.
This attribute is not applicable if the farfield shape type of None is specified.
This attribute is either the string “Automatic” or a float with the range [0, infinity).
The default for this attribute is the value is Automatic.
$mesher get/setShapeAlignment shape
This attribute controls which primary axes the shape is aligned with.
That this attribute is only applicable for cylinder shapes.
This attribute is a string with options < Automatic | X | Y | Z >.
The default for this attribute is X.
$mesher get/setFarfieldLength < Automatic | lengths >
This attribute controls the length dimension of the farfield.
That this attribute is only applicable to box and cylinder farfield shapes.
This attribute is either the string “Automatic” or a list of two float values each within the range [0.0, infinity). The two float values describe the positive and negative length of the shape respectively.
The default for this attribute Automatic.
$mesher get/setFarfieldWidth < Automatic | widths >
This attribute controls the width dimension of the farfield.
That this attribute is only applicable to box farfield shapes.
This attribute is either the string “Automatic” or a list of two float values each within the range [0.0, infinity). The two float values describe the positive and negative width of the shape respectively.
The default for this attribute Automatic.
$mesher get/setFarfieldHeight < Automatic | heights >
This attribute controls the height dimension of the farfield.
That this attribute is only applicable to box farfield shapes.
This attribute is either the string “Automatic” or a list of two float values each within the range [0.0, infinity). The two float values describe the positive and negative height of the shape respectively.
The default for this attribute Automatic.
$mesher get/setFarfieldCapRadii < Automatic | radii >
This attribute controls the radii of the farfield caps.
That this attribute is only applicable to cylinder farfield shapes.
This attribute is either the string “Automatic” or a list of two float values each within the range [0.0, infinity). The first float value describes the radius of the top cylinder cap, and the second float value describes the radius of the base cylinder cap.
The default for this attribute Automatic.
$mesher get/setFarfieldRadius < Automatic | radius >
This attribute controls the radius of the farfield.
That this attribute is only applicable to sphere farfield shapes.
This attribute is either the string “Automatic” or a float value within the range [0.0, infinity) that describes the radius of the sphere.
The default for this attribute Automatic.
$mesher get/setBoundaryLayerType type
This attribute controls the boundary layer type to be applied to resulting volume meshes.
This attribute is a string with options < Off | GeometricGrowth >.
The default for this attribute is Off
$mesher get/setWallNormalSpacing spacing
This attribute controls the wall normal spacing to be applied to the nearfield boundary mesh.
This attribute only applies when the boundary layer type is set to Geometric Growth and only to those domains which belong to the “Boundary Layer” boundary condition filter.
This attribute is a float with the range [0, infinity).
The default for this attribute is 0.01
$mesher get/setGrowthRate growth
This attribute is the growth rate of T-Rex layers of an unstructured block when it is created.
This attribute only applies when the boundary layer type is set to Geometric Growth.
This default is a float with the range [1.0, infinity).
The default for this attribute is 1.2
$mesher get/setCollisionBuffer < Automatic | value >
This attribute is the minimum buffer to be maintained between encroaching extruded tetrahedrals of an unstructured block when it is created.
This attribute only applies when the boundary layer type is set to Geometric Growth.
This attribute is either the string “Automatic” or a float with the range [0, infinity).
The default for this attribute is the value is Automatic.
$mesher get/setFinalCellAspectRatio < Automatic | value >
This attribute specifies the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation, decimation or refinement.
When set to 1.0, anisotropic cell growth continues at each vertex until one of the tets below the vertex reaches its isotropic height. When a value other that 1.0 is selected, the isotropic height criteria is multiplied by the value, meaning that it is possible to stop vertex advancement prior (value < 1) or beyond (value> 1) true isotropy.
This attribute only applies when the boundary layer type is set to Geometric Growth.
This attribute is either the string “Automatic” or a float with the range (0.0, infinity).
The default for this attribute is the value is Automatic.
$mesher get/setMaxIncludedAngle < Automatic | value >
This attribute specifies the maximum included angle quality threshold for T-Rex cells. If the criterion cannot be met the cell will be discarded and the front is stopped locally.
This attribute only applies when the boundary layer type is set to Geometric Growth.
This attribute is either the string “Automatic” or a float with the range [60.0, 180.0], 180.0 disables the quality check.
The default for this attribute is the value is Automatic.
$mesher get/setCentroidSkewness < Automatic | value >
This attribute specifies the maximum centroid skew quality threshold for T-Rex cells. If the criterion cannot be met the cell will be discarded and the front is stopped locally.
This attribute only applies when the boundary layer type is set to Geometric Growth.
This attribute is either the string “Automatic” or a float with the range [0.0, 1.0], where 1.0 disables the quality check.
The default for this attribute is the value is Automatic.
$mesher get/setVoxelMinimumSize < Automatic | value >
This attribute is the minimum voxel size of the voxel mesh.
This attribute only applies when the mesh type is set to voxel.
This attribute is either the string “Automatic” or a float with the range [0, infinity).
The default for this attribute is the value is Automatic.
$mesher get/setVoxelMaximumSize < Automatic | value >
This attribute is the maximum voxel size of the voxel mesh.
This attribute only applies when the mesh type is set to voxel.
This attribute is either the string “Automatic” or a float with the range [0, infinity).
The default for this attribute is the value is Automatic.
$mesher get/setVoxelTransitionLayers < Automatic | value >
This attribute is the number of layers between voxel size transitions of the voxel mesh of this block.
This attribute only applies when the mesh type is set to voxel.
This attribute is either the string “Automatic” or an integer with the range [1, 100].
The default for this attribute is the value is Automatic.
$mesher createGridEntities
This command creates the volume grid entities according to the attributes applied to the pw::VolumeMesher mode such as mesh type, farfield shape, symmetry specifications, size field decay, etc. The newly created farfield domains, symmetry domains, or database planes are named based on their orientation with the principal axes.
This action returns a list of pw::GridEntity objects.
This example shows how to create volume grid entities using a set of unstructured domains with several specified attributes.
Code
set doms [pw::Grid getAll -type pw::DomainUnstructured] set vm [pw::Application begin VolumeMesher $doms] $vm setMeshType Unstructured $vm setFarfieldShapeType Box $vm setSizeFieldDecay 0.8 $vm setSizeFieldBackgroundSpacing 10 set newDoms [$vm createGridEntities] puts "Grid entities created:" foreach ent $newDoms { puts [$ent getName] }
$mesher addBoundaryConditionFilter name
This command creates a new boundary condition filter. Filters apply to all domains associated with the volume created in the mode. If a domain’s name matches a filter’s pattern, then that domain will be assigned to the boundary condition that the filter represents.
name | This parameter is the string boundary condition filter name. |
This action returns the name of the added filter.
$mesher deleteBoundaryConditionFilter name
This command deletes a boundary condition filter.
name | This parameter is the string boundary condition filter name. |
This action returns nothing.
$mesher getBoundaryConditionFilterNames
This command gets all boundary condition filter names.
A list of strings of the boundary condition filter names.
$mesher setBoundaryConditionFilterType name type
This command sets the boundary condition filter’s T-Rex type.
name | This parameter is the string boundary condition filter name. |
type | This attribute is a string with values < Off | Wall | Angle | Match | AdjacentGrid | AspectRatio | MaximumAspectRatio >. |
This action returns nothing.
$mesher getBoundaryConditionFilterType name
This command gets the boundary condition filter’s T-Rex type.
name | This parameter is the string boundary condition filter name. |
This action returns a string with values < Off | Wall | Angle | Match | AdjacentGrid | AspectRatio | MaximumAspectRatio >.
$mesher setBoundaryConditionFilterValue name value
This command sets the boundary condition filter’s T-Rex condition value. If the boundary condition filter’s T-Rex condition type is Wall, the value is the spacing. If the condition type is Angle, the value is the angle. If the condtion type is AspectRatio or MaximumAspectRatio, the value is the aspect ratio.
name | This parameter is the string boundary condition filter name. |
value | This attribute is a float. |
This action returns nothing.
$mesher getBoundaryConditionFilterValue name
This command gets the boundary condition filter’s T-Rex condition value. If the boundary condition filter’s T-Rex condition type is Wall, the value is the spacing. If the condition type is Angle, the value is the angle. If the condtion type is AspectRatio or MaximumAspectRatio, the value is the aspect ratio.
name | This parameter is the string boundary condition filter name. |
value | This attribute is a float. |
This action returns a float.
$mesher setBoundaryConditionFilterPatterns name patterns
This command sets the boundary condition filter’s patterns. The filter’s pattern is used to select grid entities for boundary condition assignment.
name | This parameter is the string boundary condition filter name. |
patterns | This parameter defines a list of string patterns that will be used to match against domains in the volume created by the mode. The order of the patterns is important and is applied from first to last. Domains on the sides of the grid shape that is used to create the volume will not have names until after the volume is generated. To match against these domains, use the following special names: “TopSide”, “BaseSide”, “MiddleSide-1”, “MiddleSide-2”, “MiddleSide-3”, “MiddleSide-4”, “SymmetrySide-1”, and “SymmetrySide-2”. |
This action returns nothing.
$mesher getBoundaryConditionFilterPatterns name
This command gets the boundary condition filter’s patterns. The filter’s pattern is used to select grid entities for boundary condition assignment.
name | This parameter is the string boundary condition filter name. |
This action returns the list of string patterns that are used to match against domains in the volume created by the mode.
$mesher getBoundaryConditionFilterGroups ?-shapeSides sidesVar? name
This action returns a list of domains associated with a boundary condition filter.
-shapeSides sidesVar | This optional parameter is a string variable name which will be assigned with a list of string names that correspond to grid shape sides. The possible grid shape side names and “TopSide”, “BaseSide”, “MiddleSide1”, “MiddleSide2”, “MiddleSide3”, “MiddleSide4”, “SymmetrySide1” and “SymmetrySide2”. |
name | This parameter is the string boundary condition filter name. In addition to any boundary filters created with addBoundaryConditionFilter, the reserved boundary filter names of “Boundary Layer”, “Match”, “Symmetry”, “Isotropic”, and “Periodic” can be used to get the domains associated with those classifications. These reserved names are populated with domains that were not filtered out by any of the added boundary filters. |
This action returns the list of pw::Domain that match the specified filter.
$mesher setBoundaryConditionFilterPriority nameList
This action sets the priority of one or more existing boundary condition filters.
nameList | This parameter is a list of string boundary condition filter names. Any filters not in nameList will be prioritized after the entities in nameList. |
This action returns nothing.
This attribute controls the mesh type that will be produced.
$mesher get/setMeshType mesh
This attribute controls the shape type that will be used on the farfield of the volume mesh.
$mesher get/setFarfieldShapeType shape
This attribute controls how the shape handles symmetry conditions of the enclosed mesh.
$mesher get/setSymmetryMode mode
This attribute controls the placement of the first symmetry plane.
$mesher get/setSymmetryPlane1 plane
This attribute controls the placement of the second symmetry plane.
$mesher get/setSymmetryPlane2 plane
This attribute controls the size field decay factor used when a size field is generated for this entity.
$mesher get/setSizeFieldDecay < Automatic | value >
This attribute is the size background spacing when a size field is generated for this entity.
$mesher get/setSizeFieldBackgroundSpacing < Automatic | value >
This attribute controls which primary axes the shape is aligned with.
$mesher get/setShapeAlignment shape
This attribute controls the length dimension of the farfield.
$mesher get/setFarfieldLength < Automatic | lengths >
This attribute controls the width dimension of the farfield.
$mesher get/setFarfieldWidth < Automatic | widths >
This attribute controls the height dimension of the farfield.
$mesher get/setFarfieldHeight < Automatic | heights >
This attribute controls the radii of the farfield caps.
$mesher get/setFarfieldCapRadii < Automatic | radii >
This attribute controls the radius of the farfield.
$mesher get/setFarfieldRadius < Automatic | radius >
This attribute controls the boundary layer type to be applied to resulting volume meshes.
$mesher get/setBoundaryLayerType type
This attribute controls the wall normal spacing to be applied to the nearfield boundary mesh.
$mesher get/setWallNormalSpacing spacing
This attribute is the growth rate of T-Rex layers of an unstructured block when it is created.
$mesher get/setGrowthRate growth
This attribute is the minimum buffer to be maintained between encroaching extruded tetrahedrals of an unstructured block when it is created.
$mesher get/setCollisionBuffer < Automatic | value >
This attribute specifies the scale factor to be applied to the local isotropic height at which T-Rex stops layer growth via deformation, decimation or refinement.
$mesher get/setFinalCellAspectRatio < Automatic | value >
This attribute specifies the maximum included angle quality threshold for T-Rex cells.
$mesher get/setMaxIncludedAngle < Automatic | value >
This attribute specifies the maximum centroid skew quality threshold for T-Rex cells.
$mesher get/setCentroidSkewness < Automatic | value >
This attribute is the minimum voxel size of the voxel mesh.
$mesher get/setVoxelMinimumSize < Automatic | value >
This attribute is the maximum voxel size of the voxel mesh.
$mesher get/setVoxelMaximumSize < Automatic | value >
This attribute is the number of layers between voxel size transitions of the voxel mesh of this block.
$mesher get/setVoxelTransitionLayers < Automatic | value >
This command creates the volume grid entities according to the attributes applied to the pw::VolumeMesher mode such as mesh type, farfield shape, symmetry specifications, size field decay, etc.
$mesher createGridEntities
This command creates a new boundary condition filter.
$mesher addBoundaryConditionFilter name
This command deletes a boundary condition filter.
$mesher deleteBoundaryConditionFilter name
This command gets all boundary condition filter names.
$mesher getBoundaryConditionFilterNames
This command updates a boundary condition filter’s name.
$mesher setBoundaryConditionFilterName oldName newName
This command sets the boundary condition filter’s T-Rex type.
$mesher setBoundaryConditionFilterType name type
This command gets the boundary condition filter’s T-Rex type.
$mesher getBoundaryConditionFilterType name
This command sets the boundary condition filter’s adaption type.
$mesher setBoundaryConditionFilterAdaptation name adapt
This command gets the boundary condition filter’s adaption type.
$mesher getBoundaryConditionFilterAdaptation name
This command sets the boundary condition filter’s T-Rex condition value.
$mesher setBoundaryConditionFilterValue name value
This command gets the boundary condition filter’s T-Rex condition value.
$mesher getBoundaryConditionFilterValue name
This command sets the boundary condition filter’s patterns.
$mesher setBoundaryConditionFilterPatterns name patterns
This command gets the boundary condition filter’s patterns.
$mesher getBoundaryConditionFilterPatterns name
This action returns a list of domains associated with a boundary condition filter.
$mesher getBoundaryConditionFilterGroups ?-shapeSides sidesVar? name
This action sets the priority of one or more existing boundary condition filters.
$mesher setBoundaryConditionFilterPriority nameList
This action begins a mode in the application.
pw::Application begin ?-mode_specific_flags? mode ?entities?