Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

output *get

Status
Not open for further replies.

maxibonne

Mechanical
Joined
Oct 5, 2008
Messages
29
Location
MT
Is it possible to store the results from a *get (*get,xposition,node,i,loc,x) other than use an array? I was thinking of something similar to 'store' which is used to store results using 'nsol'. Does it exist in Ansys?

regards, maxibonne
 
If your node number is 1234 and you need the x-location of this node, you can store in a parameter name of your choice ("XLOC" for example) using:

XLOC=NX(1234)

The "NX" is known as an "enquiry function" within ANSYS. See the *GET command for more details.


------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
Thanks Drej. Can I then ouput all the results stored? My point of doing this is to extract the data. Therefore I need them to be output in the Output File, so that I can copy into a Spreadsheet.
 
You can *VGET all of the nodal locations and store in an array and then output from the array. Try the following for output of all x-location of the nodes:

! ---------- CODE ----------
nall
*get,n_max,NODE,0,NUM,MAX
*dim,n_storage,array,n_max,1
*vget,n_storage,node,1,loc,x ! GET x-loc of all nodes
*cfopen,nodal_data,csv
*vwrite,n_storage(1)
(1(E15.6))
*cfclos
!---------------------------

Do the same for the Y and Z locations but change the syntax in the *VGET command above. Output will be to a file named "nodal_data.csv".



------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
This is a way to do it using the *msg command and puts them all in one csv file. Must be input through a file though. *msg does not work in command lines.

*get,nnode,node,0,count
*get,nmin,node,0,num,min
*do,inode,1,nnode,1
*get,xdef,node,nmin,u,x
*get,ydef,node,nmin,u,y
*get,zdef,node,nmin,u,z
*if,inode,eq,1,then
/output,node_def,csv,,append
*msg,,'Node','X Deflection','Y Deflection','Z Deflection',
%C, %C, %C, %C,
/nop
*else
*endif
/output,node_def,csv,,append
*msg,,nmin,xdef,ydef,zdef,
%I, %10.5F, %10.5F, %10.5F, ! FORTRAN FORMAT
nmin=ndnext(nmin)
*enddo
/output
nnode=
nmin=
inode=
xdef=
ydef=
zdef=
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top