×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Try to create a table array for plotting data

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!

RE: Try to create a table array for plotting data

I think you may be getting confused with the usage of the *VGET command. You cannot "select" certain nodes to be filled in your array using this method.

Quote (ANSYS Help File):

*VGET Notes
Retrieves values for specified items and stores the values in an output vector of a user-named array parameter according to:

ParR = f(Entity, ENTNUM, Item1, IT1NUM, Item2, IT2NUM)


where (f) is the *GET function; Entity, Item1, and Item2 are keywords; and ENTNUM, IT1NUM, and IT2NUM are numbers or labels corresponding to the keywords. A starting array location number must be defined for the result array parameter. Looping continues over successive entity numbers (ENTNUM) for the KLOOP default. For example, *VGET,A(1),ELEM,5,CENT,X returns the centroid x-location of element 5 and stores the result in the first location of A. Retrieving continues with element 6, 7, 8, etc. until successive array locations [*VLEN, *VMASK] are filled. Absolute values....


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

/GTHK,CURVE,-1  
/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

Hi plvachon!

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

(OP)
Ok that works, thanks for your help! I shall learn about Ansys up to my death!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources