Files
OpenFOAM-12/test/multiphaseEuler/populationBalance/isothermalGrowth/validation/createGraphs
Will Bainbridge 303e3d1f60 tutorials: Consistency of All* scripts
Various minor changes to tutorial scripts. In particular, ensuring that
they all change to the containing directory so that batches of tutorials
can be run easily from the root of the installation.
2024-06-28 14:31:05 +01:00

35 lines
1.0 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 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
#------------------------------------------------------------------------------