2 #------------------------------------------------------------------------------
4 # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
6 # \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
8 #-------------------------------------------------------------------------------
10 # This file is part of OpenFOAM.
12 # OpenFOAM is free software: you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 # You should have received a copy of the GNU General Public License
23 # along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
29 # Creates .eps graphs of OpenFOAM results vs experiment for the buoyant
32 #------------------------------------------------------------------------------
41 set terminal postscript eps color enhanced
42 set output "OF_vs_EXPT_T$i.eps"
43 set xlabel "Channel width, x / [m]"
44 set ylabel "Temperature / [K]"
51 "$EXPT" u (\$1/1000):(\$2+273.15) title "Expt 0.$index" with points lt 1 pt 6, \
52 "$OF" title "OpenFOAM 0.$index" with lines linetype -1
64 set terminal postscript eps color enhanced
65 set output "OF_vs_EXPT_U$i.eps"
66 set xlabel "Channel width, x / [m]"
67 set ylabel "Vertical velocity component, Uy / [m/s]"
74 "$EXPT" u (\$1/1000):(\$2) title "Expt 0.$index" with points lt 1 pt 6, \
75 "$OF" u 1:3 title "OpenFOAM 0.$index" with lines linetype -1
80 # test if gnuplot exists on the system
81 type -P gnuplot
&>/dev
/null ||
{
82 echo "gnuplot not found - skipping graph creation" >&2
87 LATESTTIME
=`ls ../sets`
88 OFDATAROOT
=..
/sets
/$LATESTTIME
90 EXPTDATAROOT
=.
/exptData
92 # generate temperature profiles
96 echo " processing temperature profile at y/yMax of 0.$i"
98 OF
="$OFDATAROOT/y0.${i}_T.xy"
99 EXPT
="$EXPTDATAROOT/mt_z0_${i}0_lo.dat"
101 createEpsT
$i $OF $EXPT
105 # generate velocity profiles
106 USets
="1 3 4 5 6 7 9"
109 echo " processing velocity profile at y/yMax of 0.$i"
111 OF
="$OFDATAROOT/y0.${i}_U.xy"
112 EXPT
="$EXPTDATAROOT/mv_z0_${i}0_lo.dat"
114 createEpsU
$i $OF $EXPT
119 #------------------------------------------------------------------------------