diff --git a/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/sbend/laminar/Allclean b/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/sbend/laminar/Allclean index 61816694dbef9df2eaf1ea8d1db954de1f9ca17a..52a7c1663cb2b24deb8c17dc4d1e58bee3a6242e 100755 --- a/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/sbend/laminar/Allclean +++ b/tutorials/incompressible/adjointOptimisationFoam/sensitivityMaps/sbend/laminar/Allclean @@ -4,5 +4,7 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ cleanCase -rm 0/*.gz + +rm -f 0/*.gz + #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean index 43b1e567b1d6c68e3541af1e54add0ebe5376bae..a7e5dc4a81308c4184cd31028db45c8524aecc05 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean +++ b/tutorials/incompressible/pimpleFoam/laminar/contactAngleCavity/Allclean @@ -1,5 +1,5 @@ #!/bin/sh -cd ${0%/*} || exit # Run from this directory +cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun index 0cae8060837435fc29bd1cbe44a43efc2492511d..3aaff9382e8d89f74654626bd751674bb48674f2 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/Allrun @@ -1,6 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ ./makeMesh diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/makeMesh b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/makeMesh index fc56e7be3ced8dddd0d2158adb4b74e5e2d96239..5a991c3d4f85394a41b97e83832bb327433042a2 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/makeMesh +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/makeMesh @@ -1,6 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ m4 < system/blockMeshDict.m4 > system/blockMeshDict diff --git a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun index 7909fb899c58e546e695d7cb0e4c7246329d5a37..ca48dae90a01af42ec2e0b7a34351fa483020600 100755 --- a/tutorials/mesh/refineMesh/refineFieldDirs/Allrun +++ b/tutorials/mesh/refineMesh/refineFieldDirs/Allrun @@ -14,45 +14,45 @@ wclean calcRadiusField runApplication blockMesh -##### Procedure for special refinement over Z - # We need the 0 folder to exist for these steps mkdir 0 # Refine over Z, in 6 passes for index in 1 2 3 4 5 6 do + suffix="tier$index" - runApplication -s tier$index calcRadiusField - - runApplication -s tier$index \ - topoSet -dict system/topoSetDict.tier$index + runApplication -s "$suffix" calcRadiusField - ## foamToVTK -cellSet tier$index + runApplication -s "$suffix" \ + topoSet -dict system/topoSetDict.tier$index - runApplication -s tier$index \ - refineMesh -dict system/refineMeshDict.tier$index -overwrite + ## foamToVTK -cellSet "$suffix" - rm -r 0/* + runApplication -s "$suffix" \ + refineMesh -dict system/refineMeshDict."$suffix" -overwrite + rm -r 0/* done # Refine over cylindrical coordinates, in 3 passes for index in 1 2 3 do + suffix="range$index" - runApplication -s range$index calcRadiusField -calcDirections + runApplication -s "$suffix" calcRadiusField -calcDirections - runApplication -s range$index \ - topoSet -dict system/topoSetDict.range$index + runApplication -s "$suffix" \ + topoSet -dict system/topoSetDict."$suffix" - ## foamToVTK -cellSet tier$index + ## foamToVTK -cellSet "$suffix" - runApplication -s range$index \ - refineMesh -dict system/refineMeshDict.range$index -overwrite - - rm -r 0/* + runApplication -s "$suffix" \ + refineMesh -dict system/refineMeshDict."$suffix" -overwrite + rm -r 0/* done +rmdir 0 2>/dev/null + #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allclean b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allclean index 8dfb6f7ba605d80e0dcd37c18285eb5abf2dfe71..fb1f3847301c377e02e12439ba58cbf303af3ef9 100755 --- a/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allclean +++ b/tutorials/multiphase/compressibleInterDyMFoam/laminar/sloshingTank2D/Allclean @@ -1,5 +1,6 @@ #!/bin/sh cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ cleanCase0 diff --git a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allclean b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allclean index 188f107b0e907b47bebd868d842a1853f587802a..faeb44ab7530e02c7248ff50be7fab36f8b37852 100755 --- a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allclean +++ b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allclean @@ -1,8 +1,10 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ cleanCase0 -rm -r sequencedVTK + +rm -rf sequencedVTK #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allrun b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allrun index 98b1a954b1962b7c9b8b87946d83b23f1ccaf5cb..30fed9690edc74843640ca740ea3b4552996bcc0 100755 --- a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allrun +++ b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge2D/Allrun @@ -1,6 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ runApplication blockMesh restore0Dir diff --git a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allclean b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allclean index 3b8c6e8e2fb2b80437330845ebe5002ef787f4b3..a3ef4042a2c651541bbbcbe38d29d15c703f41b5 100755 --- a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allclean +++ b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allclean @@ -1,8 +1,10 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ cleanCase0 + rm -rf processor* #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allrun b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allrun index bdb96428fab4a09fe5434006ac2651a46362525a..02b2d981f376706913ce5194fbaa0bf40fd76c08 100755 --- a/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allrun +++ b/tutorials/multiphase/compressibleInterIsoFoam/laminar/depthCharge3D/Allrun @@ -1,6 +1,7 @@ #!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ runApplication blockMesh restore0Dir