Python Scripting - basic help
I'm trying to analyze the boundary layer growth of a fluid near a wall in a simulation that I did with openfoam. The way I'm do that is that I take cross-sectional cuts of the velocity profile and plot the 2d data and look at the 99% value of velocity by eye and record the value.
This is a very inefficient way of doing it, and ideally I'd like to have a script that does that for me automatically. Writing python, C++ or Java programs isn't a problem for me, I just need to know how or where I can get started.
How would I get started doing something like this? Any help, pointers or suggestions are welcome.
You mentioned you're familiar with python, so PyFoam is a nice place to start looking around.
I did look at pyFoam briefly and it seems like a great tool. However I was doing some reading and stumbled upon the sample utility: shouldn't I be able to do this boundary layer analysis just by using the sample utility?
Do you think that's true? I'll try it today and repost.
I think what you can do is to use the sample utility or even the approach you mentioned at the start and add same C++ to do exactly what you want. you will find these in: $FOAM/applications/utilities/postProcessing/ dir.
I'm afraid "pyFoamSamplePlot.py --help" is all the documentation you're going to get, but it shouldn't be too hard to figure out how to get all this
|All times are GMT -4. The time now is 01:04.|