Try to create a table array for plotting data
Try to create a table array for plotting data
(OP)
Hi to all,
I'm trying to plot on a graph the Z displacement of some nodes, with defining a table array to do it. The resulting graph is a kind of kid drawing, but it should not be... I just have a layered plate under four-point bending. I checked out the table I created, and the data is not what it should be: the X position of the nodes is absolutely false (some nodes have the same position) and the Z displacements are weird too... When I'm listing the node results for Z displacement, the results are like I expected them to be and so the X positions. So in brief: the model is correctly programmed, but the information in the table is false... I don't know what I'm doing wrong! Here is the procedure: after solving, in the post-proc., I select the nodes I want and then I create a table and plot data in a graph:
*DIM,graph,TABLE,nb_node,2
*vget,graph(1,1),node,all,loc,x
*vget,graph(1,2),node,all,u,z
*DO,ii,1,nb_node
graph(ii,0)=ii
*ENDDO
graph(0,1)=1
graph(0,2)=2
*vplot,graph(1,1),graph(1,2)
/axlab,x,X ! Change the axis labels
/axlab,y,UZ
/replot
Hope you can help me! Thanks!
I'm trying to plot on a graph the Z displacement of some nodes, with defining a table array to do it. The resulting graph is a kind of kid drawing, but it should not be... I just have a layered plate under four-point bending. I checked out the table I created, and the data is not what it should be: the X position of the nodes is absolutely false (some nodes have the same position) and the Z displacements are weird too... When I'm listing the node results for Z displacement, the results are like I expected them to be and so the X positions. So in brief: the model is correctly programmed, but the information in the table is false... I don't know what I'm doing wrong! Here is the procedure: after solving, in the post-proc., I select the nodes I want and then I create a table and plot data in a graph:
*DIM,graph,TABLE,nb_node,2
*vget,graph(1,1),node,all,loc,x
*vget,graph(1,2),node,all,u,z
*DO,ii,1,nb_node
graph(ii,0)=ii
*ENDDO
graph(0,1)=1
graph(0,2)=2
*vplot,graph(1,1),graph(1,2)
/axlab,x,X ! Change the axis labels
/axlab,y,UZ
/replot
Hope you can help me! Thanks!





RE: Try to create a table array for plotting data
In other words, if you leave the ENTNUM field blank (you have "all" currently which is meaningless for this command), then the *VGET will loop from node 1 until all nodes have been looped upon. It then places this data in numerical order in your TABLE, which you then plot. You're probably storing the correct numbers, but these are being stored by ANSYS in numerical order. I don't know how your model is numbered, but you may be able to fiddle with the KLOOP parameter to get what you need. Try turning the lines in your plot off using:
CODE
/GROPT,FILL,OFF
/GROPT,CURL,1
/GCOLUMN,1,
/GMARKER,1,3,1,
and see whether the resulting plot makes sense.
------------
See FAQ569-1083 for details on how to make best use of Eng-Tips.com
RE: Try to create a table array for plotting data
Try these:
! first select your nodes
! then:
*get, nb_node, node,,count
*DIM,graph,TABLE,nb_node,2
*get, nmin, node,,num,min
*DO,ii,1,nb_node
graph(ii,0)= ii
graph(ii,1)= nx(nmin)
graph(ii,2)= uz(nmin)
nmin= ndnext(nmin)
*ENDDO
graph(0,1)=1
graph(0,2)=2
*vplot,graph(1,1),graph(1,2)
/axlab,x,X ! Change the axis labels
/axlab,y,UZ
/replot
RE: Try to create a table array for plotting data