Here are some more examples of using the smrtsize
and aessize
commands in an Ansys APDL script:
Example 1: Setting element size for a specific volume
! Select volume number 2
*get, vol_num, vnum, 2
! Set element size for selected volume
esize, 0.4
smrtsize, , , vol_num
! Generate mesh on selected areas and volumes
amesh, allsel
In this example, we first use the *get
command to get the ID number of Volume 2 and store it in the variable vol_num
. Then we set the element size using the esize
command with a value of 0.4 and use the smrtsize
command to apply this size only to Volume 2.
Finally, we create a mesh on all selected areas and volumes using the amesh
command.
Example 2: Setting area size based on proximity to a point
! Select node number 10
nsel,s,node,,10
! Set area size based on proximity to selected node
aessize,,dist,0.5
! Generate mesh on selected areas and volumes
amesh, allsel
In this example, we use the nsel
command to select Node 10. Then we use the aessize
command with the argument dist
and a value of 0.5 to set the area size based on proximity to this node.
Finally, we create a mesh on all selected areas and volumes using the amesh
command.
I hope these additional examples help you understand how to use these commands in different ways within your Ansys APDL scripts. Let me know if you have any further questions or need additional assistance.