File size: 802 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 | #!/bin/sh
! command -v gnuplot >/dev/null 2>&1 && \
echo 'gnuplot not found - skipping graph creation' && \
exit 1
# Formatting
format () {
cat<<EOF
set term pngcairo size 750,500
set xlabel 'x (m)'
set key left top
set xtics 0.05
EOF
}
graphFile=postProcessing/graph/0.002/line.xy
cfdFmt="title 'CFD' w lp ls 1 lw 1"
dataFmt="title 'Schulein (1996)' w p ls 2 lw 1"
# Plotting
gnuplot<<EOF
$(format)
set output 'Cf.png'
set ylabel 'C_{f} (-)'
plot "$graphFile" u 1:2 $cfdFmt, \
"schulein1996Cf.txt" u 1:2 $dataFmt
EOF
gnuplot<<EOF
$(format)
set output 'p.png'
set ylabel 'p (Pa)'
plot "$graphFile" u 1:3 $cfdFmt, \
"schulein1996P.txt" u 1:2 $dataFmt
EOF
#------------------------------------------------------------------------------
|