tutorials: rationalized log

This commit is contained in:
Henry
2015-02-19 08:39:32 +00:00
parent 0ca9a1fb09
commit 6be514684a
7 changed files with 28 additions and 21 deletions

View File

@ -182,10 +182,10 @@ all)
if [ -f constant/polyMesh/blockMeshDict ] if [ -f constant/polyMesh/blockMeshDict ]
then then
touch "$caseName.blockMesh" touch "$caseName.blockMesh"
echo "created '$caseName.blockMesh'" echo "Created '$caseName.blockMesh'"
fi fi
touch "$caseName.$extension" touch "$caseName.$extension"
echo "created '$caseName.$extension'" echo "Created '$caseName.$extension'"
# discover probable regions # discover probable regions
for region in constant/* for region in constant/*
do do
@ -193,14 +193,14 @@ all)
then then
regionName=${region##*/} regionName=${region##*/}
touch "$caseName{$regionName}.$extension" touch "$caseName{$regionName}.$extension"
echo "created '$caseName{$regionName}.$extension'" echo "Created '$caseName{$regionName}.$extension'"
fi fi
done done
exit 0 exit 0
;; ;;
true) true)
touch "$caseFile" touch "$caseFile"
echo "created '$caseFile'" echo "Created '$caseFile'"
exit 0 exit 0
;; ;;
esac esac
@ -258,7 +258,7 @@ else
[ -e $caseFile ] || { [ -e $caseFile ] || {
trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT
touch "$caseFile" touch "$caseFile"
echo "created temporary '$caseFile'" echo "Created temporary '$caseFile'"
} }
# For now filter out any ld.so errors. Caused by non-system compiler? # For now filter out any ld.so errors. Caused by non-system compiler?

View File

@ -13,7 +13,7 @@ runAnsysToFoam()
then then
echo "ansysToFoam already run on $PWD: remove log file to re-run" echo "ansysToFoam already run on $PWD: remove log file to re-run"
else else
echo "ansysToFoam: converting mesh $1" echo "ansysToFoam: converting mesh $1" > log.ansysToFoam 2>&1
ansysToFoam $1 -scale $2 > log.ansysToFoam 2>&1 ansysToFoam $1 -scale $2 > log.ansysToFoam 2>&1
fi fi
} }

View File

@ -3,7 +3,7 @@
# ========= | # ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | # \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation # \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# License # License
@ -48,7 +48,8 @@ createEpsT()
set xrange [0:0.08] set xrange [0:0.08]
set yrange [285:310] set yrange [285:310]
plot \ plot \
"$EXPT" u (\$1/1000):(\$2+273.15) title "Expt 0.$index" with points lt 1 pt 6, \ "$EXPT" u (\$1/1000):(\$2+273.15) title "Expt 0.$index" \
with points lt 1 pt 6, \
"$OF" title "OpenFOAM 0.$index" with lines linetype -1 "$OF" title "OpenFOAM 0.$index" with lines linetype -1
EOF EOF
} }
@ -71,7 +72,8 @@ createEpsU()
set xrange [0:0.08] set xrange [0:0.08]
set yrange [-0.2:0.2] set yrange [-0.2:0.2]
plot \ plot \
"$EXPT" u (\$1/1000):(\$2) title "Expt 0.$index" with points lt 1 pt 6, \ "$EXPT" u (\$1/1000):(\$2) title "Expt 0.$index" \
with points lt 1 pt 6, \
"$OF" u 1:3 title "OpenFOAM 0.$index" with lines linetype -1 "$OF" u 1:3 title "OpenFOAM 0.$index" with lines linetype -1
EOF EOF
} }
@ -102,7 +104,8 @@ 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"
@ -115,7 +118,8 @@ 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"

View File

@ -13,12 +13,13 @@ refineMeshByCellSet()
do do
if [ ! -e log.refineMesh.$1 ] if [ ! -e log.refineMesh.$1 ]
then then
echo "creating cell set for primary zone - $1" echo "Creating cell set for primary zone - $1"
cp system/topoSetDict.$1 system/topoSetDict cp system/topoSetDict.$1 system/topoSetDict
topoSet > log.topoSet.$1 2>&1 topoSet > log.topoSet.$1 2>&1
echo "refining primary zone - $1" echo "Refining primary zone - $1"
refineMesh -dict system/refineMeshDict -overwrite > log.refineMesh.$1 2>&1 refineMesh -dict system/refineMeshDict -overwrite \
> log.refineMesh.$1 2>&1
fi fi
shift shift
done done

View File

@ -13,12 +13,13 @@ refineMeshByCellSet()
do do
if [ ! -e log.refineMesh.$1 ] if [ ! -e log.refineMesh.$1 ]
then then
echo "creating cell set for primary zone - $1" echo "Creating cell set for primary zone - $1"
cp system/topoSetDict.$1 system/topoSetDict cp system/topoSetDict.$1 system/topoSetDict
topoSet > log.topoSet.$1 2>&1 topoSet > log.topoSet.$1 2>&1
echo "refining primary zone - $1" echo "Refining primary zone - $1"
refineMesh -dict system/refineMeshDict -overwrite > log.refineMesh.$1 2>&1 refineMesh -dict system/refineMeshDict -overwrite \
> log.refineMesh.$1 2>&1
fi fi
shift shift
done done

View File

@ -12,12 +12,13 @@ refineMeshByCellSet()
do do
if [ ! -e log.refineMesh.$1 ] if [ ! -e log.refineMesh.$1 ]
then then
echo "creating cell set for primary zone - $1" echo "Creating cell set for primary zone - $1"
cp system/topoSetDict.$1 system/topoSetDict cp system/topoSetDict.$1 system/topoSetDict
topoSet > log.topoSet.$1 2>&1 topoSet > log.topoSet.$1 2>&1
echo "refining primary zone - $1" echo "Refining primary zone - $1"
refineMesh -dict system/refineMeshDict -overwrite > log.refineMesh.$1 2>&1 refineMesh -dict system/refineMeshDict -overwrite \
> log.refineMesh.$1 2>&1
fi fi
shift shift
done done

View File

@ -10,7 +10,7 @@ application=`getApplication`
rm -rf 0 rm -rf 0
cp -r 0.org 0 cp -r 0.org 0
setFields runApplication setFields
#runApplication $application #runApplication $application
#runApplication decomposePar #runApplication decomposePar