OpenFOAM® v1612+: Post-processing

23/12/2016

New extraction of particle data from multiphase

The new extractEulerianParticles function object derives particle data from fluid elements traversing a face zone during multiphase flow calculations.

Particle data is stored as a Lagrangian cloud, where the particle properties include:

  • soi: start of injection
  • d: diameter
  • U: volume-averaged velocity
  • x: volume-averaged position

This is written to the case time directories, under the name: $FOAM_CASE/<time>/lagrangian/eulerianCloud

The following example shows the lagrangian particles being collected as the liquid phase crosses the external boundaries of the Eulerian case.

extractEulerianParticles1
{
    type            extractEulerianParticles;
    libs            ("libfieldFunctionObjects.so");
    writeControl    writeTime;
    faceZone        collector;
    alpha           alpha.water;
    nLocations      20;
}

Source code
$FOAM_SRC/functionObjects/field/extractEulerianParticles
Examples
$FOAM_TUTORIALS/multiphase/interFoam/laminar/vofToLagrangian/eulerianInjection

New thermocouple function object

The new thermocouple function object incorporates the effects of bead thermal inertia, convective and radiative heat transfer. The reported temperature is based on an energy balance for the thermocouple bead, given by:

pict\relax \special {t4ht=

where ρ
  TC  \relax \special {t4ht=, C
  p,TC  \relax \special {t4ht=, V
 T C  \relax \special {t4ht=, A
  TC  \relax \special {t4ht=, and ϵ
 TC  \relax \special {t4ht= represent the mass density, heat capacity, volume, surface, and emissivity of the thermocouple bead. TTC  \relax \special {t4ht= is the thermocouple bead temperature, Tg  \relax \special {t4ht= the local gas temperature from the cell, G  \relax \special {t4ht= the average irradiation received by the thermocouple bead, and σ  \relax \special {t4ht= the Stefan-Boltzmann constant. The convective heat transfer coefficient, h  \relax \special {t4ht=, is based on the Nusselt number around a sphere:

pict\relax \special {t4ht=

Example usage:

probes
{
    type            thermoCoupleProbes;
    libs            ("libutilityFunctionObjects.so");
    writeControl    timeStep;
    writeInterval   1;

    // ODE solver properties (see $FOAM_SRC/ODE/ODESolvers)
    solver          rodas23;
    absTol          1e-12;
    relTol          1e-8;

    interpolationScheme cellPoint;

    // Thermocouple properties
    rho             8908;
    Cp              440;
    d               1e-3; // diameter
    epsilon         0.85; // emissivity

    // Name of the incident radiation flux
    radiationField  G;

    probeLocations
    (
        (0.5 0.5 0.5)
    );

    fields          (T);
}

In this example the output is written to the file: $FOAM_CASE/postProcessing/probes/0/T

Source code
$FOAM_SRC/functionObjects/utilities/thermoCoupleProbes
Examples
$FOAM_TUTORIALS/combustion/fireFoam/LES/compartmentFire
$FOAM_TUTORIALS/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase

New function object to generate particle distributions

The new particleDistribution function object generates distributions for user selected particle fields.

Example usage:

distribtion1
{
    type            particleDistribution;
    libs            ("libfieldFunctionObjects.so");
    writeControl    writeTime;
    cloud           sprayCloud;
    nameVsBinWidth
    (
        (d 1e-5)
        (U 10)
    );
    setFormat       raw;
}

Source code
$FOAM_SRC/functionObjects/field/particleDistribution
Examples
$FOAM_TUTORIALS/lagrangian/sprayFoam/aachenBomb

New flux calculation

The new flux function object generates a scalar surface flux field by interpolating the selected field to the faces, and performing the dot product with the face areas.

The object is specified using:

flux1
{
    type            flux;
    libs            ("libfieldFunctionObjects.so");
    field           (U);
}

Note that the operation is limited to volVectorField and surfaceVectorField field types.

Source code
$FOAM_SRC/functionObjects/field/flux

Updated run-time image generation

The runTimePostProcessing function object was introduced in version v3.0+ to generate images during run-time. This has been improved to:

  • optionally remove source VTK objects after use
  • simplified the camera input
  • new optional zoom controls

Source code
$FOAM_SRC/functionObjects/graphics/runTimePostProcessing
Examples
$FOAM_TUTORIALS/incompressible/pisoFoam/LES/motorBike/motorBike

Updated noise analysis functionality

The pointNoise and surfaceNoise models have been extended to operate on multiple input files.

Point noise example usage:

// Optional list of input files
inputFiles ("$FOAM_CASE/pressureData" "pressureData2");

// Note: no file names required when specifying the pressure data
// - assuming all files follow the same schema
pressureData
{
    nHeaderLine     0;
    refColumn       0;
    componentColumns (1);
    separator       " ";
    mergeSeparators yes;
}

windowModel     Hanning;

HanningCoeffs
{
    // Window overlap percentage
    overlapPercent  50;
    symmetric       yes;
...

Surface noise example usage:

// Surface reader
reader      ensight;

// Surface writer
writer      ensight;

// Optional list of input files
inputFiles ("$FOAM_CASE/pressureData.case" "pressureData2.case");

windowModel     Hanning;

HanningCoeffs
{
    // Window overlap percentage
    overlapPercent  50;
    symmetric       yes;
...

Source code
$FOAM_SRC/randomProcesses/noise/noiseModels/pointNoise
$FOAM_SRC/randomProcesses/noise/noiseModels/surfaceNoise

New scalar zero gradient function object

The new zeroGradient function object projects the patch internal field values on to the patch faces. This is a simpler alternative to the nearWallFields function object for the case that only the cell values adjacent to the patch are of interest.

The input fields are selected via a wordReList, e.g.

fields      (U "(T|k|epsilon|omega)");

The names of the resulting output fields use place holder tokens for flexibility, e.g.

result      zeroGradient(@@);

The @@ place holder is replaced by the name of the input field, e.g.

fields      (U T);
result      zeroGradient(@@);

-> zeroGradient(U), zeroGradient(T)

Or,

fields      (U T);
result      @@nearWall;

-> UnearWall, TnearWall

Source code
$FOAM_SRC/functionObjects/field/zeroGradient