pw:: BlockUnstructured

Unstructured block type

Derives From

pw::Object pw::Entity pw::GridEntity pw::Block

Summary
Unstructured block type
This action creates a new unstructured block object.
This action creates new unstructured block objects from the given domains.
This action splits the given TRex blocks into prism and tetrahedral cell blocks, maximizing the number of prism layers.
This action joins as many of the given unstructured blocks together as possible.
This action combines anisotropic tet and pyramid cells in TRex-defined blocks into tet, pyramid, prism and hex cells.
This default is the boundary decay factor of an unstructured block when it is created.
This default is the boundary influence factor of an unstructured block when it is created.
This default is the background grid spacing of an unstructured block when it is created.
This default is the maximum spacing growth rate along an edge of an unstructured block when it is created.
This default is the maximum edge length of an unstructured block when it is created.
This default is the minimum edge length of an unstructured block when it is created.
This default is the maximum pyramid height of an unstructured block when it is created.
This default is the minimum pyramid height of an unstructured block when it is created.
This default is the pyramid aspect ratio of an unstructured block when it is created.
This default is the initial memory size for initializing an unstructured block when it is created.
This default is the type of cells generated by TRex of an unstructured block when it is created.
This default is the maximum number of T-Rex layers of an unstructured block when it is created.
This default is the minimum number of fully structured TRex layers of an unstructured block when it is created.
This default is the growth rate of TRex layers of an unstructured block when it is created.
This default is the flag for pushing TRex attributes onto the connectors and domains of an unstructured block when a it is created.
This default is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of an unstructured block when it is created.
This default is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for an unstructured block when it is created.
This default is the number of TRex isotropic seed layers for an unstructured block when it is created.
This default is the minimum buffer to be maintained between encroaching extruded tetrahedrals of an unstructured block when it is created.
This default is the rate at which anisotropic triangles are blended into isotropic triangles on the interior of an unstructured block when it is created.
This default is the number of layers to delay checking for the quality criteria of the TRex cells of an unstructured block when it is created.
This default is the maximum included angle quality threshold for TRex cells of an unstructured block when it is created.
This default is the maximum equivolume quality threshold for TRex cells of an unstructured block when it is created.
This default is the maximum equiangle quality threshold for TRex cells of an unstructured block when it is created.
This default is the maximum centroid skew quality threshold for TRex cells of an unstructured block when it is created.
This default is the method to be used when computing prism cell volumes for TRex cells of an unstructured block when it is created.
This default is the adaption target edge length amplification factor of an unstructured block when it is created.
This default is the orphan remediation and fringe improvement adaption targets of an unstructured block when it is created.
This action gets the number of errors from the last attempt at initializing the block.
This action gets a specific error message from the last initialization attempt.
This action gets the number of T-Rex cells in the block.
This action gets the number of T-Rex tet cells in the block.
This action gets the number of T-Rex pyr cells in the block.
This action gets the number of T-Rex full layers in the block generated by the last run of the solver.
This action gets the number of T-Rex total layers in the block generated by the last run of the solver.
This action gets the number of match domains emanating from the adj grid/wall BC conditions within this block.
This action gets the minimum, average, and maximum initial spacing of the match domains connected to the adj grid/wall BCs of this block.
This action gets the minimum, average, and maximum growth rates of the match domains connected to the adj grid/wall BCs of this block.
This action gets the minimum, average, and maximum layer count of the match domains connected to the adj grid/wall BCs of this block.
This action frees the block’s interior points.
This action removes a face from the block.
This action returns the block’s outer face.
THis action gets the calculated minimum boundary edge length based on triangluar area of the boundary cells.
This action gets the calculated maximum boundary edge length based on triangluar area of the boundary cells.
This action gets the calculated minimum volume edge length based on tetrahedral volume of the cells.
This action gets the calculated maximum volume edge length based on tetrahedral volume of the cells.
This action gets the calculated maximum height of the pyrimds based on the proscribed aspect ratio and the base area of the cells.
This action gets the calculated minimum height of the pyrimds based on the proscribed aspect ratio and the base area of the cells.
This action gets the named unstructured solver attribute.
This action sets the named unstructured solver attribute.
This attribute is the boundary decay factor of an unstructured block.
This attribute is the boundary influence factor of an unstructured block.
This attribute is the background spacing of an unstructured block.
This attribute is the maximum spacing growth rate along an edge of an unstructured block.
This attribute is the maximum edge length of an unstructured block.
This attribute is the minimum edge length of an unstructured block.
The maximum pyramid height of an unstructured block
This attribute is the minimum pyramid height of an unstructured block.
This attribute is the pyramid aspect ratio of an unstructured block.
This attribute is the initial memory allocated for initializing an unstructured block.
This attribute is the number of iterations to be used for intializing the interior points of this block.
This attribute controls what type of cells a T-Rex generated block will contain after generation.
This attribute is the maximum number of TRex layers of the block.
This attribute is the minimum number of fully structured TRex layers of the block.
This attribute is the growth rate of TRex layers for the block.
This attribute is the flag for pushing TRex attributes onto the connectors and domains of this block.
This attribute is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the block.
This attribute is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the block.
This attribute is the number of TRex isotropic seed layers for the block.
This attribute specifies the minimum buffer to be maintained between encroaching extruded tetrahedrals.
This attribute specifies the rate at which anisotropic triangles are blended into isotropic triangles on the block interior.
This attribute is the number of layers to delay checking for the quality criteria of the TRex cells.
This attribute specifies the maximum included angle quality threshold for TRex cells.
This attribute specifies the maximum equivolume quality threshold for TRex cells.
This attribute specifies the maximum equiangle quality threshold for TRex cells.
This attribute specifies the maximum centroid skew quality threshold for TRex cells.
This attribute specifies the method to be used when computing prism cell volumes for TRex cells.
This attribute is the adaption target edge length amplification factor of an unstructured block.
This attribute sets the orphan remediation and fringe improvement adaption targets to be applied to an unstructured block run in the unstructured solver.

Static Actions

create

pw::BlockUnstructured create

This action creates a new unstructured block object.

Parameters

This action has no parameters.

Returns

This action returns a new pw::BlockUnstructured object.

createFromDomains

pw::BlockUnstructured createFromDomains ?-reject rejectVar? ?-fillVoids? ?-voids voidsVar? ?-addBaffles? ?-baffles bafflesVar? domains

This action creates new unstructured block objects from the given domains.

Parameters

-reject rejectVarThis optional parameter is a string variable name to receive a list of pw::Domain objects that were not used in creating the blocks.
-fillVoidsThis optional parameter specifies that internal, closed block faces (aka voids or holes) will also be assembled into blocks.  The returned list of blocks will include the outermost block and all of the blocks assembled to fill its voids.  By default internal, closed block faces are not assembled and are left as voids (holes) in their surrounding block.
-voids voidsVarThis optional parameter is a string variable name to receive the subset of returned pw::BlockUnstructured objects that were created to fill block voids.  This parameter is ignored if -fillVoids is not also specified.
-addBafflesThis optional parameter specifies that internal, non-closed, baffle faces are to be added to their surrounding block.  By default, baffle faces are not added (and returned in rejectVar).
-baffles bafflesVarThis optional parameter is a string variable name to receive the pw::FaceUnstructured objects that were added as baffles to the assembled blocks.  This parameter is ignored if -addBaffles is not also specified.
domainsThis parameter is a list of pw::Domain objects.

Returns

This action returns a list of new pw::BlockUnstructured objects.  Multiple blocks will be returned if the domains form multiple closed, disjoint regions or if -fillVoids is specified and the domains form multiple closed, nested regions (or any combination of these).

Information

This command supports progress updates.

Notes

While this command will produce identical results when run with the exact same input, it may produce different results for slight variations in the input domains.  The blocks may be created in a different order, for example.  Use the explicit block building routines ( pw::FaceUnstructured.create, pw::BlockUnstructured.create, pw::Face.addDomain, and pw::Block.addFace commands) to build the block in a controlled manner.

If this command is run inside of a Create pw::Mode, it will only be able to assemble blocks from entities that were created within the same pw::Mode.  If entities created outside of the pw::Mode are also included, the assembly will fail.  Instead, use explicit assembly by creating the pw::FaceUnstructured objects directly.

Example

This example assembles all visible and selectable domains into as many blocks as possible with all voids (holes) filled and baffles.

Code

package require PWI_Glyph 2.17.2
# Get all visible and selectable domains
set allDoms [pw::Grid getAll -type pw::Domain]
set doms {}
foreach dom $allDoms {
if { ![pw::Display isLayerVisible [$dom getLayer]] } {
continue
} elseif { ![$dom getEnabled] } {
continue
} else {
lappend doms $dom
}
}

# Assemble blocks from these domains
set blks [pw::BlockUnstructured createFromDomains \
-reject unusedDoms -fillVoids -voids voidBlks -addBaffles \
-baffles baffleFaces $doms]

# Output the results
puts "Assembled a total of [llength $blks] blocks."
if { [llength $voidBlks] > 0 } {
puts "[llength $voidBlks] of these were used to fill voids."
foreach blk $voidBlks {
puts " [$blk getName] ($blk)"
}
} else {
puts "There were no void blocks."
}

set baffleLen [llength $baffleFaces]
if { $baffleLen > 0 } {
puts "$baffleLen baffle faces were added."
foreach face $baffleFaces {
puts " $face"
set faceDoms [$face getDomains]
foreach faceDom $faceDoms {
puts " [$faceDom getName] ($faceDom)"
}
}
} else {
puts "No baffle faces were added."
}

if { [llength $unusedDoms] > 0 } {
puts "[llength $unusedDoms] domains were unused."
foreach dom $unusedDoms {
puts " [$dom getName] ($dom)"
}
} else {
puts "All domains were used."
}

Output

Assembled a total of 3 blocks.
Of these blocks, 2 were used to fill voids.
blk-1 (::pw::BlockUnstructured_6)
blk-2 (::pw::BlockUnstructured_7)
1 baffle faces were added.
::pw::FaceUnstructured_2
dom-17 (::pw::DomainUnstructured_13)
dom-3 (::pw::DomainUnstructured_24)
dom-4 (::pw::DomainUnstructured_25)
1 domains were unused.
dom-5 (::pw::DomainUnstructured_26)

split

pw::BlockUnstructured split ?-trexLayers? blocks

This action splits the given TRex blocks into prism and tetrahedral cell blocks, maximizing the number of prism layers.

Parameters

-trexLayersThis optional parameter specifies that the TRex (anisotropic tetrahedral) cells should be recombined into as many prism layers as possible.  This is the default.
blocksthe list of pw::BlockUnstructured TRex blocks.

Returns

This action returns a heterogeneous list of the pw::BlockUnstructured and pw::BlockExtruded objects that were created and/or modified.

Information

This command supports progress updates.

Example

This example creates prism (extruded) and tetrahedral cell blocks, maximizing the number of anisotropic prism layers that can be recombined while keeping the block topology intact.  This example assumes that all the unstructured blocks in the system are TRex blocks.

Code

set blocks [pw::Grid getAll -type pw::BlockUnstructured]
set splits [pw::BlockUnstructured split -trexLayers $blocks]
puts "[llength $splits] blocks were created/modified."

Output

3 blocks were created/modified.

join

pw::BlockUnstructured join ?-reject rejectVar? blocks

This action joins as many of the given unstructured blocks together as possible.

Parameters

-reject rejectVarThis optional parameter is name string of the variable that recieves a list of pw::BlockUnstructured objects that were not used in joining.
blocksThis parameter is a list of pw::BlockUnstructured objects to join.

Returns

This action returns a list of the pw::BlockUnstructured objects that were joined.

Information

This command supports progress updates.

combineAnisoCells

pw::BlockUnstructured combineAnisoCells blocks

This action combines anisotropic tet and pyramid cells in TRex-defined blocks into tet, pyramid, prism and hex cells.

Parameters

blocksthe list of pw::BlockUnstructured TRex blocks.

Returns

This action returns nothing.

Information

This command supports progress updates.

Example

This example combines anisotropic tet and pyramid cells in TRex-defined blocks into tet, pyramid, prism and hex cells.

Code

set blocks [pw::Grid getAll -type pw::BlockUnstructured]
pw::BlockUnstructured combineAnisoCells $blocks

Static Defaults

BoundaryDecay

pw::BlockUnstructured get/setDefault BoundaryDecay decay

This default is the boundary decay factor of an unstructured block when it is created.

Type

This default is a float with the range [0, 1].

Default

The default value is 0.5.

BoundaryInfluence

pw::BlockUnstructured get/setDefault BoundaryInfluence influence

This default is the boundary influence factor of an unstructured block when it is created.

Type

This default is a float with the range [0, 1].

Default

The default value is 0.5.

BackgroundSpacing

pw::BlockUnstructured get/setDefault BackgroundSpacing spacing

This default is the background grid spacing of an unstructured block when it is created.

Type

This default is a float with the range (0, infinity).

Default

The default value is 0.0.

EdgeMaximumGrowthRate

pw::BlockUnstructured get/setDefault EdgeMaximumGrowthRate growth_rate

This default is the maximum spacing growth rate along an edge of an unstructured block when it is created.

Type

This default is a float with the range (1.0, infinity).

Default

The default value is 1.8.

EdgeMaximumLength

pw::BlockUnstructured get/setDefault EdgeMaximumLength < Boundary | length >

This default is the maximum edge length of an unstructured block when it is created.

Type

This default is a float with the range (0, infinity).

Default

The default value is Boundary.

EdgeMinimumLength

pw::BlockUnstructured get/setDefault EdgeMinimumLength < Boundary | length >

This default is the minimum edge length of an unstructured block when it is created.

Type

This default is a float with the range (0, infinity).

Default

The defualt value is Boundary.

PyramidMaximumHeight

pw::BlockUnstructured get/setDefault PyramidMaximumHeight height

This default is the maximum pyramid height of an unstructured block when it is created.

Type

This default is a float with the range [0, infinity.  Use 0 for unrestricted pyramid height.

Default

The default value is 0.

PyramidMinimumHeight

pw::BlockUnstructured get/setDefault PyramidMinimumHeight height

This default is the minimum pyramid height of an unstructured block when it is created.

Type

This default is a float with the range [0, infinity).  Use 0 for unrestricted pyramid height.

Default

THe default value is 0.

PyramidAspectRatio

pw::BlockUnstructured get/setDefault PyramidAspectRatio ratio

This default is the pyramid aspect ratio of an unstructured block when it is created.

Type

This default is a float with the range (0, infinity).

Default

THe default value is 1.

InitialMemorySize

pw::BlockUnstructured get/setDefault InitialMemorySize megabytes

This default is the initial memory size for initializing an unstructured block when it is created.  More memory will be allocated if necessary.

Type

This default is an integer with the range 0 | [10, infinity) megabytes.

Default

The default value is 0.

TRexCellType

pw::BlockUnstructured get/setDefault TRexCellType value

This default is the type of cells generated by TRex of an unstructured block when it is created.

Type

This default is a string with options < TetPyramid | TetPyramidPrismHex | AllAndConvertWallDoms >

Default

The default value is TetPyramidPrismHex

Information

TetPyramid indicates that generated cells will be stored as tets upon completion, except for pyramids necessarily placed adjacent to surface quads.  TetPyramidPrismHex means that a combination of tets, pyramids and prisms will be generated in the anisotropic (T-Rex) portion of the mesh.  In addition, hexes will be generated off of surface quads.  AllAndConvertWallDoms is the same as TetPyramidPrismHex except that triangles lying on growth surfaces will be combined into quads (as is practical) after the block is generated.  This will essentially combine prism stacks into hex stacks, further lowering cell count.

TRexMaximumLayers

pw::BlockUnstructured get/setDefault TRexMaximumLayers layers

This default is the maximum number of T-Rex layers of an unstructured block when it is created.

Type

This default is an integer with the range [0, infinity), where 0 means that there should be no TRex layers.

Default

The default value is 0.

TRexFullLayers

pw::BlockUnstructured get/setDefault TRexFullLayers layers

This default is the minimum number of fully structured TRex layers of an unstructured block when it is created.

Type

This default is an integer with the range [0, infinity), where 0 means that there should be no minimum fully structured TRex layers.

Default

The default value is 0.

TRexGrowthRate

pw::BlockUnstructured get/setDefault TRexGrowthRate growth_rate

This default is the growth rate of TRex layers of an unstructured block when it is created.

Type

This default is a float with the range [1.0, infinity).

Default

The default value is 1.3.

TRexPushAttributes

pw::BlockUnstructured get/setDefault TRexPushAttributes push

This default is the flag for pushing TRex attributes onto the connectors and domains of an unstructured block when a it is created.

Type

This default is a boolean, where true means that TRex attributes are pushed down onto the connectors and domains.

Default

The default value is false.

TRexSpacingSmoothing

pw::BlockUnstructured get/setDefault TRexSpacingSmoothing smooth

This default is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of an unstructured block when it is created.

Type

This default is an integer with the range [0, infinity), where 0 means no smoothing is applied to the initial spacing values.

Default

The default value is 3.

TRexSpacingRelaxationFactor

pw::BlockUnstructured get/setDefault TRexSpacingRelaxationFactor factor

This default is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for an unstructured block when it is created.

Type

This default is a float with the range [0.0, 1.0), where 0 means no smoothing is applied to the initial spacing values.

Default

The default value is 0.7.

TRexIsotropicSeedLayers

pw::BlockUnstructured get/setDefault TRexIsotropicSeedLayers value

This default is the number of TRex isotropic seed layers for an unstructured block when it is created.

Type

This default is a string with the value < UseRemainingLayers > or an explicit integer with the range [0, infinity), where 0 means that there should be no TRex isotropic seed layers.

Default

The default value is 0.

TRexCollisionBuffer

pw::BlockUnstructured get/setDefault TRexCollisionBuffer factor

This default is the minimum buffer to be maintained between encroaching extruded tetrahedrals of an unstructured block when it is created.

Type

This default is a float with the range [0, infinity).

Default

The default value is 0.5.

Info

This default is a multiplication factor of the current cell height.  With a factor of 0.5, a grid point will be extruded by a distance of 0.01 only if it may also be extruded by a distance of 0.015 without intersecting any other portion of the front.

TRexAnisotropicIsotropicBlend

pw::BlockUnstructured get/setDefault TRexAnisotropicIsotropicBlend blending

This default is the rate at which anisotropic triangles are blended into isotropic triangles on the interior of an unstructured block when it is created.

Type

This default is a float with the range [0, 1], where 0 disables blending and larger values increase the rate of blending.

Default

The default value is 0.5.

TRexSkewCriteriaDelayLayers

pw::BlockUnstructured get/setDefault TRexSkewCriteriaDelayLayers delay

This default is the number of layers to delay checking for the quality criteria of the TRex cells of an unstructured block when it is created.

Type

This default is an integer with the range [0, infinity), where 0 means that there should be no delay in checking the quality criteria.

Default

The default value is 0.

TRexSkewCriteriaMaximumAngle

pw::BlockUnstructured get/setDefault TRexSkewCriteriaMaximumAngle angle

This default is the maximum included angle quality threshold for TRex cells of an unstructured block when it is created.

Type

This default is a float with the range [60.0, 180.0], where 180.0 disables the quality check.

Default

The default value is 180.0.

TRexSkewCriteriaEquivolume

pw::BlockUnstructured get/setDefault TRexSkewCriteriaEquivolume threshold

This default is the maximum equivolume quality threshold for TRex cells of an unstructured block when it is created.

Type

This default is a float with the range [0.0, 1.0], where 1.0 disables the quality check.

Default

The default value is 1.0.

TRexSkewCriteriaEquiangle

pw::BlockUnstructured get/setDefault TRexSkewCriteriaEquiangle threshold

This default is the maximum equiangle quality threshold for TRex cells of an unstructured block when it is created.

Type

This default is a float with the range [0.0, 1.0], where 1.0 disables the quality check.

Default

The default value is 1.0.

TRexSkewCriteriaCentroid

pw::BlockUnstructured get/setDefault TRexSkewCriteriaCentroid threshold

This default is the maximum centroid skew quality threshold for TRex cells of an unstructured block when it is created.

Type

This default is a float with the range [0.0, 1.0], where 1.0 disables the quality check.

Default

The default value is 1.0.

TRexVolumeFunction

pw::BlockUnstructured get/setDefault TRexVolumeFunction function

This default is the method to be used when computing prism cell volumes for TRex cells of an unstructured block when it is created.

Type

This default is a string with options < MinComponent | GreenGauss >.  MinComponent indicates that the TRex mesher should use the minimum component volume for prism volume computation.  GreenGauss indicates the use of the Green-Gauss method of prism volume computation.

Default

The default value is MinComponent.

OversetAdaptAmplification

$block get/setDefault OversetAdaptAmplification factor

This default is the adaption target edge length amplification factor of an unstructured block when it is created.

Type

This default is a float with the range (0, infinity).

Default

The default value is 1.5.

OversetAdaptTargets

$block get/setDefault OversetAdaptTargets targets

This default is the orphan remediation and fringe improvement adaption targets of an unstructured block when it is created.

Type

This default is a list of strings with values < Fringes | Donors | Orphans | OrphanDonorCandidates >.

Default

The default value is [list Donors OrphanDonorCandidates].

Instance Actions

getInitializationErrorCount

$block getInitializationErrorCount

This action gets the number of errors from the last attempt at initializing the block.

Parameters

This action has no parameters.

Returns

This action returns the integer number of error messages.

getInitializationError

$block getInitializationError ?-points? index

This action gets a specific error message from the last initialization attempt.

Parameters

-pointsThis optional parameter indicates that the error elements should be returned as a list of xyz vectors rather than indices
indexThis parameter is the integer message number with the range [1, num_messages].

Returns

This action returns a list consisting of an error message string and 0 or more additional elements that are lists of vertices that indicate the location of the error.  Each list will contain vertex indices or xyz vectors if the -points parameter is present.

Information

Each list of vertices that indicate the location of the error represents a different shape depending on the number of vertices provided: a single point (1 vertex), an edge (2 vertices), a cell face (3 vertices), or a cell (4 vertices).

Do not depend on the actual error message strings as a “key”.  The message may change across releases or languages.

See Also

getInitializationErrorCount

getTRexCellCount

$blk getTRexCellCount

This action gets the number of T-Rex cells in the block.  Note that there is currently no distinction between an isotropic or anisotropic (T-Rex) cell, so this action is used only for statistical purposes.

Parameters

none

Returns

This action returns the number of anisotropic (T-Rex) cells.

getTRexTetCount

$blk getTRexTetCount

This action gets the number of T-Rex tet cells in the block.  Note that there is currently no distinction between an isotropic or anisotropic (T-Rex) cell, so this action is used only for statistical purposes.

Parameters

none

Returns

This action returns the number of anisotropic (T-Rex) tet cells.

getTRexPyrCount

$blk getTRexPyrCount

This action gets the number of T-Rex pyr cells in the block.  Note that there is currently no distinction between an isotropic or anisotropic (T-Rex) cell, so this action is used only for statistical purposes.

Parameters

none

Returns

This action returns the number of anisotropic (T-Rex) pyramid cells.

getTRexFullLayerCount

$blk getTRexFullLayerCount

This action gets the number of T-Rex full layers in the block generated by the last run of the solver.  This may be different than the user-specified amount in the solver attributes

Parameters

none

Returns

This action returns the number of T-Rex full layers.

getTRexTotalLayerCount

$blk getTRexTotalLayerCount

This action gets the number of T-Rex total layers in the block generated by the last run of the solver.  This may be different than the user-specified amount in the solver attributes

Parameters

none

Returns

This action returns the number of T-Rex total layers.

getTRexMatchDomainCount

$blk getTRexMatchDomainCount ?-connectorCount connectorCountVar?

This action gets the number of match domains emanating from the adj grid/wall BC conditions within this block.

Parameters

-connectorCount connectorCountVarThis optional parameter is a variable name to recieve the count of connectors where domains emanate from the adj grid/wall BC conditions within this block.  This can be greater than the number of domains when multiple connectors of a domain touch a adj grid/wall BC condition.

Returns

This action returns the number of domains.

getTRexMatchInitialSpacing

$blk getTRexMatchInitialSpacing

This action gets the minimum, average, and maximum initial spacing of the match domains connected to the adj grid/wall BCs of this block.

Parameters

none

Returns

This action returns a vector of the minimum, average, and maximum of the initial spacings.  If there are no match domains, 0.0 will be returned for each of these values

Example

This example shows how to get the initial spacing on match domains from an unstructured block.  $blk(1) is referencing an existing block.

Code

puts [$blk(1) getTRexMatchInitialSpacing]

Output

[0.0100 0.0123 0.0200]

getTRexMatchGrowthRate

$blk getTRexMatchGrowthRate

This action gets the minimum, average, and maximum growth rates of the match domains connected to the adj grid/wall BCs of this block.

Parameters

none

Returns

This action returns a vector of the minimum, average, and maximum of the growth rates.  If there are no match domains, 0.0 will be returned for each of these values

Example

This example shows how to get the average growth rate on match domains from an unstructured block.  $blk(1) is referencing an existing block.

Code

puts [$blk(1) getTRexMatchGrowthRate]

Output

[1.0100 1.0123 1.0200]

getTRexMatchLayerCount

$blk getTRexMatchLayerCount

This action gets the minimum, average, and maximum layer count of the match domains connected to the adj grid/wall BCs of this block.

Parameters

none

Returns

This action returns a vector of the minimum, average, and maximum of the layer counts.  If there are no match domains, 0.0 will be returned for each of these values

Example

This example shows how to get the average initial spacing on match domains from an unstructured block.  $blk(1) is referencing an existing domain.

Code

puts [$blk(1) getTRexMatchLayerCount]

Output

[10.0 20.0 30.0]

freeInterior

$block freeInterior

This action frees the block’s interior points.

Parameters

This action has no paramteres.

Returns

This action returns nothing.

removeFace

$block removeFace $face

This action removes a face from the block.

Parameters

faceThis parameter is the pw::FaceUnstructured object to remove.

Returns

This action returns nothing.

Information

If this is performed inside of a mode, the pw::FaceUnstructured object will be valid until the end of the mode.  Otherwise, the face object is deleted immediately.  The outer face of a block can not be removed unless it is the only face.

getOuterFace

$block getOuterFace

This action returns the block’s outer face.

Parameters

none

Returns

This action returns a pw::FaceUnstructured object representing the block’s outer face.  An error is raised if the block does not have an outer face.

getBoundaryEdgeMinimumLength

$block getBoundaryEdgeMinimumLength

THis action gets the calculated minimum boundary edge length based on triangluar area of the boundary cells.

Parameters

This action has no parameters.

Returns

This action returns the minimum boundary edge length as a float.

getBoundaryEdgeMaximumLength

$block getBoundaryEdgeMaximumLength

This action gets the calculated maximum boundary edge length based on triangluar area of the boundary cells.

Parameters

This action has no parameters.

Returns

This action returns the maximum boundary edge length as a float.

getVolumeEdgeMinimumLength

$block getVolumeEdgeMinimumLength

This action gets the calculated minimum volume edge length based on tetrahedral volume of the cells.

Parameters

This action has no parameters.

Returns

This action returns the minimum volume edge length as a float.

getVolumeEdgeMaximumLength

$block getVolumeEdgeMaximumLength

This action gets the calculated maximum volume edge length based on tetrahedral volume of the cells.

Parameters

This action has no parameters.

Returns

This action returns the maximum volume edge length as a float.

getPyramidBaseMaximumHeight

$block getPyramidBaseMaximumHeight

This action gets the calculated maximum height of the pyrimds based on the proscribed aspect ratio and the base area of the cells.

Parameters

This action has no parameters.

Returns

This action returns the maximum pyramid height as a float.

getPyramidBaseMinimumHeight

This action gets the calculated minimum height of the pyrimds based on the proscribed aspect ratio and the base area of the cells.

Parameters

This action has no parameters.

Returns

This action returns the minimum pyramid height as a float.

getUnstructuredSolverAttribute

$block getUnstructuredSolverAttribute att_name

This action gets the named unstructured solver attribute.

Parameters

att_nameThis parameter is the name string of the attribute to get.
value_typeThis parameter is the type string of value to get; < Actual | Default >.

Returns

This action returns the value of the attribute.

setUnstructuredSolverAttribute

$block setUnstructuredSolverAttribute att_name att_value

This action sets the named unstructured solver attribute.

Parameters

att_nameThis parameter is the string name of the attribute to set.
att_valueThis parameter is the new attribute value.

Returns

This action returns nothing.

Unstructured Solver Attributes

BoundaryDecay

$block get/setUnstructuredSolverAttribute BoundaryDecay decay

This attribute is the boundary decay factor of an unstructured block.

Type

This attribute is a float with the range [0, 1].

Default

The default for this attribute is 0.5.

BoundaryInfluence

$block get/setUnstructuredSolverAttribute BoundaryInfluence influence

This attribute is the boundary influence factor of an unstructured block.

Type

This attribute is a float with the range [0, 1].

Default

The default for this attribute is 0.5.

BackgroundSpacing

$block get/setUnstructuredSolverAttribute BackgroundSpacing spacing

This attribute is the background spacing of an unstructured block.

Type

This attribute is a float with the range [0, infinity).

Default

The default for this attribute is 0.0.

EdgeMaximumGrowthRate

$block get/setUnstructuredSolverAttribute EdgeMaximumGrowthRate growth_rate

This attribute is the maximum spacing growth rate along an edge of an unstructured block.

Type

This attribute is a float with the range (1.0, infinity).

Default

The default for this attribute is 1.8.

EdgeMaximumLength

$block get/setUnstructuredSolverAttribute EdgeMaximumLength < Boundary | length >

This attribute is the maximum edge length of an unstructured block.

Type

This attribute is a float with the range (0, infinity).

Default

The default for this attribute is 0.0.

EdgeMinimumLength

$block get/setUnstructuredSolverAttribute EdgeMinimumLength < Boundary | length >

This attribute is the minimum edge length of an unstructured block.

Type

This attribute is a float with the range (0, infinity).

Default

The default for this attribute is 0.0.

PyramidMaximumHeight

$block get/setUnstructuredSolverAttribute PyramidMaximumHeight height

The maximum pyramid height of an unstructured block

Type

float; [0, infinity), use 0 for unrestricted pyramid height

Default

The default for this attribute is 0.0.

PyramidMinimumHeight

$block get/setUnstructuredSolverAttribute PyramidMinimumHeight height

This attribute is the minimum pyramid height of an unstructured block.

Type

This attribute is a float with the range [0, infinity).  Use 0 for unrestricted pyramid height.

Default

The default for this attribute is 0.0.

PyramidAspectRatio

$block get/setUnstructuredSolverAttribute PyramidAspectRatio ratio

This attribute is the pyramid aspect ratio of an unstructured block.

Type

This attribute is a float with the range (0, infinity).

Default

The default for this attribute is 0.5.

InitialMemorySize

$block get/setUnstructuredSolverAttribute InitialMemorySize megabytes

This attribute is the initial memory allocated for initializing an unstructured block.

Type

This attribute is an integer with the range 0 | [10, infinity) in megabytes.

Default

The default for this attribute is 0.

IterationCount

$block get/setUnstructuredSolverAttribute IterationCount count

This attribute is the number of iterations to be used for intializing the interior points of this block.

Type

This attribute is an integer with the range [1, 12].

Default

The default for this attribute is 1.

TRexCellType

$block get/setUnstructuredSolverAttribute TRexCellType value

This attribute controls what type of cells a T-Rex generated block will contain after generation.

Type

This attribute is a string with options < TetPyramid | TetPyramidPrismHex | AllAndConvertWallDoms >

Default

The default for this attribute is TetPyramidPrismHex

Information

TetPyramid indicates that generated cells will be stored as tets upon completion, except for pyramids necessarily placed adjacent to surface quads.  TetPyramidPrismHex means that a combination of tets, pyramids and prisms will be generated in the anisotropic (T-Rex) portion of the mesh.  In addition, hexes will be generated off of surface quads.  AllAndConvertWallDoms is the same as TetPyramidPrismHex except that triangles lying on growth surfaces will be combined into quads (as is practical) after the block is generated.  This will essentially combine prism stacks into hex stacks, further lowering cell count.

TRexMaximumLayers

$block get/setUnstructuredSolverAttribute TRexMaximumLayers value

This attribute is the maximum number of TRex layers of the block.

Type

This attribute is an integer with the range [0, infinity), where 0 means that there should be no TRex layers.

Default

The default of this attribute is 0.

TRexFullLayers

$block get/setUnstructuredSolverAttribute TRexFullLayers value

This attribute is the minimum number of fully structured TRex layers of the block.

Type

This attribute is an integer with the range [0, infinity), where 0 means that there should be no minimum fully structured TRex layers.

Default

The default of this attribute is 0.

TRexGrowthRate

$block get/setUnstructuredSolverAttribute TRexGrowthRate value

This attribute is the growth rate of TRex layers for the block.

Type

This attribute is a float with the range [1.0, infinity).

Default

The default of this attribute is 1.3.

TRexPushAttributes

$block get/setUnstructuredSolverAttribute TRexPushAttributes value

This attribute is the flag for pushing TRex attributes onto the connectors and domains of this block.

Type

This attribute is a boolean, where true means that TRex attributes are pushed down onto the connectors and domains.

Default

The default of this attribute is false.

TRexSpacingSmoothing

$block get/setUnstructuredSolverAttribute TRexSpacingSmoothing value

This attribute is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of the block.

Type

This attribute is an integer with the range [0, infinity), where 0 means no smoothing is applied to the initial spacing values.

Default

The default of this attribute is 3.

TRexSpacingRelaxationFactor

$block get/setUnstructuredSolverAttribute TRexSpacingRelaxationFactor value

This attribute is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for the block.

Type

This attribute is a float with the range [0.0, 1.0), where 0 means no smoothing is applied to the initial spacing values.

Default

The default of this attribute is 0.7.

TRexIsotropicSeedLayers

$block get/setUnstructuredSolverAttribute TRexIsotropicSeedLayers value

This attribute is the number of TRex isotropic seed layers for the block.

Type

This attribute is a string with the value < UseRemainingLayers > or an explicit integer with the range [0, infinity), where 0 means that there should be no TRex isotropic seed layers.

Default

The default value of this attribute is 0.

TRexCollisionBuffer

$block get/setUnstructuredSolverAttribute TRexCollisionBuffer value

This attribute specifies the minimum buffer to be maintained between encroaching extruded tetrahedrals.

Type

This attribute is a float with the range [0, infinity).

Default

The default of this attribute is 0.5.

Info

This attribute is a multiplication factor of the current cell height.  With a factor of 0.5, a grid point will be extruded by a distance of 0.01 only if it may also be extruded by a distance of 0.015 without intersecting any other portion of the front.

TRexAnisotropicIsotropicBlend

$block get/setUnstructuredSolverAttribute TRexAnisotropicIsotropicBlend value

This attribute specifies the rate at which anisotropic triangles are blended into isotropic triangles on the block interior.

Type

This attribute is a float with the range [0, 1], where 0 disables blending and larger values increase the rate of blending.

Default

The default of this attribute is 0.5.

TRexSkewCriteriaDelayLayers

$block get/setUnstructuredSolverAttribute TRexSkewCriteriaDelayLayers value

This attribute is the number of layers to delay checking for the quality criteria of the TRex cells.

Type

This attribute is an integer with the range [0, infinity), where 0 means that there should be no delay in checking the quality criteria.

Default

The default of this attribute is 0.

TRexSkewCriteriaMaximumAngle

$block get/setUnstructuredSolverAttribute TRexSkewCriteriaMaximumAngle value

This attribute specifies the maximum included angle quality threshold for TRex cells.  If the criterion cannot be met the cell will be discarded and the front is stopped locally.

Type

This attribute is a float with the range [60.0, 180.0], where 180.0 disables the quality check.

Default

The default of this attribute is 180.0.

TRexSkewCriteriaEquivolume

$block get/setUnstructuredSolverAttribute TRexSkewCriteriaEquivolume value

This attribute specifies the maximum equivolume quality threshold for TRex cells.  If the criterion cannot be met the cell will be discarded and the front is stopped locally.

Type

This attribute is a float with the range [0.0, 1.0], where 1.0 disables the quality check.

Default

The default of this attribute is 1.0.

TRexSkewCriteriaEquiangle

$block get/setUnstructuredSolverAttribute TRexSkewCriteriaEquiangle value

This attribute specifies the maximum equiangle quality threshold for TRex cells.  If the criterion cannot be met the cell will be discarded and the front is stopped locally.

Type

This attribute is a float with the range [0.0, 1.0], where 1.0 disables the quality check.

Default

The default of this attribute is 1.0.

TRexSkewCriteriaCentroid

$block get/setUnstructuredSolverAttribute TRexSkewCriteriaCentroid value

This attribute specifies the maximum centroid skew quality threshold for TRex cells.  If the criterion cannot be met the cell will be discarded and the front is stopped locally.

Type

This attribute is a float with the range [0.0, 1.0], where 1.0 disables the quality check.

Default

The default of this attribute is 1.0.

TRexVolumeFunction

$block get/setUnstructuredSolverAttribute TRexVolumeFunction function

This attribute specifies the method to be used when computing prism cell volumes for TRex cells.

Type

This attribute is a string with one of the values < MinComponent > or < GreenGauss >.  MinComponent indicates that the TRex mesher should use the minimum component volume for prism volume computation.  GreenGause indicates the use of the Green-Gauss method of prism volume computation.

Default

The default of this attribute is MinComponent.

OversetAdaptAmplification

$block get/setUnstructuredSolverAttribute OversetAdaptAmplification factor

This attribute is the adaption target edge length amplification factor of an unstructured block.

Type

This attribute is a float with the range (0, infinity).

Default

The default for this attribute is 1.5.

OversetAdaptTargets

$block get/setUnstructuredSolverAttribute OversetAdaptTargets <targets>

This attribute sets the orphan remediation and fringe improvement adaption targets to be applied to an unstructured block run in the unstructured solver.

Type

This default is a list of strings with values < Fringes | Donors | Orphans | OrphanDonorCandidates >.

Default

The default value is [list Donors OrphanDonorCandidates].

pw::BlockUnstructured create
This action creates a new unstructured block object.
pw::BlockUnstructured createFromDomains ?-reject rejectVar? ?-fillVoids? ?-voids voidsVar? ?-addBaffles? ?-baffles bafflesVar? domains
This action creates new unstructured block objects from the given domains.
pw::BlockUnstructured split ?-trexLayers? blocks
This action splits the given TRex blocks into prism and tetrahedral cell blocks, maximizing the number of prism layers.
pw::BlockUnstructured join ?-reject rejectVar? blocks
This action joins as many of the given unstructured blocks together as possible.
pw::BlockUnstructured combineAnisoCells blocks
This action combines anisotropic tet and pyramid cells in TRex-defined blocks into tet, pyramid, prism and hex cells.
pw::BlockUnstructured get/setDefault BoundaryDecay decay
This default is the boundary decay factor of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault BoundaryInfluence influence
This default is the boundary influence factor of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault BackgroundSpacing spacing
This default is the background grid spacing of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault EdgeMaximumGrowthRate growth_rate
This default is the maximum spacing growth rate along an edge of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault EdgeMaximumLength < Boundary | length >
This default is the maximum edge length of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault EdgeMinimumLength < Boundary | length >
This default is the minimum edge length of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault PyramidMaximumHeight height
This default is the maximum pyramid height of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault PyramidMinimumHeight height
This default is the minimum pyramid height of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault PyramidAspectRatio ratio
This default is the pyramid aspect ratio of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault InitialMemorySize megabytes
This default is the initial memory size for initializing an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexCellType value
This default is the type of cells generated by TRex of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexMaximumLayers layers
This default is the maximum number of T-Rex layers of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexFullLayers layers
This default is the minimum number of fully structured TRex layers of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexGrowthRate growth_rate
This default is the growth rate of TRex layers of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexPushAttributes push
This default is the flag for pushing TRex attributes onto the connectors and domains of an unstructured block when a it is created.
pw::BlockUnstructured get/setDefault TRexSpacingSmoothing smooth
This default is the number of smoothing sweeps to apply to the initial spacing values of TRex layers of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexSpacingRelaxationFactor factor
This default is the relaxation factor of smoothing sweeps to apply to the intial spacing values of TRex layers for an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexIsotropicSeedLayers value
This default is the number of TRex isotropic seed layers for an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexCollisionBuffer factor
This default is the minimum buffer to be maintained between encroaching extruded tetrahedrals of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexAnisotropicIsotropicBlend blending
This default is the rate at which anisotropic triangles are blended into isotropic triangles on the interior of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexSkewCriteriaDelayLayers delay
This default is the number of layers to delay checking for the quality criteria of the TRex cells of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexSkewCriteriaMaximumAngle angle
This default is the maximum included angle quality threshold for TRex cells of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexSkewCriteriaEquivolume threshold
This default is the maximum equivolume quality threshold for TRex cells of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexSkewCriteriaEquiangle threshold
This default is the maximum equiangle quality threshold for TRex cells of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexSkewCriteriaCentroid threshold
This default is the maximum centroid skew quality threshold for TRex cells of an unstructured block when it is created.
pw::BlockUnstructured get/setDefault TRexVolumeFunction function
This default is the method to be used when computing prism cell volumes for TRex cells of an unstructured block when it is created.
$block get/setDefault OversetAdaptAmplification factor
This default is the adaption target edge length amplification factor of an unstructured block when it is created.
$block get/setDefault OversetAdaptTargets targets
This default is the orphan remediation and fringe improvement adaption targets of an unstructured block when it is created.
$block getInitializationErrorCount
This action gets the number of errors from the last attempt at initializing the block.
$block getInitializationError ?-points? index
This action gets a specific error message from the last initialization attempt.
$blk getTRexCellCount
This action gets the number of T-Rex cells in the block.
$blk getTRexTetCount
This action gets the number of T-Rex tet cells in the block.
$blk getTRexPyrCount
This action gets the number of T-Rex pyr cells in the block.
$blk getTRexFullLayerCount
This action gets the number of T-Rex full layers in the block generated by the last run of the solver.
$blk getTRexTotalLayerCount
This action gets the number of T-Rex total layers in the block generated by the last run of the solver.
$blk getTRexMatchDomainCount ?-connectorCount connectorCountVar?
This action gets the number of match domains emanating from the adj grid/wall BC conditions within this block.
$blk getTRexMatchInitialSpacing
This action gets the minimum, average, and maximum initial spacing of the match domains connected to the adj grid/wall BCs of this block.
$blk getTRexMatchGrowthRate
This action gets the minimum, average, and maximum growth rates of the match domains connected to the adj grid/wall BCs of this block.
$blk getTRexMatchLayerCount
This action gets the minimum, average, and maximum layer count of the match domains connected to the adj grid/wall BCs of this block.
$block freeInterior
This action frees the block’s interior points.
$block removeFace $face
This action removes a face from the block.
$block getOuterFace
This action returns the block’s outer face.
$block getBoundaryEdgeMinimumLength
THis action gets the calculated minimum boundary edge length based on triangluar area of the boundary cells.
$block getBoundaryEdgeMaximumLength
This action gets the calculated maximum boundary edge length based on triangluar area of the boundary cells.
$block getVolumeEdgeMinimumLength
This action gets the calculated minimum volume edge length based on tetrahedral volume of the cells.
$block getVolumeEdgeMaximumLength
This action gets the calculated maximum volume edge length based on tetrahedral volume of the cells.
$block getPyramidBaseMaximumHeight
This action gets the calculated maximum height of the pyrimds based on the proscribed aspect ratio and the base area of the cells.
$block getUnstructuredSolverAttribute att_name
This action gets the named unstructured solver attribute.
$block setUnstructuredSolverAttribute att_name att_value
This action sets the named unstructured solver attribute.
$block get/setUnstructuredSolverAttribute IterationCount count
This attribute is the number of iterations to be used for intializing the interior points of this block.
Base type for all glyph types
Entity type
Block type
Unstructured block type
A string is an array of characters.
Domain type
Unsuctured face type
pw::FaceUnstructured create
This action creates a new unstructured face object.
$face addDomain ?-linkage linkage? domain
This action adds a domain to this face.
$block addFace face
This action adds a face to the block.
The mode base type
Extruded block type
A float is a fractional number.
An integer is a whole number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A vector is a list of float values.