STYLE: cleanup handling of 0.org directories (in parallel)

- remove duplicate 0/ files from the repository
This commit is contained in:
Mark Olesen
2016-06-29 13:34:36 +02:00
parent 8bdc7e01bf
commit 820f809bd5
44 changed files with 51 additions and 1474 deletions

View File

@ -180,16 +180,29 @@ cloneCase()
fi fi
} }
# Overwrite 0/ with the contents of 0.org/ if it exists # Overwrite 0/ with the contents of 0.org/ if it exists.
# The -processor option to do the processor directories instead
#
restore0Dir() restore0Dir()
{ {
echo "Restore 0/ from 0.org/" if [ "$1" = "-processor" ]
if [ -d 0.org ]
then then
\rm -rf 0 echo "Restore 0/ from 0.org/ for processor directories"
\cp -r 0.org 0 > /dev/null 2>&1 [ -d 0.org ] || echo " Warning: no 0.org/ found"
# do nonetheless
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 > /dev/null 2>&1
else else
echo " Warning: no 0.org/ found" echo "Restore 0/ from 0.org/"
if [ -d 0.org ]
then
\rm -rf 0
\cp -r 0.org 0 > /dev/null 2>&1
else
echo " Warning: no 0.org/ found"
fi
fi fi
} }

View File

@ -4,7 +4,7 @@ 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
rm -rf 0 > /dev/null 2>&1 \rm -rf 0 > /dev/null 2>&1
cleanCase cleanCase

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 1;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -4,8 +4,9 @@ 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
# Remove 0.org/ copy
\rm -rf 0 \rm -rf 0
\cp -r 0.org 0
cleanCase cleanCase
cleanSamples cleanSamples

View File

@ -4,6 +4,7 @@ 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
restore0Dir
runApplication blockMesh runApplication blockMesh
runApplication setFields runApplication setFields
runApplication $(getApplication) runApplication $(getApplication)

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 1;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object magU;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type calculated;
value uniform 0;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
sides
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -4,9 +4,10 @@ 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 # Remove 0.org/ copy
\rm -rf 0 \rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples cleanSamples
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=$(getApplication) application=$(getApplication)
restore0Dir
runApplication blockMesh runApplication blockMesh
runApplication setFields runApplication setFields
runApplication $application runApplication $application

View File

@ -7,10 +7,10 @@
\cp ../lesFiles/fvS* ../lesFiles/controlDict system/ \cp ../lesFiles/fvS* ../lesFiles/controlDict system/
\cp ../lesFiles/turbulenceProperties constant/ \cp ../lesFiles/turbulenceProperties constant/
# $1 for special test cases? # restart from iteration 500
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1 \ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0 $1 \ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0
\ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform $1 \ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform
runParallel pisoFoam runParallel pisoFoam

View File

@ -20,9 +20,7 @@ runParallel snappyHexMesh -decomposeParDict system/decomposeParDict.ptscotch -pr
find . -type f -iname "*level*" -exec rm {} \; find . -type f -iname "*level*" -exec rm {} \;
#- set the initial fields #- set the initial fields
# $1 for special test cases? restore0Dir -processor
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 $1
runParallel renumberMesh -overwrite runParallel renumberMesh -overwrite
runParallel potentialFoam -initialiseUBCs runParallel potentialFoam -initialiseUBCs

View File

@ -17,8 +17,7 @@ runParallel snappyHexMesh -overwrite
# restore0Dir # restore0Dir
#- For parallel running: set the initial fields #- For parallel running: set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 restore0Dir -processor
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
runParallel patchSummary runParallel patchSummary
runParallel potentialFoam runParallel potentialFoam

View File

@ -8,17 +8,16 @@ cd ${0%/*} || exit 1 # Run from this directory
mkdir 0 mkdir 0
runApplication blockMesh runApplication blockMesh
cp system/decomposeParDict.hierarchical system/decomposeParDict \cp system/decomposeParDict.hierarchical system/decomposeParDict
runApplication decomposePar runApplication decomposePar
cp system/decomposeParDict.ptscotch system/decomposeParDict \cp system/decomposeParDict.ptscotch system/decomposeParDict
runParallel snappyHexMesh -overwrite runParallel snappyHexMesh -overwrite
find . -type f -iname "*level*" -exec rm {} \; find . -type f -iname "*level*" -exec rm {} \;
# - set the initial fields # - set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 restore0Dir -processor
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
runParallel topoSet runParallel topoSet
runParallel $(getApplication) runParallel $(getApplication)

View File

@ -1,73 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object G;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 0 -3 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type MarshakRadiation;
T T;
emissivityMode lookup;
emissivity uniform 1;
value uniform 0;
refValue uniform 0;
refGradient uniform 0;
valueFraction uniform 0;
}
inlet
{
type MarshakRadiation;
T T;
emissivityMode lookup;
emissivity uniform 1;
value uniform 0;
refValue uniform 0;
refGradient uniform 0;
valueFraction uniform 0;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object H2O;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 0;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object N2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.79;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 0.79;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object O2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.21;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 0.21;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 350;
boundaryField
{
walls
{
type fixedValue;
value uniform 400;
}
inlet
{
type fixedValue;
value uniform 350;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "1";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type noSlip;
}
inlet
{
type fixedValue;
value uniform (5 0 0);
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type compressible::alphatWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.0449;
boundaryField
{
walls
{
type epsilonWallFunction;
value uniform 0.0449;
}
inlet
{
type fixedValue;
value uniform 0.0449;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,61 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.0938;
boundaryField
{
walls
{
type kqRWallFunction;
value uniform 0.0938;
}
inlet
{
type fixedValue;
value uniform 0.0938;
}
outlet
{
type zeroGradient;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type nutkWallFunction;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -1,60 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "1";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
walls
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 100000;
}
cycLeft_half0
{
type cyclic;
}
cycRight_half0
{
type cyclic;
}
frontAndBack
{
type empty;
}
cycLeft_half1
{
type cyclic;
}
cycRight_half1
{
type cyclic;
}
}
// ************************************************************************* //

View File

@ -4,12 +4,9 @@ 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 # Remove 0.org/ copy and post-processing directories
# remove 0 directory and post-processing directories
\rm -rf 0 postProcessing \rm -rf 0 postProcessing
# restore 0/ directory from 0.org/ cleanCase
\cp -r 0.org 0
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,9 +4,7 @@ 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=$(getApplication) restore0Dir
# create mesh
runApplication blockMesh runApplication blockMesh
# create sets # create sets
@ -15,6 +13,6 @@ runApplication topoSet
# create baffles and fields # create baffles and fields
runApplication createBaffles -overwrite runApplication createBaffles -overwrite
runApplication $application runApplication $(getApplication)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object H2O;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.01;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
type inletOutlet;
inletValue uniform 0.0;
}
inletSides
{
type fixedValue;
value uniform 0.01;
}
inletCentral
{
type fixedValue;
value uniform 0.01;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 473.0;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
type inletOutlet;
inletValue uniform 473.0;
}
inletSides
{
type fixedValue;
value uniform 473.0;
}
inletCentral
{
type fixedValue;
value uniform 573.0;
}
}
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type flowRateInletVelocity;
rhoInlet 1.2;
massFlowRate constant 0.00379;
value uniform (0 14.68 0);
}
inletSides
{
type flowRateInletVelocity;
rhoInlet 1.2;
massFlowRate constant 0.00832;
value uniform (0 17.79 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
}
walls
{
type noSlip;
}
}
// ************************************************************************* //

View File

@ -1,54 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.99;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
walls
{
type zeroGradient;
}
outlet
{
type inletOutlet;
inletValue uniform 1.0;
}
inletSides
{
type fixedValue;
value uniform 0.99;
}
inletCentral
{
type fixedValue;
value uniform 0.99;
}
}
// ************************************************************************* //

View File

@ -1,56 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alphat;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type calculated;
value uniform 0;
}
inletSides
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type compressible::alphatWallFunction;
Prt 0.85;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,57 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 3.75e-9;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.15;
value uniform 3.75e-9;
}
inletSides
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.16;
value uniform 3.75e-9;
}
outlet
{
type inletOutlet;
inletValue uniform 3.75e-9;
}
walls
{
type kqRWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type calculated;
value uniform 0;
}
inletSides
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type nutkWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 4.5e-3;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type turbulentMixingLengthFrequencyInlet;
mixingLength 0.007;
k k;
value uniform 4.5e-3;
}
inletSides
{
type turbulentMixingLengthFrequencyInlet;
mixingLength 0.007;
k k;
value uniform 4.5e-3;
}
outlet
{
type inletOutlet;
inletValue uniform 4.5e-3;
}
walls
{
type omegaWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -1,52 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 100000;
boundaryField
{
back
{
type symmetryPlane;
}
front
{
type symmetryPlane;
}
inletCentral
{
type zeroGradient;
}
inletSides
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 100000;
}
walls
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -4,12 +4,9 @@ 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
# remove old time and post-processing directories # Remove old time, 0.org/ copy and post-processing directories
\rm -rf 0 *[1-9]* processor* postProcessing \rm -rf 0 *[1-9]* processor* postProcessing
# restore 0/ directory from 0.org/
\cp -r 0.org 0
cleanCase cleanCase
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,12 +4,9 @@ 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
# Remove 0.org/ copy and post-processing directories
\rm -rf 0 postProcessing
cleanCase cleanCase
# remove 0 directory
rm -rf 0
# remove post-processing directory
rm -rf postProcessing
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -4,12 +4,10 @@ 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=$(getApplication)
# Create mesh # Create mesh
runApplication blockMesh runApplication blockMesh
# Copy 0.org to 0 # Restore 0/ from 0.org/
restore0Dir restore0Dir
# Create sets # Create sets
@ -18,7 +16,7 @@ runApplication topoSet
# Create baffles and fields # Create baffles and fields
runApplication createBaffles -overwrite runApplication createBaffles -overwrite
runApplication $application runApplication $(getApplication)
#- RedistributePar to do decomposition #- RedistributePar to do decomposition
runParallel redistributePar -decompose -cellDist runParallel redistributePar -decompose -cellDist

View File

@ -23,9 +23,9 @@ runApplication blockMesh
# -------- # --------
runApplication decomposePar -force runApplication decomposePar -force
runParallel snappyHexMesh -overwrite runParallel snappyHexMesh -overwrite
\ls -d processor* | xargs -I {} rm -f ./{}/constant/polyMesh/refinementHistory \ls -d processor* | xargs -I {} \rm -f ./{}/constant/polyMesh/refinementHistory
# - set the initial fields # - set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 restore0Dir -processor
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
runParallel setFields runParallel setFields

View File

@ -7,8 +7,8 @@ cd ${0%/*} || exit 1 # Run from this directory
# Remove surface # Remove surface
\rm -f constant/triSurface/bullet.stl.gz \rm -f constant/triSurface/bullet.stl.gz
# Remove copy of 0.org # Remove 0.org/ copy
rm -rf 0 \rm -rf 0
cleanCase cleanCase