Getting material data by id

vreddy
vreddy Altair Community Member
edited October 2020 in Community Q&A

set MatE [hm_getentityvalue mats MATERIALID \$E 0 -byid]

In nastran its returning value but in abaqus and radioss its returning zero

Answers

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

    For Abaqus, try:

     

     hm_getvalue mats id=<MAT_ID> dataname=Young

     

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

    For 'Radioss 2017', try:

     hm_getvalue mats id=<MAT_ID> dataname=MAT_E

     

  • timonq
    timonq Altair Community Member
    edited March 2020

    Hello, how to obtain RHO and NU? When I tried to use hm_getentityvalue mats MATERIALID \$E NU 0 -byid I got 0 :(/emoticons/default_sad.png' srcset='/emoticons/sad@2x.png 2x' title=':(' width='20' /> the same for RHO

  • DEEPAKSREEDHARK
    DEEPAKSREEDHARK Altair Community Member
    edited March 2020

    Hello  @vreddy @timonq

     

    Whatever the solver profile, manually change the material data value in hypermesh, and read the command.tcl file.

    Suppose you have changed the density (rho), you will notice the following reflected in your command file: (hypermesh 2017. In older versions, you can find it in 'attributeupdatedouble')

     

    *setvalue mats id=41 STATUS=2 183={8.77e-009}

     

    which means '183' is the parameter code. Since you have the attribute dataname now, you can query it in your script like so:

     

    hm_getvalue mats id=41 dataname=183

    This will return the rho (density) value currently assigned to the field!