Files
OpenFOAM-12/tutorials/discreteMethods/dsmcFoam
Henry Weller 46c790dd09 functionObjects::fieldAverage: Simplified the interface by the introduction of defaults
The mean, prime2Mean and base now have default values:

    {
        mean            on;   // (default = on)
        prime2Mean      on;   // (default = off)
        base            time; // time or iteration (default = time)
        window          200;  // optional averaging window
        windowName      w1;   // optional window name (default = "")
    }

so for the majority of cases for which these defaults are appropriate the
fieldAverage functionObject can now be specified in the functions entry in
controlDict thus:

functions
{
    fieldAverage1
    {
        #includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"

        fields
        (
            U.air
            U.water
            alpha.air
            p
        );
    }
}

also utilising the new fieldAverage.cfg file.

For cases in which these defaults are not appropriate, e.g. the prime2Mean is
also required the optional entries can be specified within sub-dictionaries for
each field, e.g.

    fieldAverage1
    {
        #includeEtc "caseDicts/postProcessing/fields/fieldAverage.cfg"

        fields
        (
            U
            {
                prime2Mean  yes;
            }

            p
            {
                prime2Mean  yes;
            }
        );
    }
2020-03-06 15:51:49 +00:00
..
2014-12-10 22:40:10 +00:00

Fields are used by dsmcFoam in several ways, some of which are different to
their use elsewhere in OpenFOAM.  None of these fields are solved by partial
differential equations, they are used either to record simulation data, or to
supply boundary data.

In each case there are 11 fields:

    boundaryT, boundaryU:

        The wall and free stream conditions at the boundary are specified for
        velocity and temperature with these fields - only the data on the
        patches is used, the cell data is not.  These are the only two fields
        which supply data to the case.

    dsmcRhoN:

        The population of dsmc particles in cells is recorded to visualise how
        well the cell population conditions required for dsmc are met.  The
        boundary conditions are zeroGradient because only cell data is
        meaningful.

    fD, q:

        The wall heat flux (q) and force density (fD, i.e. stress vector) is
        recorded with these fields - only the data on wall patches is relevant,
        the cell data is not.

    iDof, internalE, linearKE, momentum, rhoM, rhoN:

        These fields are the densities of extensive quantities in the
        simulation, i.e. of number, mass, momentum, energy.  Cell data is
        recorded in the internal field and the boundaryField is used to record
        the data of particles that strike wall patches.  The properties of
        particles striking wall faces are weighted by 1/(Un*fA), where Un is the
        normal component of the particle's velocity and fA is the face area.
        This is done so that when intensive quantities, such as velocity or
        temperature, are evaluated on the wall the values are correct this
        allows velocity slip and temperature jump to be evaluated.

        Therefore, the data in these fields on wall patches is of a different
        type to the volume data.  This may cause problems when post-processing,
        as any interpolation of these fields will have a artifacts in the near
        wall cells because the values on the faces are radically different.
        This can be overcome by visualising the data uninterpolated, or by
        copying the fields and setting zeroGradient boundary conditions on
        walls.  Calculated intensive fields do not have this issue.

Further fields are produced by dsmcFoam, i.e. dsmcSigmaTcRMax (used in the
selection of collision partners) and by the fieldAverage (averaging the
extensive quantity densities) and dsmcFields (calculating intensive quantities,
i.e. velocity and temperature, from extensive quantities) function objects in
each case as it runs.