COG and mass of unmeshed components
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:)
Best Answer
-
Hi did you try using command hm_getcentroid ?1
Answers
-
Hi did you try using command hm_getcentroid ?1
-
example *createmarkpanel solids 1 "select solids of comps"; tk_messagebox -message [hm_getcentroid solids 1]0
-
tinh said:
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
0 -
Thanks Tinh. hm_getcentroid works now. Just in a different way.
*createmark solids 1 all
hm_getcentroid solids 1Now 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
0 -
i am sorry, just miss typing tk_messagebox instead of tk_mesageBoxAlihan Alayoğlu_22549 said:It doesn't work. No message box after solid select-proceed
0 -
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.Alihan Alayoğlu_22549 said:Thanks Tinh. hm_getcentroid works now. Just in a different way.
*createmark solids 1 all
hm_getcentroid solids 1Now 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
0 -
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!Alihan Alayoğlu_22549 said:Thanks Tinh. hm_getcentroid works now. Just in a different way.
*createmark solids 1 all
hm_getcentroid solids 1Now 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
1 -
tinh said:
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
0