mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: multi-world tutorial setup with circular connectivity
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
#!/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.*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Run serial
|
||||
./Allrun.pre
|
||||
mpirun -app ./mpirun_left_right.schema
|
||||
|
||||
## Run parallel
|
||||
# ./Allrun.pre-parallel
|
||||
#(cd left && runApplication blockMesh)
|
||||
#(cd left && runApplication decomposePar)
|
||||
#(cd right && runApplication blockMesh)
|
||||
#(cd right && runApplication decomposePar)
|
||||
#
|
||||
#mpirun -app ./mpirun.schema
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,15 +0,0 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,15 +0,0 @@
|
||||
#!/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -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,28 +0,0 @@
|
||||
/*--------------------------------*- 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);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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,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,80 +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 volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
coupled
|
||||
{
|
||||
//type mappedField;
|
||||
type mappedMixedField;
|
||||
|
||||
// What to sample:
|
||||
sampleMode nearestPatchFace;
|
||||
|
||||
// Simulation world to sample
|
||||
sampleWorld RIGHT;
|
||||
|
||||
// Region to sample
|
||||
sampleRegion region0;
|
||||
|
||||
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||
samplePatch coupled;
|
||||
|
||||
// Use database to get data from (one-way or loose coupling in
|
||||
// combination with functionObject)
|
||||
//sampleDatabase false; //true;
|
||||
|
||||
// According to offsetMode (see above) supply one of
|
||||
// offset, offsets or distance
|
||||
offset (0 0 0);
|
||||
|
||||
value uniform 0.0;
|
||||
|
||||
|
||||
// For mappedMixed
|
||||
//weightField DTV;
|
||||
refValue $value;
|
||||
refGradient uniform 0.0;
|
||||
valueFraction uniform 1.0;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
left
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,21 +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 "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
DT 4e-05;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,90 +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 blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 0.1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0 0 0)
|
||||
(0.5 0 0)
|
||||
(0.5 1 0)
|
||||
(0 1 0)
|
||||
(0 0 0.1)
|
||||
(0.5 0 0.1)
|
||||
(0.5 1 0.1)
|
||||
(0 1 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (2 2 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
coupled
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
);
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
left
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/controlDict
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/decomposeParDict
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/fvSchemes
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/fvSolution
|
||||
@ -1,2 +0,0 @@
|
||||
-np 2 laplacianFoam -case left -world LEFT -parallel
|
||||
-np 2 laplacianFoam -case right -world RIGHT -parallel
|
||||
@ -1,2 +0,0 @@
|
||||
-np 1 xterm -font fixed -title left -geometry 200x15+0+0 -e ./run_world.sh left
|
||||
-np 1 xterm -font fixed -title right -geometry 200x15+0+200 -e ./run_world.sh right
|
||||
@ -1,79 +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 volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
coupled
|
||||
{
|
||||
//type mappedField;
|
||||
type mappedMixedField;
|
||||
|
||||
// What to sample:
|
||||
sampleMode nearestPatchFace;
|
||||
|
||||
// Simulation world to sample
|
||||
sampleWorld LEFT;
|
||||
|
||||
// Region to sample
|
||||
sampleRegion region0;
|
||||
|
||||
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||
samplePatch coupled;
|
||||
|
||||
// Use database to get data from (one-way or loose coupling in
|
||||
// combination with functionObject)
|
||||
//sampleDatabase false; //true;
|
||||
|
||||
// According to offsetMode (see above) supply one of
|
||||
// offset, offsets or distance
|
||||
offset (0 0 0);
|
||||
|
||||
value uniform 1.1;
|
||||
|
||||
// For mappedMixed
|
||||
//weightField DTV;
|
||||
refValue $value;
|
||||
refGradient uniform 0.0;
|
||||
valueFraction uniform 1.0;
|
||||
}
|
||||
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1 +0,0 @@
|
||||
../../left/constant/transportProperties
|
||||
@ -1,89 +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 blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 0.1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0.5 0 0)
|
||||
(1 0 0)
|
||||
(1 1 0)
|
||||
(0.5 1 0)
|
||||
(0.5 0 0.1)
|
||||
(1 0 0.1)
|
||||
(1 1 0.1)
|
||||
(0.5 1 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (2 2 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
coupled
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
);
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
right
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/controlDict
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/decomposeParDict
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/fvSchemes
|
||||
@ -1 +0,0 @@
|
||||
../../common/system/fvSolution
|
||||
@ -1,23 +0,0 @@
|
||||
#!/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
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user