K62 |
November 6, 2015 05:49 |
Calculating a sequence of zone averages with swak4Foam
Dear forum,
I do simulations on a straight pipe and would like to extract pressure averaged over the radial plane at specific locations. Of course for the inlet and outlet patches one could use
Code:
patchAverage -latestTime p <patch>
and for single planes within the domain swak4Foam is a suitable option.
For that I am using this functionObject definition in controlDict
Code:
p0
{
type swakExpression;
valueType surface;
surfaceName p0;
surface {
type plane;
basePoint (0 0 0.001);
normalVector (1 0 0);
interpolate false;
}
verbose true;
accumulations ( weightedAverage );
outputControlMode timeStep;
outputInterval 1;
expression "p";
}
This gives me for a single basePoint, i.e. a single plane, the pressure averaged over the area of the plane. Using
Code:
execFlowFunctionObjects -latestTime
writes a nice output file in the postProcessing dir, such as:
Code:
# Time weightedAverage
35000 1.86158477779654
However, I'd like to know if swak4Foam also offers the possibility to extract averages for multiple basePoints, i.e. multiple planes, and writes the result into a single file. Of course I am aware of the option to define multiple functionObjects. But, this gives also multiple output files. I am doing this so far and extracting the data using another python script. However, I'd like to know if swak4Foam offers a cleaner solution to my problem.
Any suggestions are more than welcome!
Thank you very much!
Martin
|