diff --git a/tutorials/IO/fileHandler/Allrun b/tutorials/IO/fileHandler/Allrun index 38def00b17..25ff145a94 100755 --- a/tutorials/IO/fileHandler/Allrun +++ b/tutorials/IO/fileHandler/Allrun @@ -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 ] diff --git a/tutorials/combustion/XiFoam/RAS/Allrun b/tutorials/combustion/XiFoam/RAS/Allrun index 2501be2429..39365a5aa9 100755 --- a/tutorials/combustion/XiFoam/RAS/Allrun +++ b/tutorials/combustion/XiFoam/RAS/Allrun @@ -24,7 +24,7 @@ setCombustionProperties() # Do moriyoshiHomogeneous ( cd moriyoshiHomogeneous && foamRunTutorials ) -if notTest $@ +if notTest "$@" then # Clone case for second phase cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2 diff --git a/tutorials/combustion/chemFoam/gri/Allrun b/tutorials/combustion/chemFoam/gri/Allrun index 2715bedcd4..f36af84995 100755 --- a/tutorials/combustion/chemFoam/gri/Allrun +++ b/tutorials/combustion/chemFoam/gri/Allrun @@ -9,7 +9,7 @@ runApplication chemkinToFoam \ runApplication $(getApplication) -if notTest $@ +if notTest "$@" then (cd validation && ./Allrun $*) fi diff --git a/tutorials/combustion/chemFoam/h2/Allrun b/tutorials/combustion/chemFoam/h2/Allrun index 74a0f0ac4e..1a498df7b7 100755 --- a/tutorials/combustion/chemFoam/h2/Allrun +++ b/tutorials/combustion/chemFoam/h2/Allrun @@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory runApplication $(getApplication) -if notTest $@ +if notTest "$@" then (cd validation && ./Allrun $*) fi diff --git a/tutorials/combustion/chemFoam/ic8h18/Allrun b/tutorials/combustion/chemFoam/ic8h18/Allrun index 74a0f0ac4e..1a498df7b7 100755 --- a/tutorials/combustion/chemFoam/ic8h18/Allrun +++ b/tutorials/combustion/chemFoam/ic8h18/Allrun @@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory runApplication $(getApplication) -if notTest $@ +if notTest "$@" then (cd validation && ./Allrun $*) fi diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun index 74a0f0ac4e..1a498df7b7 100755 --- a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun +++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun @@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory runApplication $(getApplication) -if notTest $@ +if notTest "$@" then (cd validation && ./Allrun $*) fi diff --git a/tutorials/combustion/chemFoam/nc7h16/Allrun b/tutorials/combustion/chemFoam/nc7h16/Allrun index 74a0f0ac4e..1a498df7b7 100755 --- a/tutorials/combustion/chemFoam/nc7h16/Allrun +++ b/tutorials/combustion/chemFoam/nc7h16/Allrun @@ -5,7 +5,7 @@ cd "${0%/*}" || exit # Run from this directory runApplication $(getApplication) -if notTest $@ +if notTest "$@" then (cd validation && ./Allrun $*) fi diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun index 19638fb3b4..e90f2c661d 100755 --- a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun +++ b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun @@ -21,7 +21,7 @@ runParallel $(getApplication) paraFoam -touch paraFoam -touch -region panelRegion -if notTest $@ +if notTest "$@" then (cd validation && ./createGraphs) fi diff --git a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun index d8f7f9f144..4a7256323c 100755 --- a/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun +++ b/tutorials/combustion/reactingFoam/RAS/SandiaD_LTS/Allrun @@ -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 diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun index 1585a049a0..5964c79ae8 100755 --- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun +++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun @@ -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 diff --git a/tutorials/compressible/sonicLiquidFoam/Allrun b/tutorials/compressible/sonicLiquidFoam/Allrun index dfe3145627..577e629b31 100755 --- a/tutorials/compressible/sonicLiquidFoam/Allrun +++ b/tutorials/compressible/sonicLiquidFoam/Allrun @@ -27,7 +27,7 @@ setDecompressionTankFine() # Do decompressionTank ( cd decompressionTank && foamRunTutorials ) -if notTest $@ +if notTest "$@" then # Clone case cloneCase decompressionTank decompressionTankFine diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun index be55fa3580..f5ecbd2a3f 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun @@ -7,7 +7,7 @@ runApplication blockMesh runApplication $(getApplication) runApplication -s sample postProcess -latestTime -func sample -if notTest $@ +if notTest "$@" then runApplication validation/createGraphs fi diff --git a/tutorials/incompressible/adjointOptimisationFoam/Allrun b/tutorials/incompressible/adjointOptimisationFoam/Allrun index 767b6295a2..918d9a51a3 100755 --- a/tutorials/incompressible/adjointOptimisationFoam/Allrun +++ b/tutorials/incompressible/adjointOptimisationFoam/Allrun @@ -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 diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun index 48478f6098..cbd1da36d0 100755 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun @@ -33,7 +33,7 @@ do rm -rf logs done -if notTest $@ +if notTest "$@" then # create validation plot diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun b/tutorials/incompressible/lumpedPointMotion/building/Allrun index 8efee0b8b2..3132b323ff 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/Allrun +++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun @@ -75,7 +75,7 @@ copyParallelPointDisplacement() # Do steady-state case (cd steady && foamRunTutorials) -if notTest $@ +if notTest "$@" then latestTime=$(\cd steady && foamListTimes -noZero -latestTime -processor) diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move index 277b6fef42..6c0c6a4f08 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move +++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move @@ -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 diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun index da49090980..4a4056c3d8 100755 --- a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun @@ -26,7 +26,7 @@ runApplication blockMesh runApplication decomposePar runParallel $(getApplication) -if notTest $@ +if notTest "$@" then # create validation plot diff --git a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun index b15f0d6c83..8acb73de70 100755 --- a/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun +++ b/tutorials/incompressible/pimpleFoam/LES/vortexShed/Allrun @@ -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 diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun index 9b2ab05be8..c806150738 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun +++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/Allrun @@ -10,7 +10,7 @@ Stokes " endTime=2 -if notTest $@ +if notTest "$@" then endTime=25 fi diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun index d6cb2e8877..88aacca19b 100755 --- a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun +++ b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun @@ -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 diff --git a/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun b/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun index e36faa9d3a..ceafdc7704 100755 --- a/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun +++ b/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun @@ -6,7 +6,7 @@ cd "${0%/*}" || exit # Run from this directory runApplication blockMesh runApplication simpleFoam -if notTest $@ +if notTest "$@" then # Create validation plots diff --git a/tutorials/incompressible/simpleFoam/bump2D/Allrun b/tutorials/incompressible/simpleFoam/bump2D/Allrun index 962a15de40..6f65a7144d 100755 --- a/tutorials/incompressible/simpleFoam/bump2D/Allrun +++ b/tutorials/incompressible/simpleFoam/bump2D/Allrun @@ -47,7 +47,7 @@ extractVal() } -# Possibly disable for test: if notTest $@ +# Possibly disable for test: if notTest "$@" if : then diff --git a/tutorials/incompressible/simpleFoam/bump2D/plot b/tutorials/incompressible/simpleFoam/bump2D/plot index 943aa78fc7..93ae8c306c 100755 --- a/tutorials/incompressible/simpleFoam/bump2D/plot +++ b/tutorials/incompressible/simpleFoam/bump2D/plot @@ -92,7 +92,7 @@ PLT_CP } -if notTest $@ +if notTest "$@" then # Create validation plots diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allrun b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allrun index bf80f70566..3c536c2586 100755 --- a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allrun +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allrun @@ -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 diff --git a/tutorials/mesh/foamyHexMesh/Allrun b/tutorials/mesh/foamyHexMesh/Allrun index 591d56cc9a..6e4c1b4d8b 100755 --- a/tutorials/mesh/foamyHexMesh/Allrun +++ b/tutorials/mesh/foamyHexMesh/Allrun @@ -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 $* ) diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/Allrun b/tutorials/multiphase/interFoam/RAS/damBreak/Allrun index a57552feda..5f4065d514 100755 --- a/tutorials/multiphase/interFoam/RAS/damBreak/Allrun +++ b/tutorials/multiphase/interFoam/RAS/damBreak/Allrun @@ -26,7 +26,7 @@ setDamBreakFine () (cd damBreak && foamRunTutorials) -if notTest $@ +if notTest "$@" then # Clone case cloneCase damBreak damBreakFine diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun index e8ceda5386..29532dbc8e 100755 --- a/tutorials/multiphase/interFoam/laminar/damBreak/Allrun +++ b/tutorials/multiphase/interFoam/laminar/damBreak/Allrun @@ -25,7 +25,7 @@ setDamBreakFine () # Do damBreak (cd damBreak && foamRunTutorials) -if notTest $@ +if notTest "$@" then # Clone case cloneCase damBreak damBreakFine diff --git a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun index 5bbf574a70..2e0c05bbd0 100755 --- a/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun +++ b/tutorials/multiphase/interFoam/laminar/vofToLagrangian/Allrun @@ -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 $*) diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun index f6a8c6ec15..03b92855a0 100755 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/Allrun +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_2phase/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 diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun index f6a8c6ec15..03b92855a0 100755 --- a/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/Allrun +++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/RAS/wallBoiling1D_3phase/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 diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun index faea476efc..d1270dd52b 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun @@ -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' diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun index f6a8c6ec15..03b92855a0 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/Allrun +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling1D/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 diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun index aed818c3f1..f006e4891d 100755 --- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun +++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun @@ -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' diff --git a/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun b/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun index f55dca2c1f..9f2eb81af9 100755 --- a/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun +++ b/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun @@ -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 #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/schemes/weightedFluxExample/plot b/tutorials/verificationAndValidation/schemes/weightedFluxExample/plot index 3d4164670b..8c3834905f 100755 --- a/tutorials/verificationAndValidation/schemes/weightedFluxExample/plot +++ b/tutorials/verificationAndValidation/schemes/weightedFluxExample/plot @@ -71,7 +71,7 @@ GNUPLOT } -if notTest $@ +if notTest "$@" then # Create validation plots diff --git a/tutorials/verificationAndValidation/turbulentInflow/Allrun b/tutorials/verificationAndValidation/turbulentInflow/Allrun index 14bf702a0f..3a55dccafa 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/Allrun +++ b/tutorials/verificationAndValidation/turbulentInflow/Allrun @@ -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