From 0f547660cec56f57a0ffba05270a7e555765e0e1 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 28 Jun 2017 12:16:38 +0200 Subject: [PATCH] TUT: make it easier to perform dry runs for lumpedPointMotion --- .../lumpedPointMotion/building/Allrun.move | 11 ++++++++--- .../lumpedPointMotion/building/files/Allrun.movement | 3 ++- .../lumpedPointMotion/building/files/Allrun.transient | 3 +++ .../lumpedPointMotion/building/steady/Allrun.pre | 7 ++++++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move index 842eb6cefe..33b1a80e7b 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/Allrun.move +++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun.move @@ -27,13 +27,18 @@ linkParallelCase() echo "Linking $dst parallel case from $src" mkdir $dst - for i in constant system + + # Copy system - may wish to change things + for i in system 0 do - cp -r $src/$i $dst + echo " copy $i/" + ( cd $dst && cp -r ../$src/$i . ) done - echo " link processor directories with $# times: $@" + echo " link constant/" + ( cd $dst && ln -sf ../$src/constant . ) + echo " link processor*/ with $# times: $@" for proc in $(cd $src && \ls -d processor*) do ( cd $dst && ln -sf ../$src/$proc . ) diff --git a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement index 4e7cab8fb7..bf69827a2c 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement +++ b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.movement @@ -3,7 +3,8 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # The 0/ field only -runApplication reconstructPar -withZero -time 0 +# runApplication reconstructPar -withZero -time 0 +runApplication reconstructParMesh -constant -withZero -time 0 # Check the location of the pressure zones # runParallel lumpedPointZones <<- Parallel file writing not yet done diff --git a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient index 91920e1883..5004717368 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient +++ b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient @@ -2,6 +2,9 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions +# Cleanup old junk that may prevent things from starting +\rm -f comms/OpenFOAM.lock + # If OpenFOAM stops prematurely, trigger the external solver to stop trap '[ -e comms/OpenFOAM.lock ] && echo "status=done" > comms/OpenFOAM.lock' EXIT TERM INT diff --git a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre index b58f7f5cea..de42e2de8c 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre +++ b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre @@ -15,7 +15,7 @@ unset parallel parallel=true # Dummy 0 directory -mkdir 0 +mkdir -p 0 if [ "${parallel:-false}" = false ] then @@ -39,6 +39,11 @@ else runParallel renumberMesh -overwrite + # In case serial calculations are needed later + + restore0Dir # Overwrite dummy 0 directory + # runApplication reconstructParMesh -constant + fi