befaro
Bioengineer
- Dec 12, 2012
- 1
Dear all,
I'm just starting to use Ansys workbench. I have already made a simulation, and I got the result. But in ANSYS Mechanical (Workbench) I can see the equivalent elastic strain only in a specific points with probe, and with a probe strain It can return a maximum or minimum result on associated geometry, however it does not produce an average value of the result.
To return an average value on the face of a body the node values need to be weighted by the amount of element face area associated with each node. With the ARNODE function in ANSYS I can find the area on element faces associated with each node, and a weighted average can be formed.
I though an APDL Commands Object for Workbench Mechanical that can output the average strain over a selected face or set of faces in my model.
In order for a Workbench Mechanical Commands Object to find a portion of a model that is of interest to a user, a Named Selection can be used since it is turned into a Component in the ANSYS APDL analysis. It is used to indicate the nodes on one or more faces that are to be used to form an average.
The code is:
/post1
cmsel,s,surface
*get,n_nodes,node,,count
nsel
*dim,node_arnode,array,n_nodes
etable,erase
etable,node_eqv,epel,eqv
node_next=0
*do,ii,1,n_nodes
node_next=NDNEXT(node_next)
node_arnode(ii)=ARNODE(node_next)
node_eqv_a(ii)=ARNODE(node_next)* node_eqv(node_next)
*enddo
*vscfun,sum_node_eqv_a,SUM,node_eqv_a
*vscfun,sum_area,SUM,node_arnode
!
my_eqv_avg=sum_node_eqv_a/sum_area
allsel
set,last
!
It doesn't work because give me zero like value, why? where is the mistake? can you help me?
Thank you in advance.
All the best,
Carmen
I'm just starting to use Ansys workbench. I have already made a simulation, and I got the result. But in ANSYS Mechanical (Workbench) I can see the equivalent elastic strain only in a specific points with probe, and with a probe strain It can return a maximum or minimum result on associated geometry, however it does not produce an average value of the result.
To return an average value on the face of a body the node values need to be weighted by the amount of element face area associated with each node. With the ARNODE function in ANSYS I can find the area on element faces associated with each node, and a weighted average can be formed.
I though an APDL Commands Object for Workbench Mechanical that can output the average strain over a selected face or set of faces in my model.
In order for a Workbench Mechanical Commands Object to find a portion of a model that is of interest to a user, a Named Selection can be used since it is turned into a Component in the ANSYS APDL analysis. It is used to indicate the nodes on one or more faces that are to be used to form an average.
The code is:
/post1
cmsel,s,surface
*get,n_nodes,node,,count
nsel
*dim,node_arnode,array,n_nodes
etable,erase
etable,node_eqv,epel,eqv
node_next=0
*do,ii,1,n_nodes
node_next=NDNEXT(node_next)
node_arnode(ii)=ARNODE(node_next)
node_eqv_a(ii)=ARNODE(node_next)* node_eqv(node_next)
*enddo
*vscfun,sum_node_eqv_a,SUM,node_eqv_a
*vscfun,sum_area,SUM,node_arnode
!
my_eqv_avg=sum_node_eqv_a/sum_area
allsel
set,last
!
It doesn't work because give me zero like value, why? where is the mistake? can you help me?
Thank you in advance.
All the best,
Carmen