Updated tutorial scripts 'createGraphs' and 'patchifyObstacles' for clearer messages

Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2411
This commit is contained in:
Henry Weller
2016-12-27 15:44:30 +00:00
parent 3d5e4c924b
commit fcde201a40
3 changed files with 19 additions and 9 deletions

View File

@ -11,6 +11,6 @@ runApplication blockMesh
runApplication $application
runApplication -s sample postProcess -latestTime -func sample
( cd validation && ./createGraphs )
runApplication validation/createGraphs
#------------------------------------------------------------------------------

View File

@ -31,6 +31,11 @@
#
#------------------------------------------------------------------------------
cd ${0%/*} || exit 1 # Run from this directory
# Stop on first error
set -e
createEpsT()
{
index=$1
@ -78,11 +83,12 @@ createEpsU()
EOF
}
echo "createGraphs:"
# test if gnuplot exists on the system
if ! which gnuplot > /dev/null 2>&1
then
echo "gnuplot not found - skipping graph creation" >&2
echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" >&2
exit 1
fi
@ -90,8 +96,8 @@ SETSDIR="../postProcessing/sample"
if [ ! -d $SETSDIR ]
then
echo "createGraphs: results sets not available in directory $SETSDIR"
exit 0
echo "FOAM FATAL ERROR: result sets not available in directory $SETSDIR" >&2
exit 1
fi
# paths to data
@ -104,8 +110,7 @@ EXPTDATAROOT=./exptData
TSets="1 3 4 5 6 7 9"
for i in $TSets
do
echo " processing temperature profile at y/yMax of 0.$i" \
> log.createGraphs 2>&1
echo " processing temperature profile at y/yMax of 0.$i"
OF="$OFDATAROOT/y0.${i}_T.xy"
EXPT="$EXPTDATAROOT/mt_z0_${i}0_lo.dat"
@ -118,8 +123,7 @@ done
USets="1 3 4 5 6 7 9"
for i in $USets
do
echo " processing velocity profile at y/yMax of 0.$i" \
> log.createGraphs 2>&1
echo " processing velocity profile at y/yMax of 0.$i"
OF="$OFDATAROOT/y0.${i}_U.xy"
EXPT="$EXPTDATAROOT/mv_z0_${i}0_lo.dat"
@ -127,6 +131,6 @@ do
createEpsU $i $OF $EXPT
done
echo Done
echo "End"
#------------------------------------------------------------------------------

View File

@ -6,8 +6,12 @@
# \\ / A nd | Web: www.OpenFOAM.org #
# \\/ M anipulation | #
#-----------------------------------------------------------------------------#
cd ${0%/*} || exit 1 # Run from this directory
# Stop on first error
set -e
x0=0.4
y0=0.1
z0=0.1
@ -157,4 +161,6 @@ echo "faceZoneSet floorFaces new setsToFaceZone FloorFaces floorCells" >> $tmpSe
setSet -batch $tmpSetSet > log.setSet.patchifyObstacles 2>&1
echo "End"
# *************************************************************************