CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   areaAverage sampledSurface - what does it do exactly? (

er10 August 22, 2019 13:26

areaAverage sampledSurface - what does it do exactly?
Hi all,

I have inherited a code which includes the following sampling lines below within the controlDict file.
Does anyone know how the plane areaAverage operation works in OpenFOAM? What's the equation which describes this particular operation?

Would really appreciate your help!

Thanks in advance.


      type            surfaceRegion;
      libs ("");
        enabled        true;
        writeControl    runTime;
        writeInterval  0.001;
        log            false;
        writeFields    false;
        writeArea      false;
        surfaceFormat  none;
        regionType      sampledSurface;
        name      Mean;

              type        plane;
              basePoint  (0.1524 0 0);
              normalVector (1 0 0);
          operation      areaAverage;

tecmul September 5, 2019 11:54

Hi, the areaAverage operation is defined in (for OpenFOAM 6):


Here's the piece of code for areaAverage:


      case opAreaAverage:
            const scalarField magSf(mag(Sf));

            result = sum(magSf*values)/sum(magSf);

magSf is defined as a scalar field of face normal vector magnitudes. The rest is just the area weighted average of whatever field you choose to integrate (rho in your case) over the plane specified by the sampledSurfaceDict. surfaceFieldValueTemplates.C also has some code related to interpolation of the field onto the plane which I don't understand.

All times are GMT -4. The time now is 13:30.