Model.slivertetrafix#

Model.slivertetrafix(collection, options)#

Fixes sliver tetra and wedges elements and performs node position optimization of poor elements using quality criteria measurements.

Parameters:
  • collection (Collection) – The collection containing the entities.

  • options (hwString) –

    This parameter constructs a table of values that comprise both the methods that should be used to fix the sliver elements, along with quality criteria that are used optimize poor element nodes. Valid fixing methods include:

    • fix_sliver

    0 - Do not fix sliver tetras.

    1 - Fix sliver tetras.

    • fix_wedge

    0 - Do not fix wedge tetras.

    1 - Fix only the internal edge of wedge tetras.

    > 1 - Fix both internal and boundary edges of wedge tetras.

    • optimize_node

    0 - Poor element nodes will not be optimized.

    1 - Optimize only internal nodes of poor elements.

    > 1 - Optimize both internal and boundary nodes of poor elements.

    The following quality measurements are available for fixing nodes when optimize_node ≥ 1. Each measurement includes the measurement name, failed value, warn value, good value, weight, and solver ID (currently only HyperMesh solver ID = 0 is supported). Valid quality measurements are aspce-ratio, tet_collapse, vol_skew, skew, vol_ar, warpage, min_interior_angle, max_interior_angle, jacobian.

    Note

    The user can neglect one or more of the above options and the function will use the default values (fix_sliver=1, fix_wedge=1, optimize_node=0).

    For every item, you can chose to only input the name and some values; in this case, the remainder will use the default values.

Examples#

Fix sliver and internal wedge tetras of displayed elements#
import hm
import hm.entities as ent

model = hm.Model()

model.slivertetrafix(
    collection=hm.CollectionByDisplayed(model, ent.Element), options=""
)
Fix the displayed poor elements and optimize the internal nodes by use the tet_collapse and vol_skew quality measurements . Only the element’s whose tet_collapse is < 0.01 and vol_skew is > 0.9 will be optimized . The weight of vol_skew is 2 . All others values are used as the default#
import hm
import hm.entities as ent

model = hm.Model()

model.slivertetrafix(
    collection=hm.CollectionByDisplayed(model, ent.Element),
    options="optimize_node 1 tet_collapse 0.01 vol_skew 0.90 0.60 0.10 2",
)