🎉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

COG and mass of unmeshed components

User: "Alihan Alayoğlu_22549"
Altair Community Member
Updated by Alihan Alayoğlu_22549

I'm dealing with the calculation of COG and mass of the unmeshed components in HyperMesh.  Even though all the mats and props are assigned to the each component which contains solids, software doesn't give any COG or mass value.

I am able to find volume of solids and multiply with density to find mass but since nastran's summary template ctr_of_gravity only works with elements; looks like it is not able to calc COG as in a regular CAD tool.

Is there any way to find them out? I'm all ears for a TCL macro advice:) 

Find more posts tagged with

Sort by:
1 - 8 of 81
    User: "tinh"
    Altair Community Member
    Accepted Answer
    Updated by tinh
    Hi did you try using command hm_getcentroid ?
    User: "tinh"
    Altair Community Member
    Updated by tinh
    example *createmarkpanel solids 1 "select solids of comps"; tk_messagebox -message [hm_getcentroid solids 1]
    User: "Alihan Alayoğlu_22549"
    Altair Community Member
    OP
    Updated by Alihan Alayoğlu_22549

    example *createmarkpanel solids 1 "select solids of comps"; tk_messagebox -message [hm_getcentroid solids 1]

    It doesn't work. No message box after solid select-proceed

    User: "Alihan Alayoğlu_22549"
    Altair Community Member
    OP
    Updated by Alihan Alayoğlu_22549

    Thanks Tinh. hm_getcentroid works now. Just in a different way.

     

    *createmark solids 1 all
    hm_getcentroid solids 1

     

    Now I'm trying to directly transfer those xyz values from command window to create node by coordinates panel and obtain a complete macro including multiplication of density and volume to add the mass at that coordinate as CONM2 element :)

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    It doesn't work. No message box after solid select-proceed

    i am sorry, just miss typing tk_messagebox instead of tk_mesageBox
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Thanks Tinh. hm_getcentroid works now. Just in a different way.

     

    *createmark solids 1 all
    hm_getcentroid solids 1

     

    Now I'm trying to directly transfer those xyz values from command window to create node by coordinates panel and obtain a complete macro including multiplication of density and volume to add the mass at that coordinate as CONM2 element :)

     

    oh my god, viewing an attached photo on smartphone's browser is too difficult, @Rahul, could you please improve it. too difficult using community website, compare with old forum website ! even i cannot type codes.
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Thanks Tinh. hm_getcentroid works now. Just in a different way.

     

    *createmark solids 1 all
    hm_getcentroid solids 1

     

    Now I'm trying to directly transfer those xyz values from command window to create node by coordinates panel and obtain a complete macro including multiplication of density and volume to add the mass at that coordinate as CONM2 element :)

     

    hi Alihan, don't createmark all codes like this *createmark solids 1 "by comp id" $compid; #replace $compid with actual id of the component; *createnode {*}[hm_getcentroid solids 1]; it will create yellow node at centroid of component if you have many comps, make a loop!
    User: "Alihan Alayoğlu_22549"
    Altair Community Member
    OP
    Updated by Alihan Alayoğlu_22549

    hi Alihan, don't createmark all codes like this *createmark solids 1 "by comp id" $compid; #replace $compid with actual id of the component; *createnode {*}[hm_getcentroid solids 1]; it will create yellow node at centroid of component if you have many comps, make a loop!

    Appreciate for help