Get mid-side node

Roshan Shiveshwar
Roshan Shiveshwar Altair Community Member
edited October 2020 in Community Q&A

Hi,

 

I am trying to create a simple Tcl script, where I should be able to identify the mid-side nodes from the model and put it in a list.  Is there any API to achieve this?

 

Thanks,

Roshan

Answers

  • tinh
    tinh Altair Community Member
    edited March 2019

    May we know reason?

     

    Which element configs do you have?

  • Roshan Shiveshwar
    Roshan Shiveshwar Altair Community Member
    edited October 2020
    https://community.altair.com/community?id=community_question&sys_id=4f56c8f61b2bd0908017dc61ec4bcb2a

    This was a code to get elements from set of nodes. I discovered now that the code fails for 2nd order elements because of the mid-side nodes.  Hence, wanted to identify them and avoid them in the calculation.

  • tinh
    tinh Altair Community Member
    edited March 2019

    I remember there is a relevant command but can't find it.

     

    Example to get mid side nodes of quad8:

    *createmark elems 1 'by config' quad8

    set NodeList [hm_getvalue elems mark=1 datanames=nodes]

    set MidNodes [join [regsub -all {\{[0-9]+ [0-9]+ [0-9]+ [0-9]+ } $NodeList \{]]

  • Roshan Shiveshwar
    Roshan Shiveshwar Altair Community Member
    edited March 2019

    Thanks Tinh,

     

    This one is a useful hack.