CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Paraview & paraFoam

Automating ParaFoam for exporting CSV files

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

Reply
 
LinkBack Thread Tools 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: 9
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
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: 14
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.
Bernhard is offline   Reply With Quote

Old   February 21, 2011, 05:51
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,659
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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
__________________
wyldckat is offline   Reply With Quote

Old   May 2, 2011, 11:10
Default
  #5
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 50
Rep Power: 9
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 10:33.
David* is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF issue MASOUD Fluent UDF and Scheme Programming 14 December 6, 2012 14:39
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46


All times are GMT -4. The time now is 23:08.