🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to measure volume,area and mass using tcl

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

Hi,

 

 How to measure volume,area and mass using tcl. In hypermesh by Tools --> mass calc..

 

I need to change the density to adjust the mass of a component. For that i need the volume of the component. 

 

how to measure that using tcl...

 

Find more posts tagged with

Sort by:
1 - 9 of 91
    User: "tinh"
    Altair Community Member
    Updated by tinh

    if you need only volume:

    *createmark comps 1 $compid

    hm_volume comps 1

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

    Thanks for the reply!!

     

    How to get min/max values of nodes,elements,components??

     

     

    For Max value i found 'hm_entitymaxsolverid comps'

     

     

    For Min value ??

    User: "tinh"
    Altair Community Member
    Updated by tinh

    ^.^ altair not provide command for min solverid ???

    using hm_entitylist get list of i-IDs then convert to s-IDs

    sort s-IDs list then you get minimum value

    or : push panel 'renumber' => *createmark entity 1 all => hm_activateitem 'min/max' => hm_getmessage

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

    Thanks for the Reply!!

     

    But, i tried both i did't get the results..

     

    set i 0

    *createmark elems 1 all
    set elemList [hm_getlist elems 1]
    set elemMin [lindex $elemList $i]
    puts -nonewline $fileId $elemMin

     

    when i print the 'elemMin' nothing is there

     

    i want to print the mininmum id's of nodes,elements,materials,systems and system collectors in a file...

     

    And one more thing is i tried to deletemodel for importing new file...

     

    I tried

    *deletemodel

     

    *deletemodel 1

     

    *deletemodel

    *answer yes

     

    wen i run this it is asking the user to select yes or no...

     

     

     

    Help me on this!!!

    User: "tinh"
    Altair Community Member
    Updated by tinh

    hi,

    to get elemList selected on mark 1: hm_getmark elems 1    (not 'hm_getlist')

    to ignore hm asking 'yes/no': 

    hm_answernext yes

    *deletemodel

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

    Thanks for the reply!!!

     

    It worked..

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

    How to measure mass using the tcl?

     

    *createmark elements 1 displayed

     

    for this mark i need to get the mass value....

    User: "tinh"
    Altair Community Member
    Updated by tinh

    hi,

    there is no 'hm_mass elems 1 ' available to get mass

     

    but make it your self

    just take volume and multiply by density value in material card

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

    Actually it is available.

     

    *createmark elements 1 displayed

    set mascalc [hm_getmass elems 1]

     

     

    Mass       =    set mas [lindex $mascalc 0]

    Volume    =    set vol [lindex $mascalc 1]

    Area        =    set are [lindex $mascalc 2]