File size: 1,598 Bytes
5a600cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh

if ! which gnuplot > /dev/null 2>&1
then
    echo "gnuplot not found - skipping graph creation" >&2
    exit 1
fi

time=$(foamListTimes -case .. -latestTime)

graphFile=../postProcessing/graph/$time/line.xy

gnuplot<<EOF
    set terminal postscript eps color enhanced font "Helvetica,20"

    set output '../void_fraction.eps'

    set xlabel 'r (mm)'
    set ylabel '{/Symbol a} (-)'

    plot "$graphFile" u (\$1*1000):4 w l lw 3 lc rgb 'black' t 'total',\
         "$graphFile" u (\$1*1000):2 w l lw 2 lc rgb 'green' t 'd < 5.5mm',\
         "$graphFile" u (\$1*1000):3 w l lw 2 lc rgb 'red' t 'd > 5.5mm'

    set output '../nonDragForces.eps'

    set ylabel 'F_{r} (N/m^3)'

    plot "$graphFile" u (\$1*1000):(-\$5) w l lw 2 t 'Lift',\
         "$graphFile" u (\$1*1000):(-\$8) w l lw 2 t 'Wall lubrication',\
         "$graphFile" u (\$1*1000):(-\$11) w l lw 2 t 'Turbulent dispersion'
EOF

injectionFile=../postProcessing/probabilityDensity.injection/$time/probabilityDensity.injection.xy
outletFile=../postProcessing/probabilityDensity.outlet/$time/probabilityDensity.outlet.xy

gnuplot<<EOF
    set terminal postscript eps color enhanced font "Helvetica,20"

    set output '../volumeDensity.eps'

    set xlabel 'd (mm)'
    set ylabel '({/Symbol a}/{/Symbol a}_{tot})/{/Symbol D}d (mm^{-1})'
    set xtics 1

    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

#------------------------------------------------------------------------------