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:
@ -11,6 +11,6 @@ runApplication blockMesh
|
|||||||
runApplication $application
|
runApplication $application
|
||||||
runApplication -s sample postProcess -latestTime -func sample
|
runApplication -s sample postProcess -latestTime -func sample
|
||||||
|
|
||||||
( cd validation && ./createGraphs )
|
runApplication validation/createGraphs
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -31,6 +31,11 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
# Stop on first error
|
||||||
|
set -e
|
||||||
|
|
||||||
createEpsT()
|
createEpsT()
|
||||||
{
|
{
|
||||||
index=$1
|
index=$1
|
||||||
@ -78,11 +83,12 @@ createEpsU()
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "createGraphs:"
|
||||||
|
|
||||||
# test if gnuplot exists on the system
|
# test if gnuplot exists on the system
|
||||||
if ! which gnuplot > /dev/null 2>&1
|
if ! which gnuplot > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "gnuplot not found - skipping graph creation" >&2
|
echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -90,8 +96,8 @@ SETSDIR="../postProcessing/sample"
|
|||||||
|
|
||||||
if [ ! -d $SETSDIR ]
|
if [ ! -d $SETSDIR ]
|
||||||
then
|
then
|
||||||
echo "createGraphs: results sets not available in directory $SETSDIR"
|
echo "FOAM FATAL ERROR: result sets not available in directory $SETSDIR" >&2
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# paths to data
|
# paths to data
|
||||||
@ -104,8 +110,7 @@ EXPTDATAROOT=./exptData
|
|||||||
TSets="1 3 4 5 6 7 9"
|
TSets="1 3 4 5 6 7 9"
|
||||||
for i in $TSets
|
for i in $TSets
|
||||||
do
|
do
|
||||||
echo " processing temperature profile at y/yMax of 0.$i" \
|
echo " processing temperature profile at y/yMax of 0.$i"
|
||||||
> log.createGraphs 2>&1
|
|
||||||
|
|
||||||
OF="$OFDATAROOT/y0.${i}_T.xy"
|
OF="$OFDATAROOT/y0.${i}_T.xy"
|
||||||
EXPT="$EXPTDATAROOT/mt_z0_${i}0_lo.dat"
|
EXPT="$EXPTDATAROOT/mt_z0_${i}0_lo.dat"
|
||||||
@ -118,8 +123,7 @@ done
|
|||||||
USets="1 3 4 5 6 7 9"
|
USets="1 3 4 5 6 7 9"
|
||||||
for i in $USets
|
for i in $USets
|
||||||
do
|
do
|
||||||
echo " processing velocity profile at y/yMax of 0.$i" \
|
echo " processing velocity profile at y/yMax of 0.$i"
|
||||||
> log.createGraphs 2>&1
|
|
||||||
|
|
||||||
OF="$OFDATAROOT/y0.${i}_U.xy"
|
OF="$OFDATAROOT/y0.${i}_U.xy"
|
||||||
EXPT="$EXPTDATAROOT/mv_z0_${i}0_lo.dat"
|
EXPT="$EXPTDATAROOT/mv_z0_${i}0_lo.dat"
|
||||||
@ -127,6 +131,6 @@ do
|
|||||||
createEpsU $i $OF $EXPT
|
createEpsU $i $OF $EXPT
|
||||||
done
|
done
|
||||||
|
|
||||||
echo Done
|
echo "End"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -6,8 +6,12 @@
|
|||||||
# \\ / A nd | Web: www.OpenFOAM.org #
|
# \\ / A nd | Web: www.OpenFOAM.org #
|
||||||
# \\/ M anipulation | #
|
# \\/ M anipulation | #
|
||||||
#-----------------------------------------------------------------------------#
|
#-----------------------------------------------------------------------------#
|
||||||
|
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
|
||||||
|
# Stop on first error
|
||||||
|
set -e
|
||||||
|
|
||||||
x0=0.4
|
x0=0.4
|
||||||
y0=0.1
|
y0=0.1
|
||||||
z0=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
|
setSet -batch $tmpSetSet > log.setSet.patchifyObstacles 2>&1
|
||||||
|
|
||||||
|
echo "End"
|
||||||
|
|
||||||
# *************************************************************************
|
# *************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user