Commit 820f809b authored by Mark Olesen's avatar Mark Olesen
Browse files

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

- remove duplicate 0/ files from the repository
parent 8bdc7e01
......@@ -180,16 +180,29 @@ cloneCase()
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()
{
echo "Restore 0/ from 0.org/"
if [ -d 0.org ]
if [ "$1" = "-processor" ]
then
\rm -rf 0
\cp -r 0.org 0 > /dev/null 2>&1
echo "Restore 0/ from 0.org/ for processor directories"
[ -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
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
}
......
......@@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -rf 0 > /dev/null 2>&1
\rm -rf 0 > /dev/null 2>&1
cleanCase
......
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
......@@ -4,8 +4,9 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
# Remove 0.org/ copy
\rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples
......
......@@ -4,6 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
restore0Dir
runApplication blockMesh
runApplication setFields
runApplication $(getApplication)
......
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
......@@ -4,9 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
# Remove 0.org/ copy
\rm -rf 0
\cp -r 0.org 0
cleanCase
cleanSamples
#------------------------------------------------------------------------------
......@@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
application=$(getApplication)
restore0Dir
runApplication blockMesh
runApplication setFields
runApplication $application
......
......@@ -7,10 +7,10 @@
\cp ../lesFiles/fvS* ../lesFiles/controlDict system/
\cp ../lesFiles/turbulenceProperties constant/
# $1 for special test cases?
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0 $1
\ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform $1
# restart from iteration 500
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \mv ./{}/500 ./{}/0
\ls -d processor* | xargs -I {} \rm -rf ./{}/0/uniform
runParallel pisoFoam
......
......@@ -20,9 +20,7 @@ runParallel snappyHexMesh -decomposeParDict system/decomposeParDict.ptscotch -pr
find . -type f -iname "*level*" -exec rm {} \;
#- set the initial fields
# $1 for special test cases?
\ls -d processor* | xargs -I {} \rm -rf ./{}/0 $1
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0 $1
restore0Dir -processor
runParallel renumberMesh -overwrite
runParallel potentialFoam -initialiseUBCs
......
......@@ -17,8 +17,7 @@ runParallel snappyHexMesh -overwrite
# restore0Dir
#- For parallel running: set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
restore0Dir -processor
runParallel patchSummary
runParallel potentialFoam
......
......@@ -8,17 +8,16 @@ cd ${0%/*} || exit 1 # Run from this directory
mkdir 0
runApplication blockMesh
cp system/decomposeParDict.hierarchical system/decomposeParDict
\cp system/decomposeParDict.hierarchical system/decomposeParDict
runApplication decomposePar
cp system/decomposeParDict.ptscotch system/decomposeParDict
\cp system/decomposeParDict.ptscotch system/decomposeParDict
runParallel snappyHexMesh -overwrite
find . -type f -iname "*level*" -exec rm {} \;
# - set the initial fields
\ls -d processor* | xargs -I {} \rm -rf ./{}/0
\ls -d processor* | xargs -I {} \cp -r 0.org ./{}/0
restore0Dir -processor
runParallel topoSet
runParallel $(getApplication)
......
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
/*--------------------------------*- 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;
}
}
// ************************************************************************* //
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment