CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Post-Processing

Calculating a sequence of zone averages with swak4Foam

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   November 6, 2015, 06:49
Default Calculating a sequence of zone averages with swak4Foam
New Member
Martin Schmelzer
Join Date: Aug 2012
Location: TU Delft
Posts: 4
Rep Power: 7
K62 is on a distinguished road
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
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

      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
execFlowFunctionObjects -latestTime
writes a nice output file in the postProcessing dir, such as:
#                  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!

K62 is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 12 May 2, 2013 10:52
Mesh conversion problem (fluent3DMeshToFoam) Aadhavan OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 1 December 12, 2012 11:38
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51
Problem in IMPORT of ICEM input file in FLUENT csvirume FLUENT 2 September 9, 2009 01:08

All times are GMT -4. The time now is 23:39.