tutorials: Simplified the Allrun and Allclean scripts

This commit is contained in:
Henry Weller
2016-02-14 18:32:34 +00:00
parent 7120fd2244
commit 4f38542d44
73 changed files with 12167 additions and 143 deletions

View File

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

View File

@ -0,0 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0/lagrangian 0/uniform
rm -f Ar-Ar
rm -f electrostatic
rm -f constant/idList
rm -rf constant/polyMesh/sets
cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +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 mdInitialise
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0/lagrangian 0/uniform
rm -f O-O
rm -f electrostatic
rm -f constant/idList
rm -rf constant/polyMesh/sets
cleanCase
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +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 mdInitialise
runApplication `getApplication`
# ----------------------------------------------------------------- end-of-file

View File

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

View File

@ -86,8 +86,4 @@ do
( cd $caseName && runApplication `getApplication` )
done
# elbow case for testing Fluent-FOAM conversion tools
(cd elbow && ./Allrun)
# ----------------------------------------------------------------- end-of-file

View File

@ -1,61 +0,0 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
setDamBreakFine ()
{
blockMeshDict="system/blockMeshDict"
controlDict="system/controlDict"
sed \
-e s/"23 8"/"46 10"/g \
-e s/"19 8"/"40 10"/g \
-e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
-e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
-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 \
$controlDict > temp.$$
mv temp.$$ $controlDict
}
# Do damBreak
(
cd damBreak || exit
runApplication blockMesh
cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`
)
# Clone case
cloneCase damBreak damBreakFine
(
cd damBreakFine || exit
# Modify case
setDamBreakFine
# And execute
runApplication blockMesh
cp ../damBreak/0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication decomposePar
runParallel `getApplication`
runApplication reconstructPar
)
# Do capillaryRise
(cd capillaryRise && foamRunTutorials)
# Do mixerVessel2D
(cd mixerVessel2D && foamRunTutorials)
# ----------------------------------------------------------------- end-of-file

File diff suppressed because it is too large Load Diff

View File

@ -4,12 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
keepCases="damBreak capillaryRise mixerVessel2D"
keepCases="damBreak"
loseCases="damBreakFine"
for case in $keepCases
do
(cd $case && foamCleanTutorials && rm -rf 0/alpha.water)
(cd $case && foamCleanTutorials)
done
for case in $loseCases

View File

@ -43,13 +43,4 @@ cloneCase damBreak damBreakFine
runApplication reconstructPar
)
# Do damBreakPorousBaffle
(cd damBreakPorousBaffle && foamRunTutorials)
# Do weirOverflow
(cd weirOverflow && foamRunTutorials)
# Do waterChannel
(cd waterChannel && foamRunTutorials)
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +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/alpha.water.org 0/alpha.water
# ----------------------------------------------------------------- end-of-file

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -4,23 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel angledDuct"
keepCases="damBreak"
loseCases="damBreakFine"
for case in $keepCases
do
(cd $case && foamCleanTutorials)
if [ "$case" = "damBreak" ]
then
cp $case/0/alpha.water.org $case/0/alpha.water
fi
if [ "$case" = "damBreakPorousBaffle" ]
then
cp $case/0/alpha.water.org $case/0/alpha.water
fi
done
for case in $loseCases

View File

@ -4,11 +4,43 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application=`getApplication`
setDamBreakFine ()
{
blockMeshDict="system/blockMeshDict"
controlDict="system/controlDict"
sed \
-e s/"23 8"/"46 10"/g \
-e s/"19 8"/"40 10"/g \
-e s/"23 42\(.*\) 1 1)"/"46 76\1 2 1)"/g \
-e s/"4 42\(.*\) 1 1)"/"4 76\1 2 1)"/g \
-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 \
$controlDict > temp.$$
mv temp.$$ $controlDict
}
# Do damBreak
(cd damBreak && foamRunTutorials)
# Clone case
cloneCase damBreak damBreakFine
(
cd damBreakFine || exit
# Modify case
setDamBreakFine
cp ../damBreak/0/alpha.water.org 0/alpha.water
# And execute
runApplication blockMesh
runApplication setFields
runApplication $application
runApplication decomposePar
runParallel `getApplication`
runApplication reconstructPar
)
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
leftWall
{
type zeroGradient;
}
rightWall
{
type zeroGradient;
}
lowerWall
{
type zeroGradient;
}
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
defaultFaces
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +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/alpha.water.org 0/alpha.water
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,14 @@
#!/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`
runApplication blockMesh
runApplication setFields
runApplication $application
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +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/alpha.water.org 0/alpha.water
# ----------------------------------------------------------------- end-of-file