Commit 7051abc3 authored by Mark Olesen's avatar Mark Olesen

TUT: fix run/clean scripts syntax

parent 14c95824
...@@ -4,5 +4,7 @@ cd "${0%/*}" || exit # Run from this directory ...@@ -4,5 +4,7 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cleanCase cleanCase
rm 0/*.gz
rm -f 0/*.gz
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
#!/bin/sh #!/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 . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
......
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd "${0%/*}" || exit # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
./makeMesh ./makeMesh
......
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd "${0%/*}" || exit # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
m4 < system/blockMeshDict.m4 > system/blockMeshDict m4 < system/blockMeshDict.m4 > system/blockMeshDict
......
...@@ -14,45 +14,45 @@ wclean calcRadiusField ...@@ -14,45 +14,45 @@ wclean calcRadiusField
runApplication blockMesh runApplication blockMesh
##### Procedure for special refinement over Z
# We need the 0 folder to exist for these steps # We need the 0 folder to exist for these steps
mkdir 0 mkdir 0
# Refine over Z, in 6 passes # Refine over Z, in 6 passes
for index in 1 2 3 4 5 6 for index in 1 2 3 4 5 6
do do
suffix="tier$index"
runApplication -s tier$index calcRadiusField runApplication -s "$suffix" calcRadiusField
runApplication -s tier$index \
topoSet -dict system/topoSetDict.tier$index
## foamToVTK -cellSet tier$index runApplication -s "$suffix" \
topoSet -dict system/topoSetDict.tier$index
runApplication -s tier$index \ ## foamToVTK -cellSet "$suffix"
refineMesh -dict system/refineMeshDict.tier$index -overwrite
rm -r 0/* runApplication -s "$suffix" \
refineMesh -dict system/refineMeshDict."$suffix" -overwrite
rm -r 0/*
done done
# Refine over cylindrical coordinates, in 3 passes # Refine over cylindrical coordinates, in 3 passes
for index in 1 2 3 for index in 1 2 3
do do
suffix="range$index"
runApplication -s range$index calcRadiusField -calcDirections runApplication -s "$suffix" calcRadiusField -calcDirections
runApplication -s range$index \ runApplication -s "$suffix" \
topoSet -dict system/topoSetDict.range$index topoSet -dict system/topoSetDict."$suffix"
## foamToVTK -cellSet tier$index ## foamToVTK -cellSet "$suffix"
runApplication -s range$index \ runApplication -s "$suffix" \
refineMesh -dict system/refineMeshDict.range$index -overwrite refineMesh -dict system/refineMeshDict."$suffix" -overwrite
rm -r 0/*
rm -r 0/*
done done
rmdir 0 2>/dev/null
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
#!/bin/sh #!/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
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cleanCase0 cleanCase0
......
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd "${0%/*}" || exit # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0 cleanCase0
rm -r sequencedVTK
rm -rf sequencedVTK
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd "${0%/*}" || exit # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh runApplication blockMesh
restore0Dir restore0Dir
......
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd "${0%/*}" || exit # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0 cleanCase0
rm -rf processor* rm -rf processor*
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory cd "${0%/*}" || exit # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication blockMesh runApplication blockMesh
restore0Dir restore0Dir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment