CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Script to Read and Export all the data in all the trn files

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By AtoHM
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2020, 12:18
Default Script to Read and Export all the data in all the trn files
  #1
New Member
 
Dinusha
Join Date: Feb 2020
Posts: 4
Rep Power: 6
ajdinr is on a distinguished road
Hi,

How can I read all the variables and data in *.trn files (transient simulation) and export to csv/excel file using a script?

In addition, I also replicate the mathematical I use for one trn file to all the other trn files using a script (or using a
macro)

Thanks
ajdinr is offline   Reply With Quote

Old   April 4, 2020, 13:18
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
You can create a state or session file in cfd post. To get the correct syntax, record a session where you manually export some values to csv. This will show you the commands you need. Then, I would recommend going to python or whatever language and write a script that recreates the former code but for all the transient files you want. Once you got that, just play the session in post.
ajdinr likes this.
AtoHM is offline   Reply With Quote

Old   April 5, 2020, 12:44
Default
  #3
New Member
 
Dinusha
Join Date: Feb 2020
Posts: 4
Rep Power: 6
ajdinr is on a distinguished road
Thanks a lot, I will try this
ajdinr is offline   Reply With Quote

Old   April 6, 2020, 06:56
Default
  #4
New Member
 
Dinusha
Join Date: Feb 2020
Posts: 4
Rep Power: 6
ajdinr is on a distinguished road
Any idea to make that applicable to different projects other than the one we create/run the session? (like if I want to use the same export script to export the trn files of different file)
Thanks
ajdinr is offline   Reply With Quote

Old   April 6, 2020, 07:06
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Do it using CFX stand-alone (ie not inside workbench). In fact just about all serious users of CFX do it stand alone as CFX runs quicker and with more control that way - your question is one example of why.
ajdinr likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.org] Compiling OpenFOAM 5.0 on the Titan Supercomputer wildfire230 OpenFOAM Installation 20 May 6, 2020 08:30
export data at nodes Meenu FLUENT 1 December 30, 2011 02:24
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 18:51
read data files and export to avs file Santhosh FLUENT 0 June 15, 2006 07:46
[making animations] fclose fails to close files? Mika FLUENT 0 March 30, 2001 09:19


All times are GMT -4. The time now is 01:16.