Model.hm_getelemcheckvalues#
- Model.hm_getelemcheckvalues(elements, dimension, check_type, time_failure=0.0005)#
Returns a single list containing alternating values of elements and the corresponding check value for that element. Only the elements on
elementsand of the specified dimension are considered when determining which elements and values are returned.- Parameters:
elements (Collection) – The collection containing the entities.
dimension (int) –
The dimension of the elements on
elementsto consider. Valid values are:1 - 1D elements
2 - 2D elements
3 - 3D elements
If no elements of the specified dimension are on
elements, an error is returned.check_type (hwString) –
The type of element check to return the bounds from. The allowable values depend on the
dimensionspecified:dimension=1: length, timestepdimension=2: addedmass, aspect, cellsquish, chordaldev, equiskew, jacobian, length, maxinterangle, maxlength, mininterangle, minlength, skew, taper, timestep, volumeareaskew, warpagedimension=3: addedmass, altitudeaspect, aspect, cellsquish, equiskew, jacobian, length, maxinterangle, maxlength, mininterangle, minlength, ortho_3d, size_ratio_3d, skew, taper, tetracollapse, timestep, volumeareaskew, volumetricskew, warpage
time_failure (double) – The value to use as a threshold beyond which the input elements should be considered to have failed the test. This is required only when
check_type="addedmass".
- Returns:
hwReturnStatus- Status objectHmQueryResultList- Result list object containingHmQueryResultobjects with the following output data:element (Entity) - Entity Type:
Elementvalue (double)
Examples#
Get the length value for all 1D elements in component with name “ comp1 “#import hm import hm.entities as ent model = hm.Model() element_collection = hm.Collection( model, ent.Element, hm.Collection(model, ent.Component, "name=comp1") ) _, resultlist = model.hm_getelemcheckvalues( elements=element_collection, dimension=1, check_type="length" ) for result in resultlist: print("Element ID:", result.element.id) print("Value:", result.value)
Get the warpage value for all displayed 2D elements#import hm import hm.entities as ent model = hm.Model() element_collection = hm.CollectionByDisplayed(model, ent.Element) _, resultlist = model.hm_getelemcheckvalues( elements=element_collection, dimension=2, check_type="warpage" ) for result in resultlist: print("Element ID:", result.element.id) print("Value:", result.value)
Get the jacobian of all 3D elements#import hm import hm.entities as ent model = hm.Model() element_collection = hm.Collection(model, ent.Element) _, resultlist = model.hm_getelemcheckvalues( elements=element_collection, dimension=3, check_type="jacobian" ) for result in resultlist: print("Element ID:", result.element.id) print("Value:", result.value)