CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Automating ParaFoam for exporting CSV files

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Bernhard
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2011, 05:12
Default Automating ParaFoam for exporting CSV files
  #1
Senior Member
 
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 17
kumar is on a distinguished road
Hello ,
I am using interFoam for jet simulations and I want to export my data into matlab. I perform the following operations:
Start ParaFoam

1) Load Mesh parts - ALL
2) Load Volume Fields - alpha1
3) Display - Representation - points
4) Select color by - Volpoint interpolation (alpha1)
5) Split Horizontal
6) Spreadsheet view
7) Export - filename.csv

Then i am able to easily import this file in Matlab.

But I have around 100 timesteps, and i dont want to perform this action for all the time steps. Is there an easy way to record these actions and then execute the script for all the time steps.
any idea on performing this is helpful

regards
K.Suresh kumar
kumar is offline   Reply With Quote

Old   February 19, 2011, 14:34
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings kumar,

AFAIK, you have at least two possible solutions:
  • Check ParaView's wiki and learn about Python scripting within ParaView. Other than that, ParaView doesn't have macro functionality (edit: I was wrong about macros capabilities, see next 2 posts)
  • The other possibility is to export to CSV directly in OpenFOAM, by applying the patches available here and following the instructions available in that same page.
Best regards and good luck!
Bruno
__________________

Last edited by wyldckat; February 21, 2011 at 05:52. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   February 21, 2011, 03:39
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
No macro's in Paraview? What do you mean with that? Since you can 'trace' a series of actions via the python shell, and save it as Python script. You can then execute it via the GUI if you like. But writing a loop around this should not be too complicated in this case.
ginop likes this.
Bernhard is offline   Reply With Quote

Old   February 21, 2011, 05:51
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Bernhard,

Quote:
Originally Posted by Bernhard View Post
No macro's in Paraview? What do you mean with that?
I'm use to seeing the term "Macros" in OpenOffice, Office and some other text editors, where mouse clicks and keyboard actions can be recorded...
Hey, wait, it does have macros!!! Apparently I've been partially asleep for a while now

Quote:
Originally Posted by Bernhard View Post
Since you can 'trace' a series of actions via the python shell, and save it as Python script.
Indeed it does!! ParaView 3.6.1 doesn't (at least via GUI), but ParaView 3.8.0 has a tracing capability!!

On the menu "Tools->Python Shell", select the "Trace" tab and click on the "Start Trace". Do the actions. "Stop Trace" and "Edit Trace", make the changes you want and save the script. Then it's just a matter of running the script!!

Many thanks Bernhard!

Best regards,
Bruno
ginop likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 2, 2011, 12:10
Default
  #5
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 70
Rep Power: 17
David* is on a distinguished road
Hello,

my ParaView is the version from the OF homepage (paraviewopenfoam381), but it has no python and no macro functionality. Do I need to just download and install ParaView from the official page to restore this functions?
And which functions am I losing by doing this (or are the two versions just the same?)?

Thanks for every hint
David

/edit: I had to download the 'official' ParaView 3.10.1 and modify it following this instructions:
http://www.cfd-online.com/Forums/blo...-openfoam.html

Last edited by David*; May 3, 2011 at 11:33.
David* 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
Converting ANSYS CFX files to Fluent files Martin S. Rasmussen FLUENT 3 January 30, 2007 16:08
Problems with result files Kasper CFX 5 December 14, 2006 03:41
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51
[making animations] fclose fails to close files? Mika FLUENT 0 March 30, 2001 09:19
Merging .msh files in TGrid Raza Mirza FLUENT 2 January 18, 2001 19:09


All times are GMT -4. The time now is 06:28.