Is there a Tcl command in Hypermesh to query the material orientation vector of an element?

Deleus
Deleus Altair Community Member

I was wondering if there's a simple Tcl command to get the coordinates of the material orientation vector of an element, just like hm_getelementnormal

*reviewmaterialorientation actually reads this vector before plotting it but I'm struggling to access its coordinates.

Thanks in advance!

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello @Deleus ,

    this might not be as straightforward to query it, and as a starter that will depend on the solver interface you are working with. May I ask you which solver you are using?

    Best Regards,

    Michael

  • Deleus
    Deleus Altair Community Member

    Hello Michael,

    I'm using Optistruct at the moment.

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello @Deleus ,

    the material orientation for OptiStruct should be accessed from the elements directly, as you should define the orientation in CTETRA element, through the CID parameter.

    Best Regards,

    Michael

  • Deleus
    Deleus Altair Community Member

    I know exactly how to access this info from the HM interface; what I'm looking for is a .tcl command similar to hm_getelementnormal and use it in a script…

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello again,

    as the material orientation is based on element, you need to query the orientation for each element. I assume that for elements beloging to the same part, you should get the same orientation.

    So that should lead you to a code such as below:

    *createmark elems 1 "by aterial" $MatId

    set CID [lsort -unique [hm_getvalue elems mark=1 dataname=system]]

    set orientation [hm_getvalue system id=CID dataname=xaxis]

    Also, may I ask you for a larger picture of what you try to achieve? Meaning, what do you do with this material orientation once you get it? This may help me to propose you a better strategy

    Best Regards,

    Michael

  • Deleus
    Deleus Altair Community Member
    edited November 2024

    In Optistruct, I solved the issue by querying the attribute THETA.
    From what I understand, there is no native Material Orientation Vector, instead Optistruct operates a rotation of THETA degrees of the vector G1-G2 around the element normal.

    For example, to query the attribute THETA for all displayed elements and store it in a list:

    *createmark elems 1 "displayed"

    set list [hm_getvalue elems mark=1 dataname=THETA]

  • Michael Herve
    Michael Herve
    Altair Employee

    Hello @Deleus ,

    you are right, Theta is another way to query element orientation, depending about how the orientation was defined.

    Best Regards,

    Michael

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.