mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
tutorials: Simplified the Allrun and Allclean scripts
This commit is contained in:
@ -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
|
|
||||||
@ -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
|
||||||
@ -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
|
||||||
@ -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
|
||||||
@ -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
|
||||||
@ -4,20 +4,14 @@ 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
|
||||||
|
|
||||||
keepCases="cavity cavityGrade cavityClipped elbow"
|
keepCases="cavity cavityGrade cavityClipped"
|
||||||
loseCases="cavityFine cavityHighRe"
|
loseCases="cavityFine cavityHighRe"
|
||||||
|
|
||||||
for caseName in $keepCases
|
for caseName in $keepCases
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
cd $caseName || exit
|
cd $caseName || exit
|
||||||
|
|
||||||
foamCleanTutorials
|
foamCleanTutorials
|
||||||
|
|
||||||
if [ "$caseName" = elbow ]
|
|
||||||
then
|
|
||||||
rm -rf fluentInterface
|
|
||||||
fi
|
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -26,7 +20,4 @@ do
|
|||||||
removeCase $caseName
|
removeCase $caseName
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
(cd elbow && ./Allclean)
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
@ -86,8 +86,4 @@ do
|
|||||||
( cd $caseName && runApplication `getApplication` )
|
( cd $caseName && runApplication `getApplication` )
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
# elbow case for testing Fluent-FOAM conversion tools
|
|
||||||
(cd elbow && ./Allrun)
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-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
|
|
||||||
8856
tutorials/multiphase/interFoam/laminar/capillaryRise/0/alpha.water
Normal file
8856
tutorials/multiphase/interFoam/laminar/capillaryRise/0/alpha.water
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,12 +4,12 @@ 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
|
||||||
|
|
||||||
keepCases="damBreak capillaryRise mixerVessel2D"
|
keepCases="damBreak"
|
||||||
loseCases="damBreakFine"
|
loseCases="damBreakFine"
|
||||||
|
|
||||||
for case in $keepCases
|
for case in $keepCases
|
||||||
do
|
do
|
||||||
(cd $case && foamCleanTutorials && rm -rf 0/alpha.water)
|
(cd $case && foamCleanTutorials)
|
||||||
done
|
done
|
||||||
|
|
||||||
for case in $loseCases
|
for case in $loseCases
|
||||||
@ -43,13 +43,4 @@ cloneCase damBreak damBreakFine
|
|||||||
runApplication reconstructPar
|
runApplication reconstructPar
|
||||||
)
|
)
|
||||||
|
|
||||||
# Do damBreakPorousBaffle
|
|
||||||
(cd damBreakPorousBaffle && foamRunTutorials)
|
|
||||||
|
|
||||||
# Do weirOverflow
|
|
||||||
(cd weirOverflow && foamRunTutorials)
|
|
||||||
|
|
||||||
# Do waterChannel
|
|
||||||
(cd waterChannel && foamRunTutorials)
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
10
tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
Executable file
10
tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allclean
Executable 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
|
||||||
@ -1,18 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
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
|
||||||
|
|
||||||
for caseName in periodicCubeArgon periodicCubeWater
|
# Get application name
|
||||||
do
|
application=`getApplication`
|
||||||
(
|
|
||||||
cd $caseName || exit
|
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication mdInitialise
|
runApplication setFields
|
||||||
runApplication `getApplication`
|
runApplication $application
|
||||||
)
|
|
||||||
done
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
3119
tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/alpha.water
Normal file
3119
tutorials/multiphase/interFoam/laminar/mixerVessel2D/0/alpha.water
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,23 +4,12 @@ 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
|
||||||
|
|
||||||
keepCases="damBreak damBreakPorousBaffle weirOverflow waterChannel angledDuct"
|
keepCases="damBreak"
|
||||||
loseCases="damBreakFine"
|
loseCases="damBreakFine"
|
||||||
|
|
||||||
for case in $keepCases
|
for case in $keepCases
|
||||||
do
|
do
|
||||||
(cd $case && foamCleanTutorials)
|
(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
|
done
|
||||||
|
|
||||||
for case in $loseCases
|
for case in $loseCases
|
||||||
@ -4,11 +4,43 @@ 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
|
setDamBreakFine ()
|
||||||
application=`getApplication`
|
{
|
||||||
|
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 blockMesh
|
||||||
runApplication setFields
|
runApplication setFields
|
||||||
runApplication $application
|
runApplication decomposePar
|
||||||
|
runParallel `getApplication`
|
||||||
|
runApplication reconstructPar
|
||||||
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
10
tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allclean
Executable file
10
tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allclean
Executable 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
|
||||||
14
tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allrun
Executable file
14
tutorials/multiphase/interFoam/ras/damBreak/damBreak/Allrun
Executable 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
|
||||||
10
tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allclean
Executable file
10
tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/Allclean
Executable 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
|
||||||
Reference in New Issue
Block a user