mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more consistent shell style in tutorial run/clean scripts
This commit is contained in:
@ -36,7 +36,8 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# logReport <logfile>
|
||||
# Extracts useful info from log file.
|
||||
logReport () {
|
||||
logReport()
|
||||
{
|
||||
caseName=`dirname $1 | sed s/"\(.*\)\.\/"/""/g`
|
||||
app=`echo $1 | sed s/"\(.*\)\."/""/g`
|
||||
appAndCase="Application $app - case $caseName"
|
||||
@ -74,19 +75,18 @@ foamRunTutorials cases
|
||||
# Analyse all log files
|
||||
rm testLoopReport > /dev/null 2>&1 &
|
||||
touch testLoopReport
|
||||
|
||||
for appDir in *
|
||||
do
|
||||
if [ -d $appDir ]
|
||||
then
|
||||
(
|
||||
cd $appDir
|
||||
for log in `find . -name "log.*" | xargs ls -rt`
|
||||
do
|
||||
logReport $log >> ../testLoopReport
|
||||
done
|
||||
echo "" >> ../testLoopReport
|
||||
)
|
||||
fi
|
||||
(
|
||||
[ -d $appDir ] && cd $appDir || exit
|
||||
|
||||
for log in `find . -name "log.*" | xargs ls -rt`
|
||||
do
|
||||
logReport $log >> ../testLoopReport
|
||||
done
|
||||
echo "" >> ../testLoopReport
|
||||
)
|
||||
done
|
||||
|
||||
find . -name "log.*" -exec cat {} \; >> logs
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
#------------------------------------------------------------------------------
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
usage() {
|
||||
usage()
|
||||
{
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
@ -49,7 +50,8 @@ USAGE
|
||||
}
|
||||
|
||||
|
||||
setDefaultFvSchemes() {
|
||||
setDefaultFvSchemes()
|
||||
{
|
||||
cat<<EOF
|
||||
gradSchemes { default Gauss linear; }
|
||||
divSchemes
|
||||
@ -126,8 +128,12 @@ eval set -- "$OPTS"
|
||||
while [ $1 != -- ]
|
||||
do
|
||||
case $1 in
|
||||
-d) DEFAULT_SCHEMES=1;;
|
||||
-h) usage;;
|
||||
-d)
|
||||
DEFAULT_SCHEMES=1
|
||||
;;
|
||||
-h)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,3 +7,5 @@
|
||||
cleanCase
|
||||
rm -rf 0
|
||||
cp -r 0.org 0
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -9,3 +11,5 @@ runApplication blockMesh
|
||||
runApplication boxTurb
|
||||
runApplication $application
|
||||
runApplication enstrophy
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf Fieldview > /dev/null 2>&1
|
||||
rm -rf EnSight > /dev/null 2>&1
|
||||
rm -rf EnSight Ensight Fieldview > /dev/null 2>&1
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -20,3 +22,5 @@ runAnsysToFoam flange.ans 0.001
|
||||
runApplication $application
|
||||
runApplication foamToFieldview9
|
||||
runApplication foamToEnsight
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,18 +1,25 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cd cylinder
|
||||
(
|
||||
cd cylinder || exit
|
||||
|
||||
cleanCase
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
cp -r 0.org 0
|
||||
wclean analyticalCylinder
|
||||
cd ..
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
cd pitzDaily || exit
|
||||
|
||||
cd pitzDaily
|
||||
cleanCase
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
cp -r 0.org 0
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -9,3 +11,5 @@ runApplication $application
|
||||
compileApplication analyticalCylinder
|
||||
runApplication analyticalCylinder
|
||||
runApplication streamFunction
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication streamFunction
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,12 +7,18 @@
|
||||
keepCases="moriyoshiHomogeneous"
|
||||
loseCases="moriyoshiHomogeneousPart2"
|
||||
|
||||
for case in $keepCases
|
||||
for caseName in $keepCases
|
||||
do
|
||||
(cd $case && foamCleanTutorials)
|
||||
(
|
||||
cd $caseName || exit
|
||||
|
||||
foamCleanTutorials
|
||||
)
|
||||
done
|
||||
|
||||
for case in $loseCases
|
||||
for caseName in $loseCases
|
||||
do
|
||||
removeCase $case
|
||||
removeCase $caseName
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="XiFoam"
|
||||
|
||||
setControlDict () {
|
||||
setControlDict()
|
||||
{
|
||||
controlDict="system/controlDict"
|
||||
|
||||
sed \
|
||||
-e s/"\(deltaT[ \t]*\) 5e-06;"/"\1 1e-05;"/g \
|
||||
-e s/"\(endTime[ \t]*\) 0.005;"/"\1 0.015;"/g \
|
||||
@ -15,15 +19,20 @@ setControlDict () {
|
||||
mv temp.$$ $controlDict
|
||||
}
|
||||
|
||||
|
||||
# Do moriyoshiHomogeneous
|
||||
(cd moriyoshiHomogeneous && foamRunTutorials)
|
||||
( cd moriyoshiHomogeneous && foamRunTutorials )
|
||||
|
||||
# Clone case
|
||||
cloneCase moriyoshiHomogeneous moriyoshiHomogeneousPart2
|
||||
|
||||
# Modify and execute
|
||||
cd moriyoshiHomogeneousPart2
|
||||
(
|
||||
cd moriyoshiHomogeneousPart2 || exit
|
||||
|
||||
cp -r ../moriyoshiHomogeneous/0.005 .
|
||||
setControlDict
|
||||
runApplication $application
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -8,3 +9,5 @@ rm -rf 0
|
||||
cp system/controlDict.1st system/controlDict
|
||||
cleanCase
|
||||
mv temp180 ./-180
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,32 +1,42 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runKivaToFoam ()
|
||||
runKivaToFoam()
|
||||
{
|
||||
if [ -f $1/log.kivaToFoam ] ; then
|
||||
echo "kivaToFoam already run on $1: remove log file to run"
|
||||
if [ -f log.kivaToFoam ]
|
||||
then
|
||||
echo "kivaToFoam already run: remove log file to run"
|
||||
else
|
||||
echo "kivaToFoam: converting kiva file"
|
||||
kivaToFoam -case $1 -file $2 > $1/log.kivaToFoam 2>&1
|
||||
kivaToFoam -file $1 > log.kivaToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
restartApplication ()
|
||||
|
||||
restartApplication()
|
||||
{
|
||||
if [ -f $2/log-2.$1 ] ; then
|
||||
echo "$1 already run on $2: remove log file to run"
|
||||
if [ -f log-2.$1 ]
|
||||
then
|
||||
echo "$1 already run: remove log file to run"
|
||||
else
|
||||
echo "Running $1 on $2"
|
||||
$1 -case $2 > $2/log-2.$1 2>&1
|
||||
echo "Running $1"
|
||||
$1 > log-2.$1 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
runKivaToFoam . otape17
|
||||
|
||||
runKivaToFoam otape17
|
||||
|
||||
cp system/controlDict.1st system/controlDict
|
||||
runApplication $application
|
||||
|
||||
cp system/controlDict.2nd system/controlDict
|
||||
restartApplication $application .
|
||||
restartApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -10,4 +12,4 @@ runApplication createPatch -overwrite
|
||||
# Run
|
||||
runApplication fireFoam
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -12,19 +13,25 @@ LadenburgJet60psi \
|
||||
biconic25-55Run35 \
|
||||
"
|
||||
|
||||
for case in $cases
|
||||
for caseName in $cases
|
||||
do
|
||||
if [ "$case" = "shockTube" ]
|
||||
(
|
||||
cd $caseName || exit
|
||||
|
||||
if [ "$caseName" = shockTube ]
|
||||
then
|
||||
rm -rf $case/0
|
||||
cp -r $case/0.org $case/0
|
||||
rm -rf 0
|
||||
cp -r 0.org 0
|
||||
fi
|
||||
|
||||
(cd $case && foamCleanTutorials && cleanSamples)
|
||||
foamCleanTutorials && cleanSamples
|
||||
|
||||
if [ "$case" = "biconic25-55Run35" ]
|
||||
if [ "$caseName" = "biconic25-55Run35" ]
|
||||
then
|
||||
rm -rf $case/constant/polyMesh/boundary
|
||||
wclean $case/datToFoam
|
||||
rm -rf constant/polyMesh/boundary
|
||||
wclean datToFoam
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -14,26 +16,30 @@ LadenburgJet60psi \
|
||||
biconic25-55Run35 \
|
||||
"
|
||||
|
||||
moveTimeMeshToConstant ()
|
||||
moveTimeMeshToConstant()
|
||||
{
|
||||
DT=`foamInfoExec -times | tail -1`
|
||||
if [ "$DT" != 0 ] ; then
|
||||
if [ "$DT" != 0 ]
|
||||
then
|
||||
mv ${DT}/polyMesh/* constant/polyMesh
|
||||
rm -rf ${DT}
|
||||
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
|
||||
runApplication datToFoam grid256.dat
|
||||
|
||||
@ -46,9 +52,11 @@ do
|
||||
mv $CONST/polyMesh/boundary $CONST/polyMesh/boundary.bak
|
||||
sed -f $CONST/wedgeScr $CONST/polyMesh/boundary.bak > $CONST/polyMesh/boundary
|
||||
rm $CONST/polyMesh/boundary.bak
|
||||
;;
|
||||
esac
|
||||
|
||||
cd ..
|
||||
fi
|
||||
#
|
||||
(cd $case && runApplication $application)
|
||||
runApplication $application
|
||||
)
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,43 +1,54 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
#
|
||||
# FUNCTIONS
|
||||
#
|
||||
printUsage () {
|
||||
cat <<EOF
|
||||
Usage: $0 [options]
|
||||
Runs a set of samples across the cone face and concatenates output files
|
||||
usage()
|
||||
{
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
|
||||
Options are:
|
||||
-l -latestTime option for sample
|
||||
-h help
|
||||
EOF
|
||||
cat<<USAGE
|
||||
Usage: ${0##*/} [OPTION]
|
||||
|
||||
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 $*`
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Aborting due to invalid option"
|
||||
printUsage
|
||||
exit 1
|
||||
fi
|
||||
[ $? -eq 0 ] || usage "Aborting due to invalid option"
|
||||
|
||||
eval set -- "$OPTS"
|
||||
while [ $1 != -- ]; do
|
||||
while [ $1 != -- ]
|
||||
do
|
||||
case $1 in
|
||||
-l) LATEST_TIME="-latestTime";;
|
||||
-h) printUsage; exit 1;;
|
||||
-l)
|
||||
timeOpt="-latestTime"
|
||||
;;
|
||||
-h)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
sample ${LATEST_TIME}
|
||||
sample $timeOpt
|
||||
SDIR="sets"
|
||||
LSDIR=`ls $SDIR | head -1`
|
||||
EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
|
||||
FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
|
||||
for d in $SDIR/*
|
||||
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
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -9,3 +11,5 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,3 +7,5 @@
|
||||
rm -rf 0
|
||||
cp -r 0.org 0
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -7,3 +8,5 @@ cleanCase
|
||||
rm -rf 0
|
||||
cp -r 0.org 0
|
||||
cleanSamples
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -9,3 +11,5 @@ runApplication setFields
|
||||
runApplication $application
|
||||
runApplication foamCalc mag U
|
||||
runApplication sample
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runStarToFoam ()
|
||||
runStarToFoam()
|
||||
{
|
||||
if [ -f log.star3ToFoam -o -f log.starToFoam ]
|
||||
then
|
||||
@ -24,3 +26,5 @@ rm temp
|
||||
runApplication $application
|
||||
|
||||
# end-of-file
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
removeCase decompressionTankFine
|
||||
foamCleanTutorials cases
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="sonicLiquidFoam"
|
||||
|
||||
setDecompressionTankFine ()
|
||||
setDecompressionTankFine()
|
||||
{
|
||||
blockMeshDict="$1/constant/polyMesh/blockMeshDict"
|
||||
controlDict="$1/system/controlDict"
|
||||
blockMeshDict="constant/polyMesh/blockMeshDict"
|
||||
controlDict="system/controlDict"
|
||||
|
||||
sed \
|
||||
-e s/"30 20"/"120 80"/g \
|
||||
-e s/"30 5"/"120 20"/g \
|
||||
@ -16,6 +19,7 @@ setDecompressionTankFine ()
|
||||
-e s/"30 95"/"120 380"/g \
|
||||
$blockMeshDict > temp.$$
|
||||
mv temp.$$ $blockMeshDict
|
||||
|
||||
sed \
|
||||
-e s/"\(deltaT[ \t]*\) 5e-07;"/"\1 1e-07;"/g \
|
||||
-e s/"\(endTime[ \t]*\) 0.00025;"/"\1 0.00015;"/g \
|
||||
@ -23,16 +27,22 @@ setDecompressionTankFine ()
|
||||
mv temp.$$ $controlDict
|
||||
}
|
||||
|
||||
|
||||
# Do decompressionTank
|
||||
(cd decompressionTank && foamRunTutorials)
|
||||
( cd decompressionTank && foamRunTutorials )
|
||||
|
||||
# Clone case
|
||||
cloneCase decompressionTank decompressionTankFine
|
||||
|
||||
cd decompressionTankFine
|
||||
(
|
||||
cd decompressionTankFine || exit
|
||||
|
||||
# Modify case
|
||||
setDecompressionTankFine .
|
||||
setDecompressionTankFine
|
||||
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication dsmcInitialise
|
||||
runApplication dsmcFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication dsmcInitialise
|
||||
runApplication dsmcFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ runParallel dsmcInitialise 4
|
||||
runParallel dsmcFoam 4
|
||||
runApplication reconstructPar -noLagrangian
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf 0/lagrangian 0/dsmcSigmaTcRMax
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ runParallel dsmcInitialise 4
|
||||
runParallel dsmcFoam 4
|
||||
runApplication reconstructPar -noLagrangian
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,22 +1,30 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cd periodicCubeArgon
|
||||
(
|
||||
cd periodicCubeArgon || exit
|
||||
|
||||
rm -rf 0/*
|
||||
rm -f Ar-Ar
|
||||
rm -f electrostatic
|
||||
rm -f constant/idList
|
||||
rm -rf constant/polyMesh/sets
|
||||
cleanCase
|
||||
cd ..
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
cd periodicCubeWater || exit
|
||||
|
||||
cd periodicCubeWater
|
||||
rm -rf 0/*
|
||||
rm -f O-O
|
||||
rm -f electrostatic
|
||||
rm -f constant/idList
|
||||
rm -rf constant/polyMesh/sets
|
||||
cleanCase
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,18 +1,20 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="mdEquilibrationFoam"
|
||||
|
||||
cd periodicCubeArgon
|
||||
runApplication blockMesh
|
||||
runApplication mdInitialise
|
||||
runApplication $application
|
||||
cd ..
|
||||
for caseName in periodicCubeArgon periodicCubeWater
|
||||
do
|
||||
(
|
||||
cd $caseName || exit
|
||||
|
||||
cd periodicCubeWater
|
||||
runApplication blockMesh
|
||||
runApplication mdInitialise
|
||||
runApplication $application
|
||||
cd ..
|
||||
)
|
||||
done
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,3 +7,5 @@
|
||||
rm -rf constant/polyMesh/sets
|
||||
rm -rf processor[0-9]
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -13,3 +15,5 @@ runParallel mdInitialise 4
|
||||
runParallel $application 4
|
||||
|
||||
runApplication reconstructPar
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,14 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
(cd hartmann && cleanCase)
|
||||
(cd hartmann && cleanSamples)
|
||||
(
|
||||
cd hartmann || exit
|
||||
|
||||
cleanCase
|
||||
cleanSamples
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,11 +1,19 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="mhdFoam"
|
||||
|
||||
(cd hartmann && runApplication blockMesh)
|
||||
(cd hartmann && runApplication $application)
|
||||
(cd hartmann && runApplication foamCalc components U)
|
||||
(cd hartmann && runApplication sample)
|
||||
(
|
||||
cd hartmann || exit
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication foamCalc components U
|
||||
runApplication sample
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -6,3 +8,4 @@ runApplication blockMesh
|
||||
runApplication snappyHexMesh -overwrite
|
||||
runApplication buoyantBoussinesqSimpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,3 +7,5 @@
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
wclean setHotRoom
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -9,3 +11,5 @@ compileApplication setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf sets
|
||||
(cd validation && rm -f *.eps)
|
||||
rm -f validation/*.eps
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,4 +10,7 @@ application="buoyantSimpleFoam"
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication sample -latestTime
|
||||
(cd validation && ./createGraphs)
|
||||
|
||||
( cd validation && ./createGraphs )
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
createEpsT() {
|
||||
createEpsT()
|
||||
{
|
||||
index=$1
|
||||
OF=$2
|
||||
EXPT=$3
|
||||
@ -54,7 +55,8 @@ EOF
|
||||
}
|
||||
|
||||
|
||||
createEpsU() {
|
||||
createEpsU()
|
||||
{
|
||||
index=$1
|
||||
OF=$2
|
||||
EXPT=$3
|
||||
@ -78,7 +80,8 @@ EOF
|
||||
|
||||
# test if gnuplot exists on the system
|
||||
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
|
||||
@ -89,7 +92,8 @@ EXPTDATAROOT=./exptData
|
||||
|
||||
# generate temperature profiles
|
||||
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"
|
||||
|
||||
OF="$OFDATAROOT/y0.${i}_T.xy"
|
||||
@ -101,7 +105,8 @@ done
|
||||
|
||||
# generate velocity profiles
|
||||
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"
|
||||
|
||||
OF="$OFDATAROOT/y0.${i}_U.xy"
|
||||
@ -110,6 +115,6 @@ for i in $USets; do
|
||||
createEpsU $i $OF $EXPT
|
||||
done
|
||||
|
||||
echo "done"
|
||||
echo Done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp 0/T.org 0/T
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom
|
||||
runApplication blockMesh
|
||||
runApplication setHotRoom
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -18,4 +19,4 @@ rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -58,4 +60,4 @@ do
|
||||
paraFoam -touch -region $i
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -18,4 +19,4 @@ rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -55,4 +57,4 @@ do
|
||||
paraFoam -touch -region $i
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -7,3 +9,5 @@ application=`getApplication`
|
||||
|
||||
./makeMesh
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -7,3 +8,5 @@ cleanCase
|
||||
|
||||
rm -rf logs
|
||||
rm -f *.eps yPlus_vs_uPlus
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $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
|
||||
|
||||
for e in $exponents; do
|
||||
for e in $exponents
|
||||
do
|
||||
echo " Setting nu to 1e-$e"
|
||||
|
||||
sed "s/XXX/$e/g" constant/transportProperties.template \
|
||||
@ -25,7 +27,8 @@ for e in $exponents; do
|
||||
|
||||
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}'`
|
||||
uPlus=`awk < logs/uPlus_0 'END{print $2}'`
|
||||
|
||||
@ -39,7 +42,8 @@ done
|
||||
# create validation plot
|
||||
# test if gnuplot exists on the system
|
||||
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"
|
||||
|
||||
@ -65,5 +69,6 @@ gnuplot<<EOF
|
||||
"yPlus_vs_uPlus" title "OpenFOAM" with points lt 1 pt 6
|
||||
EOF
|
||||
|
||||
echo Done
|
||||
|
||||
echo "done"
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication postChannel
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,17 +7,23 @@
|
||||
keepCases="cavity cavityGrade cavityClipped elbow"
|
||||
loseCases="cavityFine cavityHighRe"
|
||||
|
||||
for case in $keepCases
|
||||
for caseName in $keepCases
|
||||
do
|
||||
(cd $case && foamCleanTutorials)
|
||||
(
|
||||
cd $caseName || exit
|
||||
|
||||
if [ "$case" = "elbow" ]
|
||||
foamCleanTutorials
|
||||
|
||||
if [ "$caseName" = elbow ]
|
||||
then
|
||||
rm -rf $case/fluentInterface
|
||||
rm -rf fluentInterface
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
for case in $loseCases
|
||||
for caseName in $loseCases
|
||||
do
|
||||
removeCase $case
|
||||
removeCase $caseName
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,34 +9,34 @@ application="icoFoam"
|
||||
|
||||
cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped"
|
||||
|
||||
runMapFields ()
|
||||
runMapFields()
|
||||
{
|
||||
echo "Running mapFields from $1 to $2"
|
||||
mapFields $1 -case $2 -sourceTime latestTime > $2/log.mapFields 2>&1
|
||||
}
|
||||
|
||||
runMapFieldsConsistent ()
|
||||
runMapFieldsConsistent()
|
||||
{
|
||||
echo "Running mapFields from $1 to $2"
|
||||
mapFields $1 -case $2 -sourceTime latestTime -consistent > $2/log.mapFields 2>&1
|
||||
}
|
||||
|
||||
runFluentMeshToFoam ()
|
||||
runFluentMeshToFoam()
|
||||
{
|
||||
echo "fluentMeshToFoam: converting mesh $2"
|
||||
fluentMeshToFoam $2 -case $1 > $1/log.fluentMeshToFoam 2>&1
|
||||
}
|
||||
|
||||
copySolutionDirs ()
|
||||
copySolutionDirs()
|
||||
{
|
||||
echo "Copying $2/0* directory to $1"
|
||||
cp -r $2/0* $1
|
||||
}
|
||||
|
||||
setCavityFine ()
|
||||
setCavityFine()
|
||||
{
|
||||
blockMeshDict="$case/constant/polyMesh/blockMeshDict"
|
||||
controlDict="$case/system/controlDict"
|
||||
blockMeshDict="$caseName/constant/polyMesh/blockMeshDict"
|
||||
controlDict="$caseName/system/controlDict"
|
||||
sed s/"20 20 1"/"41 41 1"/g $blockMeshDict > temp.$$
|
||||
mv temp.$$ $blockMeshDict
|
||||
sed \
|
||||
@ -47,11 +49,11 @@ setCavityFine ()
|
||||
mv temp.$$ $controlDict
|
||||
}
|
||||
|
||||
setCavityHighRe ()
|
||||
setCavityHighRe()
|
||||
{
|
||||
echo "Setting cavityHighRe to generate a secondary vortex"
|
||||
controlDict="$case/system/controlDict"
|
||||
transportProperties="$case/constant/transportProperties"
|
||||
controlDict="$caseName/system/controlDict"
|
||||
transportProperties="$caseName/constant/transportProperties"
|
||||
sed \
|
||||
-e s/"\(startFrom[ \t]*\) startTime;"/"\1 latestTime;"/g \
|
||||
-e s/"\(endTime[ \t]*\) 0.5;"/"\1 2.0;"/g \
|
||||
@ -61,47 +63,53 @@ setCavityHighRe ()
|
||||
mv temp.$$ $transportProperties
|
||||
}
|
||||
|
||||
for case in $cavityCases
|
||||
|
||||
for caseName in $cavityCases
|
||||
do
|
||||
if [ "$case" = "cavityFine" ]
|
||||
if [ "$caseName" = cavityFine ]
|
||||
then
|
||||
cloneCase cavity $case
|
||||
cloneCase cavity $caseName
|
||||
setCavityFine
|
||||
fi
|
||||
|
||||
if [ "$case" = "cavityHighRe" ]
|
||||
if [ "$caseName" = cavityHighRe ]
|
||||
then
|
||||
cloneCase cavity $case
|
||||
cloneCase cavity $caseName
|
||||
setCavityHighRe
|
||||
copySolutionDirs $case cavity
|
||||
copySolutionDirs $caseName cavity
|
||||
fi
|
||||
|
||||
(cd $case && runApplication blockMesh)
|
||||
#
|
||||
if [ "$case" = "cavityFine" -o "$case" = "cavityGrade" ]
|
||||
then
|
||||
runMapFieldsConsistent $previousCase $case
|
||||
fi
|
||||
( cd $caseName && runApplication blockMesh )
|
||||
|
||||
if [ "$case" = "cavityClipped" ]
|
||||
then
|
||||
cp -r $case/0 $case/0.5
|
||||
runMapFields cavity $case
|
||||
if [ ".`grep nonuniform $case/0.5/U`" != "." ]
|
||||
case "$caseName" in
|
||||
cavityFine | cavityGrade)
|
||||
runMapFieldsConsistent $previousCase $caseName
|
||||
;;
|
||||
cavityClipped)
|
||||
cp -r $caseName/0 $caseName/0.5
|
||||
runMapFields cavity $caseName
|
||||
if [ ".`grep nonuniform $caseName/0.5/U`" != "." ]
|
||||
then
|
||||
sed -f resetFixedWallsScr $case/0.5/U > $case/0.5/U.temp
|
||||
mv $case/0.5/U.temp $case/0.5/U
|
||||
sed -f resetFixedWallsScr $caseName/0.5/U > $caseName/0.5/U.temp
|
||||
mv $caseName/0.5/U.temp $caseName/0.5/U
|
||||
fi
|
||||
fi
|
||||
#
|
||||
previousCase="$case"
|
||||
#
|
||||
(cd $case && runApplication $application)
|
||||
;;
|
||||
esac
|
||||
|
||||
previousCase="$caseName"
|
||||
( cd $caseName && runApplication $application )
|
||||
done
|
||||
|
||||
# elbow case for testing Fluent-FOAM conversion tools
|
||||
|
||||
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
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -8,3 +10,5 @@ application=`getApplication`
|
||||
runApplication blockMesh
|
||||
runApplication changeDictionary
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Clean time folders only
|
||||
|
||||
rm -rf *[1-9]*
|
||||
rm -f log.* 2>/dev/null
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -6,3 +7,5 @@
|
||||
application=`getApplication`
|
||||
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -6,3 +8,4 @@ runApplication blockMesh
|
||||
runApplication snappyHexMesh -overwrite
|
||||
runApplication simpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -12,3 +13,5 @@ runApplication blockMesh
|
||||
runApplication cellSet
|
||||
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -13,3 +14,5 @@ rm -rf postProcessing
|
||||
|
||||
# copy 0.org to 0
|
||||
cp -r 0.org 0
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -22,3 +23,5 @@ createBaffles cycLeft cycLeft -overwrite >& log.createBaffles1
|
||||
createBaffles cycRight cycRight -overwrite >& log.createBaffles2
|
||||
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
@ -11,3 +13,4 @@ cp -r 0.org 0
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -11,3 +13,5 @@ rm -f 0/phi
|
||||
|
||||
# run the solver
|
||||
runApplication porousExplicitSourceReactingParcelFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
exit 0
|
||||
|
||||
@ -7,3 +8,4 @@ exit 0
|
||||
|
||||
# This dummy Allrun script avoids meshing these cases twice.
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,17 +1,23 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cd throttle
|
||||
(
|
||||
cd throttle || exit
|
||||
|
||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||
rm -rf 0/polyMesh > /dev/null 2>&1
|
||||
rm system/cellSetDict > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
cd ..
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
cd throttle3D || exit
|
||||
|
||||
cd throttle3D
|
||||
rm -rf constant/polyMesh/sets > /dev/null 2>&1
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
cp -r 0.org 0
|
||||
@ -19,5 +25,6 @@ cd throttle3D
|
||||
rm -rf processor[0-9] > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -20,13 +21,19 @@ refineMeshByCellSet()
|
||||
done
|
||||
}
|
||||
|
||||
cd throttle
|
||||
|
||||
(
|
||||
cd throttle || exit
|
||||
|
||||
runApplication blockMesh
|
||||
refineMeshByCellSet 1 2 3
|
||||
runApplication $application
|
||||
cd ..
|
||||
)
|
||||
|
||||
|
||||
(
|
||||
cd throttle3D || exit
|
||||
|
||||
cd throttle3D
|
||||
cp -r 0.org 0
|
||||
|
||||
runApplication blockMesh
|
||||
@ -38,5 +45,6 @@ cd throttle3D
|
||||
runApplication decomposePar
|
||||
runParallel $application 4
|
||||
runApplication reconstructPar
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $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 system/cellSetDict > /dev/null 2>&1
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -23,3 +24,4 @@ runApplication blockMesh
|
||||
refineMeshByCellSet 1 2 3
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -10,3 +12,5 @@ cp 0/alpha1.org 0/alpha1
|
||||
cp 0/p.org 0/p
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf processor*
|
||||
rm -rf 0/p.gz 0/alpha1.gz
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -12,3 +14,5 @@ runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $application 4
|
||||
runApplication reconstructPar
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ runApplication setSet -batch createObstacle.setSet
|
||||
runApplication subsetMesh c0 -patch walls
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -8,3 +9,4 @@ rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -24,4 +25,4 @@ cp -r 0.org 0 > /dev/null 2>&1
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/alpha1.gz probes wallPressure pRefProbe
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/alpha1.gz probes wallPressure pRefProbe
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/alpha1.gz probes wallPressure pRefProbe
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/alpha1.gz probes wallPressure pRefProbe
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/alpha1.gz probes wallPressure pRefProbe
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -7,3 +9,5 @@ runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
foamCleanTutorials cases
|
||||
rm -rf 0/alpha1.gz
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
@ -6,3 +8,5 @@ runApplication blockMesh
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
runApplication setFields
|
||||
runApplication interDyMFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
@ -7,3 +8,5 @@ application=`getApplication`
|
||||
|
||||
runApplication ./makeMesh
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,17 +7,23 @@
|
||||
keepCases="damBreak"
|
||||
loseCases="damBreakFine"
|
||||
|
||||
for case in $keepCases
|
||||
for caseName in $keepCases
|
||||
do
|
||||
(cd $case && foamCleanTutorials)
|
||||
(
|
||||
cd $caseName || exit
|
||||
|
||||
if [ "$case" = "damBreak" ]
|
||||
foamCleanTutorials
|
||||
|
||||
if [ "$caseName" = damBreak ]
|
||||
then
|
||||
cp $case/0/alpha1.org $case/0/alpha1
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
for case in $loseCases
|
||||
for caseName in $loseCases
|
||||
do
|
||||
removeCase $case
|
||||
removeCase $caseName
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="interFoam"
|
||||
|
||||
setDamBreakFine ()
|
||||
setDamBreakFine()
|
||||
{
|
||||
blockMeshDict="constant/polyMesh/blockMeshDict"
|
||||
controlDict="system/controlDict"
|
||||
|
||||
sed \
|
||||
-e s/"23 8"/"46 10"/g \
|
||||
-e s/"19 8"/"40 10"/g \
|
||||
@ -17,6 +20,7 @@ setDamBreakFine ()
|
||||
-e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
|
||||
$blockMeshDict > temp.$$
|
||||
mv temp.$$ $blockMeshDict
|
||||
|
||||
sed \
|
||||
-e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
|
||||
-e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
|
||||
@ -25,23 +29,30 @@ setDamBreakFine ()
|
||||
}
|
||||
|
||||
# Do damBreak
|
||||
cd damBreak
|
||||
(
|
||||
cd damBreak || exit
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
cd ..
|
||||
)
|
||||
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
||||
cd damBreakFine
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
cp ../damBreak/0/alpha1.org 0/alpha1
|
||||
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $application 4
|
||||
runApplication reconstructPar
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,24 +1,31 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runRefineMesh ()
|
||||
runRefineMesh()
|
||||
{
|
||||
echo "Running refineMesh on $PWD"
|
||||
refineMesh -dict > log.refineMesh 2>&1
|
||||
}
|
||||
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
i=1
|
||||
if [ -f log.cellSet ] ; then
|
||||
i=3
|
||||
if [ -f log.cellSet ]
|
||||
then
|
||||
i=3
|
||||
fi
|
||||
while [ "$i" -lt 3 ] ; do
|
||||
if [ -f log.cellSet ] ; then
|
||||
|
||||
while [ "$i" -lt 3 ]
|
||||
do
|
||||
if [ -f log.cellSet ]
|
||||
then
|
||||
mv log.cellSet log.cellSet.1
|
||||
fi
|
||||
cp system/cellSetDict.${i} system/cellSetDict
|
||||
@ -31,3 +38,5 @@ done
|
||||
cp constant/polyMesh/boundary.org constant/polyMesh/boundary
|
||||
|
||||
runApplication $application
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
@ -6,17 +7,23 @@
|
||||
keepCases="damBreak"
|
||||
loseCases="damBreakFine"
|
||||
|
||||
for case in $keepCases
|
||||
for caseName in $keepCases
|
||||
do
|
||||
(cd $case && foamCleanTutorials)
|
||||
(
|
||||
cd $caseName || exit
|
||||
|
||||
if [ "$case" = "damBreak" ]
|
||||
foamCleanTutorials
|
||||
|
||||
if [ "$caseName" = damBreak ]
|
||||
then
|
||||
cp $case/0/alpha1.org $case/0/alpha1
|
||||
cp 0/alpha1.org 0/alpha1
|
||||
fi
|
||||
)
|
||||
done
|
||||
|
||||
for case in $loseCases
|
||||
for caseName in $loseCases
|
||||
do
|
||||
removeCase $case
|
||||
removeCase $caseName
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,14 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application="interFoam"
|
||||
|
||||
setDamBreakFine ()
|
||||
setDamBreakFine()
|
||||
{
|
||||
blockMeshDict="constant/polyMesh/blockMeshDict"
|
||||
controlDict="system/controlDict"
|
||||
|
||||
sed \
|
||||
-e s/"23 8"/"46 10"/g \
|
||||
-e s/"19 8"/"40 10"/g \
|
||||
@ -17,6 +20,7 @@ setDamBreakFine ()
|
||||
-e s/"19 42\(.*\) 1 1)"/"40 76\1 2 1)"/g \
|
||||
$blockMeshDict > temp.$$
|
||||
mv temp.$$ $blockMeshDict
|
||||
|
||||
sed \
|
||||
-e s/"\(deltaT[ \t]*\) 0.001;"/"\1 5e-04;"/g \
|
||||
-e s/"\(endTime[ \t]*\) 1;"/"\1 0.4;"/g \
|
||||
@ -25,19 +29,24 @@ setDamBreakFine ()
|
||||
}
|
||||
|
||||
# Do damBreak
|
||||
(cd damBreak && foamRunTutorials)
|
||||
( cd damBreak && foamRunTutorials )
|
||||
|
||||
# Clone case
|
||||
cloneCase damBreak damBreakFine
|
||||
|
||||
cd damBreakFine
|
||||
(
|
||||
cd damBreakFine || exit
|
||||
|
||||
# Modify case
|
||||
setDamBreakFine
|
||||
cp ../damBreak/0/alpha1.org 0/alpha1
|
||||
|
||||
# And execute
|
||||
runApplication blockMesh
|
||||
runApplication setFields
|
||||
runApplication decomposePar
|
||||
runParallel $application 4
|
||||
runApplication reconstructPar
|
||||
cd ..
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user