File size: 2,683 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh

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

graphFile=$(foamListTimes -latestTime)/line.xy
surfaceFile=$(cd postProcessing/inflow && ls -1tr */* | tail -n 1)

gnuplot<<EOF

    set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
    set output "./validation/$(basename "$PWD").eps"
    set multiplot layout 3,2
    set decimalsign '.'
    set grid

    A = 0.000586423
    q = 73890

    set key at graph 0.65,0.95
    set xlabel 'Radial coordinate, r/R (-)'
    set xrange [0:1]

    set ylabel 'Void fraction (-)'
    plot \
        "postProcessing/graph/$graphFile" \
        u (\$1/0.0096):2 w lp lt 1 t 'Simulation', \
        './validation/exptData/vof_deb1.txt' \
        u 1:2 w p lt rgb "black" pt 4 t 'Experiment'

    set ylabel 'Liquid temperature (K)'
    plot \
        "postProcessing/graph/$graphFile" \
        u (\$1/0.0096):3 w lp lt 1 t 'Simulation', \
        './validation/exptData/T_deb1.txt' \
        u 1:2 w p lt rgb "black" pt 4 t 'Experiment'

    set ylabel 'Sauter mean diameter (mm)'
    plot \
        "postProcessing/graph/$graphFile" \
        u (\$1/0.0096):(\$5*1000) w lp lt 1 t 'Simulation', \
        './validation/exptData/d_deb1.txt' \
        u 1:(\$2*1000) w p lt rgb "black" pt 4 t 'Experiment'

    set key at graph 0.99,0.95
    set xlabel 'Time (s)'
    set xrange [0.5:4]

    set ylabel 'Mass in- and outflow (kg/s)'
    set yrange [0.5:0.8]
    plot \
        './postProcessing/inflow/$surfaceFile' \
        every ::4::10000 u 1:(-1*360*\$3) w l lt 1 t 'liquid inflow', \
        './postProcessing/outflow/$surfaceFile' \
        every ::4::10000 u 1:(360*\$3) w l lt 3 t 'liquid outflow', \
        './postProcessing/outflow/$surfaceFile' \
        every ::4::10000 u 1:(360*\$2+360*\$3) w l lt 4 t 'liquid + vapour outflow'

    set ylabel 'Enthalpy in- and outflow (J/s)'
    set yrange [1.5e5:2.0e5]
    plot \
        './postProcessing/inletLiquid/$surfaceFile' \
        every ::4::10000 u 1:(-1*360*\$2) w l lt 1 t 'liquid inflow', \
        './postProcessing/inletLiquid/$surfaceFile' \
        every ::4::10000 u 1:(-1*360*\$2+360*A*q) w l lt 8 t 'liquid inflow + wall heat flux', \
        './postProcessing/outletLiquid/$surfaceFile' \
        every ::4::10000 u 1:(360*\$2) w l lt 3 t 'liquid outflow', \
        "<paste \
        ./postProcessing/outletLiquid/$surfaceFile \
        ./postProcessing/outletGas/$surfaceFile" \
        every ::4::10000 u 1:(360*\$2+360*\$4) w l lt 4 t 'liquid + vapour outflow'

    unset multiplot

EOF

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