TUT: fix run/clean scripts syntax

This commit is contained in:
Mark Olesen 2020-08-04 15:02:51 +02:00
parent 14c9582458
commit 7051abc371
10 changed files with 44 additions and 33 deletions

View File

@ -4,5 +4,7 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
cleanCase
rm 0/*.gz
rm -f 0/*.gz
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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

View File

@ -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

View File

@ -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 "$suffix" calcRadiusField
runApplication -s tier$index \
topoSet -dict system/topoSetDict.tier$index
runApplication -s "$suffix" \
topoSet -dict system/topoSetDict.tier$index
## foamToVTK -cellSet tier$index
## foamToVTK -cellSet "$suffix"
runApplication -s tier$index \
refineMesh -dict system/refineMeshDict.tier$index -overwrite
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
#------------------------------------------------------------------------------

View File

@ -1,5 +1,6 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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

View File

@ -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*
#------------------------------------------------------------------------------

View File

@ -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