Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › Measuring surface of selected elements › Reply To: Measuring surface of selected elements
July 27, 2021 at 11:43 pm
Govindan Nagappan
Ansys Employee
@ciema
Here is a sample command set that you can use to get the area. Make sure you create a named selection with the selected elements. In this case, named selection is called my_elem
/PREP7
cmsel,s,my_elem esln *get,ncount,node,,count
my_area=0
nnum=0
*do,i,1,ncount,1
nnum=ndnext(nnum)
node_area=ARNODE(nnum)
my_area=my_area+node_area
*enddo
area_of_name_selection=my_area
ALLSEL
/exit
Example:
After inserting the commands, solve the model. Since there is a /Exit command, solution process will be stopped after executing these commands. You can check the solution information for the area.
In solution information, you can see the unit system being used
For details on these commands, please check the command reference manual: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v212/en/ans_cmd/Hlp_C_CmdTOC.html
Here is a sample command set that you can use to get the area. Make sure you create a named selection with the selected elements. In this case, named selection is called my_elem
/PREP7
cmsel,s,my_elem esln *get,ncount,node,,count
my_area=0
nnum=0
*do,i,1,ncount,1
nnum=ndnext(nnum)
node_area=ARNODE(nnum)
my_area=my_area+node_area
*enddo
area_of_name_selection=my_area
ALLSEL
/exit
Example:
After inserting the commands, solve the model. Since there is a /Exit command, solution process will be stopped after executing these commands. You can check the solution information for the area.
In solution information, you can see the unit system being used
For details on these commands, please check the command reference manual: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v212/en/ans_cmd/Hlp_C_CmdTOC.html