Files
OpenFOAM-12/etc/caseDicts/postProcessing/graphs/graphPatchCutLayerAverage
Will Bainbridge 8208ca6cc7 functionObjects: Added patchCutLayerAverage
This function object writes graphs of patch face values, area-averaged in
planes perpendicular to a given direction. It adaptively grades the
distribution of graph points to match the resolution of the mesh.

Example of function object specification:

    patchCutLayerAverage1
    {
        type            patchCutLayerAverage;
        libs            ("libpatchCutLayerAverageFunctionObject.so");

        writeControl    writeTime;
        writeInterval   1;

        patch           lowerWall;
        direction       (1 0 0);
        nPoints         100;
        interpolate     no;

        fields          (p U);

        axis            x;
        setFormat       raw;
    }

A packaged function object is also included, which permits the following
syntax to be used, either with #includeFunc in the system/controlDict,
or with the -func option to foamPostProcess:

    graphPatchCutLayerAverage
    (
        funcName=aerofoilLowerPressure,
        patch=aerofoilLower,
        direction=(0.15 -0.016 0),
        nPoints=100,
        p
    )
2022-12-06 13:00:56 +00:00

38 lines
1.7 KiB
C++

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Writes graphs of patch face values, area-averaged in planes perpendicular
to a given direction. It adaptively grades the distribution of graph points
to match the resolution of the mesh.
\*---------------------------------------------------------------------------*/
patch <patchName>; // Patch on which to average values
direction <direction>; // Direction along which to graph
nPoints <nPoints>; // Number of points in the graph
interpolate no; // Whether or not to do linear interpolation
// between the plot points. Generates a smoother,
// higher order result. Loses the ability to
// visualise and reason about the layer
// thicknesses.
axis default; // The independent variable of the graph. Can be
// "x", "y", "z", "xyz" (all coordinates written
// out), "distance" (plane distance from the
// origin), or "default" (both coordinates and
// distance written out).
fields (<fieldNames>);
#includeEtc "caseDicts/postProcessing/graphs/graphPatchCutLayerAverage.cfg"
// ************************************************************************* //