Model.elementtestvolumetricskew#
- Model.elementtestvolumetricskew(collection, skew, outputcollection, contour, title)#
Tests tetra elements for whether or not they pass the volumetric skew element quality check, and puts those that fail on the specified output mark. The tetra element volumetric skew corresponds directly to the Abaqus and Fluent CFD tetra element quality checks. It is calculated by fitting a sphere through the four vertex nodes of the element. An ideally shaped tetra element with nodes on that sphere would have a volume of 3.
\(\text{IdealVol} = \frac{8 \cdot \text{Radius}}{9 \cdot \text{Sqrt}(3) }\)
So, \(\text{VolSkew} = \frac{ \text{IdealVol} - \text{RealVol} }{\text{IdealVol}}\)
In the CFD community, this quantity is traditionally referred to as “skew.” To differentiate it from the finite element quantity of the same name, notes this as “volumetric skew.”
- Parameters:
collection (Collection) – The collection containing the tetra element entities to test.
skew (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 failed element entities.
contour (int) –
A flag that determines how the results are presented. Valid values are:
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 to label the curve in the histogram. Only required, if
contour=2.
Example#
Test all displayed elements for a skew of 0.6#import hm import hm.entities as ent model = hm.Model() elems1 = model.CreateCollectionByDisplayed(ent.Element) elems2 = hm.Collection(model, hm.FilterByEnumeration(ent.Element, ids=hm.hwUIntList([]))) model.elementtestvolumetricskew( collection=elems1, skew=0.6, output_collection=elems2, contour=0, title="" )