Skip to main content

regionSizeDistribution

Description

The regionSizeDistribution function object creates a droplet size distribution via interrogating a continuous phase fraction field.

Looks up a phase-fraction (alpha) field and splits the mesh into regions based on where the field is below the threshold value. These regions ("droplets") can now be analysed.

Regions:

  • print the regions connected to a user-defined set of patches.
(in spray calculation these form the liquid core)
  • print the regions with too large volume. These are the 'background'
regions.
  • (debug) write regions as a volScalarField
  • (debug) print for all regions the sum of volume and alpha*volume

Output (volume scalar) fields include:

  • alpha_liquidCore : alpha with outside liquid core set to 0
  • alpha_background : alpha with outside background set to 0.

Histogram:

  • determine histogram of diameter (given minDiameter, maxDiameter, nBins)
  • write graph of number of droplets per bin
  • write graph of sum, average and deviation of droplet volume per bin
  • write graph of sum, average and deviation of user-defined fields. For
`volVectorField`s these are those of the 3 components and the magnitude.
  • (optional) write graph of histogram of centroids on iso planes
downstream of the injector determined by `origin`, `direction` and
`maxDiameter` up to `maxDownstream`

Operands

OperandTypeLocation
input--
output file-$FOAM_CASE/postProcessing/<FO>/<time>/<files>
output field--

Usage

Example of the regionSizeDistribution function object by using functions sub-dictionary in system/controlDict file:

regionSizeDistribution1
{
// Mandatory entries (unmodifiable)
type regionSizeDistribution;
libs (fieldFunctionObjects);

// Mandatory entries (runtime modifiable)
field alpha;
patches (inlet);
fields (p U);
threshold 0.4;
maxDiameter 5e-5;
nBins 100;
setFormat gnuplot;

// Optional entries (runtime modifiable)
minDiameter 0.0;
coordinateSystem
{
origin (0 0 0);
rotation
{
type axes;
e3 (0 0 1);
e1 (1 0 0);
}
}

// Optional downstream iso-plane bins
isoPlanes true;

// Mandatory entries if isoPlanes=true (runtime modifiable)
// Plane normal and point definition
origin (1e-4 0 5e-4);
direction (1 0 1);

// Maximum diameter of the cylinder formed by the origin point
// and direction
maxD 3e-4;

// Maximum downstream distance
maxDownstream 6e-4;

// Number of iso-plane bins
nDownstreamBins 20;

// Optional (inherited) entries
writePrecision 8;
writeToFile true;
useUserTime true;
region region0;
enabled true;
log true;
timeStart 0;
timeEnd 1000;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval 1;
}

where the entries mean:

PropertyDescriptionTypeRequiredDefault
typeType name: regionSizeDistributionwordyes-
libsLibrary name: fieldFunctionObjectswordyes-
fieldPhase field to interrogatewordyes-
patchesPatches wherefrom the liquid core is identifiedwordListyes-
fieldsFields to samplewordListyes-
thresholdPhase fraction applied to delimit regionsscalaryes-
maxDiameterMaximum droplet diameterscalaryes-
minDiameterMinimum droplet diameterscalarno0.0
nBinsNumber of bins for histogramlabelyes-
setFormatOutput formatwordyes-
isoPlanesFlag for isoPlanesboolnofalse
originOrigin of the plane when isoPlanes is usedvectoryes-
directionDirection of the plane when isoPlanes is usedvectoryes-
maxDMaximum diameter of the sampling cylinder when isoPlanes is usedvectoryes-
nDownstreamBinsNumber of bins when isoPlanes is usedlabelyes-
maxDownstreamMaximum distance from origin when isoPlanes is usedscalaryes-

The inherited entries are elaborated in:

Usage by the postProcess utility is not available.

Further information

Tutorial:

Source code:

API:

History: Introduced in version v1606+