|July 11, 2013, 09:26||
Using python for post-processing: pythonFlu, swak4foam, ... ?
Join Date: Mar 2009
Location: Lille, France
Posts: 138Rep Power: 9
I would like to know if it's possible to use pythonFlu/swak4foam for post-processing data from an already computed case or is it only available at solver run time level ?
When the run is finished, is pythonFlu/swak4foam suited to do things like that:
* get scalar, vector fields into numpy arrays to be able to manipulate them later
* get cell/face center coordinates, faces surfaces, normals to faces ...
* sample data over line/plane/surface (something like OpenFOAM sample utility)
* compute gradient, integral, ....
I would like to replace Paraview + python scripts by my own Scipy/Matplotlib scripts
Thanks for sharing your experiences.
|July 11, 2013, 11:03||
Join Date: Mar 2009
Posts: 3,926Rep Power: 41
In swak4Foam something like a hybrid of funkyDoCalc and the pythonIntegration-functionObject would be possible: calculate some swakVariables then inject the values into the Python-space and drop the user to the Python-shell or execute his script. The problem with this approach is that all the actual OF-specific work (gradients, sampling etc) has to be done in the first (swak)-part.
But thanks for the idea. I might consider implementing such a thing. Feature requests in http://sourceforge.net/apps/mantisbt...?page_number=1 might speed up that decision process. Or maybe someone feels like implementing it (contributions most welcome)
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
|Thread||Thread Starter||Forum||Replies||Last Post|
|swak4foam fails in parallel with -otherTime?||Phicau||OpenFOAM Post-Processing||3||June 26, 2013 13:00|
|pythonFlu - Python wrapping for OpenFOAM C++ API||alexey2petrov||OpenFOAM Announcements from Other Sources||13||December 21, 2012 12:43|
|How to get Python Shell into ParaView 3.8.1?||blaise||OpenFOAM Installation||3||July 24, 2012 04:58|
|CentFOAM Python Script Installation: Error||socon009||OpenFOAM Installation||2||May 26, 2012 09:36|
|Post Processing in FEM||Abhijit Tilak||Main CFD Forum||0||April 26, 2004 11:59|