CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Newbie: How to get raw format x y z u v w file from OpenFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2017, 05:06
Default Newbie: How to get raw format x y z u v w file from OpenFoam
  #1
New Member
 
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12
ayushmorx is on a distinguished road
Hello,

I am newbie to OpenFoam, and recently ran a case using pimpleFoam. The run was successful, but now I need to postprocess. I am trying to extract a single file with raw data of cell nodes, and the corresponding velocities. I initially tried using writeCellCenters, but it shows 92k+ data points, whereas, my U file only shows 88k+ data points. Clearly either I am missing either U data at nodes or I do not have access to coordinates of the corresponding U velocities. I tried using PyFoamConvertToCSV, but clearly I am doing something wrong and cannot extract the data, not that I understand PyFoam much either.

So my question is, how would I best extract the correct node coordinates and correct corresponding velocities in a single file in raw format(x y z u v w). I need the data in my lagrangian codes, as well as possibly plot the data in gnuplot or jplot.
ayushmorx is offline   Reply With Quote

Old   October 26, 2017, 05:42
Default
  #2
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12
kera is on a distinguished road
Hallo Ayush,

one quick question, have you tried using "sampleDict"?

hope this helps!

Regards,
Ricky


Quote:
Originally Posted by ayushmorx View Post
Hello,

I am newbie to OpenFoam, and recently ran a case using pimpleFoam. The run was successful, but now I need to postprocess. I am trying to extract a single file with raw data of cell nodes, and the corresponding velocities. I initially tried using writeCellCenters, but it shows 92k+ data points, whereas, my U file only shows 88k+ data points. Clearly either I am missing either U data at nodes or I do not have access to coordinates of the corresponding U velocities. I tried using PyFoamConvertToCSV, but clearly I am doing something wrong and cannot extract the data, not that I understand PyFoam much either.

So my question is, how would I best extract the correct node coordinates and correct corresponding velocities in a single file in raw format(x y z u v w). I need the data in my lagrangian codes, as well as possibly plot the data in gnuplot or jplot.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   October 26, 2017, 06:01
Default
  #3
New Member
 
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12
ayushmorx is on a distinguished road
Hello Ricky,

I tried that, but it seems I can only extract the information for a line or surface. Can I extract information for the whole volume too?
ayushmorx is offline   Reply With Quote

Old   October 26, 2017, 08:22
Default
  #4
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12
kera is on a distinguished road
Hallo Ayush,

My knowledge of OpenFOAM is rather limited, of course there may be more efficient ways to extract information for the whole volume, but as for now, if you wanna extract the field data at every data point, you can do it in paraView.

Step1: Open paraview and on the top right corner of the RenderView click on split vertical or horizontal.
Step 2: select the SpreadSheet View, Wollah! you have all the field data for the specified time/iteration
Step 3: save the data as CSV and from there you can work it out as you like.

If you find any other approach, would be glad to know about it

Regards,
Ricky

Quote:
Originally Posted by ayushmorx View Post
Hello Ricky,

I tried that, but it seems I can only extract the information for a line or surface. Can I extract information for the whole volume too?
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Reply

Tags
openfoam4.1, postprocessing, raw data


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
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 04:04
[swak4Foam] Problem installing swak_2.x for OpenFoam-2.4.0 towanda OpenFOAM Community Contributions 6 September 5, 2015 22:03
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


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