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.
28 lines
810 B
Bash
Executable File
28 lines
810 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if ! which gnuplot > /dev/null 2>&1
|
|
then
|
|
echo "gnuplot not found - skipping graph creation" >&2
|
|
exit 1
|
|
fi
|
|
|
|
tail -n +4 ../postProcessing/probes/0/U | \
|
|
tr -s " " | tr -d '(' | cut -d " " -f1-2 > ../Numerical.dat
|
|
|
|
gnuplot<<EOF
|
|
set terminal postscript eps color enhanced "Helvetica,20"
|
|
set output "planarPoiseuille.eps"
|
|
set xlabel "Time / [s]" font "Helvetica,24"
|
|
set ylabel "Velocity / [m/s]" font "Helvetica,24"
|
|
set grid
|
|
set key right top
|
|
set xrange [0:25]
|
|
set yrange [0:8]
|
|
plot \
|
|
"../Numerical.dat" t "OpenFOAM (every 100 pts)" \
|
|
with linespoints pointinterval 100 lt 1 pt 6 ps 1.5, \
|
|
"../WatersKing.dat" with lines t "Analytical" lt -1
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|