Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Exporting time history data from multiple nodes

Status
Not open for further replies.

Flaxman

Civil/Environmental
Oct 23, 2008
3
I am modeling the vibration over a floor slab and want to export the displacement time history for a large number of nodes into a text or excel file (so that I can then manipulate the data to find the maximum velocity at each point).

Is there a way of getting the time history for a range of nodes, rather than selecting them one by one?

Thanks in advance
 
Replies continue below

Recommended for you

Try the following as a starter for ten (save the following to a text file - you will need to be in /post26 before you read this file in):

! ======= OUTPUT TIME HISTORY DATA TO ASCII FILE ========
cmsel,s,EQP_DISPS ! select a component for output

*get,num_n,NODE,0,COUNT ! get number of nodes
*get,n_min,NODE,0,NUM,MIN ! get min node number

*do,i,1,num_n,1 ! output to ascii by looping over nodes
curr_n=n_min
nsol,10,curr_n,u,x ! output UX
nsol,20,curr_n,u,y ! output UY
nsol,30,curr_n,u,z ! output UZ

*dim,N%curr_n%_output,array,10000,4

vget,N%curr_n%_output(1,1),1 ! put time in array
vget,N%curr_n%_output(1,2),10 ! put UX in array
vget,N%curr_n%_output(1,3),20 ! put UY in array
vget,N%curr_n%_output(1,4),30 ! put UZ in array

*cfopen,N%curr_n%,dat
*vwrite,N%curr_n%_output(1,1),N%curr_n%_output(1,2),N%curr_n%_output(1,3),N%curr_n%_output(1,4)
(4(E15.6))
*cfopen

*get,n_min,NODE,curr_n,NXTH
*enddo

! ========================


------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
Drej

I am trying to modify your file in order to get the maximum temperature reached by each node at the end of the analysis. Currently my code looks like this and I have a query about the 1st line: what is EQP_DISPS?


cmsel,s,EQP_DISPS ! select a component for output

*get,num_n,NODE,0,COUNT ! get number of nodes
*get,n_min,NODE,0,NUM,MIN ! get min node number

*do,i,1,num_n,1 ! output to ascii by looping over nodes
curr_n=n_min
nsol,10,curr_n,temp ! output temp


*dim,N%curr_n%_output,array,100,2

vget,N%curr_n%_output(1,1),1 ! put time in array
vget,N%curr_n%_output(1,2),10 ! put temp in array

*cfopen,N%curr_n%,dat
*vwrite,N%curr_n%_output(1,1),N%curr_n%_output(1,2)
(4(E15.6))
*cfopen

*get,n_min,NODE,curr_n,NXTH
*enddo


 
EQP_DISPS is the name of a node component that was generated earlier in the analysis e.g:

nsel,s,node,,1,10 ! select nodes 1 to 10
cm,EQP_DISPS,node ! save these nodes in a component
alls

then the code as before:

cmsel,s,EQP_DISPS ! select a component for output

*get,num_n,NODE,0,COUNT ! get number of nodes
*get,n_min,NODE,0,NUM,MIN ! get min node number

etc.
etc.
etc.


------------
See faq569-1083 for details on how to make best use of Eng-Tips.com
 
thanks.

another question if you don't mind please: what is "(4(E15.6))" towards the end?

thank you for your time; I am finding your answers very useful in my work

 
thats in what format the results to be written, check help for *vwrite..
 
Thanks for the tips.

A message keeps popping up for each iteration of the loop saying
"Redimensioning parameter NXXX_OUTPUT will erase all current values. SHOULD THE *DIM COMMAND BE EXECUTED?"

How can I prevent this message from appearing (I guess that somehow I have to delete the parameter before defining its dimensions?)
 
u can try, i am not so sure if it is possible to delete it.
 
I managed to get around the problem by changing the name of the output files to MXXX_OUTPUT, IXXX_OUTPUT etc for each analysis

This did the trick for a while, but now I get an error message saying that there are too many defined parameters, and I have exceeded the limit of 5000.

I have tried working in a different directory but this doesnt solve the problem. The software must be making a record somewhere of each parameter that is defined. I just need to find a way of un-defining or deleting the old parameters. This would also solve the problem of constantly having to find new names for the parameters.
Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top