From 8717f9936e41514169da715ad25a2f72c86c9369 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 21 Jun 2018 15:19:09 +0200 Subject: [PATCH] TUT: consistency in Allclean Allrun scripts --- tutorials/IO/fileHandler/Allclean | 7 ++--- .../basic/overPotentialFoam/cylinder/Allclean | 6 ++-- .../basic/overPotentialFoam/cylinder/Allrun | 5 +++- .../overPotentialFoam/cylinder/Allrun.pre | 5 +++- .../cylinder/cylinderAndBackground/Allclean | 9 +++--- .../cylinder/cylinderAndBackground/Allrun | 4 +-- .../cylinder/cylinderAndBackground/Allrun.pre | 4 +-- .../cylinder/cylinderMesh/Allrun.pre | 5 +++- .../combustion/XiEngineFoam/kivaTest/Allclean | 8 ++--- .../combustion/XiEngineFoam/kivaTest/Allrun | 11 ++----- .../reactingFoam/RAS/chockedNozzle/Allclean | 7 ++--- .../reactingFoam/RAS/chockedNozzle/Allrun | 6 ++-- .../reactingFoam/RAS/membrane/Allclean | 8 +++-- .../reactingFoam/RAS/membrane/Allrun | 10 +++---- .../overRhoSimpleFoam/hotCylinder/Allrun | 5 +++- .../overRhoSimpleFoam/hotCylinder/Allrun.pre | 5 +++- .../cylinderAndBackground/Allclean | 9 +++--- .../hotCylinder/cylinderAndBackground/Allrun | 4 +-- .../cylinderAndBackground/Allrun.pre | 4 +-- .../hotCylinder/cylinderMesh/Allrun.pre | 5 +++- .../RAS/aerofoilNACA0012/Allclean | 6 ++-- .../rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun | 10 ++----- .../rhoSimpleFoam/aerofoilNACA0012/Allclean | 6 ++-- .../rhoSimpleFoam/aerofoilNACA0012/Allrun | 10 ++----- .../chtMultiRegionFoam/reverseBurner/Allclean | 8 ++--- .../chtMultiRegionFoam/reverseBurner/Allrun | 8 ++--- .../mesh/refineMesh/refineFieldDirs/Allrun | 6 ++-- .../Allrun | 8 ++--- .../laminar/climbingRod/Allclean | 9 ++---- .../laminar/climbingRod/Allrun | 15 ++++------ .../evaporationMultiComponent/Allclean | 7 ++--- .../evaporationMultiComponent/Allrun | 5 ++-- .../inertMultiphaseMultiComponent/Allclean | 7 ++--- .../inertMultiphaseMultiComponent/Allrun | 5 ++-- .../waveExampleStreamFunction/Allclean | 11 +++---- .../laminar/waveExampleStreamFunction/Allrun | 8 ++--- .../laminar/waveMangroveInteraction/Allclean | 11 +++---- .../laminar/waveMangroveInteraction/Allrun | 8 ++--- .../damBreakWithObstacle/Allclean | 9 ++---- .../interIsoFoam/damBreakWithObstacle/Allrun | 13 ++++---- .../boatAndPropeller/Allclean | 9 +++--- .../overInterDyMFoam/boatAndPropeller/Allrun | 4 +-- .../boatAndPropeller/Allrun.pre | 30 +++++++++---------- .../schemes/divergenceExample/Allrun | 8 ++--- 44 files changed, 161 insertions(+), 187 deletions(-) diff --git a/tutorials/IO/fileHandler/Allclean b/tutorials/IO/fileHandler/Allclean index d7d5f0c370..b94239990e 100755 --- a/tutorials/IO/fileHandler/Allclean +++ b/tutorials/IO/fileHandler/Allclean @@ -1,10 +1,9 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions cleanCase + rm -rf machineA rm -rf machineB diff --git a/tutorials/basic/overPotentialFoam/cylinder/Allclean b/tutorials/basic/overPotentialFoam/cylinder/Allclean index 02381632b7..5a8494c4b6 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/Allclean +++ b/tutorials/basic/overPotentialFoam/cylinder/Allclean @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions # Extrude mesh around cylinder (cd cylinderAndBackground && ./Allclean) @@ -8,4 +8,4 @@ cd ${0%/*} || exit 1 # run from this directory # Add background mesh (cd cylinderMesh && foamCleanTutorials) -# ----------------------------------------------------------------- end-of-file +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/Allrun b/tutorials/basic/overPotentialFoam/cylinder/Allrun index 606384c249..a98fd76068 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/Allrun +++ b/tutorials/basic/overPotentialFoam/cylinder/Allrun @@ -1,8 +1,11 @@ #!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Extrude mesh around cylinder (cd cylinderMesh && ./Allrun.pre) # Add background mesh (cd cylinderAndBackground && ./Allrun $*) + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre b/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre index 788e947486..d87c892a62 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre +++ b/tutorials/basic/overPotentialFoam/cylinder/Allrun.pre @@ -1,8 +1,11 @@ #!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Extrude mesh around cylinder (cd cylinderMesh && ./Allrun.pre) # Add background mesh (cd cylinderAndBackground && ./Allrun.pre) + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean index 6be736ea3c..aab71fa2ca 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allclean @@ -1,12 +1,11 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 -cleanCase rm -f constant/polyMesh/boundary rm -f constant/polyMesh/zoneID rm -f constant/cellInterpolationWeight -rm -rf 0 - #------------------------------------------------------------------------------ diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun index 50626eed68..6751923556 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions ./Allrun.pre diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre index f4910d875d..fb7e1120bd 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderAndBackground/Allrun.pre @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Create background mesh runApplication blockMesh diff --git a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre index ad0801bbb9..a86d958660 100755 --- a/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre +++ b/tutorials/basic/overPotentialFoam/cylinder/cylinderMesh/Allrun.pre @@ -1,8 +1,11 @@ #!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Generate mesh from surface (in constant/triSurface) runApplication extrudeMesh # Make front and back type empty runApplication createPatch -overwrite + +#------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiEngineFoam/kivaTest/Allclean b/tutorials/combustion/XiEngineFoam/kivaTest/Allclean index 6904a7f0e6..b2a02d4957 100755 --- a/tutorials/combustion/XiEngineFoam/kivaTest/Allclean +++ b/tutorials/combustion/XiEngineFoam/kivaTest/Allclean @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions mv ./-180 temp180 cleanCase @@ -12,4 +10,4 @@ rm -f constant/polyMesh/boundary > /dev/null 2>&1 mv temp180 ./-180 -#------------------------------------------------------------------------------ \ No newline at end of file +#------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiEngineFoam/kivaTest/Allrun b/tutorials/combustion/XiEngineFoam/kivaTest/Allrun index e51b7da7c0..9cb48c6cf4 100755 --- a/tutorials/combustion/XiEngineFoam/kivaTest/Allrun +++ b/tutorials/combustion/XiEngineFoam/kivaTest/Allrun @@ -1,14 +1,9 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Get application name -application=`getApplication` +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication kivaToFoam -file otape17 -runApplication $application +runApplication $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allclean b/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allclean index f0bfad6c43..be7ddb0688 100755 --- a/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allclean +++ b/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allclean @@ -1,8 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions cleanCase + #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allrun b/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allrun index 81bd0203d0..e7546150c9 100755 --- a/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allrun +++ b/tutorials/combustion/reactingFoam/RAS/chockedNozzle/Allrun @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh runApplication decomposePar diff --git a/tutorials/combustion/reactingFoam/RAS/membrane/Allclean b/tutorials/combustion/reactingFoam/RAS/membrane/Allclean index 19839c87a7..4b318da219 100755 --- a/tutorials/combustion/reactingFoam/RAS/membrane/Allclean +++ b/tutorials/combustion/reactingFoam/RAS/membrane/Allclean @@ -1,7 +1,9 @@ #!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -cd ${0%/*} || exit 1 +cleanCase0 -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +rm constant/triSurface/membrane-*.stl.gz 2> /dev/null -rm -rf 0 constant/triSurface/membrane-*.stl.gz && cleanCase +#------------------------------------------------------------------------------ diff --git a/tutorials/combustion/reactingFoam/RAS/membrane/Allrun b/tutorials/combustion/reactingFoam/RAS/membrane/Allrun index a1a4a3b4b4..5b60d5c00f 100755 --- a/tutorials/combustion/reactingFoam/RAS/membrane/Allrun +++ b/tutorials/combustion/reactingFoam/RAS/membrane/Allrun @@ -1,8 +1,6 @@ #!/bin/sh - -cd ${0%/*} || exit 1 cd ${0%/*} || exit 1 - -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions cp \ $FOAM_TUTORIALS/resources/geometry/membrane-boundaries.stl.gz \ @@ -13,8 +11,10 @@ runApplication blockMesh runApplication snappyHexMesh -overwrite runApplication createBaffles -overwrite -cp -r 0.orig 0 +restore0Dir runApplication setFields runApplication reactingFoam + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun index 606384c249..a98fd76068 100755 --- a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun @@ -1,8 +1,11 @@ #!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Extrude mesh around cylinder (cd cylinderMesh && ./Allrun.pre) # Add background mesh (cd cylinderAndBackground && ./Allrun $*) + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre index 788e947486..d87c892a62 100755 --- a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/Allrun.pre @@ -1,8 +1,11 @@ #!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Extrude mesh around cylinder (cd cylinderMesh && ./Allrun.pre) # Add background mesh (cd cylinderAndBackground && ./Allrun.pre) + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean index 6be736ea3c..aab71fa2ca 100755 --- a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allclean @@ -1,12 +1,11 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 -cleanCase rm -f constant/polyMesh/boundary rm -f constant/polyMesh/zoneID rm -f constant/cellInterpolationWeight -rm -rf 0 - #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun index 50626eed68..6751923556 100755 --- a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions ./Allrun.pre diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre index f4910d875d..fb7e1120bd 100755 --- a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderAndBackground/Allrun.pre @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Create background mesh runApplication blockMesh diff --git a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre index ad0801bbb9..a86d958660 100755 --- a/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre +++ b/tutorials/compressible/overRhoSimpleFoam/hotCylinder/cylinderMesh/Allrun.pre @@ -1,8 +1,11 @@ #!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions # Generate mesh from surface (in constant/triSurface) runApplication extrudeMesh # Make front and back type empty runApplication createPatch -overwrite + +#------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean index ecde0bf529..d547ed8b57 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions cleanCase diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun index fc1fa0b900..cb5a812f5e 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun +++ b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allrun @@ -1,15 +1,11 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -application="$(getApplication)" +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh runApplication transformPoints -scale "(1 0 1)" runApplication extrudeMesh -runApplication $application +runApplication $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean index ecde0bf529..d547ed8b57 100755 --- a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean +++ b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions cleanCase diff --git a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allrun b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allrun index fc1fa0b900..cb5a812f5e 100755 --- a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allrun +++ b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allrun @@ -1,15 +1,11 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -application="$(getApplication)" +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh runApplication transformPoints -scale "(1 0 1)" runApplication extrudeMesh -runApplication $application +runApplication $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allclean index b95f77b46c..53071c9ab4 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allclean +++ b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allclean @@ -1,9 +1,9 @@ #!/bin/sh - -cd ${0%/*} || exit 1 - -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions cleanCase rm -rf constant/*/polyMesh 0/cellToRegion 0/*/cellToRegion + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allrun index 054d3cff03..69d93eb543 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/Allrun @@ -1,8 +1,6 @@ #!/bin/sh - -cd ${0%/*} || exit 1 - -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh @@ -18,3 +16,5 @@ runApplication decomposePar -allRegions runParallel $(getApplication) runApplication reconstructPar -allRegions -newTimes + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun index 26cdf66ba1..5093f553b3 100755 --- a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun +++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun @@ -13,7 +13,8 @@ runApplication blockMesh mkdir 0 # Refine over Z, in 6 passes -for index in 1 2 3 4 5 6; do +for index in 1 2 3 4 5 6 +do runApplication -s tier$index calcRadiusField @@ -30,7 +31,8 @@ for index in 1 2 3 4 5 6; do done # Refine over cylindrical coordinates, in 3 passes -for index in 1 2 3; do +for index in 1 2 3 +do runApplication -s range$index calcRadiusField -calcDirections diff --git a/tutorials/mesh/snappyHexMesh/aerofoilNACA0012_directionalRefinement/Allrun b/tutorials/mesh/snappyHexMesh/aerofoilNACA0012_directionalRefinement/Allrun index 8b2da784f2..3921a01604 100755 --- a/tutorials/mesh/snappyHexMesh/aerofoilNACA0012_directionalRefinement/Allrun +++ b/tutorials/mesh/snappyHexMesh/aerofoilNACA0012_directionalRefinement/Allrun @@ -1,10 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -application="$(getApplication)" +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh runApplication snappyHexMesh diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allclean index 7bafa25531..e2f275d9fd 100755 --- a/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allclean +++ b/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allclean @@ -1,10 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -cleanCase -rm -rf 0 2> /dev/null +cleanCase0 #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allrun index f182e99ff0..8f11c77e3f 100755 --- a/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allrun +++ b/tutorials/multiphase/compressibleInterFoam/laminar/climbingRod/Allrun @@ -1,18 +1,13 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Get application name -application=`getApplication` +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh runApplication extrudeMesh -rm -rf 0 2> /dev/null -cp -r 0.orig 0 +restore0Dir + runApplication setFields -runApplication $application +runApplication $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allclean b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allclean index e12744789f..e2f275d9fd 100755 --- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allclean +++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allclean @@ -1,8 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -cleanCase -rm -rf 0 +cleanCase0 #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allrun b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allrun index 506b2f1220..efced0038e 100755 --- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allrun +++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/evaporationMultiComponent/Allrun @@ -1,8 +1,9 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions restore0Dir + runApplication blockMesh runApplication setFields runApplication $(getApplication) diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allclean b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allclean index e12744789f..e2f275d9fd 100755 --- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allclean +++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allclean @@ -1,8 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -cleanCase -rm -rf 0 +cleanCase0 #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allrun b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allrun index 506b2f1220..efced0038e 100755 --- a/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allrun +++ b/tutorials/multiphase/icoReactingMultiPhaseInterFoam/inertMultiphaseMultiComponent/Allrun @@ -1,8 +1,9 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions restore0Dir + runApplication blockMesh runApplication setFields runApplication $(getApplication) diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allclean b/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allclean index 705f91474c..e2f275d9fd 100755 --- a/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allclean +++ b/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allclean @@ -1,10 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -rm -rf 0 - -cleanCase +cleanCase0 +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allrun b/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allrun index 9f0c668029..28bf991e62 100755 --- a/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allrun +++ b/tutorials/multiphase/interFoam/laminar/waveExampleStreamFunction/Allrun @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions restore0Dir @@ -13,3 +11,5 @@ runApplication decomposePar runParallel setFields runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allclean b/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allclean index 705f91474c..e2f275d9fd 100755 --- a/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allclean +++ b/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allclean @@ -1,10 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -rm -rf 0 - -cleanCase +cleanCase0 +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allrun b/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allrun index 7ce66c4a9c..471e2eeb5f 100755 --- a/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allrun +++ b/tutorials/multiphase/interFoam/laminar/waveMangroveInteraction/Allrun @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions restore0Dir @@ -15,3 +13,5 @@ runApplication topoSet runApplication decomposePar runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean b/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean index d1295e344e..dced1dda72 100755 --- a/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean +++ b/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean @@ -1,12 +1,9 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cleanCase0 rm system/cellSetDict > /dev/null 2>&1 -rm -rf 0 > /dev/null 2>&1 - -cleanCase #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allrun b/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allrun index 3c6ac72641..2bc6e3a474 100755 --- a/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allrun +++ b/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allrun @@ -1,17 +1,18 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions +restore0Dir -cp -r 0.orig 0 > /dev/null 2>&1 runApplication blockMesh #runApplication setSet -batch createObstacle.setSet runApplication topoSet runApplication subsetMesh -overwrite c0 -patch walls runApplication setFields + runApplication decomposePar -runParallel `getApplication` -#runApplication `getApplication` +runParallel $(getApplication) + +#runApplication $(getApplication) #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allclean b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allclean index 6be736ea3c..aab71fa2ca 100755 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allclean +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allclean @@ -1,12 +1,11 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 -cleanCase rm -f constant/polyMesh/boundary rm -f constant/polyMesh/zoneID rm -f constant/cellInterpolationWeight -rm -rf 0 - #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun index 787d72a9dc..e4ccbb9c32 100755 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun @@ -1,6 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions ./Allrun.pre diff --git a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre index 31f8196390..2ee78f494a 100755 --- a/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre +++ b/tutorials/multiphase/overInterDyMFoam/boatAndPropeller/Allrun.pre @@ -1,28 +1,27 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions runApplication blockMesh -#runApplication -s 1 topoSet -dict ./system/topoSetDictRefine -#runApplication -s 1 refineMesh -overwrite -dict ./system/refineMeshDict -runApplication -s 1 topoSet -dict ./system/topoSetDictRefine -runApplication -s 1 refineMesh -overwrite -dict ./system/refineMeshDict -runApplication -s 2 topoSet -dict ./system/topoSetDictRefine -runApplication -s 2 refineMesh -overwrite -dict ./system/refineMeshDict -# Select cellSets -runApplication -s 3 topoSet -dict ./system/topoSetDictHull +#runApplication -s 1 topoSet -dict system/topoSetDictRefine +#runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict +runApplication -s 1 topoSet -dict system/topoSetDictRefine +runApplication -s 1 refineMesh -overwrite -dict system/refineMeshDict +runApplication -s 2 topoSet -dict system/topoSetDictRefine +runApplication -s 2 refineMesh -overwrite -dict system/refineMeshDict + +# Select cellSets +runApplication -s 3 topoSet -dict system/topoSetDictHull runApplication -s 3 subsetMesh keepBox -patch hullWall -overwrite # Select cellSets -runApplication -s 4 topoSet -dict ./system/topoSetDictPropeller - +runApplication -s 4 topoSet -dict system/topoSetDictPropeller runApplication -s 4 subsetMesh keepBox -patch propellerWall -overwrite # Select cellSets -runApplication -s 5 topoSet -dict ./system/topoSetDictRudder - +runApplication -s 5 topoSet -dict system/topoSetDictRudder runApplication -s 5 subsetMesh keepBox -patch rudderWall -overwrite restore0Dir @@ -31,7 +30,6 @@ restore0Dir runApplication -s 1 setFields -dict system/setFieldsDict runApplication -s 2 setFields -dict system/setFieldsDictWaterLevel - - touch rbm.foam + #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun b/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun index e7448449c2..89bd04a003 100755 --- a/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun +++ b/tutorials/verificationAndValidation/schemes/divergenceExample/Allrun @@ -1,8 +1,6 @@ #!/bin/sh -cd ${0%/*} || exit 1 # run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions params=$@ @@ -24,3 +22,5 @@ do mv postProcessing/sample1/100/line1_T.xy line1_T_${schemeTag}.xy fi done + +#------------------------------------------------------------------------------