#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see .
#
# Script
# createGraphs
#
# Description
# Creates .eps graphs of OpenFOAM results vs experiment for the buoyant
# cavity case
#
#------------------------------------------------------------------------------
createEpsT()
{
index=$1
OF=$2
EXPT=$3
gnuplot</dev/null || {
echo "gnuplot not found - skipping graph creation" >&2
exit 1
}
# paths to data
LATESTTIME=`ls ../sets`
OFDATAROOT=../sets/$LATESTTIME
EXPTDATAROOT=./exptData
# generate temperature profiles
TSets="1 3 4 5 6 7 9"
for i in $TSets
do
echo " processing temperature profile at y/yMax of 0.$i"
OF="$OFDATAROOT/y0.${i}_T.xy"
EXPT="$EXPTDATAROOT/mt_z0_${i}0_lo.dat"
createEpsT $i $OF $EXPT
done
# generate velocity profiles
USets="1 3 4 5 6 7 9"
for i in $USets
do
echo " processing velocity profile at y/yMax of 0.$i"
OF="$OFDATAROOT/y0.${i}_U.xy"
EXPT="$EXPTDATAROOT/mv_z0_${i}0_lo.dat"
createEpsU $i $OF $EXPT
done
echo Done
#------------------------------------------------------------------------------