Get mass and volume of each component

User: "Jaggs"
New Altair Community Member
Updated by Jaggs

Hello Friends,

 

I have lets say 100 components and I need to display each collector's mass, volume individually, can you please help me out.

 

With the piece of code shown below i am able to get net mass, volume of all the collectors which are displayed but not able to get individual collectors'

 

*createmark components 1 'displayed'

set i [hm_getmark comps 1]

foreach j $i {
set a [hm_getmass comps 1 'by comp id' $i]
puts $a

}

 

Thanks in advance.

Find more posts tagged with

Sort by:
1 - 7 of 71
    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    *createmark components 1 'displayed'

    set i [hm_getmark comps 1]

    foreach j $i {

    *createmark comps 1 $j

    set a [hm_getmass comps 1]

    puts $a

    }

    It is giving the mass of all components because the mark 1 of components has all the displayed components in it. Each time the loop is run the mark needs to be updated with the id of the component.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hello Friends,

     

    I have lets say 100 components and I need to display each collector's mass, volume individually, can you please help me out.

     

    With the piece of code shown below i am able to get net mass, volume of all the collectors which are displayed but not able to get individual collectors'

     

    *createmark components 1 'displayed'

    set i [hm_getmark comps 1]

    foreach j $i {

    set a [hm_getmass comps 1 'by comp id' $i]

    puts $a

    }

     

    Thanks in advance.

     

    Hi,

    There is available template for component summary

    You can invoke the template from panel Post>summary>load the template 'components'>summary.  (optistruct, with other solver, name of the template file may differ)

    User: "Rahul_P1"
    Altair Employee
    Updated by Rahul_P1

    Summary may only give mass and not volume in certain user profiles, 

     

    Perhaps you can convert the model to Abaqus format and use the below script,

     

    <?xml version="1.0" encoding="UTF-8"?>post-4438-0-07238200-1415870633_thumb.jp

    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    @Jaggs : last solution is writing yourself a TCL script for that image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>

    User: "Jaggs"
    New Altair Community Member
    OP
    Updated by Jaggs

    Thank you very much for the help people.

     

    I have one more question, i need to find the volume of the solid now and I am using this commant 'hm_getvolumeofsolid solids solidID '.

    My question is what is solid id? Is there any difference between solid id and comp id?

     

    Please let me know.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Thank you very much for the help people.

     

    I have one more question, i need to find the volume of the solid now and I am using this commant 'hm_getvolumeofsolid solids solidID '.

    My question is what is solid id? Is there any difference between solid id and comp id?

     

    Please let me know.

    Yes, there is a difference

    solids belong to solid object

    comps belong to component object

    so solid is different from comp

    to get solid ids you can use *createmarkpanel solids 1; puts [hm_getmark solids 1]

    to get solid ids stored in component compid you can use *createmark solids 1 'by comp id' $compid;puts [hm_getmark solids 1]

    User: "Altair Forum User"
    Altair Employee
    Updated by Altair Forum User

    @Jaggs: Have a look at the page 'Data Names' of Hyperworks's help.