54 lines
1.5 KiB
Text
54 lines
1.5 KiB
Text
|
#!/bin/bash
|
||
|
#
|
||
|
#set -x
|
||
|
|
||
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||
|
|
||
|
# Load additional RunFunctions
|
||
|
. ./RunFunctionsSupplemental
|
||
|
|
||
|
#We stop this script when we encounter a problem
|
||
|
trap "exit -1" ERR
|
||
|
|
||
|
export caseName=`basename $PWD`
|
||
|
|
||
|
echo "$caseName: Creating the file blockMeshDict using m4"
|
||
|
(cd constant/polyMesh; m4 -P blockMeshDict.m4 > blockMeshDict)
|
||
|
|
||
|
echo "$caseName: Running blockMesh"
|
||
|
runApplicationAndReportOnError blockMesh
|
||
|
|
||
|
echo "$caseName: Creating the starting time directory"
|
||
|
cp -r 0_orig 0
|
||
|
|
||
|
echo "$caseName: Running addSwirlAndRotation"
|
||
|
runApplicationAndReportOnError addSwirlAndRotation
|
||
|
|
||
|
echo "$caseName: Running simpleFoam"
|
||
|
runApplicationAndReportOnError simpleFoam
|
||
|
|
||
|
echo "$caseName: Postprocessing"
|
||
|
cd postProcessing
|
||
|
|
||
|
# Find latest time directory
|
||
|
latestAvailTimeDir=`foamInfoExec -case .. -times | tail -1`
|
||
|
|
||
|
echo "Analysing results for time: $latestAvailTimeDir"
|
||
|
|
||
|
# Run sample
|
||
|
runApplicationAndReportOnError sample -case .. -latestTime
|
||
|
|
||
|
# Adjust compareAll.gplt: replace "Case1.1" "??" by "Case1.1" "$latestAvailTimeDir"
|
||
|
sed -i.old "s/\"Case1.1\".*$/\"Case1.1\" \"$latestAvailTimeDir\"/g" compareAll.gplt
|
||
|
|
||
|
# Run gnuplot to generate the comparison charts
|
||
|
runApplicationAndReportOnError gnuplot compareAll.gplt ; mv log.gnuplot log.gnuplotCompareAll
|
||
|
|
||
|
# Run foamLog
|
||
|
runApplicationAndReportOnError foamLog ../log.simpleFoam
|
||
|
|
||
|
# Run gnuplot for the residuals
|
||
|
runApplicationAndReportOnError gnuplot plotResiduals.gplt; mv log.gnuplot log.gnuplotPlotResiduals
|
||
|
|
||
|
|