functionObjects: layerAverage: Replacment for postChannel

This function generates plots of fields averaged over the layers in the
mesh. It is a generalised replacement for the postChannel utility, which
has been removed. An example of this function's usage is as follows:

    layerAverage1
    {
        type            layerAverage;
        libs            ("libfieldFunctionObjects.so");

        writeControl    writeTime;

        setFormat       raw;

        // Patches and/or zones from which layers extrude
        patches         (bottom);
        zones           (quarterPlane threeQuartersPlane);

        // Spatial component against which to plot
        component       y;

        // Is the geometry symmetric around the centre layer?
        symmetric       true;

        // Fields to average and plot
        fields          (pMean pPrime2Mean UMean UPrime2Mean k);
    }
This commit is contained in:
Will Bainbridge
2021-12-07 15:32:43 +00:00
parent 31fee136e1
commit 053eed714d
19 changed files with 829 additions and 935 deletions

View File

@ -17,6 +17,4 @@ runApplication decomposePar -cellDist
runParallel $application
runApplication reconstructPar
runApplication postChannel
#------------------------------------------------------------------------------

View File

@ -47,6 +47,31 @@ runTimeModifiable true;
functions
{
#includeFunc fieldAverage(U, p, prime2Mean = yes)
#includeFunc uniform
(
fieldType = volScalarField,
name = half,
dimensions = [0 0 0 0 0 0 0],
value = 0.5
)
#includeFunc mag(UPrime2Mean)
#includeFunc multiply(half, mag(UPrime2Mean), result = k)
#includeFunc graphLayerAverage
(
funcName = layerAverage,
patches = (bottomWall),
axis = y,
symmetric = yes,
pMean,
pPrime2Mean,
UMean,
UPrime2Mean,
k
);
}
// ************************************************************************* //