TUT: verificationAndValidation Allrun uses bash
STYLE: double-quote "$@" for isTest/notTest
This commit is contained in:
parent
8a4ea197cd
commit
9b1c0786ce
@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if isTest $@
|
||||
if isTest "$@"
|
||||
then
|
||||
# Reset the controlDict
|
||||
if [ -f system/controlDict.orig ]
|
||||
|
@ -24,7 +24,7 @@ setCombustionProperties()
|
||||
# Do moriyoshiHomogeneous
|
||||
( cd moriyoshiHomogeneous && foamRunTutorials )
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Clone case for second phase
|
||||
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
|
||||
|
@ -9,7 +9,7 @@ runApplication chemkinToFoam \
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
(cd validation && ./Allrun $*)
|
||||
fi
|
||||
|
@ -21,7 +21,7 @@ runParallel $(getApplication)
|
||||
paraFoam -touch
|
||||
paraFoam -touch -region panelRegion
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
(cd validation && ./createGraphs)
|
||||
fi
|
||||
|
@ -15,7 +15,7 @@ runApplication chemkinToFoam \
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
|
||||
if isTest $@
|
||||
if isTest "$@"
|
||||
then
|
||||
# Test without chemistry
|
||||
foamDictionary constant/chemistryProperties -entry chemistry -set off
|
||||
|
@ -29,7 +29,7 @@ run resolved
|
||||
# Run with the plenum modelled by a boundary condition
|
||||
run modelled
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Plot a comparison of the pressure in the neck
|
||||
cat << EOF | gnuplot -persist
|
||||
|
@ -27,7 +27,7 @@ setDecompressionTankFine()
|
||||
# Do decompressionTank
|
||||
( cd decompressionTank && foamRunTutorials )
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Clone case
|
||||
cloneCase decompressionTank decompressionTankFine
|
||||
|
@ -7,7 +7,7 @@ runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
runApplication -s sample postProcess -latestTime -func sample
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
runApplication validation/createGraphs
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
foamRunTutorials -skipFirst
|
||||
else
|
||||
|
@ -33,7 +33,7 @@ do
|
||||
rm -rf logs
|
||||
done
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# create validation plot
|
||||
|
||||
|
@ -75,7 +75,7 @@ copyParallelPointDisplacement()
|
||||
# Do steady-state case
|
||||
(cd steady && foamRunTutorials)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
latestTime=$(\cd steady && foamListTimes -noZero -latestTime -processor)
|
||||
|
||||
|
@ -52,7 +52,7 @@ linkParallelCase()
|
||||
# Do steady-state case
|
||||
(cd steady && ./Allrun.pre)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Copy/link the steady-state case to movement
|
||||
linkParallelCase steady movement
|
||||
|
@ -26,7 +26,7 @@ runApplication blockMesh
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# create validation plot
|
||||
|
||||
|
@ -14,7 +14,7 @@ runParallel $(getApplication)
|
||||
|
||||
# Run noise tool for both point and surface
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
runParallel -s point noise -dict system/noiseDict-point
|
||||
|
||||
|
@ -10,7 +10,7 @@ Stokes
|
||||
"
|
||||
|
||||
endTime=2
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
endTime=25
|
||||
fi
|
||||
|
@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
# Do the Spalart-Allmaras steady-state case
|
||||
(cd motorBike && foamRunTutorials)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Clone the steady-state case to the LES case
|
||||
cloneParallelCase motorBike motorBikeLES
|
||||
|
@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
runApplication blockMesh
|
||||
runApplication simpleFoam
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Create validation plots
|
||||
|
||||
|
@ -47,7 +47,7 @@ extractVal()
|
||||
}
|
||||
|
||||
|
||||
# Possibly disable for test: if notTest $@
|
||||
# Possibly disable for test: if notTest "$@"
|
||||
|
||||
if :
|
||||
then
|
||||
|
@ -92,7 +92,7 @@ PLT_CP
|
||||
}
|
||||
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Create validation plots
|
||||
|
||||
|
@ -3,7 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
models="
|
||||
kOmegaSST
|
||||
|
@ -10,7 +10,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
( cd blob && ./Allrun $* )
|
||||
( cd simpleShapes && ./Allrun $* )
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
( cd flange && ./Allrun $* )
|
||||
( cd mixerVessel && ./Allrun $* )
|
||||
|
@ -26,7 +26,7 @@ setDamBreakFine ()
|
||||
(cd damBreak && foamRunTutorials)
|
||||
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
@ -25,7 +25,7 @@ setDamBreakFine ()
|
||||
# Do damBreak
|
||||
(cd damBreak && foamRunTutorials)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
|
||||
(cd eulerianInjection && ./Allrun $*)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Note: particle data only available if running complete case
|
||||
(cd lagrangianParticleInjection && ./Allrun $*)
|
||||
|
@ -8,7 +8,7 @@ application=$(getApplication)
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
|
@ -8,7 +8,7 @@ application=$(getApplication)
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
|
@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary 2/T.liquid -entry boundaryField/wall2/q -set 'uniform 1e5'
|
||||
|
@ -8,7 +8,7 @@ application=$(getApplication)
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
|
@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
runApplication blockMesh
|
||||
runApplication $(getApplication)
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 5
|
||||
foamDictionary 2/T.liquid -entry boundaryField/wall2/q -set 'uniform 1e5'
|
||||
|
@ -1,27 +1,34 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
params=$@
|
||||
# Save the line plot
|
||||
unset savePlots
|
||||
|
||||
if notTest "$@"
|
||||
then
|
||||
savePlots=true
|
||||
fi
|
||||
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
cat system/schemesToTest | while read scheme
|
||||
while read -r scheme
|
||||
do
|
||||
echo "Updating fvSchemes to use $scheme"
|
||||
sed "s/DIVSCHEME/$scheme/g" system/fvSchemes.template > system/fvSchemes
|
||||
|
||||
# Create a sanitised name for the scheme - remove 'special' characters
|
||||
schemeTag=$(sed -e 's# #_#g#' -e 's#(##g' -e 's#)##g' -e 's#\.##g' <<< "$scheme")
|
||||
schemeTag=$(sed -e 's# #_#g#' -e 's#[.()]##g' <<< "$scheme")
|
||||
|
||||
runApplication -s ${schemeTag} scalarTransportFoam
|
||||
runApplication -s "${schemeTag}" scalarTransportFoam
|
||||
|
||||
if notTest $params
|
||||
if [ "$savePlots" = true ]
|
||||
then
|
||||
# Save the line plot
|
||||
mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy
|
||||
mv postProcessing/sample1/100/line1_T.xy line1_T_"${schemeTag}".xy
|
||||
fi
|
||||
done
|
||||
done < system/schemesToTest
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
@ -71,7 +71,7 @@ GNUPLOT
|
||||
}
|
||||
|
||||
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
# Create validation plots
|
||||
|
||||
|
@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory
|
||||
|
||||
endTime=10
|
||||
\cp system/controlDict.template system/controlDict
|
||||
if notTest $@
|
||||
if notTest "$@"
|
||||
then
|
||||
endTime=85
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user