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

Output transient file to csv

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2008, 01:43
Default Output transient file to csv
  #1
Ben
Guest
 
Posts: n/a
Hi,

I am trying to output my transient results to csv format. Does anyone know how to conduct this operation?

I found out that you can do this in CFX-Post by going to File>Export, type in the filename as name.csv, select the variables you want to output, and save it as .csv.

However this only output the final results file....

I figured out that ANSYS-CFX solver can output transient results file to Fieldview,CGNS and other format..but it can't export to .csv file! I am currently trying to output variables such as velocity or pressure into csv format so that it can be read in MATLAB.

Does anyone have any idea? Any input will be greatly appreciated.

Cheers, ben
  Reply With Quote

Old   September 7, 2008, 12:58
Default Re: Output transient file to csv
  #2
Padla
Guest
 
Posts: n/a
Hello, Yes, it's a kind of problem in CFX to output transient fields into csv. I do it like this: 1. Create in CFX-Post one single Point, then create a time-plot of variable you want and wait (it depends on mesh how long. When I did it took sometimes for 5 or 10 minutes). 2. Then, using comand editor make any quantity of points you want by copy-pasting your first point and giving them new names. Then do the same with the plots. 3. Then you apply your changes and wait, until CFX builds your plots. Then press the "Export" button. And that is all.

P.S. Yeah, I know, it's pertty dull, but I didn't manage to find any better variant.

  Reply With Quote

Old   September 10, 2008, 06:14
Default Re: Output transient file to csv
  #3
ben
Guest
 
Posts: n/a
Ok, that might just work. Thanks for the input!
  Reply With Quote

Old   September 23, 2008, 09:17
Default Re: Output transient file to csv
  #4
Terje
Guest
 
Posts: n/a
Hi,

Padla's explanation does probably work but it involves a lot of manual work and has the problem that cfx post is very slow at making time plots. My method requires a little work up front but it will save you tremendous amount of time if you handle a lot of files. I often have a lot of trn-files and want to extract e.g. the temperature at the flow front to a csv-file at each time step. Here is my suggestion:

- First create a session file (temp1.cse) in post defining the flow front and export the temperature there to a Out.csv file.

- Write a small script that loops through your trn-files changes the name of the csv-file and runs cfx-post in batch mode. It could look something like below if you are using python. Here repString changes the string 'out.csv' to something like 'flowFront_22.csv' in the file temp1.cse.

prefix = 'flowFront'

for f in os.listdir(transFileFolder):

>if f[-3:] == 'trn':

>>timeStep = f.split("_")[0]

>>transFile = transFileFolder + f

>>repString('temp1.cse','temp2.cse','Out.csv', prefix + '_' + str(timeStep) + '.csv')

>>os.system('cfx5post -batch temp2.cse ' + transFile)

  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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.com] OpenFOAM 1.7.1 installation on LINUX UBUNTU 10.10 electrosin OpenFOAM Installation 40 May 31, 2016 06:11
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM Community Contributions 300 October 29, 2014 19:00
paraview installation woes vex OpenFOAM Installation 15 January 30, 2011 08:11
OpenFOAM Install Script ljsh OpenFOAM Installation 82 October 12, 2009 12:47
PHI file structure Eugene Phoenics 9 November 2, 2001 23:00


All times are GMT -4. The time now is 09:20.