hexagon logo

Material ID for an element

Hi,
​I have element ID and I need to get the property set ID and its material ID defined in the property.   db_element function returns part ID and its not matching with BDF file. Please suggest to get the material ID for an element.
Parents
  • Use db_get_region_for_elements ( ) to get the region ids (property ids) for elements (input and return are arrays). Then use db_get_region_definition ( ) and db_get_material_name_from_id() as described above. The first 2 are documented in PCL and Customization. The third is is in Acumen Functions.
     
    There is a loose correlation between the MID in the Nastran BDF and Patran Database. When exporting, Patran has a couple of options:
    • By default, the Internal Patran DB MID is used as the Nastran MID. This guarantees unique MIDs in the BDF.
    • There is an option to append the desired Nastran MID to the material name using a delimiter. For example, steel.10 becomes MID=10 on export, and aluminium.20 becomes MID=20.
    • The same appended ID option is also available for Property Names and PIDs.
    • When using these options, the user must take care not to define duplicate IDs in the names. For example, if you have steel.10 and aluminium.10, results are unpredictable. (The same is true if you have properties named pshell.wing.11 and pshell.tail.11)
    On import, the Nastran MID is appended to the material name, so you can usually safely use the MID from the name for imported BDFs.
    However, as @Darrel Sinclair​ said, there isn't necessarily a relation between material IDs.
     
     
     
Reply
  • Use db_get_region_for_elements ( ) to get the region ids (property ids) for elements (input and return are arrays). Then use db_get_region_definition ( ) and db_get_material_name_from_id() as described above. The first 2 are documented in PCL and Customization. The third is is in Acumen Functions.
     
    There is a loose correlation between the MID in the Nastran BDF and Patran Database. When exporting, Patran has a couple of options:
    • By default, the Internal Patran DB MID is used as the Nastran MID. This guarantees unique MIDs in the BDF.
    • There is an option to append the desired Nastran MID to the material name using a delimiter. For example, steel.10 becomes MID=10 on export, and aluminium.20 becomes MID=20.
    • The same appended ID option is also available for Property Names and PIDs.
    • When using these options, the user must take care not to define duplicate IDs in the names. For example, if you have steel.10 and aluminium.10, results are unpredictable. (The same is true if you have properties named pshell.wing.11 and pshell.tail.11)
    On import, the Nastran MID is appended to the material name, so you can usually safely use the MID from the name for imported BDFs.
    However, as @Darrel Sinclair​ said, there isn't necessarily a relation between material IDs.
     
     
     
Children
No Data