File size: 1,035 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 | #!/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 color enhanced "Helvetica,20"
set output '../d.air_y.eps'
set xlabel 'd (mm)'
set ylabel 'y (m)'
set key bottom center
latestTime = system("foamListTimes -case .. -latestTime")
p0 = $(tail -n1 ../postProcessing/cellZoneAverage/0/volFieldValue.dat | awk '{print $2}')
file = '../postProcessing/graph/'.latestTime.'/line.xy'
plot file u (\$2*1000):1 w l lc rgb 'black' t 'prediction',\
file u (0.003*(p0/\$3)**(1./3.)*1000):1 w l dt 2 lc rgb 'black' t 'exact result'
set output '../alpha.air_y.eps'
set xlabel '{/Symbol a} (-)'
plot file u 4:1 w l dt 2 lc rgb 'black' t 'air1',\
file u 5:1 w l dt 3 lc rgb 'black' t 'air2',\
file u 6:1 w l dt 4 lc rgb 'black' t 'air3',\
file u 7:1 w l lc rgb 'black' t 'air total'
EOF
#------------------------------------------------------------------------------
|