CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   average over cutting plane during runtime (http://www.cfd-online.com/Forums/openfoam-post-processing/106500-average-over-cutting-plane-during-runtime.html)

gigilentini8 August 30, 2012 11:41

average over cutting plane during runtime
 
Dear FOAMers,
can you confirm me that the function object below in ControlDict is the correct and fastest way to calculate average over cutting planes in a 3D simulation during runtime?
it seems to work but I'm not 100% sure about the results...

Code:

functions
{
    cuttingplane_average
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");

        enabled        true;
        outputControl  outputTime;

        // Output to log&file (true) or to file only
        log            true;

        // Output field values as well
        valueOutput    false;  //true;

        // Type of source: patch/faceZone/sampledSurface
        source          sampledSurface;

        sampledSurfaceDict
        {
                type cuttingPlane;
                planeType          pointAndNormal;
                pointAndNormalDict
                {
                        basePoint      (0 0 0); 
                        normalVector    (0 0 1);
                }
                source cells; // sample cells or boundaryFaces
                interpolate true;
        }

        // Operation: areaAverage/sum/weightedAverage ...
        operation      areaAverage;

        fields
        (
            p
            U
        );
    }



All times are GMT -4. The time now is 22:06.