STYLE: more consistent shell style in tutorial run/clean scripts

This commit is contained in:
Mark Olesen 2010-03-10 10:55:42 +01:00
parent 2068c67a33
commit 6b6dd51a27
112 changed files with 721 additions and 260 deletions

View File

@ -34,31 +34,31 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
printUsage() usage()
{ {
echo "Usage : `basename $0` start|stop|list" echo "Usage : ${0##*/} start|stop|list"
echo "" echo ""
exit 1
} }
RSH='ssh' RSH='ssh'
if [ ! "$DISTCC_HOSTS" ]; then if [ ! "$DISTCC_HOSTS" ]
echo "`basename $0`: variable DISTCC_HOSTS not set." then
echo "`basename $0`: please set DISTCC_HOSTS to the list of hosts to use." echo "${0##*/} Warnings"
echo "`basename $0`: the format is host1:port host2:port host3:port etc." echo " variable DISTCC_HOSTS not set."
echo "" echo " please set DISTCC_HOSTS to the list of hosts to use."
echo " the format is host1:port host2:port host3:port etc."
echo
exit 1 exit 1
fi fi
if [ $# -ne 1 ]; then [ $# -eq 1 ] || usage
printUsage
exit 1
fi
if [ "$1" = 'start' ]; then case "$1" in
start)
grep -v '^#' /etc/hosts | awk '{print $1, $2 " "}' > ~/filteredHosts.txt grep -v '^#' /etc/hosts | awk '{print $1, $2 " "}' > ~/filteredHosts.txt
allowIPS='' allowIPS=''
@ -66,7 +66,8 @@ if [ "$1" = 'start' ]; then
do do
machine=`echo "$host" | awk -F: '{print $1}'` machine=`echo "$host" | awk -F: '{print $1}'`
iptest=`echo "$machine" | sed -e 's/[0-9.]//g'` iptest=`echo "$machine" | sed -e 's/[0-9.]//g'`
if [ ! "$iptest" ]; then if [ ! "$iptest" ]
then
# address only contained 0-9 and '.'. Probably ip address. # address only contained 0-9 and '.'. Probably ip address.
ip=$machine ip=$machine
else else
@ -74,7 +75,8 @@ if [ "$1" = 'start' ]; then
ip=`egrep " $machine " ~/filteredHosts.txt | awk '{print $1}'` ip=`egrep " $machine " ~/filteredHosts.txt | awk '{print $1}'`
fi fi
if [ ! "$ip" ]; then if [ ! "$ip" ]
then
echo "$0 : host specifier $host either is not an ip address or cannot be found in /etc/hosts." echo "$0 : host specifier $host either is not an ip address or cannot be found in /etc/hosts."
echo "$0 : Exiting." echo "$0 : Exiting."
exit 1 exit 1
@ -92,7 +94,8 @@ if [ "$1" = 'start' ]; then
machine=`echo "$host" | awk -F: '{print $1}'` machine=`echo "$host" | awk -F: '{print $1}'`
port=`echo "$host" | awk -F: '{print $2}'` port=`echo "$host" | awk -F: '{print $2}'`
if [ "$machine" -a "$port" ]; then if [ "$machine" -a "$port" ]
then
#echo "Machine:$machine port:$port" #echo "Machine:$machine port:$port"
echo "distccd --daemon $allowIPS --port $port"' --jobs `egrep "^processor" /proc/cpuinfo | wc -l`' echo "distccd --daemon $allowIPS --port $port"' --jobs `egrep "^processor" /proc/cpuinfo | wc -l`'
$RSH $machine "distccd --verbose --daemon $allowIPS --port $port"' --jobs `egrep "^processor" /proc/cpuinfo | wc -l`' $RSH $machine "distccd --verbose --daemon $allowIPS --port $port"' --jobs `egrep "^processor" /proc/cpuinfo | wc -l`'
@ -102,9 +105,9 @@ if [ "$1" = 'start' ]; then
exit 1 exit 1
fi fi
done done
;;
elif [ "$1" = 'stop' ]; then stop)
for host in $DISTCC_HOSTS for host in $DISTCC_HOSTS
do do
echo "" echo ""
@ -114,10 +117,9 @@ elif [ "$1" = 'stop' ]; then
$RSH $machine killall distccd $RSH $machine killall distccd
done done
;;
list)
elif [ "$1" = 'list' ]; then
for host in $DISTCC_HOSTS for host in $DISTCC_HOSTS
do do
echo "" echo ""
@ -127,12 +129,11 @@ elif [ "$1" = 'list' ]; then
$RSH $machine "ps -ef | grep distccd | grep -v grep" $RSH $machine "ps -ef | grep distccd | grep -v grep"
done done
;;
else *)
usage
printUsage ;;
exit 1 esac
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -32,12 +32,13 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
sourcesFile=${TMPDIR:-/tmp}/sourcesFile.$$ sourcesFile=${TMPDIR:-/tmp}/sourcesFile.$$
if [ $# -ne 0 ]; then if [ $# -ne 0 ]
echo "Usage : ${0##*/}" then
echo "" echo "Usage : ${0##*/}"
echo "Build the Ebrowse dadbase for all the .H and .C files" echo ""
echo "" echo "Build the Ebrowse database for all the .H and .C files"
exit 1 echo ""
exit 1
fi fi
# Clean up on termination and on Ctrl-C # Clean up on termination and on Ctrl-C

View File

@ -29,13 +29,14 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
#cleanTimeDirectories () #cleanTimeDirectories()
#{ #{
# echo "Cleaning $case case of $application application" # echo "Cleaning $case case of $application application"
# TIME_DIRS=`foamInfoExec . $1 -times | sed '1,/constant/d'` # TIME_DIRS=`foamInfoExec . $1 -times | sed '1,/constant/d'`
# for T in $TIME_DIRS # for T in $TIME_DIRS
# do # do
# if [ $T != "0" ] ; then # if [ $T != "0" ]
# then
# echo "Deleting directory $T" # echo "Deleting directory $T"
# rm -rf ${T} > /dev/null 2>&1 # rm -rf ${T} > /dev/null 2>&1
# fi # fi
@ -43,12 +44,13 @@
# rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1 # rm -rf {log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
#} #}
cleanTimeDirectories () cleanTimeDirectories()
{ {
echo "Cleaning $PWD case" echo "Cleaning $PWD case"
nZeros=0 nZeros=0
zeros="" zeros=""
while [ $nZeros -lt 8 ] ; do while [ $nZeros -lt 8 ]
do
timeDir="0.${zeros}[1-9]*" timeDir="0.${zeros}[1-9]*"
rm -rf ${timeDir} > /dev/null 2>&1 rm -rf ${timeDir} > /dev/null 2>&1
rm -rf ./-${timeDir} > /dev/null 2>&1 rm -rf ./-${timeDir} > /dev/null 2>&1
@ -58,7 +60,7 @@ cleanTimeDirectories ()
rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1 rm -rf ./{[1-9]*,-[1-9]*,log,log.*,log-*,logSummary.*,.fxLock,*.xml,ParaView*,paraFoam*,*.OpenFOAM} > /dev/null 2>&1
} }
cleanCase () cleanCase()
{ {
cleanTimeDirectories cleanTimeDirectories
rm -rf processor* > /dev/null 2>&1 rm -rf processor* > /dev/null 2>&1
@ -82,23 +84,23 @@ cleanCase ()
done done
} }
removeCase () removeCase()
{ {
echo "Removing $case case" echo "Removing $case case"
rm -rf $1 rm -rf $1
} }
cleanSamples () cleanSamples()
{ {
rm -rf {sets,samples,sampleSurfaces} > /dev/null 2>&1 rm -rf {sets,samples,sampleSurfaces} > /dev/null 2>&1
} }
cleanUcomponents () cleanUcomponents()
{ {
rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1 rm -rf 0/{Ux,Uy,Uz} > /dev/null 2>&1
} }
cleanApplication () cleanApplication()
{ {
echo "Cleaning $PWD application" echo "Cleaning $PWD application"
wclean wclean

View File

@ -29,17 +29,19 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
getApplication () getApplication()
{ {
grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/" grep application system/controlDict | sed "s/application *\([a-zA-Z]*\);/\1/"
} }
runApplication () runApplication()
{ {
APP_RUN=$1; shift APP_RUN=$1
shift
APP_NAME=${APP_RUN##*/} APP_NAME=${APP_RUN##*/}
if [ -f log.$APP_NAME ] ; then if [ -f log.$APP_NAME ]
then
echo "$APP_NAME already run on $PWD: remove log file to run" echo "$APP_NAME already run on $PWD: remove log file to run"
else else
echo "Running $APP_RUN on $PWD" echo "Running $APP_RUN on $PWD"
@ -47,11 +49,13 @@ runApplication ()
fi fi
} }
runParallel () runParallel()
{ {
APP_RUN=$1; shift APP_RUN=$1
shift
if [ -f $log.$APP_RUN ] ; then if [ -f $log.$APP_RUN ]
then
echo "$APP_RUN already run on $PWD: remove log file to run" echo "$APP_RUN already run on $PWD: remove log file to run"
else else
echo "Running $APP_RUN in parallel on $PWD using $1 processes" echo "Running $APP_RUN in parallel on $PWD using $1 processes"
@ -59,15 +63,16 @@ runParallel ()
fi fi
} }
compileApplication () compileApplication()
{ {
echo "Compiling $1 application" echo "Compiling $1 application"
wmake $1 wmake $1
} }
cloneCase () cloneCase()
{ {
if [ -d $2 ] ; then if [ -d $2 ]
then
echo "Case already cloned: remove case directory $2 to clone" echo "Case already cloned: remove case directory $2 to clone"
else else
echo "Cloning $2 case from $1" echo "Cloning $2 case from $1"

View File

@ -2,8 +2,9 @@
# $0 string1 string2 file1 .. filen # $0 string1 string2 file1 .. filen
# #
if [ $# -lt 3 ]; then if [ $# -lt 3 ]
echo "Usage: `basename $0` [-f] <string1> <string2> <file1> .. <filen>" then
echo "Usage: ${0##*/} [-f] <string1> <string2> <file1> .. <filen>"
echo "" echo ""
echo "Replaces all occurrences of string1 by string2 in files." echo "Replaces all occurrences of string1 by string2 in files."
echo "(replacement of sed -i on those systems that don't support it)" echo "(replacement of sed -i on those systems that don't support it)"
@ -26,3 +27,5 @@ do
# echo "String $FROMSTRING not present in $f" # echo "String $FROMSTRING not present in $f"
#fi #fi
done done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,8 +1,9 @@
#!/usr/xpg4/bin/sh #!/usr/xpg4/bin/sh
# Replace all shell script headers with # Replace all shell script headers with
if [ $# -ne 1 -o ! -d "$1" ]; then if [ $# -ne 1 -o ! -d "$1" ]
echo "Usage: `basename $0` <dir>" then
echo "Usage: ${0##*/} <dir>"
echo "" echo ""
echo "Replaces all occurrences of #!/bin/sh with #!/usr/xpg4/bin/sh inside a directory tree." echo "Replaces all occurrences of #!/bin/sh with #!/usr/xpg4/bin/sh inside a directory tree."
exit 1 exit 1
@ -13,3 +14,4 @@ fi
find $1 -exec $WM_PROJECT_DIR/bin/tools/inlineReplace '^#\!/bin/sh' '#\!/usr/xpg4/bin/sh' {} \; -print find $1 -exec $WM_PROJECT_DIR/bin/tools/inlineReplace '^#\!/bin/sh' '#\!/usr/xpg4/bin/sh' {} \; -print
# ----------------------------------------------------------------- end-of-file

View File

@ -36,7 +36,8 @@ cd ${0%/*} || exit 1 # run from this directory
# logReport <logfile> # logReport <logfile>
# Extracts useful info from log file. # Extracts useful info from log file.
logReport () { logReport()
{
caseName=`dirname $1 | sed s/"\(.*\)\.\/"/""/g` caseName=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
app=`echo $1 | sed s/"\(.*\)\."/""/g` app=`echo $1 | sed s/"\(.*\)\."/""/g`
appAndCase="Application $app - case $caseName" appAndCase="Application $app - case $caseName"
@ -74,19 +75,18 @@ foamRunTutorials cases
# Analyse all log files # Analyse all log files
rm testLoopReport > /dev/null 2>&1 & rm testLoopReport > /dev/null 2>&1 &
touch testLoopReport touch testLoopReport
for appDir in * for appDir in *
do do
if [ -d $appDir ] (
then [ -d $appDir ] && cd $appDir || exit
(
cd $appDir for log in `find . -name "log.*" | xargs ls -rt`
for log in `find . -name "log.*" | xargs ls -rt` do
do logReport $log >> ../testLoopReport
logReport $log >> ../testLoopReport done
done echo "" >> ../testLoopReport
echo "" >> ../testLoopReport )
)
fi
done done
find . -name "log.*" -exec cat {} \; >> logs find . -name "log.*" -exec cat {} \; >> logs

View File

@ -32,7 +32,8 @@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cd ${0%/*} || exit 1 # run from this directory cd ${0%/*} || exit 1 # run from this directory
usage() { usage()
{
while [ "$#" -ge 1 ]; do echo "$1"; shift; done while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE cat<<USAGE
@ -49,7 +50,8 @@ USAGE
} }
setDefaultFvSchemes() { setDefaultFvSchemes()
{
cat<<EOF cat<<EOF
gradSchemes { default Gauss linear; } gradSchemes { default Gauss linear; }
divSchemes divSchemes
@ -126,8 +128,12 @@ eval set -- "$OPTS"
while [ $1 != -- ] while [ $1 != -- ]
do do
case $1 in case $1 in
-d) DEFAULT_SCHEMES=1;; -d)
-h) usage;; DEFAULT_SCHEMES=1
;;
-h)
usage
;;
esac esac
shift shift
done done

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -6,3 +7,5 @@
cleanCase cleanCase
rm -rf 0 rm -rf 0
cp -r 0.org 0 cp -r 0.org 0
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,3 +11,5 @@ runApplication blockMesh
runApplication boxTurb runApplication boxTurb
runApplication $application runApplication $application
runApplication enstrophy runApplication enstrophy
# ----------------------------------------------------------------- end-of-file

View File

@ -1,8 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf Fieldview > /dev/null 2>&1 rm -rf EnSight Ensight Fieldview > /dev/null 2>&1
rm -rf EnSight > /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -20,3 +22,5 @@ runAnsysToFoam flange.ans 0.001
runApplication $application runApplication $application
runApplication foamToFieldview9 runApplication foamToFieldview9
runApplication foamToEnsight runApplication foamToEnsight
# ----------------------------------------------------------------- end-of-file

View File

@ -1,18 +1,25 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd cylinder (
cd cylinder || exit
cleanCase cleanCase
rm -rf 0 > /dev/null 2>&1 rm -rf 0 > /dev/null 2>&1
cp -r 0.org 0 cp -r 0.org 0
wclean analyticalCylinder wclean analyticalCylinder
cd .. )
(
cd pitzDaily || exit
cd pitzDaily
cleanCase cleanCase
rm -rf 0 > /dev/null 2>&1 rm -rf 0 > /dev/null 2>&1
cp -r 0.org 0 cp -r 0.org 0
cd .. )
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,3 +11,5 @@ runApplication $application
compileApplication analyticalCylinder compileApplication analyticalCylinder
runApplication analyticalCylinder runApplication analyticalCylinder
runApplication streamFunction runApplication streamFunction
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
runApplication $application runApplication $application
runApplication streamFunction runApplication streamFunction
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -6,12 +7,18 @@
keepCases="moriyoshiHomogeneous" keepCases="moriyoshiHomogeneous"
loseCases="moriyoshiHomogeneousPart2" loseCases="moriyoshiHomogeneousPart2"
for case in $keepCases for caseName in $keepCases
do do
(cd $case && foamCleanTutorials) (
cd $caseName || exit
foamCleanTutorials
)
done done
for case in $loseCases for caseName in $loseCases
do do
removeCase $case removeCase $caseName
done done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,12 +1,16 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Set application name # Set application name
application="XiFoam" application="XiFoam"
setControlDict () { setControlDict()
{
controlDict="system/controlDict" controlDict="system/controlDict"
sed \ sed \
-e s/"\(deltaT[ \t]*\) 5e-06;"/"\1 1e-05;"/g \ -e s/"\(deltaT[ \t]*\) 5e-06;"/"\1 1e-05;"/g \
-e s/"\(endTime[ \t]*\) 0.005;"/"\1 0.015;"/g \ -e s/"\(endTime[ \t]*\) 0.005;"/"\1 0.015;"/g \
@ -15,15 +19,20 @@ setControlDict () {
mv temp.$$ $controlDict mv temp.$$ $controlDict
} }
# Do moriyoshiHomogeneous # Do moriyoshiHomogeneous
(cd moriyoshiHomogeneous && foamRunTutorials) ( cd moriyoshiHomogeneous && foamRunTutorials )
# Clone case # Clone case
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2 cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
# Modify and execute # Modify and execute
cd moriyoshiHomogeneousPart2 (
cd moriyoshiHomogeneousPart2 || exit
cp -r ../moriyoshiHomogeneous/0.005 . cp -r ../moriyoshiHomogeneous/0.005 .
setControlDict setControlDict
runApplication $application runApplication $application
cd .. )
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -8,3 +9,5 @@ rm -rf 0
cp system/controlDict.1st system/controlDict cp system/controlDict.1st system/controlDict
cleanCase cleanCase
mv temp180 ./-180 mv temp180 ./-180
# ----------------------------------------------------------------- end-of-file

View File

@ -1,32 +1,42 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name # Get application name
application=`getApplication` application=`getApplication`
runKivaToFoam () runKivaToFoam()
{ {
if [ -f $1/log.kivaToFoam ] ; then if [ -f log.kivaToFoam ]
echo "kivaToFoam already run on $1: remove log file to run" then
echo "kivaToFoam already run: remove log file to run"
else else
echo "kivaToFoam: converting kiva file" echo "kivaToFoam: converting kiva file"
kivaToFoam -case $1 -file $2 > $1/log.kivaToFoam 2>&1 kivaToFoam -file $1 > log.kivaToFoam 2>&1
fi fi
} }
restartApplication ()
restartApplication()
{ {
if [ -f $2/log-2.$1 ] ; then if [ -f log-2.$1 ]
echo "$1 already run on $2: remove log file to run" then
echo "$1 already run: remove log file to run"
else else
echo "Running $1 on $2" echo "Running $1"
$1 -case $2 > $2/log-2.$1 2>&1 $1 > log-2.$1 2>&1
fi fi
} }
runKivaToFoam . otape17
runKivaToFoam otape17
cp system/controlDict.1st system/controlDict cp system/controlDict.1st system/controlDict
runApplication $application runApplication $application
cp system/controlDict.2nd system/controlDict cp system/controlDict.2nd system/controlDict
restartApplication $application . restartApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -10,4 +12,4 @@ runApplication createPatch -overwrite
# Run # Run
runApplication fireFoam runApplication fireFoam
# ----------------------------------------------------------------------------- # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -12,19 +13,25 @@ LadenburgJet60psi \
biconic25-55Run35 \ biconic25-55Run35 \
" "
for case in $cases for caseName in $cases
do do
if [ "$case" = "shockTube" ] (
cd $caseName || exit
if [ "$caseName" = shockTube ]
then then
rm -rf $case/0 rm -rf 0
cp -r $case/0.org $case/0 cp -r 0.org 0
fi fi
(cd $case && foamCleanTutorials && cleanSamples) foamCleanTutorials && cleanSamples
if [ "$case" = "biconic25-55Run35" ] if [ "$caseName" = "biconic25-55Run35" ]
then then
rm -rf $case/constant/polyMesh/boundary rm -rf constant/polyMesh/boundary
wclean $case/datToFoam wclean datToFoam
fi fi
)
done done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -14,26 +16,30 @@ LadenburgJet60psi \
biconic25-55Run35 \ biconic25-55Run35 \
" "
moveTimeMeshToConstant () moveTimeMeshToConstant()
{ {
DT=`foamInfoExec -times | tail -1` DT=`foamInfoExec -times | tail -1`
if [ "$DT" != 0 ] ; then if [ "$DT" != 0 ]
then
mv ${DT}/polyMesh/* constant/polyMesh mv ${DT}/polyMesh/* constant/polyMesh
rm -rf ${DT} rm -rf ${DT}
fi fi
} }
for case in $cases
do
(cd $case && runApplication blockMesh)
#
if [ "$case" = "shockTube" ] ; then
(cd $case && runApplication setFields)
fi
#
if [ "$case" = "biconic25-55Run35" ] ; then
cd $case
for caseName in $cases
do
(
cd $caseName || exit
runApplication blockMesh
case "$caseName" in
shockTube)
runApplication setFields
;;
biconic25-55Run35)
wmake datToFoam wmake datToFoam
runApplication datToFoam grid256.dat runApplication datToFoam grid256.dat
@ -46,9 +52,11 @@ do
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
rm $CONST/polyMesh/boundary.bak rm $CONST/polyMesh/boundary.bak
;;
esac
cd .. runApplication $application
fi )
#
(cd $case && runApplication $application)
done done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,43 +1,54 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# #
# FUNCTIONS # FUNCTIONS
# #
printUsage () { usage()
cat <<EOF {
Usage: $0 [options] while [ "$#" -ge 1 ]; do echo "$1"; shift; done
Runs a set of samples across the cone face and concatenates output files
Options are: cat<<USAGE
-l -latestTime option for sample Usage: ${0##*/} [OPTION]
-h help
EOF options:
-l -latestTime option for sample
-h help
Runs a set of samples across the cone face and concatenates output files
USAGE
exit 1
} }
LATEST_TIME=""
unset timeOpt
OPTS=`getopt hl $*` OPTS=`getopt hl $*`
if [ $? -ne 0 ] ; then [ $? -eq 0 ] || usage "Aborting due to invalid option"
echo "Aborting due to invalid option"
printUsage
exit 1
fi
eval set -- "$OPTS" eval set -- "$OPTS"
while [ $1 != -- ]; do while [ $1 != -- ]
do
case $1 in case $1 in
-l) LATEST_TIME="-latestTime";; -l)
-h) printUsage; exit 1;; timeOpt="-latestTime"
;;
-h)
usage
;;
esac esac
shift shift
done done
shift shift
sample ${LATEST_TIME} sample $timeOpt
SDIR="sets" SDIR="sets"
LSDIR=`ls $SDIR | head -1` LSDIR=`ls $SDIR | head -1`
EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1` EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
FS=`basename $EXAMPLE_FILE | cut -d_ -f2-` FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
for d in $SDIR/* for d in $SDIR/*
do do
cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS} cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}
done done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,3 +11,5 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
runApplication setFields runApplication setFields
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -6,3 +7,5 @@
rm -rf 0 rm -rf 0
cp -r 0.org 0 cp -r 0.org 0
cleanCase cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
runApplication setFields runApplication setFields
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -7,3 +8,5 @@ cleanCase
rm -rf 0 rm -rf 0
cp -r 0.org 0 cp -r 0.org 0
cleanSamples cleanSamples
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,3 +11,5 @@ runApplication setFields
runApplication $application runApplication $application
runApplication foamCalc mag U runApplication foamCalc mag U
runApplication sample runApplication sample
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,13 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name # Get application name
application=`getApplication` application=`getApplication`
runStarToFoam () runStarToFoam()
{ {
if [ -f log.star3ToFoam -o -f log.starToFoam ] if [ -f log.star3ToFoam -o -f log.starToFoam ]
then then
@ -24,3 +26,5 @@ rm temp
runApplication $application runApplication $application
# end-of-file # end-of-file
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
removeCase decompressionTankFine removeCase decompressionTankFine
foamCleanTutorials cases foamCleanTutorials cases
# ----------------------------------------------------------------- end-of-file

View File

@ -1,14 +1,17 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Set application name # Set application name
application="sonicLiquidFoam" application="sonicLiquidFoam"
setDecompressionTankFine () setDecompressionTankFine()
{ {
blockMeshDict="$1/constant/polyMesh/blockMeshDict" blockMeshDict="constant/polyMesh/blockMeshDict"
controlDict="$1/system/controlDict" controlDict="system/controlDict"
sed \ sed \
-e s/"30 20"/"120 80"/g \ -e s/"30 20"/"120 80"/g \
-e s/"30 5"/"120 20"/g \ -e s/"30 5"/"120 20"/g \
@ -16,6 +19,7 @@ setDecompressionTankFine ()
-e s/"30 95"/"120 380"/g \ -e s/"30 95"/"120 380"/g \
$blockMeshDict > temp.$$ $blockMeshDict > temp.$$
mv temp.$$ $blockMeshDict mv temp.$$ $blockMeshDict
sed \ sed \
-e s/"\(deltaT[ \t]*\) 5e-07;"/"\1 1e-07;"/g \ -e s/"\(deltaT[ \t]*\) 5e-07;"/"\1 1e-07;"/g \
-e s/"\(endTime[ \t]*\) 0.00025;"/"\1 0.00015;"/g \ -e s/"\(endTime[ \t]*\) 0.00025;"/"\1 0.00015;"/g \
@ -23,16 +27,22 @@ setDecompressionTankFine ()
mv temp.$$ $controlDict mv temp.$$ $controlDict
} }
# Do decompressionTank # Do decompressionTank
(cd decompressionTank && foamRunTutorials) ( cd decompressionTank && foamRunTutorials )
# Clone case # Clone case
cloneCase decompressionTank decompressionTankFine cloneCase decompressionTank decompressionTankFine
cd decompressionTankFine (
cd decompressionTankFine || exit
# Modify case # Modify case
setDecompressionTankFine . setDecompressionTankFine
# And execute # And execute
runApplication blockMesh runApplication blockMesh
runApplication $application runApplication $application
cd .. )
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,11 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh runApplication blockMesh
runApplication dsmcInitialise runApplication dsmcInitialise
runApplication dsmcFoam runApplication dsmcFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,11 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh runApplication blockMesh
runApplication dsmcInitialise runApplication dsmcInitialise
runApplication dsmcFoam runApplication dsmcFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ runParallel dsmcInitialise 4
runParallel dsmcFoam 4 runParallel dsmcFoam 4
runApplication reconstructPar -noLagrangian runApplication reconstructPar -noLagrangian
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ runParallel dsmcInitialise 4
runParallel dsmcFoam 4 runParallel dsmcFoam 4
runApplication reconstructPar -noLagrangian runApplication reconstructPar -noLagrangian
# ----------------------------------------------------------------- end-of-file

View File

@ -1,22 +1,30 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd periodicCubeArgon (
cd periodicCubeArgon || exit
rm -rf 0/* rm -rf 0/*
rm -f Ar-Ar rm -f Ar-Ar
rm -f electrostatic rm -f electrostatic
rm -f constant/idList rm -f constant/idList
rm -rf constant/polyMesh/sets rm -rf constant/polyMesh/sets
cleanCase cleanCase
cd .. )
(
cd periodicCubeWater || exit
cd periodicCubeWater
rm -rf 0/* rm -rf 0/*
rm -f O-O rm -f O-O
rm -f electrostatic rm -f electrostatic
rm -f constant/idList rm -f constant/idList
rm -rf constant/polyMesh/sets rm -rf constant/polyMesh/sets
cleanCase cleanCase
cd .. )
# ----------------------------------------------------------------- end-of-file

View File

@ -1,18 +1,20 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
application="mdEquilibrationFoam" application="mdEquilibrationFoam"
cd periodicCubeArgon for caseName in periodicCubeArgon periodicCubeWater
runApplication blockMesh do
runApplication mdInitialise (
runApplication $application cd $caseName || exit
cd ..
cd periodicCubeWater
runApplication blockMesh runApplication blockMesh
runApplication mdInitialise runApplication mdInitialise
runApplication $application runApplication $application
cd .. )
done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -6,3 +7,5 @@
rm -rf constant/polyMesh/sets rm -rf constant/polyMesh/sets
rm -rf processor[0-9] rm -rf processor[0-9]
cleanCase cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -13,3 +15,5 @@ runParallel mdInitialise 4
runParallel $application 4 runParallel $application 4
runApplication reconstructPar runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,14 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
(cd hartmann && cleanCase) (
(cd hartmann && cleanSamples) cd hartmann || exit
cleanCase
cleanSamples
)
# ----------------------------------------------------------------- end-of-file

View File

@ -1,11 +1,19 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
# Set application name # Set application name
application="mhdFoam" application="mhdFoam"
(cd hartmann && runApplication blockMesh) (
(cd hartmann && runApplication $application) cd hartmann || exit
(cd hartmann && runApplication foamCalc components U)
(cd hartmann && runApplication sample) runApplication blockMesh
runApplication $application
runApplication foamCalc components U
runApplication sample
)
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
cp 0/T.org 0/T cp 0/T.org 0/T
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
runApplication blockMesh runApplication blockMesh
runApplication setHotRoom runApplication setHotRoom
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
cp 0/T.org 0/T cp 0/T.org 0/T
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
runApplication blockMesh runApplication blockMesh
runApplication setHotRoom runApplication setHotRoom
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -6,3 +8,4 @@ runApplication blockMesh
runApplication snappyHexMesh -overwrite runApplication snappyHexMesh -overwrite
runApplication buoyantBoussinesqSimpleFoam runApplication buoyantBoussinesqSimpleFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -6,3 +7,5 @@
cleanCase cleanCase
cp 0/T.org 0/T cp 0/T.org 0/T
wclean setHotRoom wclean setHotRoom
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,3 +11,5 @@ compileApplication setHotRoom
runApplication blockMesh runApplication blockMesh
runApplication setHotRoom runApplication setHotRoom
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,7 +1,11 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
rm -rf sets rm -rf sets
(cd validation && rm -f *.eps) rm -f validation/*.eps
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,4 +10,7 @@ application="buoyantSimpleFoam"
runApplication blockMesh runApplication blockMesh
runApplication $application runApplication $application
runApplication sample -latestTime runApplication sample -latestTime
(cd validation && ./createGraphs)
( cd validation && ./createGraphs )
# ----------------------------------------------------------------- end-of-file

View File

@ -32,7 +32,8 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
createEpsT() { createEpsT()
{
index=$1 index=$1
OF=$2 OF=$2
EXPT=$3 EXPT=$3
@ -54,7 +55,8 @@ EOF
} }
createEpsU() { createEpsU()
{
index=$1 index=$1
OF=$2 OF=$2
EXPT=$3 EXPT=$3
@ -78,7 +80,8 @@ EOF
# test if gnuplot exists on the system # test if gnuplot exists on the system
type -P gnuplot &>/dev/null || { type -P gnuplot &>/dev/null || {
echo "gnuplot not found - skipping graph creation" >&2; exit 1; echo "gnuplot not found - skipping graph creation" >&2
exit 1
} }
# paths to data # paths to data
@ -89,7 +92,8 @@ EXPTDATAROOT=./exptData
# generate temperature profiles # generate temperature profiles
TSets="1 3 4 5 6 7 9" TSets="1 3 4 5 6 7 9"
for i in $TSets; do for i in $TSets
do
echo " processing temperature profile at y/yMax of 0.$i" echo " processing temperature profile at y/yMax of 0.$i"
OF="$OFDATAROOT/y0.${i}_T.xy" OF="$OFDATAROOT/y0.${i}_T.xy"
@ -101,7 +105,8 @@ done
# generate velocity profiles # generate velocity profiles
USets="1 3 4 5 6 7 9" USets="1 3 4 5 6 7 9"
for i in $USets; do for i in $USets
do
echo " processing velocity profile at y/yMax of 0.$i" echo " processing velocity profile at y/yMax of 0.$i"
OF="$OFDATAROOT/y0.${i}_U.xy" OF="$OFDATAROOT/y0.${i}_U.xy"
@ -110,6 +115,6 @@ for i in $USets; do
createEpsU $i $OF $EXPT createEpsU $i $OF $EXPT
done done
echo "done" echo Done
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase cleanCase
cp 0/T.org 0/T cp 0/T.org 0/T
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
runApplication blockMesh runApplication blockMesh
runApplication setHotRoom runApplication setHotRoom
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -18,4 +19,4 @@ rm -rf constant/heater/polyMesh
rm -rf constant/leftSolid/polyMesh rm -rf constant/leftSolid/polyMesh
rm -rf constant/rightSolid/polyMesh rm -rf constant/rightSolid/polyMesh
# ----------------------------------------------------------------------------- # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -58,4 +60,4 @@ do
paraFoam -touch -region $i paraFoam -touch -region $i
done done
# ----------------------------------------------------------------------------- # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -18,4 +19,4 @@ rm -rf constant/heater/polyMesh
rm -rf constant/leftSolid/polyMesh rm -rf constant/leftSolid/polyMesh
rm -rf constant/rightSolid/polyMesh rm -rf constant/rightSolid/polyMesh
# ----------------------------------------------------------------------------- # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -55,4 +57,4 @@ do
paraFoam -touch -region $i paraFoam -touch -region $i
done done
# ----------------------------------------------------------------------------- # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ application=`getApplication`
./makeMesh ./makeMesh
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -7,3 +8,5 @@ cleanCase
rm -rf logs rm -rf logs
rm -f *.eps yPlus_vs_uPlus rm -f *.eps yPlus_vs_uPlus
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -9,7 +10,8 @@ exponents="2 3 4 5 6 7 8"
echo "# yPlus vs uPlus" > yPlus_vs_uPlus echo "# yPlus vs uPlus" > yPlus_vs_uPlus
for e in $exponents; do for e in $exponents
do
echo " Setting nu to 1e-$e" echo " Setting nu to 1e-$e"
sed "s/XXX/$e/g" constant/transportProperties.template \ sed "s/XXX/$e/g" constant/transportProperties.template \
@ -25,7 +27,8 @@ for e in $exponents; do
mv log.foamLog log.foamLog_$e mv log.foamLog log.foamLog_$e
if [ -e logs/yPlus_0 ]; then if [ -e logs/yPlus_0 ]
then
yPlus=`awk < logs/yPlus_0 'END{print $2}'` yPlus=`awk < logs/yPlus_0 'END{print $2}'`
uPlus=`awk < logs/uPlus_0 'END{print $2}'` uPlus=`awk < logs/uPlus_0 'END{print $2}'`
@ -39,7 +42,8 @@ done
# create validation plot # create validation plot
# test if gnuplot exists on the system # test if gnuplot exists on the system
type -P gnuplot &>/dev/null || { type -P gnuplot &>/dev/null || {
echo "gnuplot not found - skipping graph creation" >&2; exit 1; echo "gnuplot not found - skipping graph creation" >&2
exit 1
} }
graphName="OF_vs_ANAYTICAL.eps" graphName="OF_vs_ANAYTICAL.eps"
@ -65,5 +69,6 @@ gnuplot<<EOF
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6 "yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
EOF EOF
echo Done
echo "done" # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
runApplication $application runApplication $application
runApplication postChannel runApplication postChannel
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -6,17 +7,23 @@
keepCases="cavity cavityGrade cavityClipped elbow" keepCases="cavity cavityGrade cavityClipped elbow"
loseCases="cavityFine cavityHighRe" loseCases="cavityFine cavityHighRe"
for case in $keepCases for caseName in $keepCases
do do
(cd $case && foamCleanTutorials) (
cd $caseName || exit
if [ "$case" = "elbow" ] foamCleanTutorials
if [ "$caseName" = elbow ]
then then
rm -rf $case/fluentInterface rm -rf fluentInterface
fi fi
)
done done
for case in $loseCases for caseName in $loseCases
do do
removeCase $case removeCase $caseName
done done
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,34 +9,34 @@ application="icoFoam"
cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped" cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped"
runMapFields () runMapFields()
{ {
echo "Running mapFields from $1 to $2" echo "Running mapFields from $1 to $2"
mapFields $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1 mapFields $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1
} }
runMapFieldsConsistent () runMapFieldsConsistent()
{ {
echo "Running mapFields from $1 to $2" echo "Running mapFields from $1 to $2"
mapFields $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1 mapFields $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1
} }
runFluentMeshToFoam () runFluentMeshToFoam()
{ {
echo "fluentMeshToFoam: converting mesh $2" echo "fluentMeshToFoam: converting mesh $2"
fluentMeshToFoam $2 -case $1 > $1/log.fluentMeshToFoam 2>&1 fluentMeshToFoam $2 -case $1 > $1/log.fluentMeshToFoam 2>&1
} }
copySolutionDirs () copySolutionDirs()
{ {
echo "Copying $2/0* directory to $1" echo "Copying $2/0* directory to $1"
cp -r $2/0* $1 cp -r $2/0* $1
} }
setCavityFine () setCavityFine()
{ {
blockMeshDict="$case/constant/polyMesh/blockMeshDict" blockMeshDict="$caseName/constant/polyMesh/blockMeshDict"
controlDict="$case/system/controlDict" controlDict="$caseName/system/controlDict"
sed s/"20 20 1"/"41 41 1"/g $blockMeshDict > temp.$$ sed s/"20 20 1"/"41 41 1"/g $blockMeshDict > temp.$$
mv temp.$$ $blockMeshDict mv temp.$$ $blockMeshDict
sed \ sed \
@ -47,11 +49,11 @@ setCavityFine ()
mv temp.$$ $controlDict mv temp.$$ $controlDict
} }
setCavityHighRe () setCavityHighRe()
{ {
echo "Setting cavityHighRe to generate a secondary vortex" echo "Setting cavityHighRe to generate a secondary vortex"
controlDict="$case/system/controlDict" controlDict="$caseName/system/controlDict"
transportProperties="$case/constant/transportProperties" transportProperties="$caseName/constant/transportProperties"
sed \ sed \
-e s/"\(startFrom[ \t]*\) startTime;"/"\1 latestTime;"/g \ -e s/"\(startFrom[ \t]*\) startTime;"/"\1 latestTime;"/g \
-e s/"\(endTime[ \t]*\) 0.5;"/"\1 2.0;"/g \ -e s/"\(endTime[ \t]*\) 0.5;"/"\1 2.0;"/g \
@ -61,47 +63,53 @@ setCavityHighRe ()
mv temp.$$ $transportProperties mv temp.$$ $transportProperties
} }
for case in $cavityCases
for caseName in $cavityCases
do do
if [ "$case" = "cavityFine" ] if [ "$caseName" = cavityFine ]
then then
cloneCase cavity $case cloneCase cavity $caseName
setCavityFine setCavityFine
fi fi
if [ "$case" = "cavityHighRe" ] if [ "$caseName" = cavityHighRe ]
then then
cloneCase cavity $case cloneCase cavity $caseName
setCavityHighRe setCavityHighRe
copySolutionDirs $case cavity copySolutionDirs $caseName cavity
fi fi
(cd $case && runApplication blockMesh) ( cd $caseName && runApplication blockMesh )
#
if [ "$case" = "cavityFine" -o "$case" = "cavityGrade" ]
then
runMapFieldsConsistent $previousCase $case
fi
if [ "$case" = "cavityClipped" ] case "$caseName" in
then cavityFine | cavityGrade)
cp -r $case/0 $case/0.5 runMapFieldsConsistent $previousCase $caseName
runMapFields cavity $case ;;
if [ ".`grep nonuniform $case/0.5/U`" != "." ] cavityClipped)
cp -r $caseName/0 $caseName/0.5
runMapFields cavity $caseName
if [ ".`grep nonuniform $caseName/0.5/U`" != "." ]
then then
sed -f resetFixedWallsScr $case/0.5/U > $case/0.5/U.temp sed -f resetFixedWallsScr $caseName/0.5/U > $caseName/0.5/U.temp
mv $case/0.5/U.temp $case/0.5/U mv $caseName/0.5/U.temp $caseName/0.5/U
fi fi
fi ;;
# esac
previousCase="$case"
# previousCase="$caseName"
(cd $case && runApplication $application) ( cd $caseName && runApplication $application )
done done
# elbow case for testing Fluent-FOAM conversion tools # elbow case for testing Fluent-FOAM conversion tools
runFluentMeshToFoam elbow elbow/elbow.msh runFluentMeshToFoam elbow elbow/elbow.msh
(cd elbow && runApplication $application)
(cd elbow && runApplication foamMeshToFluent) (
(cd elbow && runApplication foamDataToFluent) cd elbow || exit
runApplication $application
runApplication foamMeshToFluent
runApplication foamDataToFluent
)
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -8,3 +10,5 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
runApplication changeDictionary runApplication changeDictionary
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Clean time folders only # Clean time folders only
rm -rf *[1-9]* rm -rf *[1-9]*
rm -f log.* 2>/dev/null rm -f log.* 2>/dev/null
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -6,3 +7,5 @@
application=`getApplication` application=`getApplication`
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -6,3 +8,4 @@ runApplication blockMesh
runApplication snappyHexMesh -overwrite runApplication snappyHexMesh -overwrite
runApplication simpleFoam runApplication simpleFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -12,3 +13,5 @@ runApplication blockMesh
runApplication cellSet runApplication cellSet
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -13,3 +14,5 @@ rm -rf postProcessing
# copy 0.org to 0 # copy 0.org to 0
cp -r 0.org 0 cp -r 0.org 0
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -22,3 +23,5 @@ createBaffles cycLeft cycLeft -overwrite >& log.createBaffles1
createBaffles cycRight cycRight -overwrite >& log.createBaffles2 createBaffles cycRight cycRight -overwrite >& log.createBaffles2
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -11,3 +13,4 @@ cp -r 0.org 0
cleanCase cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -11,3 +13,5 @@ rm -f 0/phi
# run the solver # run the solver
runApplication porousExplicitSourceReactingParcelFoam runApplication porousExplicitSourceReactingParcelFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
exit 0 exit 0
@ -7,3 +8,4 @@ exit 0
# This dummy Allrun script avoids meshing these cases twice. # This dummy Allrun script avoids meshing these cases twice.
# ----------------------------------------------------------------- end-of-file

View File

@ -1,17 +1,23 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd throttle (
cd throttle || exit
rm -rf constant/polyMesh/sets > /dev/null 2>&1 rm -rf constant/polyMesh/sets > /dev/null 2>&1
rm -rf 0/polyMesh > /dev/null 2>&1 rm -rf 0/polyMesh > /dev/null 2>&1
rm system/cellSetDict > /dev/null 2>&1 rm system/cellSetDict > /dev/null 2>&1
cleanCase cleanCase
cd .. )
(
cd throttle3D || exit
cd throttle3D
rm -rf constant/polyMesh/sets > /dev/null 2>&1 rm -rf constant/polyMesh/sets > /dev/null 2>&1
rm -rf 0 > /dev/null 2>&1 rm -rf 0 > /dev/null 2>&1
cp -r 0.org 0 cp -r 0.org 0
@ -19,5 +25,6 @@ cd throttle3D
rm -rf processor[0-9] > /dev/null 2>&1 rm -rf processor[0-9] > /dev/null 2>&1
cleanCase cleanCase
cd .. )
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -20,13 +21,19 @@ refineMeshByCellSet()
done done
} }
cd throttle
(
cd throttle || exit
runApplication blockMesh runApplication blockMesh
refineMeshByCellSet 1 2 3 refineMeshByCellSet 1 2 3
runApplication $application runApplication $application
cd .. )
(
cd throttle3D || exit
cd throttle3D
cp -r 0.org 0 cp -r 0.org 0
runApplication blockMesh runApplication blockMesh
@ -38,5 +45,6 @@ cd throttle3D
runApplication decomposePar runApplication decomposePar
runParallel $application 4 runParallel $application 4
runApplication reconstructPar runApplication reconstructPar
cd .. )
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -7,3 +8,5 @@ rm -rf constant/polyMesh/sets > /dev/null 2>&1
rm -rf 0/polyMesh > /dev/null 2>&1 rm -rf 0/polyMesh > /dev/null 2>&1
rm system/cellSetDict > /dev/null 2>&1 rm system/cellSetDict > /dev/null 2>&1
cleanCase cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -23,3 +24,4 @@ runApplication blockMesh
refineMeshByCellSet 1 2 3 refineMeshByCellSet 1 2 3
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -10,3 +12,5 @@ cp 0/alpha1.org 0/alpha1
cp 0/p.org 0/p cp 0/p.org 0/p
runApplication setFields runApplication setFields
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf processor* rm -rf processor*
rm -rf 0/p.gz 0/alpha1.gz rm -rf 0/p.gz 0/alpha1.gz
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -12,3 +14,5 @@ runApplication setFields
runApplication decomposePar runApplication decomposePar
runParallel $application 4 runParallel $application 4
runApplication reconstructPar runApplication reconstructPar
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ runApplication setSet -batch createObstacle.setSet
runApplication subsetMesh c0 -patch walls runApplication subsetMesh c0 -patch walls
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions # Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -8,3 +9,4 @@ rm -rf 0 > /dev/null 2>&1
cleanCase cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -24,4 +25,4 @@ cp -r 0.org 0 > /dev/null 2>&1
runApplication setFields runApplication setFields
runApplication $application runApplication $application
# ----------------------------------------------------------------------------- # ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf 0/alpha1.gz probes wallPressure pRefProbe rm -rf 0/alpha1.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ runApplication blockMesh
cp 0/alpha1.org 0/alpha1 cp 0/alpha1.org 0/alpha1
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf 0/alpha1.gz probes wallPressure pRefProbe rm -rf 0/alpha1.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ runApplication blockMesh
cp 0/alpha1.org 0/alpha1 cp 0/alpha1.org 0/alpha1
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf 0/alpha1.gz probes wallPressure pRefProbe rm -rf 0/alpha1.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ runApplication blockMesh
cp 0/alpha1.org 0/alpha1 cp 0/alpha1.org 0/alpha1
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf 0/alpha1.gz probes wallPressure pRefProbe rm -rf 0/alpha1.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ runApplication blockMesh
cp 0/alpha1.org 0/alpha1 cp 0/alpha1.org 0/alpha1
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf 0/alpha1.gz probes wallPressure pRefProbe rm -rf 0/alpha1.gz probes wallPressure pRefProbe
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +9,5 @@ runApplication blockMesh
cp 0/alpha1.org 0/alpha1 cp 0/alpha1.org 0/alpha1
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases foamCleanTutorials cases
rm -rf 0/alpha1.gz rm -rf 0/alpha1.gz
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,6 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -6,3 +8,5 @@ runApplication blockMesh
cp 0/alpha1.org 0/alpha1 cp 0/alpha1.org 0/alpha1
runApplication setFields runApplication setFields
runApplication interDyMFoam runApplication interDyMFoam
# ----------------------------------------------------------------- end-of-file

View File

@ -1,4 +1,5 @@
#!/bin/sh #!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions # Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions . $WM_PROJECT_DIR/bin/tools/RunFunctions
@ -7,3 +8,5 @@ application=`getApplication`
runApplication ./makeMesh runApplication ./makeMesh
runApplication $application runApplication $application
# ----------------------------------------------------------------- end-of-file

Some files were not shown because too many files have changed in this diff Show More