diff --git a/tutorials/combustion/engineFoam/kivaTest/Allrun b/tutorials/combustion/engineFoam/kivaTest/Allrun index 21d4983a9393d8df2e99d3d20096d0a2578905a6..5088aaff7bfcc1e9771b193ccee33e6f5e66a963 100755 --- a/tutorials/combustion/engineFoam/kivaTest/Allrun +++ b/tutorials/combustion/engineFoam/kivaTest/Allrun @@ -7,36 +7,14 @@ cd ${0%/*} || exit 1 # run from this directory # Get application name application=`getApplication` -runKivaToFoam() -{ - if [ -f log.kivaToFoam ] - then - echo "kivaToFoam already run: remove log file to re-run" - else - echo "kivaToFoam: converting kiva file" - kivaToFoam -file $1 > log.kivaToFoam 2>&1 - fi -} - - -restartApplication() -{ - if [ -f log-2.$1 ] - then - echo "$1 already run: remove log file to re-run" - else - echo "Running $1" - $1 > log-2.$1 2>&1 - fi -} - - -runKivaToFoam otape17 +runApplication kivaToFoam -file otape17 cp system/controlDict.1st system/controlDict runApplication $application +mv log.$application log.$application.1 cp system/controlDict.2nd system/controlDict -restartApplication $application +runApplication $application +mv log.$application log.$application.2 # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/makeMesh b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/makeMesh index 937900177cf8dd32580188517f1288f2f7a37eda..3d13f36b4fd5dc0b8cb2736017d4be4d95a0696c 100755 --- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/makeMesh +++ b/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/makeMesh @@ -1,5 +1,8 @@ #!/bin/sh -set -x +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict -blockMesh > log.blockMesh 2>&1 +runApplication blockMesh diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun index 6142b9557c81a05d64dd43de4b095a5d0b21493f..7ff431e35f3eae0e2e63ce137cd3a29dd66a628d 100755 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Allrun @@ -7,24 +7,13 @@ cd ${0%/*} || exit 1 # run from this directory # Get application name application=`getApplication` -runStarToFoam() -{ - if [ -f log.star3ToFoam -o -f log.starToFoam ] - then - echo "star3ToFoam already run on $PWD: remove log file to re-run" - else - echo "star3ToFoam: converting mesh $1" - star3ToFoam $1 > log.star3ToFoam 2>&1 - fi -} +runApplication star3ToFoam prostar/nacaAirfoil -runStarToFoam prostar/nacaAirfoil mv constant/polyMesh/boundary temp sed -e s/"\([\t ]*type[\t ]*\)symmetryPlane"/"\1empty"/g \ temp > constant/polyMesh/boundary rm temp -runApplication $application -# end-of-file +runApplication $application # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs index 2d9ceeb49a128a8d79c850a4c95ec7af0db83e72..4baed11dace892bc45de05403d70465d7bbd90fe 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs @@ -83,8 +83,16 @@ type -P gnuplot &>/dev/null || { exit 1 } +SETSDIR="../sets" + +if [ ! -d $SETSDIR ] +then + echo "createGraphs: results sets not available in folder $SETSDIR" + exit 0 +fi + # paths to data -LATESTTIME=`ls ../sets` +LATESTTIME=`ls $SETSDIR` OFDATAROOT=../sets/$LATESTTIME EXPTDATAROOT=./exptData diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun index 6de4b18840f513923647e10ed3211e3520d17546..ed131900d36d14e0bb34237f1e1e0b69976c65dc 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun @@ -13,7 +13,7 @@ unset FOAM_SETNAN unset FOAM_SIGFPE # Create first baffle -createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite > log.createBaffles 2>&1 +runApplication createBaffles baffleFaces '(baffle1Wall_0 baffle1Wall_1)' -overwrite # Create region runApplication extrudeToRegionMesh -overwrite diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/makeMesh b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/makeMesh index 937900177cf8dd32580188517f1288f2f7a37eda..8cb3ae622ef5b4fbf91da2e3a558c41ec3b60797 100755 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/makeMesh +++ b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/makeMesh @@ -1,5 +1,11 @@ #!/bin/sh -set -x +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict -blockMesh > log.blockMesh 2>&1 + +runApplication blockMesh + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun index 3aa63c00d9b7d1b846e4e231834287a4d5e56fa6..f038377853694a0f7ffba2e610774e5f01ae9904 100755 --- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun +++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun @@ -1,7 +1,6 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory - # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh index edcd0dadfe341e37ec4fd4015cb2c54d16fc7f3f..937765f7cb7b519acdc5f2be2b23d0cd13c59ed9 100755 --- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh +++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/makeMesh @@ -1,6 +1,13 @@ #!/bin/sh -set -x +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict -blockMesh > log.blockMesh 2>&1 -topoSet + +runApplication blockMesh + +runApplication topoSet + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun index 84758693b88e0ac85b8dce7d3faf314190a50624..2374d2fb6c3277c6f5aa1db7cd77620c2bc5109e 100755 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/Allrun @@ -16,9 +16,13 @@ unset FOAM_SETNAN # Create faceZones for fan and baffles runApplication topoSet + # Create fan cyclics -createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite > log.createBaffles 2>&1 +runApplication createBaffles cyclicFaces '(fan_half0 fan_half1)' -overwrite +mv log.createBaffles log.createBaffles.1 + # Create wall baffles -createBaffles baffleFaces '(baffles baffles)' -overwrite > log.createBaffles 2>&1 +runApplication createBaffles baffleFaces '(baffles baffles)' -overwrite +mv log.createBaffles log.createBaffles.2 runApplication $application diff --git a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun index fd85f49a951d0ded2fad152f116e272f97164bad..656b92f3addbd931034a7f844bb2f46dffce0a97 100755 --- a/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun +++ b/tutorials/incompressible/pimpleFoam/elipsekkLOmega/Allrun @@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory application=`getApplication` runApplication blockMesh -transformPoints -scale '(1.6666 1 1)' +runApplication transformPoints -scale '(1.6666 1 1)' runApplication changeDictionary -instance system -dict system/changeDictionaryDict.X runApplication mirrorMesh -overwrite diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun index 061be5a02eb8a1cd772b947b0c05a27f5230043e..b7428e064f41ff60966bae7e3ee0f990ef38bd62 100755 --- a/tutorials/lagrangian/reactingParcelFoam/filter/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/filter/Allrun @@ -21,10 +21,12 @@ setsToZones -noFlipMap > log.setsToZones 2>&1 # - use binary writing to avoid 'nan' # - use setFields to set values unset FOAM_SIGFPE -createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite > log.createBaffles1 2>&1 +runApplication createBaffles cycLeft '(cycLeft_half0 cycLeft_half1)' -overwrite +mv log.createBaffles log.createBaffles1 # create the second cyclic - rhs of porous zone -createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite > log.createBaffles2 2>&1 +runApplication createBaffles cycRight '(cycRight_half0 cycRight_half1)' -overwrite +mv log.createBaffles log.createBaffles2 # Initialise newly created patchFields to 0 runApplication changeDictionary diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun index 29758935af3f44d3b33636462a6c091fe16f7c15..32c7e6f948157c416cccf020b8c874198ee1ddcc 100755 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allrun @@ -16,7 +16,7 @@ unset FOAM_SETNAN # Create faceZones for porous baffles runApplication topoSet -createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite > log.createBaffles 2>&1 +runApplication createBaffles cyclicZoneFaces '(porous_half0 porous_half1)' -overwrite runApplication changeDictionary