multiphaseEulerFoam: new functionObject "moments"
This function calculates integral (integer moments) or mean properties
(mean, variance, standard deviation) of a size distribution computed with
multiphaseEulerFoam. It has to be run with multiphaseEulerFoam, either
at run-time or with -postProcess. It will not work with the postProcess
utility.
The following function object specification for example returns the first
moment of the volume-based number density function which is equivalent to
the phase fraction of the particulate phase:
moments
{
type moments;
libs ("libmultiphaseEulerFoamFunctionObjects.so");
executeControl timeStep;
writeControl writeTime;
populationBalance bubbles;
momentType integerMoment;
coordinateType volume;
order 1;
}
The same can be achieved using a packaged function:
#includeFunc moments
(
populationBalance=bubbles,
momentType=integerMoment,
coordinateType=volume,
order=1,
funcName=moments
)
Or on the command line:
multiphaseEulerFoam -postProcess -func "
moments
(
populationBalance=bubbles,
momentType=integerMoment,
coordinateType=volume,
order=1,
funcName=moments
)"
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
This commit is contained in:
@ -6,6 +6,6 @@ cd "${0%/*}" || exit 1
|
||||
# Source clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase && rm -f moments.eps numberDensity.eps
|
||||
cleanCase && rm -rf *.eps 0/d.air 0/uniform/ 0/integerMoment*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -28,7 +28,7 @@ deltaT 0.01;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 6;
|
||||
writeInterval 0.2;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
@ -68,21 +68,30 @@ functions
|
||||
densityFunction yes;
|
||||
}
|
||||
|
||||
moments
|
||||
{
|
||||
type sizeDistribution;
|
||||
functionObjectLibs ("libmultiphaseEulerFoamFunctionObjects.so");
|
||||
#includeFunc moments
|
||||
(
|
||||
populationBalance=bubbles,
|
||||
momentType=integerMoment,
|
||||
coordinateType=volume,
|
||||
order=1
|
||||
)
|
||||
|
||||
writeControl runTime;
|
||||
writeInterval 0.1;
|
||||
#includeFunc moments
|
||||
(
|
||||
populationBalance=bubbles,
|
||||
momentType=integerMoment,
|
||||
coordinateType=volume,
|
||||
order=0
|
||||
)
|
||||
|
||||
setFormat raw;
|
||||
|
||||
populationBalance bubbles;
|
||||
functionType moments;
|
||||
coordinateType volume;
|
||||
maxOrder 1;
|
||||
}
|
||||
#includeFunc probes
|
||||
(
|
||||
funcName=probes,
|
||||
points=((0.5 0.5 0.5)),
|
||||
integerMoment0(N,v).bubbles,
|
||||
integerMoment1(N,v).bubbles,
|
||||
writeControl=writeTime
|
||||
)
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -36,9 +36,9 @@ gnuplot<<EOF
|
||||
set yrange [0.5:3.5]
|
||||
set key top left
|
||||
|
||||
plot '../postProcessing/moments/0/moments.dat' every 2 u 1:(\$2/0.02186682) w p pt 5 lc rgb 'black' t 'j=0 (Numbers), numerical',\
|
||||
plot '../postProcessing/probes/0/integerMoment0(N,v).bubbles' u 1:(\$2/0.02186682) w p pt 5 lc rgb 'black' t 'j=0 (Numbers), numerical',\
|
||||
'<printf "0 1\n6 1\n"' w l lc rgb 'black' t 'j=0 (Numbers), exact',\
|
||||
'../postProcessing/moments/0/moments.dat' u 1:(\$3/0.066553351) every 2 w p pt 6 lc rgb 'black' t 'j=1 (Volume), numerical',\
|
||||
'../postProcessing/probes/0/integerMoment1(N,v).bubbles' u 1:(\$2/0.066553351) w p pt 6 lc rgb 'black' t 'j=1 (Volume), numerical',\
|
||||
'<printf "0 1\n6 3\n"' w l dt 2 lc rgb 'black' t 'j=1 (Volume), exact'
|
||||
EOF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user