Hi There,
Is it possible to get the result of OpenFOAM using the python scripts ? I am mostly interested in getting result like flow rate/pressure on a specific inlet/outlet/face or other quantities.
Or is it possible to get into these values into the Spreadsheet ?
If it is not possible, which file or data should I look in into ? I am interested in the text data so that maybe I can process it by myslef.
Any guideline ?
Your help is greatly appreciated.
S-Y. Chen
Getting OpenFOAM result using python script
Moderator: oliveroxtoby
Forum rules
and Helpful information for the FEM forum
and Helpful information for the FEM forum
Re: Getting OpenFOAM result using python script
That should be pretty straightforward. OpenFOAM saves its results to a file (or files) in the case directory, so you can do a typical file read to get into them. They're put under folders numbered with the timestep (e.g., the 0 folder holds the initial conditions). I don't remember if CfdOF imports them back into FreeCAD in a way that's more convenient for that, but I suspect it doesn't, since the post-processing is primarily done in ParaView.
If you want an idea of how to approach that, you might want to look into PyFOAM. Here's a pretty good introduction on how to use it: https://openfoamwiki.net/images/e/e4/Be ... aining.pdf
If you want an idea of how to approach that, you might want to look into PyFOAM. Here's a pretty good introduction on how to use it: https://openfoamwiki.net/images/e/e4/Be ... aining.pdf