Area of 1D beam element using TCL

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

Hello Everyone!

How to get section area of 1D beam (for Beam4 - Ansys Profile) using tcl command. I can find the property id for a particular element/component by 'hm_getcardimagename props [hm_getentityvalue elem $elementid property.id 0]' but not able to get into this info and find out the beam area using tcl, please help me out.

 

Thanks in advance

Answers

  • tinh
    tinh Altair Community Member
    edited March 2017

    Hi,

    send us your hm file. or take a photo which indicate the value on cardimage that you want to retrieve

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2017

    Hello,

    Please check the attached file which has only one 1D beam (Ansys Profile). I am not sure how to get the area allotted to this beam using tcl, please let me know your comments.

    Thanks!

     

    <?xml version="1.0" encoding="UTF-8"?>1D_Area_Q1.png

    <?xml version="1.0" encoding="UTF-8"?>1D_Area_Q2.png

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited March 2017

    All data of 'BEAM4p' are saved into an array '$R_VAL2' which is exported from FE- template by using pointer. But within a TCL script I don't know how to get these values yet.

     

    <?xml version="1.0" encoding="UTF-8"?>beam4p_ansys.png

  • tinh
    tinh Altair Community Member
    edited March 2017

    Hi,

    equivalence command of @attributearrayvalue is hm_attributearrayvalue

    so value of area can be retrieved by:

    set Area [hm_attributearrayvalue props $PropId \$R_VAL2 1 -byid]

  • tinh
    tinh Altair Community Member
    edited March 2017

    Or from HM14, using hm_getvalue

    set Area [hm_getvalue props id=$PropId dataname=\$R_VAL2 row=0]

     

    I am not sure why array index is starting from 1 in case of using hm_attributearrayvalue

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2017

    Great! thanks for your help Tinh, Nguyen, appreciate your help.