multiphaseEulerFoam: revised sizeDistribution functionObject

Following the addition of the new moments functionObject, all related
functionality was removed from sizeDistribution.

In its revised version, sizeDistribution allows for different kinds of
weighted region averaging in case of field-dependent representative
particle properties.

A packaged function has also been added to allow for command line solver
post-processing.

For example, the following function object specification returns the
volume-based number density function:

    numberDensity
    {
        type                sizeDistribution;
        libs                ("libmultiphaseEulerFoamFunctionObjects.so");
        writeControl        writeTime;
        populationBalance   bubbles;
        functionType        numberDensity;
        coordinateType      volume;
        setFormat           raw;
    }

The same can be achieved using a packaged function:

    #includeFunc sizeDistribution
    (
        populationBalance=bubbles,
        functionType=numberDensity,
        coordinateType=volume,
        funcName=numberDensity
    )

Or on the command line:

    multiphaseEulerFoam -postProcess -func "
    sizeDistribution
    (
        populationBalance=bubbles,
        functionType=numberDensity,
        coordinateType=volume,
        funcName=numberDensity
    )"

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
This commit is contained in:
Will Bainbridge
2022-01-07 08:47:29 +00:00
parent 36c565b9bf
commit 794255284f
25 changed files with 731 additions and 882 deletions

View File

@ -73,43 +73,27 @@ functions
)
)
probabilityDensity.injection
{
type sizeDistribution;
functionObjectLibs ("libmultiphaseEulerFoamFunctionObjects.so");
#includeFunc sizeDistribution
(
populationBalance=bubbles,
regionType=cellZone,
name=injection,
functionType=volumeDensity,
coordinateType=diameter,
normalise=yes,
funcName=probabilityDensity.injection
)
writeControl outputTime;
writeInterval 1;
setFormat raw;
populationBalance bubbles;
regionType cellZone;
name injection;
functionType volume;
coordinateType diameter;
densityFunction yes;
normalise yes;
}
probabilityDensity.outlet
{
type sizeDistribution;
functionObjectLibs ("libmultiphaseEulerFoamFunctionObjects.so");
writeControl outputTime;
writeInterval 1;
setFormat raw;
populationBalance bubbles;
regionType cellZone;
name outlet;
functionType volume;
coordinateType diameter;
densityFunction yes;
normalise yes;
}
#includeFunc sizeDistribution
(
populationBalance=bubbles,
regionType=cellZone,
name=outlet,
functionType=volumeDensity,
coordinateType=diameter,
normalise=yes,
funcName=probabilityDensity.outlet
)
}
// ************************************************************************* //

View File

@ -43,8 +43,8 @@ gnuplot<<EOF
set ylabel '({/Symbol a}/{/Symbol a}_{tot})/{/Symbol D}d (mm^{-1})'
set xtics 1
plot "$injectionFile" u (\$3/1e-3):(\$4/1e3) w histeps lw 3 lc rgb 'green' t 'injection',\
"$outletFile" u (\$3/1e-3):(\$4/1e3) w histeps lw 3 lc rgb 'red' t 'outlet'
plot "$injectionFile" u (\$1/1e-3):(\$2/1e3) w histeps lw 3 lc rgb 'green' t 'injection',\
"$outletFile" u (\$1/1e-3):(\$2/1e3) w histeps lw 3 lc rgb 'red' t 'outlet'
EOF
#------------------------------------------------------------------------------

View File

@ -60,7 +60,7 @@ functions
writeInterval 0.5;
setFormat raw;
log yes;
functionType volume;
functionType volumeConcentration;
coordinateType diameter;
regionType cellZone;
name x349;
@ -74,7 +74,7 @@ functions
writeInterval 0.5;
setFormat raw;
log yes;
functionType volume;
functionType volumeConcentration;
coordinateType diameter;
regionType cellZone;
name x349_bulk;
@ -88,7 +88,7 @@ functions
writeInterval 0.5;
setFormat raw;
log yes;
functionType volume;
functionType volumeConcentration;
coordinateType diameter;
regionType cellZone;
name x349_wall;

View File

@ -60,7 +60,7 @@ functions
writeInterval 0.5;
setFormat raw;
log yes;
functionType volume;
functionType volumeConcentration;
coordinateType diameter;
regionType cellZone;
name x349;
@ -74,7 +74,7 @@ functions
writeInterval 0.5;
setFormat raw;
log yes;
functionType volume;
functionType volumeConcentration;
coordinateType diameter;
regionType cellZone;
name x349_bulk;
@ -88,7 +88,7 @@ functions
writeInterval 0.5;
setFormat raw;
log yes;
functionType volume;
functionType volumeConcentration;
coordinateType diameter;
regionType cellZone;
name x349_wall;

View File

@ -60,26 +60,18 @@ functions
fields=(TiCl4.vapor O2.vapor Cl2.vapor alpha.particles)
)
numberConcentration
{
type sizeDistribution;
functionObjectLibs ("libmultiphaseEulerFoamFunctionObjects.so");
writeControl outputTime;
writeInterval 1;
setFormat raw;
log yes;
regionType cellZone;
name outlet;
populationBalance aggregates;
functionType number;
coordinateType projectedAreaDiameter;
densityFunction yes;
normalise yes;
geometric yes;
}
#includeFunc sizeDistribution
(
populationBalance=aggregates,
regionType=cellZone,
name=outlet,
functionType=numberDensity,
coordinateType=projectedAreaDiameter,
allCoordinates=yes,
normalise=yes,
logTransform=yes,
funcName=numberDensity
)
#includeFunc writeObjects
(

View File

@ -27,7 +27,7 @@ gnuplot<<EOF
"$graphFile" u 1:5 axis x1y2 w l t '{/Symbol a}_{particles}'
EOF
resultFile=../postProcessing/numberConcentration/$time/numberConcentration.xy
resultFile=../postProcessing/numberDensity/$time/numberDensity.xy
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
@ -43,9 +43,9 @@ gnuplot<<EOF
set xrange [1e-3:1]
set yrange [1e-3:3]
plot "$resultFile" u (\$3/1e-6):4 w lp t 'Size distribution',\
"$resultFile" u (\$3/1e-6):(\$2/\$1) axis x1y2 w l t '{/Symbol k}',\
"$resultFile" u (\$3/1e-6):(6./((6./pi*\$1)**(1./3.))) axis x1y2 w l t '{/Symbol k} lower bound'
plot "$resultFile" u (\$1/1e-6):2 w lp t 'Size distribution',\
"$resultFile" u (\$1/1e-6):(\$4/\$3) axis x1y2 w l t '{/Symbol k}',\
"$resultFile" u (\$1/1e-6):(6./((6./pi*\$3)**(1./3.))) axis x1y2 w l t '{/Symbol k} lower bound'
EOF
#------------------------------------------------------------------------------

View File

@ -60,26 +60,18 @@ functions
fields=(TiCl4.vapor O2.vapor Cl2.vapor alpha.particles)
)
numberConcentration
{
type sizeDistribution;
functionObjectLibs ("libmultiphaseEulerFoamFunctionObjects.so");
writeControl outputTime;
writeInterval 1;
setFormat raw;
log yes;
regionType cellZone;
name outlet;
populationBalance aggregates;
functionType number;
coordinateType projectedAreaDiameter;
densityFunction yes;
normalise yes;
geometric yes;
}
#includeFunc sizeDistribution
(
populationBalance=aggregates,
regionType=cellZone,
name=outlet,
functionType=numberDensity,
coordinateType=projectedAreaDiameter,
allCoordinates=yes,
normalise=yes,
logTransform=yes,
funcName=numberDensity
)
#includeFunc writeObjects
(

View File

@ -27,7 +27,7 @@ gnuplot<<EOF
"$graphFile" u 1:5 axis x1y2 w l t '{/Symbol a}_{particles}'
EOF
resultFile=../postProcessing/numberConcentration/$time/numberConcentration.xy
resultFile=../postProcessing/numberDensity/$time/numberDensity.xy
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
@ -43,9 +43,9 @@ gnuplot<<EOF
set xrange [1e-3:1]
set yrange [1e-3:3]
plot "$resultFile" u (\$3/1e-6):4 w lp t 'Size distribution',\
"$resultFile" u (\$3/1e-6):(\$2/\$1) axis x1y2 w l t '{/Symbol k}',\
"$resultFile" u (\$3/1e-6):(6./((6./pi*\$1)**(1./3.))) axis x1y2 w l t '{/Symbol k} lower bound'
plot "$resultFile" u (\$1/1e-6):2 w lp t 'Size distribution',\
"$resultFile" u (\$1/1e-6):(\$4/\$3) axis x1y2 w l t '{/Symbol k}',\
"$resultFile" u (\$1/1e-6):(6./((6./pi*\$3)**(1./3.))) axis x1y2 w l t '{/Symbol k} lower bound'
EOF
#------------------------------------------------------------------------------