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)
46 lines
1.5 KiB
Bash
Executable File
46 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
if ! which gnuplot > /dev/null 2>&1
|
|
then
|
|
echo 'gnuplot not found - skipping graph creation' >&2
|
|
exit 1
|
|
fi
|
|
|
|
gnuplot<<EOF
|
|
set terminal postscript eps monochrome
|
|
set output '../numberDensity.eps'
|
|
set decimalsign '.'
|
|
|
|
set format xy '%g'
|
|
set xtics 1 mirror
|
|
set xlabel 'v(m^3)'
|
|
set ytics 0.005 mirror
|
|
set ylabel 'n(m^{-3}m^{-3})'
|
|
|
|
set xrange [1:15]
|
|
set yrange [0:1.5e-2]
|
|
set key top right
|
|
|
|
plot '<printf "7.548417545 0\n7.548417545 0.01\n10.62698298 0.01\n10.62698298 0\n"' w l dt 2 lc rgb 'black' t 'Initial condition',\
|
|
'<printf "3.548417545 0\n3.548417545 0.01\n6.626982979 0.01\n6.626982979 0\n"' w l lc rgb 'black' t 'Exact',\
|
|
'../postProcessing/numberDensity/4/numberDensity.xy' u 1:2 w lp ls 4 lc rgb 'black' t 'Numerical'
|
|
|
|
set output '../moments.eps'
|
|
|
|
set format xy '%g'
|
|
set xlabel 't(s)'
|
|
set ytics 0.5 mirror
|
|
set ylabel 'M_j(t)/M_j(t=0)'
|
|
|
|
set xrange [0:4]
|
|
set yrange [0:1.5]
|
|
set key top right
|
|
|
|
plot '../postProcessing/probes/0/integerMoment0(N,v).bubbles' u 1:(\$2/0.030785654) 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/probes/0/integerMoment1(N,v).bubbles' u 1:(\$2/0.279433081) w p pt 6 lc rgb 'black' t 'j=1 (Volume), numerical',\
|
|
'<printf "0 1\n6 0.33333\n"' w l dt 2 lc rgb 'black' t 'j=1 (Volume), exact'
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|