TUT: replace remaining templated thermoType
TUT: some simplification for multiWorld test STYLE: remove some editor junk
This commit is contained in:
parent
09aa3d8b43
commit
aca366d293
14
applications/test/multiWorld/Allclean
Executable file
14
applications/test/multiWorld/Allclean
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
for subcase in left right
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" && cleanCase
|
||||||
|
)
|
||||||
|
done
|
||||||
|
rm -f log.*
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
@ -4,11 +4,11 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Run serial
|
# Run serial
|
||||||
(cd left && runApplication blockMesh)
|
./Allrun.pre
|
||||||
(cd right && runApplication blockMesh)
|
|
||||||
mpirun -app ./mpirun_left_right.schema
|
mpirun -app ./mpirun_left_right.schema
|
||||||
|
|
||||||
## Run parallel
|
## Run parallel
|
||||||
|
# ./Allrun.pre-parallel
|
||||||
#(cd left && runApplication blockMesh)
|
#(cd left && runApplication blockMesh)
|
||||||
#(cd left && runApplication decomposePar)
|
#(cd left && runApplication decomposePar)
|
||||||
#(cd right && runApplication blockMesh)
|
#(cd right && runApplication blockMesh)
|
||||||
|
15
applications/test/multiWorld/Allrun.pre
Executable file
15
applications/test/multiWorld/Allrun.pre
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Create meshes
|
||||||
|
for subcase in left right
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" || exit
|
||||||
|
runApplication blockMesh
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
15
applications/test/multiWorld/Allrun.pre-parallel
Executable file
15
applications/test/multiWorld/Allrun.pre-parallel
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Create meshes
|
||||||
|
for subcase in left right
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" || exit
|
||||||
|
runApplication blockMesh
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
75
applications/test/multiWorld/common/system/controlDict
Normal file
75
applications/test/multiWorld/common/system/controlDict
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
|
||||||
|
DebugSwitches
|
||||||
|
{
|
||||||
|
// mappedPatchBase 1;
|
||||||
|
// syncObjects 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
application laplacianFoam;
|
||||||
|
|
||||||
|
startFrom startTime; //latestTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 50;
|
||||||
|
|
||||||
|
deltaT 1;
|
||||||
|
|
||||||
|
//writeControl runTime;
|
||||||
|
//writeInterval 0.1;
|
||||||
|
writeControl timeStep;
|
||||||
|
writeInterval 1;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
syncObjects
|
||||||
|
{
|
||||||
|
type syncObjects;
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
|
||||||
|
// Where is data located relative to runTime. Given as a filename
|
||||||
|
// with every '/' indicating a sub-objectRegistry w.r.t. runTime.
|
||||||
|
// Local data is under <root>/send/processorXXX. After execution
|
||||||
|
// data will be under the corresponding <root>/receive/processorYYY
|
||||||
|
// objectRegistry
|
||||||
|
//root "level0/level1/level2";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
28
applications/test/multiWorld/common/system/decomposeParDict
Normal file
28
applications/test/multiWorld/common/system/decomposeParDict
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
note "mesh decomposition control dictionary";
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 2;
|
||||||
|
|
||||||
|
method hierarchical;
|
||||||
|
|
||||||
|
coeffs
|
||||||
|
{
|
||||||
|
n (2 1 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
52
applications/test/multiWorld/common/system/fvSchemes
Normal file
52
applications/test/multiWorld/common/system/fvSchemes
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default steadyState; //Euler;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
grad(T) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
laplacian(DT,T) Gauss linear corrected;
|
||||||
|
laplacian(DTV,T) Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
35
applications/test/multiWorld/common/system/fvSolution
Normal file
35
applications/test/multiWorld/common/system/fvSolution
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
location "system";
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
T
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner DIC;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE
|
||||||
|
{
|
||||||
|
nNonOrthogonalCorrectors 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -1,75 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "system";
|
|
||||||
object controlDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
libs (utilityFunctionObjects);
|
|
||||||
|
|
||||||
DebugSwitches
|
|
||||||
{
|
|
||||||
// mappedPatchBase 1;
|
|
||||||
// syncObjects 1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
application laplacianFoam;
|
|
||||||
|
|
||||||
startFrom startTime; //latestTime;
|
|
||||||
|
|
||||||
startTime 0;
|
|
||||||
|
|
||||||
stopAt endTime;
|
|
||||||
|
|
||||||
endTime 50;
|
|
||||||
|
|
||||||
deltaT 1;
|
|
||||||
|
|
||||||
//writeControl runTime;
|
|
||||||
//writeInterval 0.1;
|
|
||||||
writeControl timeStep;
|
|
||||||
writeInterval 1;
|
|
||||||
|
|
||||||
purgeWrite 0;
|
|
||||||
|
|
||||||
writeFormat ascii;
|
|
||||||
|
|
||||||
writePrecision 6;
|
|
||||||
|
|
||||||
writeCompression off;
|
|
||||||
|
|
||||||
timeFormat general;
|
|
||||||
|
|
||||||
timePrecision 6;
|
|
||||||
|
|
||||||
runTimeModifiable true;
|
|
||||||
|
|
||||||
functions
|
|
||||||
{
|
|
||||||
syncObjects
|
|
||||||
{
|
|
||||||
type syncObjects;
|
|
||||||
libs (utilityFunctionObjects);
|
|
||||||
|
|
||||||
// Where is data located relative to runTime. Given as a filename
|
|
||||||
// with every '/' indicating a sub-objectRegistry w.r.t. runTime.
|
|
||||||
// Local data is under <root>/send/processorXXX. After execution
|
|
||||||
// data will be under the corresponding <root>/receive/processorYYY
|
|
||||||
// objectRegistry
|
|
||||||
//root "level0/level1/level2";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
applications/test/multiWorld/left/system/controlDict
Symbolic link
1
applications/test/multiWorld/left/system/controlDict
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/controlDict
|
@ -1,25 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
note "mesh decomposition control dictionary";
|
|
||||||
object decomposeParDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
//- The total number of domains (mandatory)
|
|
||||||
numberOfSubdomains 2;
|
|
||||||
|
|
||||||
//- The decomposition method (mandatory)
|
|
||||||
method hierarchical;
|
|
||||||
n (2 1 1);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
applications/test/multiWorld/left/system/decomposeParDict
Symbolic link
1
applications/test/multiWorld/left/system/decomposeParDict
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/decomposeParDict
|
@ -1,52 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "system";
|
|
||||||
object fvSchemes;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
ddtSchemes
|
|
||||||
{
|
|
||||||
default steadyState; //Euler;
|
|
||||||
}
|
|
||||||
|
|
||||||
gradSchemes
|
|
||||||
{
|
|
||||||
default Gauss linear;
|
|
||||||
grad(T) Gauss linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
divSchemes
|
|
||||||
{
|
|
||||||
default none;
|
|
||||||
}
|
|
||||||
|
|
||||||
laplacianSchemes
|
|
||||||
{
|
|
||||||
default none;
|
|
||||||
laplacian(DT,T) Gauss linear corrected;
|
|
||||||
laplacian(DTV,T) Gauss linear corrected;
|
|
||||||
}
|
|
||||||
|
|
||||||
interpolationSchemes
|
|
||||||
{
|
|
||||||
default linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
snGradSchemes
|
|
||||||
{
|
|
||||||
default corrected;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
applications/test/multiWorld/left/system/fvSchemes
Symbolic link
1
applications/test/multiWorld/left/system/fvSchemes
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSchemes
|
@ -1,35 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "system";
|
|
||||||
object fvSolution;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
solvers
|
|
||||||
{
|
|
||||||
T
|
|
||||||
{
|
|
||||||
solver PCG;
|
|
||||||
preconditioner DIC;
|
|
||||||
tolerance 1e-06;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SIMPLE
|
|
||||||
{
|
|
||||||
nNonOrthogonalCorrectors 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
applications/test/multiWorld/left/system/fvSolution
Symbolic link
1
applications/test/multiWorld/left/system/fvSolution
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSolution
|
@ -1,7 +1,2 @@
|
|||||||
-np 2 laplacianFoam -case ./left -world LEFT -parallel
|
-np 2 laplacianFoam -case left -world LEFT -parallel
|
||||||
-np 2 laplacianFoam -case ./right -world RIGHT -parallel
|
-np 2 laplacianFoam -case right -world RIGHT -parallel
|
||||||
|
|
||||||
#-np 1 xterm -font fixed -title processor0 -geometry 200x15+0+0 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor0.sh
|
|
||||||
#-np 1 xterm -font fixed -title processor1 -geometry 200x15+0+200 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor1.sh
|
|
||||||
#-np 1 xterm -font fixed -title processor2 -geometry 200x15+0+400 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor2.sh
|
|
||||||
#-np 1 xterm -font fixed -title processor3 -geometry 200x15+0+600 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor3.sh
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
-np 1 xterm -font fixed -title processor0 -geometry 200x15+0+0 -e ./run_left.sh
|
-np 1 xterm -font fixed -title left -geometry 200x15+0+0 -e ./run_world.sh left
|
||||||
-np 1 xterm -font fixed -title processor1 -geometry 200x15+0+200 -e ./run_right.sh
|
-np 1 xterm -font fixed -title right -geometry 200x15+0+200 -e ./run_world.sh right
|
||||||
|
@ -1 +1 @@
|
|||||||
../../left/system/controlDict
|
../../common/system/controlDict
|
@ -1 +1 @@
|
|||||||
../../left/system/decomposeParDict
|
../../common/system/decomposeParDict
|
@ -1 +1 @@
|
|||||||
../../left/system/fvSchemes
|
../../common/system/fvSchemes
|
@ -1 +1 @@
|
|||||||
../../left/system/fvSolution
|
../../common/system/fvSolution
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
laplacianFoam -case ./left -world LEFT 2>&1 | tee log.run_left
|
|
||||||
read dummy
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
laplacianFoam -case ./right -world RIGHT 2>&1 | tee log.run_right
|
|
||||||
read dummy
|
|
23
applications/test/multiWorld/run_world.sh
Executable file
23
applications/test/multiWorld/run_world.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
world="${1:?specify world/case}"
|
||||||
|
application="${2:-laplacianFoam}"
|
||||||
|
|
||||||
|
# case "$application" in
|
||||||
|
# (-test)
|
||||||
|
# application="Test-multiWorld1"
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
|
||||||
|
if [ -z "$application" ] || ! command -v "$application" > /dev/null
|
||||||
|
then
|
||||||
|
echo "No application: $application"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
|
||||||
|
|
||||||
|
"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase"
|
||||||
|
read dummy
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
@ -1,6 +1,6 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield |2011 OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
|
@ -4,19 +4,11 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Run serial
|
# Run serial
|
||||||
for subcase in left right
|
./Allrun.pre
|
||||||
do
|
|
||||||
(
|
|
||||||
cd "$subcase" || exit
|
|
||||||
runApplication blockMesh && restore0Dir
|
|
||||||
)
|
|
||||||
done
|
|
||||||
|
|
||||||
mpirun -app ./mpirun_left_right.schema
|
mpirun -app ./mpirun_left_right.schema
|
||||||
|
|
||||||
# Run with database
|
# Run with database
|
||||||
mv -f log.run_left log.run_left_direct
|
mv -f log.run_left* log.run_right*
|
||||||
mv -f log.run_right log.run_right_direct
|
|
||||||
|
|
||||||
for subcase in left right
|
for subcase in left right
|
||||||
do
|
do
|
||||||
@ -31,13 +23,7 @@ done
|
|||||||
mpirun -app ./mpirun_left_right.schema
|
mpirun -app ./mpirun_left_right.schema
|
||||||
|
|
||||||
## Run parallel
|
## Run parallel
|
||||||
## for subcase in left right
|
## ./Allrun.pre-parallel
|
||||||
## do
|
|
||||||
## (
|
|
||||||
## cd "$subcase" || exit
|
|
||||||
## runApplication blockMesh && runApplication decomposePar
|
|
||||||
## )
|
|
||||||
## done
|
|
||||||
## mpirun -app ./mpirun.schema
|
## mpirun -app ./mpirun.schema
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
15
tutorials/basic/laplacianFoam/multiWorld/Allrun.pre
Executable file
15
tutorials/basic/laplacianFoam/multiWorld/Allrun.pre
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Create meshes and initial fields
|
||||||
|
for subcase in left right
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" || exit
|
||||||
|
runApplication blockMesh && restore0Dir
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
15
tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel
Executable file
15
tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Create meshes and initial fields
|
||||||
|
for subcase in left right
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" || exit
|
||||||
|
runApplication blockMesh && restore0Dir && runApplication decomposePar
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
@ -0,0 +1,65 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object controlDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
|
||||||
|
application laplacianFoam;
|
||||||
|
|
||||||
|
startFrom startTime;
|
||||||
|
|
||||||
|
startTime 0;
|
||||||
|
|
||||||
|
stopAt endTime;
|
||||||
|
|
||||||
|
endTime 5;
|
||||||
|
|
||||||
|
deltaT 1;
|
||||||
|
|
||||||
|
writeControl timeStep;
|
||||||
|
writeInterval 1;
|
||||||
|
|
||||||
|
purgeWrite 0;
|
||||||
|
|
||||||
|
writeFormat ascii;
|
||||||
|
|
||||||
|
writePrecision 6;
|
||||||
|
|
||||||
|
writeCompression off;
|
||||||
|
|
||||||
|
timeFormat general;
|
||||||
|
|
||||||
|
timePrecision 6;
|
||||||
|
|
||||||
|
runTimeModifiable true;
|
||||||
|
|
||||||
|
functions
|
||||||
|
{
|
||||||
|
syncObjects
|
||||||
|
{
|
||||||
|
type syncObjects;
|
||||||
|
libs (utilityFunctionObjects);
|
||||||
|
|
||||||
|
// Where is data located relative to runTime. Given as a filename
|
||||||
|
// with every '/' indicating a sub-objectRegistry w.r.t. runTime.
|
||||||
|
// Local data is under <root>/send/processorXXX. After execution
|
||||||
|
// data will be under the corresponding <root>/receive/processorYYY
|
||||||
|
// objectRegistry
|
||||||
|
//root "level0/level1/level2";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,26 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2112 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object decomposeParDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
numberOfSubdomains 2;
|
||||||
|
|
||||||
|
method hierarchical;
|
||||||
|
|
||||||
|
coeffs
|
||||||
|
{
|
||||||
|
n (2 1 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,51 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSchemes;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
ddtSchemes
|
||||||
|
{
|
||||||
|
default steadyState;
|
||||||
|
}
|
||||||
|
|
||||||
|
gradSchemes
|
||||||
|
{
|
||||||
|
default Gauss linear;
|
||||||
|
grad(T) Gauss linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
divSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
}
|
||||||
|
|
||||||
|
laplacianSchemes
|
||||||
|
{
|
||||||
|
default none;
|
||||||
|
laplacian(DT,T) Gauss linear corrected;
|
||||||
|
laplacian(DTV,T) Gauss linear corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
interpolationSchemes
|
||||||
|
{
|
||||||
|
default linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
snGradSchemes
|
||||||
|
{
|
||||||
|
default corrected;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -0,0 +1,34 @@
|
|||||||
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
|
| ========= | |
|
||||||
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
| \\ / O peration | Version: v2106 |
|
||||||
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
|
| \\/ M anipulation | |
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
FoamFile
|
||||||
|
{
|
||||||
|
version 2.0;
|
||||||
|
format ascii;
|
||||||
|
class dictionary;
|
||||||
|
object fvSolution;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
solvers
|
||||||
|
{
|
||||||
|
T
|
||||||
|
{
|
||||||
|
solver PCG;
|
||||||
|
preconditioner DIC;
|
||||||
|
tolerance 1e-06;
|
||||||
|
relTol 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SIMPLE
|
||||||
|
{
|
||||||
|
nNonOrthogonalCorrectors 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
@ -1,65 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object controlDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
libs (utilityFunctionObjects);
|
|
||||||
|
|
||||||
application laplacianFoam;
|
|
||||||
|
|
||||||
startFrom startTime;
|
|
||||||
|
|
||||||
startTime 0;
|
|
||||||
|
|
||||||
stopAt endTime;
|
|
||||||
|
|
||||||
endTime 5;
|
|
||||||
|
|
||||||
deltaT 1;
|
|
||||||
|
|
||||||
writeControl timeStep;
|
|
||||||
writeInterval 1;
|
|
||||||
|
|
||||||
purgeWrite 0;
|
|
||||||
|
|
||||||
writeFormat ascii;
|
|
||||||
|
|
||||||
writePrecision 6;
|
|
||||||
|
|
||||||
writeCompression off;
|
|
||||||
|
|
||||||
timeFormat general;
|
|
||||||
|
|
||||||
timePrecision 6;
|
|
||||||
|
|
||||||
runTimeModifiable true;
|
|
||||||
|
|
||||||
functions
|
|
||||||
{
|
|
||||||
syncObjects
|
|
||||||
{
|
|
||||||
type syncObjects;
|
|
||||||
libs (utilityFunctionObjects);
|
|
||||||
|
|
||||||
// Where is data located relative to runTime. Given as a filename
|
|
||||||
// with every '/' indicating a sub-objectRegistry w.r.t. runTime.
|
|
||||||
// Local data is under <root>/send/processorXXX. After execution
|
|
||||||
// data will be under the corresponding <root>/receive/processorYYY
|
|
||||||
// objectRegistry
|
|
||||||
//root "level0/level1/level2";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/controlDict
|
@ -1,24 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object decomposeParDict;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
numberOfSubdomains 2;
|
|
||||||
|
|
||||||
method hierarchical;
|
|
||||||
|
|
||||||
n (2 1 1);
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
@ -0,0 +1 @@
|
|||||||
|
../../common/system/decomposeParDict
|
@ -1,51 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object fvSchemes;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
ddtSchemes
|
|
||||||
{
|
|
||||||
default steadyState;
|
|
||||||
}
|
|
||||||
|
|
||||||
gradSchemes
|
|
||||||
{
|
|
||||||
default Gauss linear;
|
|
||||||
grad(T) Gauss linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
divSchemes
|
|
||||||
{
|
|
||||||
default none;
|
|
||||||
}
|
|
||||||
|
|
||||||
laplacianSchemes
|
|
||||||
{
|
|
||||||
default none;
|
|
||||||
laplacian(DT,T) Gauss linear corrected;
|
|
||||||
laplacian(DTV,T) Gauss linear corrected;
|
|
||||||
}
|
|
||||||
|
|
||||||
interpolationSchemes
|
|
||||||
{
|
|
||||||
default linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
snGradSchemes
|
|
||||||
{
|
|
||||||
default corrected;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSchemes
|
@ -1,34 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
| ========= | |
|
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
|
||||||
| \\ / O peration | Version: v2106 |
|
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
|
||||||
| \\/ M anipulation | |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
object fvSolution;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
solvers
|
|
||||||
{
|
|
||||||
T
|
|
||||||
{
|
|
||||||
solver PCG;
|
|
||||||
preconditioner DIC;
|
|
||||||
tolerance 1e-06;
|
|
||||||
relTol 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SIMPLE
|
|
||||||
{
|
|
||||||
nNonOrthogonalCorrectors 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
1
tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSolution
|
@ -1,2 +1,2 @@
|
|||||||
-np 1 ./run_left.sh
|
-np 1 ./run_world.sh left
|
||||||
-np 1 ./run_right.sh
|
-np 1 ./run_world.sh right
|
||||||
|
@ -1 +1 @@
|
|||||||
../../left/system/controlDict
|
../../common/system/controlDict
|
@ -1 +1 @@
|
|||||||
../../left/system/decomposeParDict
|
../../common/system/decomposeParDict
|
@ -1 +1 @@
|
|||||||
../../left/system/fvSchemes
|
../../common/system/fvSchemes
|
@ -1 +1 @@
|
|||||||
../../left/system/fvSolution
|
../../common/system/fvSolution
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
laplacianFoam -case left -world LEFT 2>&1 | tee log.run_left
|
|
||||||
read dummy
|
|
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
laplacianFoam -case right -world RIGHT 2>&1 | tee log.run_right
|
|
||||||
read dummy
|
|
23
tutorials/basic/laplacianFoam/multiWorld/run_world.sh
Executable file
23
tutorials/basic/laplacianFoam/multiWorld/run_world.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
world="${1:?specify world/case}"
|
||||||
|
application="${2:-laplacianFoam}"
|
||||||
|
|
||||||
|
# case "$application" in
|
||||||
|
# (-test)
|
||||||
|
# application="Test-multiWorld1"
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
|
||||||
|
if [ -z "$application" ] || ! command -v "$application" > /dev/null
|
||||||
|
then
|
||||||
|
echo "No application: $application"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
|
||||||
|
|
||||||
|
"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase"
|
||||||
|
read dummy
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
@ -79,8 +79,6 @@ SCOPECoeffs
|
|||||||
|
|
||||||
thermophysicalProperties
|
thermophysicalProperties
|
||||||
{
|
{
|
||||||
thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>;
|
|
||||||
|
|
||||||
stoichiometricAirFuelMassRatio 17.1667;
|
stoichiometricAirFuelMassRatio 17.1667;
|
||||||
|
|
||||||
fuel
|
fuel
|
||||||
|
@ -14,7 +14,16 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
thermoType hePsiThermo<pureMixture<const<hConst<perfectGas<specie>>,sensibleEnthalpy>>>;
|
thermoType
|
||||||
|
{
|
||||||
|
type hePsiThermo;
|
||||||
|
mixture pureMixture;
|
||||||
|
transport const;
|
||||||
|
thermo hConst;
|
||||||
|
equationOfState perfectGas;
|
||||||
|
specie specie;
|
||||||
|
energy sensibleEnthalpy;
|
||||||
|
}
|
||||||
|
|
||||||
// Note: these are the properties for a "normalised" inviscid gas
|
// Note: these are the properties for a "normalised" inviscid gas
|
||||||
// for which the speed of sound is 1 m/s at a temperature of 1K
|
// for which the speed of sound is 1 m/s at a temperature of 1K
|
||||||
|
Loading…
Reference in New Issue
Block a user