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

Python / R libraries for reading postProcessing data

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2020, 09:22
Default Python / R libraries for reading postProcessing data
  #1
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 376
Rep Power: 11
Gerry Kan is on a distinguished road
Howdy Foamers:

I have my run write out line data, which are written in the postProcessing folder. I am wondering if there exists python or R libraries that would read them.

I found myself writing scripts for parsing these files over and over again and I hope there is a nicely packaged solution ...

Thanks in advance, Gerry.
Gerry Kan is offline   Reply With Quote

Old   July 7, 2020, 04:31
Default
  #2
New Member
 
bestucan's Avatar
 
Tu Can
Join Date: Jul 2017
Location: China
Posts: 16
Rep Power: 9
bestucan is on a distinguished road
paraview. it could run with python.
bestucan is offline   Reply With Quote

Old   July 7, 2020, 12:56
Default
  #3
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
Here is an example:

https://github.com/ETHZ-CFD-MS/O2RBC...SamplePlane.py
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   July 8, 2020, 04:35
Default
  #4
Senior Member
 
Gerry Kan's Avatar
 
Gerry Kan
Join Date: May 2016
Posts: 376
Rep Power: 11
Gerry Kan is on a distinguished road
Dear Zhangyan:

Thank you for the link. The "challenge" (if I could call it that) is that I have a lot of them, mostly line sample data, that have to be read.

I ended up writing a simple package to process them and save the data in a dictionary. This way at least I don't have to rewrite the parser every time.

Thanks, Gerry.
Gerry Kan is offline   Reply With Quote

Old   September 28, 2020, 20:34
Default
  #5
Member
 
Patti Michelle Sheaffer
Join Date: Sep 2018
Posts: 55
Rep Power: 8
pattim is on a distinguished road
Quote:
Originally Posted by Gerry Kan View Post
Dear Zhangyan:

Thank you for the link. The "challenge" (if I could call it that) is that I have a lot of them, mostly line sample data, that have to be read.

I ended up writing a simple package to process them and save the data in a dictionary. This way at least I don't have to rewrite the parser every time.

Thanks, Gerry.

Gerry - Did you ever find Python/R libraries that can read OF variable data-files? I found PyFoam, but it seems to be oriented toward setting up and controlling OF solver/parameter-files/applets (including paraFoam), rather than simply reading hundreds of data files into Python/R for processing.


Thanks,
Patricia
pattim 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
[General] Get data from Calculator filter in python script taalf ParaView 17 February 15, 2018 05:53
Postprocessing Data from Starccm+ AS_Aero STAR-CCM+ 1 October 8, 2017 20:05
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 15:06
studying a valve case mina.basta OpenFOAM 33 August 30, 2013 05:46
data postprocessing - need help astro1 Main CFD Forum 0 November 28, 2006 15:37


All times are GMT -4. The time now is 15:55.