Trying to create quality elems check macro

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi,

I would like to create a macro which check quality of elements.

I didn't find how to check an element for some specific values as aspect ratio, skew angle, or warpage.

 

Do you have any ideas to do that ?

Thanks in advance.

Regards,

Cya.

Answers

  • tinh
    tinh Altair Community Member
    edited January 2014

    Hi,

    by following these steps:

    delete documents/command.cmf file

    press F10 /press 'aspect'

    open command.cmf file and you will see how to check aspect

     

    if you want to get aspect value of an elem, using hm_getentityvalue elems ID aspect 0 -byid

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited January 2014

    Thanks for your help !

    Ok for the value, but how can I get the ID of incorrect elements ?

    Because using 'save failed', and 'retrieve mark', I'm not able to get them.

  • tinh
    tinh Altair Community Member
    edited January 2014

    if you want to get correct id, using hm_getsolverid

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2014

    I use hm_createmark instead of hm_getentityvalue. If you review the documentation for hm_createmark you will find that there are some options to create the mark by a Data Name value, these options are:

     

    • 'by value range' 'attribute_or_data_name value_lower value_upper'
    • 'contains value' 'attribute_or_data_name value value_type'
    • 'equal to value' 'attribute_or_data_name value value_type'
    • 'greater than value' 'attribute_or_data_name value'
    • 'less than value' 'attribute_or_data_name value'

     

     

    Here is an example:


    hm_createmark elems 1 'less than value' 'jacobian 0.5';
    set elemList [ hm_getmark elems 1 ];

    which get all of the elements with jacobian value less than 0.5.

     

    For more information, read the hm_createmark and DataName documentation:

     

    DataNames: http://www.altairhyperworks.com/hwhelp/Altair/hw11.0/help/hwdref/data_names.htm

    hm_createmark  http://www.altairhyperworks.com/hwhelp/Altair/hw11.0/help/hwdref/hm_createmark.htm

     

    Edit: The ids of the elements obtained from the hm_getmark commands are the internal hypermesh id of the elements not the element number for the solver.  In case you need also the solver element id use the command hm_getsolverid entity id, where entity is any hm entity in this case elements.