Model.elementtestaltitudeaspect#

Model.elementtestaltitudeaspect(collection, aspectratio, outputcollection, contour, title)#

Tests tetra elements for whether or not they pass the tetra AR element quality check, and puts those that fail on the specified output collection.

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

  • aspectratio (double) – The value to use as a threshold beyond which elements should be considered to have failed the test.

  • outputcollection (Collection) – The collection containing the element entities that fail the test in HyperMesh.

  • contour (int) –

    A code telling if should:

    0 - Display the results of the test normally.

    1 - Display the elements color coded by their ratings.

    2 - Build a histogram showing the distribution of ratings.

  • title (hwString) – The title with which to label the curve in the histogram.

Example#

Check if all elements pass the tetra AR element quality check with an aspect ratio 5.0 , put those that fail in an output collection and display the resu of the test normally#
import hm
import hm.entities as ent

model = hm.Model()

element1 = hm.Collection(model, ent.Element, populate=True)
element2 = hm.Collection(model, ent.Element, populate=False)

model.elementtestaltitudeaspect(
    collection=element1,
    aspectratio=5.0,
    outputcollection=element2,
    contour=0,
    title="Tetra Altitude Aspect"
)

Note

The tetra element aspect ratio corresponds directly to the Nastran TETRAAR element quality check. It is calculated by dividing the largest edge length of the element by its smallest altitude.