Skip to content

New function objects

Andrew Heather requested to merge feature-function-objects-2206 into develop

New function objects

multiFieldValue

  • Previously, the multiFieldValue function object was limited to operate on lists of fieldValue function objects.
  • Any function objects that generate results can now be used, e.g.
pressureAverage
{
    type    multiFieldValue;
    libs    (fieldFunctionObjects);

    operation   average;

    functions
    {
        inlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            inlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
            resultFields    (areaAverage(inlet,p));
        }
        outlet
        {
            type            surfaceFieldValue;
            operation       areaAverage;
            regionType      patch;
            name            outlet;
            fields          (p);

            writeFields     no;
            writeToFile     no;
            log             no;
        }
        average
        {
            type            valueAverage;
            functionObject  testSample1;
            fields          (average(p));

            writeToFile     no;
            log             no;
        }
    }
}

Test case : filter-multiFieldValue.tgz - see system/pressureDifference function object

particleZoneInfo

Reports cloud information for particles passing through a specified cell zone.

Example usage:

cloudFunctions
{
    particleZoneInfo1
    {
        type            particleZoneInfo;
        cellZone        leftFluid;

        // Optional entries
        //writer          vtk;
    }
}

Results are written to file:

  • \<case\>/postProcessing/lagrangian/\<cloudName\>/\<functionName\>/\<time\>
# cellZone        : leftFluid
# time            : 1.0000000000e+00
#
# origID    origProc    (x y z)    time0    age    d0    d    mass0    mass

Where

  • origID : particle ID
  • origProc : processor ID
  • (x y z) : Cartesian co-ordinates
  • time0 : time particle enters the cellZone
  • age : time spent in the cellZone
  • d0 : diameter on entry to the cellZone
  • d : current diameter
  • mass0 : mass on entry to the cellZone
  • mass : current mass

If the optional writer entry is supplied, cloud data is written in the specified format.

During the run, output statistics are reported after the cloud solution, e.g.:

particleZoneInfo:
    Cell zone                       = leftFluid
    Contributions                   = 257

Here, Contributions refers to the number of incremental particle-move contributions recorded during this time step. At write times, the output is extended, e.g.:

particleZoneInfo:
    Cell zone                       = leftFluid
    Contributions                   = 822
    Number of particles             = 199
    Written data to "postProcessing/lagrangian/reactingCloud1/

Test case: filter-particleZoneInfo.tgz - see constant/reactingCloud1Properties

Merge request reports