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,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,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,2 +0,0 @@
|
|||||||
-np 2 laplacianFoam -case left -world LEFT -parallel
|
|
||||||
-np 2 laplacianFoam -case right -world RIGHT -parallel
|
|
||||||
@ -1 +0,0 @@
|
|||||||
../../left/constant/transportProperties
|
|
||||||
@ -3,12 +3,14 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
for subcase in left right
|
for subcase in $(./list-worlds)
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
cd "$subcase" && cleanCase
|
cd "$subcase" || exit
|
||||||
|
cleanCase0
|
||||||
|
rm -f *_mapped.obj 2>/dev/null
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
rm -f log.*
|
rm -rf log.* 2>/dev/null
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -5,25 +5,19 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
# Run serial
|
# Run serial
|
||||||
./Allrun.pre
|
./Allrun.pre
|
||||||
mpirun -app ./mpirun_left_right.schema
|
echo "Begin run"
|
||||||
|
mpirun -app ./mpirun_worlds.schema
|
||||||
|
|
||||||
# Run with database
|
# Run with database
|
||||||
mv -f log.run_left* log.run_right*
|
./Allrun.addDatabase
|
||||||
|
mv -f log.run_* 2>/dev/null
|
||||||
for subcase in left right
|
echo "Begin run with database"
|
||||||
do
|
mpirun -app ./mpirun_worlds.schema
|
||||||
(
|
|
||||||
cd "$subcase" || exit
|
|
||||||
foamListTimes -rm
|
|
||||||
restore0Dir
|
|
||||||
foamDictionary 0/T -entry boundaryField.coupled.sampleDatabase -add true
|
|
||||||
)
|
|
||||||
done
|
|
||||||
|
|
||||||
mpirun -app ./mpirun_left_right.schema
|
|
||||||
|
|
||||||
## Run parallel
|
## Run parallel
|
||||||
## ./Allrun.pre-parallel
|
## ./Allrun.pre-parallel
|
||||||
## mpirun -app ./mpirun.schema
|
## mpirun -app ./mpirun.schema
|
||||||
|
|
||||||
|
echo "End"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
30
tutorials/basic/laplacianFoam/multiWorld1/Allrun.addDatabase
Executable file
30
tutorials/basic/laplacianFoam/multiWorld1/Allrun.addDatabase
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Running with database
|
||||||
|
for subcase in $(./list-worlds)
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" || exit
|
||||||
|
foamListTimes -rm
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
dictFile="0/T"
|
||||||
|
|
||||||
|
for patch in $(foamDictionary "$dictFile" -keywords -entry boundaryField)
|
||||||
|
do
|
||||||
|
patchType="$(foamDictionary "$dictFile" -value -entry boundaryField/"$patch"/type)"
|
||||||
|
|
||||||
|
case "$patchType" in
|
||||||
|
(mapped*)
|
||||||
|
foamDictionary "$dictFile" -entry boundaryField/"$patch"/sampleDatabase -add true >/dev/null
|
||||||
|
echo "Use sampleDatabase: $subcase/$dictFile patch=$patch"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -4,11 +4,19 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Create meshes and initial fields
|
# Create meshes and initial fields
|
||||||
for subcase in left right
|
for subcase in $(./list-worlds)
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
cd "$subcase" || exit
|
cd "$subcase" || exit
|
||||||
runApplication blockMesh && restore0Dir
|
echo "case=$subcase"
|
||||||
|
if [ -x ./Allrun.pre ]
|
||||||
|
then
|
||||||
|
./Allrun.pre
|
||||||
|
else
|
||||||
|
runApplication blockMesh
|
||||||
|
fi
|
||||||
|
restore0Dir
|
||||||
|
echo
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -4,7 +4,7 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Create meshes and initial fields
|
# Create meshes and initial fields
|
||||||
for subcase in left right
|
for subcase in $(./list-worlds)
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
cd "$subcase" || exit
|
cd "$subcase" || exit
|
||||||
@ -29,7 +29,7 @@ boundaryField
|
|||||||
sampleMode nearestPatchFaceAMI;
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
// Simulation world to sample
|
// Simulation world to sample
|
||||||
sampleWorld RIGHT;
|
sampleWorld right;
|
||||||
|
|
||||||
// Region to sample
|
// Region to sample
|
||||||
sampleRegion region0;
|
sampleRegion region0;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
6
tutorials/basic/laplacianFoam/multiWorld1/list-worlds
Executable file
6
tutorials/basic/laplacianFoam/multiWorld1/list-worlds
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
echo left right
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
2
tutorials/basic/laplacianFoam/multiWorld1/mpirun.schema
Normal file
2
tutorials/basic/laplacianFoam/multiWorld1/mpirun.schema
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-np 2 laplacianFoam -case left -world left -parallel
|
||||||
|
-np 2 laplacianFoam -case right -world right -parallel
|
||||||
@ -29,7 +29,7 @@ boundaryField
|
|||||||
sampleMode nearestPatchFaceAMI;
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
// Simulation world to sample
|
// Simulation world to sample
|
||||||
sampleWorld LEFT;
|
sampleWorld left;
|
||||||
|
|
||||||
// Region to sample
|
// Region to sample
|
||||||
sampleRegion region0;
|
sampleRegion region0;
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
@ -15,9 +15,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
|
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
|
||||||
worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
|
# worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
|
||||||
|
worldName="$worldCase"
|
||||||
|
|
||||||
"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase"
|
log="log.run_$worldCase"
|
||||||
read dummy
|
|
||||||
|
"$application" -case "$worldCase" -world "$worldName" > "$log" 2>&1
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
@ -3,12 +3,14 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
for subcase in left right
|
for subcase in $(./list-worlds)
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
cd "$subcase" && cleanCase0
|
cd "$subcase" || exit
|
||||||
|
cleanCase0
|
||||||
|
rm -f *_mapped.obj 2>/dev/null
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
rm -f log.*
|
rm -rf log.* 2>/dev/null
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -5,15 +5,19 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
|
|
||||||
# Run serial
|
# Run serial
|
||||||
./Allrun.pre
|
./Allrun.pre
|
||||||
mpirun -app ./mpirun_left_right.schema
|
echo "Begin run - interworld communication"
|
||||||
|
mpirun -app ./mpirun_full.schema
|
||||||
|
|
||||||
## Run parallel
|
# Run with database
|
||||||
# ./Allrun.pre-parallel
|
if false
|
||||||
#(cd left && runApplication blockMesh)
|
then
|
||||||
#(cd left && runApplication decomposePar)
|
./Allrun.addDatabase
|
||||||
#(cd right && runApplication blockMesh)
|
rm -f log.run* 2>/dev/null
|
||||||
#(cd right && runApplication decomposePar)
|
echo "Begin run - database data exchange"
|
||||||
#
|
mpirun -app ./mpirun_full.schema
|
||||||
#mpirun -app ./mpirun.schema
|
fi
|
||||||
|
|
||||||
|
echo "Can load with: paraview --script=load-worlds.py &"
|
||||||
|
echo "End"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
30
tutorials/basic/laplacianFoam/multiWorld2/Allrun.addDatabase
Executable file
30
tutorials/basic/laplacianFoam/multiWorld2/Allrun.addDatabase
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Prepare for running with database
|
||||||
|
for subcase in $(./list-worlds)
|
||||||
|
do
|
||||||
|
(
|
||||||
|
cd "$subcase" || exit
|
||||||
|
foamListTimes -rm
|
||||||
|
restore0Dir
|
||||||
|
|
||||||
|
dictFile="0/T"
|
||||||
|
|
||||||
|
for patch in $(foamDictionary "$dictFile" -keywords -entry boundaryField)
|
||||||
|
do
|
||||||
|
patchType="$(foamDictionary "$dictFile" -value -entry boundaryField/"$patch"/type)"
|
||||||
|
|
||||||
|
case "$patchType" in
|
||||||
|
(mapped*)
|
||||||
|
foamDictionary "$dictFile" -entry boundaryField/"$patch"/sampleDatabase -add true >/dev/null
|
||||||
|
echo "Use sampleDatabase: $subcase/$dictFile patch=$patch"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
@ -3,12 +3,21 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Create meshes
|
# Create meshes and initial fields
|
||||||
for subcase in left right
|
for subcase in $(./list-worlds)
|
||||||
do
|
do
|
||||||
(
|
(
|
||||||
cd "$subcase" || exit
|
cd "$subcase" || exit
|
||||||
runApplication blockMesh
|
echo "case=$subcase"
|
||||||
|
if [ -x ./Allrun.pre ]
|
||||||
|
then
|
||||||
|
./Allrun.pre
|
||||||
|
else
|
||||||
|
runApplication blockMesh
|
||||||
|
fi
|
||||||
|
restore0Dir
|
||||||
|
touch "$subcase.foam" # paraview
|
||||||
|
echo
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2106 |
|
| \\ / O peration | Version: v2112 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2106 |
|
| \\ / O peration | Version: v2112 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -19,9 +19,9 @@ libs (utilityFunctionObjects);
|
|||||||
|
|
||||||
DebugSwitches
|
DebugSwitches
|
||||||
{
|
{
|
||||||
|
multiWorld 1;
|
||||||
// mappedPatchBase 1;
|
// mappedPatchBase 1;
|
||||||
// syncObjects 1;
|
// syncObjects 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2106 |
|
| \\ / O peration | Version: v2112 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2106 |
|
| \\ / O peration | Version: v2112 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
6
tutorials/basic/laplacianFoam/multiWorld2/list-worlds
Executable file
6
tutorials/basic/laplacianFoam/multiWorld2/list-worlds
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
echo top slab1 slab2 slab3 slab4
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
67
tutorials/basic/laplacianFoam/multiWorld2/load-worlds.py
Normal file
67
tutorials/basic/laplacianFoam/multiWorld2/load-worlds.py
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#### import the simple module from the paraview
|
||||||
|
from paraview.simple import *
|
||||||
|
#### disable automatic camera reset on 'Show'
|
||||||
|
paraview.simple._DisableFirstRenderCameraReset()
|
||||||
|
|
||||||
|
# get active view
|
||||||
|
renderView1 = GetActiveViewOrCreate('RenderView')
|
||||||
|
|
||||||
|
useGroup = True
|
||||||
|
pieces = []
|
||||||
|
|
||||||
|
# Load all pieces
|
||||||
|
for worldName in ['top', 'slab1', 'slab2', 'slab3', 'slab4']:
|
||||||
|
# Could also touch world/world.foam into existence
|
||||||
|
loadedDir = './' + worldName + '/' + worldName + '.foam'
|
||||||
|
piece = OpenFOAMReader(registrationName=worldName, FileName=loadedDir)
|
||||||
|
piece.SkipZeroTime = 0
|
||||||
|
piece.Decomposepolyhedra = 0
|
||||||
|
piece.MeshRegions = ['internalMesh']
|
||||||
|
piece.CellArrays = ['T']
|
||||||
|
pieces.append(piece)
|
||||||
|
|
||||||
|
# Set display for all pieces
|
||||||
|
for piece in pieces:
|
||||||
|
display = Show(piece, renderView1, 'UnstructuredGridRepresentation')
|
||||||
|
display.SetRepresentationType('Surface With Edges')
|
||||||
|
ColorBy(display, ('CELLS', 'T'))
|
||||||
|
# Show color bar/color legend
|
||||||
|
display.SetScalarBarVisibility(renderView1, True)
|
||||||
|
|
||||||
|
# ----
|
||||||
|
# Group pieces
|
||||||
|
if useGroup:
|
||||||
|
# Hide data in view
|
||||||
|
group1 = GroupDatasets(registrationName='GroupDatasets1', Input=pieces)
|
||||||
|
|
||||||
|
# show data in view
|
||||||
|
display = Show(group1, renderView1, 'UnstructuredGridRepresentation')
|
||||||
|
|
||||||
|
display.SetRepresentationType('Surface With Edges')
|
||||||
|
ColorBy(display, ('CELLS', 'T'))
|
||||||
|
# Show color bar/color legend
|
||||||
|
display.SetScalarBarVisibility(renderView1, True)
|
||||||
|
|
||||||
|
for piece in pieces:
|
||||||
|
Hide(piece, renderView1)
|
||||||
|
|
||||||
|
# ----
|
||||||
|
# get color transfer function/color map for 'T'
|
||||||
|
tLUT = GetColorTransferFunction('T')
|
||||||
|
|
||||||
|
# Rescale transfer function
|
||||||
|
tLUT.RescaleTransferFunction(0.0, 1.2)
|
||||||
|
|
||||||
|
# get opacity transfer function/opacity map for 'T'
|
||||||
|
tPWF = GetOpacityTransferFunction('T')
|
||||||
|
|
||||||
|
# Rescale transfer function
|
||||||
|
tPWF.RescaleTransferFunction(0.0, 1.2)
|
||||||
|
|
||||||
|
# reset view to fit data
|
||||||
|
renderView1.ResetCamera(False)
|
||||||
|
|
||||||
|
# update the view to ensure updated data information
|
||||||
|
renderView1.Update()
|
||||||
|
|
||||||
|
#================================================================
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
-np 1 ./run_world.sh top
|
||||||
|
-np 1 ./run_world.sh slab1
|
||||||
|
-np 1 ./run_world.sh slab2
|
||||||
|
-np 1 ./run_world.sh slab3
|
||||||
|
-np 1 ./run_world.sh slab4
|
||||||
@ -2,12 +2,6 @@
|
|||||||
world="${1:?specify world/case}"
|
world="${1:?specify world/case}"
|
||||||
application="${2:-laplacianFoam}"
|
application="${2:-laplacianFoam}"
|
||||||
|
|
||||||
# case "$application" in
|
|
||||||
# (-test)
|
|
||||||
# application="Test-multiWorld1"
|
|
||||||
# ;;
|
|
||||||
# esac
|
|
||||||
|
|
||||||
if [ -z "$application" ] || ! command -v "$application" > /dev/null
|
if [ -z "$application" ] || ! command -v "$application" > /dev/null
|
||||||
then
|
then
|
||||||
echo "No application: $application"
|
echo "No application: $application"
|
||||||
@ -15,9 +9,11 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
|
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
|
||||||
worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
|
# worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
|
||||||
|
worldName="$worldCase"
|
||||||
|
|
||||||
"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase"
|
log="log.run_$worldCase"
|
||||||
read dummy
|
|
||||||
|
"$application" -case "$worldCase" -world "$worldName" > "$log" 2>&1
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
87
tutorials/basic/laplacianFoam/multiWorld2/slab1/0.orig/T
Normal file
87
tutorials/basic/laplacianFoam/multiWorld2/slab1/0.orig/T
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
_mappedMixedField
|
||||||
|
{
|
||||||
|
type mappedMixedField;
|
||||||
|
|
||||||
|
// What/how to sample:
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
// Simulation world to sample
|
||||||
|
// Overwrite -> sampleWorld top;
|
||||||
|
|
||||||
|
// Region to sample
|
||||||
|
sampleRegion region0;
|
||||||
|
|
||||||
|
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||||
|
// Overwrite -> samplePatch right_to_left;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
slab1_to_2
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab2;
|
||||||
|
samplePatch slab2_to_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld top;
|
||||||
|
samplePatch top_to_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
/*--------------------------------*- 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 blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
SLAB_OFFSET 0;
|
||||||
|
|
||||||
|
scale 0.1;
|
||||||
|
|
||||||
|
transform
|
||||||
|
{
|
||||||
|
origin (#eval{0.5 * $SLAB_OFFSET} 0 0);
|
||||||
|
rotation none;
|
||||||
|
}
|
||||||
|
|
||||||
|
xdim 0.5;
|
||||||
|
ydim 1;
|
||||||
|
zdim 0.1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(0 0 0)
|
||||||
|
($xdim 0 0)
|
||||||
|
($xdim $ydim 0)
|
||||||
|
(0 $ydim 0)
|
||||||
|
|
||||||
|
(0 0 $zdim)
|
||||||
|
($xdim 0 $zdim)
|
||||||
|
($xdim $ydim $zdim)
|
||||||
|
(0 $ydim $zdim)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (2 2 1) grading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
left // left-side (face 0)
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
slab1_to_2 // right-side (face 1)
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom // face 2
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top // top: face 3
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack // face 4 5
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
faces ((0 4) (0 5));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
94
tutorials/basic/laplacianFoam/multiWorld2/slab2/0.orig/T
Normal file
94
tutorials/basic/laplacianFoam/multiWorld2/slab2/0.orig/T
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
_mappedMixedField
|
||||||
|
{
|
||||||
|
type mappedMixedField;
|
||||||
|
|
||||||
|
// What/how to sample:
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
// Simulation world to sample
|
||||||
|
// Overwrite -> sampleWorld top;
|
||||||
|
|
||||||
|
// Region to sample
|
||||||
|
sampleRegion region0;
|
||||||
|
|
||||||
|
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||||
|
// Overwrite -> samplePatch right_to_left;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
slab2_to_1
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab1;
|
||||||
|
samplePatch slab1_to_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
slab2_to_3
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab3;
|
||||||
|
samplePatch slab3_to_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld top;
|
||||||
|
samplePatch top_to_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2106 |
|
| \\ / O peration | Version: v2112 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -14,76 +14,70 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
SLAB_OFFSET 1;
|
||||||
|
|
||||||
scale 0.1;
|
scale 0.1;
|
||||||
|
|
||||||
|
transform
|
||||||
|
{
|
||||||
|
origin (#eval{0.5 * $SLAB_OFFSET} 0 0);
|
||||||
|
rotation none;
|
||||||
|
}
|
||||||
|
|
||||||
|
xdim 0.5;
|
||||||
|
ydim 1;
|
||||||
|
zdim 0.1;
|
||||||
|
|
||||||
vertices
|
vertices
|
||||||
(
|
(
|
||||||
(0.5 0 0)
|
(0 0 0)
|
||||||
(1 0 0)
|
($xdim 0 0)
|
||||||
(1 1 0)
|
($xdim $ydim 0)
|
||||||
(0.5 1 0)
|
(0 $ydim 0)
|
||||||
(0.5 0 0.1)
|
|
||||||
(1 0 0.1)
|
(0 0 $zdim)
|
||||||
(1 1 0.1)
|
($xdim 0 $zdim)
|
||||||
(0.5 1 0.1)
|
($xdim $ydim $zdim)
|
||||||
|
(0 $ydim $zdim)
|
||||||
);
|
);
|
||||||
|
|
||||||
blocks
|
blocks
|
||||||
(
|
(
|
||||||
hex (0 1 2 3 4 5 6 7) (2 2 1) simpleGrading (1 1 1)
|
hex (0 1 2 3 4 5 6 7) (2 2 1) grading (1 1 1)
|
||||||
);
|
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
);
|
||||||
|
|
||||||
boundary
|
boundary
|
||||||
(
|
(
|
||||||
coupled
|
slab2_to_1 // left-side (face 0)
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
faces
|
faces ((0 0));
|
||||||
(
|
|
||||||
(0 4 7 3)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
top
|
|
||||||
|
slab2_to_3 // right-side (face 1)
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
faces
|
faces ((0 1));
|
||||||
(
|
|
||||||
(3 7 6 2)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
bottom
|
|
||||||
|
bottom // face 2
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
faces
|
faces ((0 2));
|
||||||
(
|
|
||||||
(1 5 4 0)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
right
|
|
||||||
|
to_top // top: face 3
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
faces
|
faces ((0 3));
|
||||||
(
|
|
||||||
(2 6 5 1)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
frontAndBack
|
|
||||||
|
frontAndBack // face 4 5
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
faces
|
faces ((0 4) (0 5));
|
||||||
(
|
|
||||||
(0 3 2 1)
|
|
||||||
(4 5 6 7)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
88
tutorials/basic/laplacianFoam/multiWorld2/slab3/0.orig/T
Normal file
88
tutorials/basic/laplacianFoam/multiWorld2/slab3/0.orig/T
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
_mappedMixedField
|
||||||
|
{
|
||||||
|
type mappedMixedField;
|
||||||
|
|
||||||
|
// What/how to sample:
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
// Simulation world to sample
|
||||||
|
// Overwrite -> sampleWorld top;
|
||||||
|
|
||||||
|
// Region to sample
|
||||||
|
sampleRegion region0;
|
||||||
|
|
||||||
|
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||||
|
// Overwrite -> samplePatch right_to_left;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
slab3_to_2
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab2;
|
||||||
|
samplePatch slab2_to_3;
|
||||||
|
}
|
||||||
|
|
||||||
|
slab3_to_4
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab4;
|
||||||
|
samplePatch slab4_to_3;
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld top;
|
||||||
|
samplePatch top_to_3;
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
/*--------------------------------*- 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 blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
SLAB_OFFSET 2;
|
||||||
|
|
||||||
|
scale 0.1;
|
||||||
|
|
||||||
|
transform
|
||||||
|
{
|
||||||
|
origin (#eval{0.5 * $SLAB_OFFSET} 0 0);
|
||||||
|
rotation none;
|
||||||
|
}
|
||||||
|
|
||||||
|
xdim 0.5;
|
||||||
|
ydim 1;
|
||||||
|
zdim 0.1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(0 0 0)
|
||||||
|
($xdim 0 0)
|
||||||
|
($xdim $ydim 0)
|
||||||
|
(0 $ydim 0)
|
||||||
|
|
||||||
|
(0 0 $zdim)
|
||||||
|
($xdim 0 $zdim)
|
||||||
|
($xdim $ydim $zdim)
|
||||||
|
(0 $ydim $zdim)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (2 2 1) grading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
slab3_to_2 // left-side (face 0)
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
slab3_to_4 // right-side (face 1)
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom // face 2
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top // top: face 3
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack // face 4 5
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
faces ((0 4) (0 5));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/controlDict
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/decomposeParDict
|
||||||
1
tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSchemes
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSchemes
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSchemes
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSolution
|
||||||
87
tutorials/basic/laplacianFoam/multiWorld2/slab4/0.orig/T
Normal file
87
tutorials/basic/laplacianFoam/multiWorld2/slab4/0.orig/T
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
_mappedMixedField
|
||||||
|
{
|
||||||
|
type mappedMixedField;
|
||||||
|
|
||||||
|
// What/how to sample:
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
// Simulation world to sample
|
||||||
|
// Overwrite -> sampleWorld top;
|
||||||
|
|
||||||
|
// Region to sample
|
||||||
|
sampleRegion region0;
|
||||||
|
|
||||||
|
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||||
|
// Overwrite -> samplePatch right_to_left;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
slab4_to_3
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab3;
|
||||||
|
samplePatch slab3_to_4;
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld top;
|
||||||
|
samplePatch top_to_4;
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
/*--------------------------------*- 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 blockMeshDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
SLAB_OFFSET 3;
|
||||||
|
|
||||||
|
scale 0.1;
|
||||||
|
|
||||||
|
transform
|
||||||
|
{
|
||||||
|
origin (#eval{0.5 * $SLAB_OFFSET} 0 0);
|
||||||
|
rotation none;
|
||||||
|
}
|
||||||
|
|
||||||
|
xdim 0.5;
|
||||||
|
ydim 1;
|
||||||
|
zdim 0.1;
|
||||||
|
|
||||||
|
vertices
|
||||||
|
(
|
||||||
|
(0 0 0)
|
||||||
|
($xdim 0 0)
|
||||||
|
($xdim $ydim 0)
|
||||||
|
(0 $ydim 0)
|
||||||
|
|
||||||
|
(0 0 $zdim)
|
||||||
|
($xdim 0 $zdim)
|
||||||
|
($xdim $ydim $zdim)
|
||||||
|
(0 $ydim $zdim)
|
||||||
|
);
|
||||||
|
|
||||||
|
blocks
|
||||||
|
(
|
||||||
|
hex (0 1 2 3 4 5 6 7) (2 2 1) grading (1 1 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
boundary
|
||||||
|
(
|
||||||
|
slab4_to_3 // left-side (face 0)
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
right // right-side (face 1)
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
bottom // face 2
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
to_top // top: face 3
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 3));
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack // face 4 5
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
faces ((0 4) (0 5));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/controlDict
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/decomposeParDict
|
||||||
1
tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSchemes
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSchemes
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSchemes
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSolution
|
||||||
109
tutorials/basic/laplacianFoam/multiWorld2/top/0.orig/T
Normal file
109
tutorials/basic/laplacianFoam/multiWorld2/top/0.orig/T
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
/*--------------------------------*- 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 volScalarField;
|
||||||
|
object T;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
internalField uniform 0;
|
||||||
|
|
||||||
|
_mappedMixedField
|
||||||
|
{
|
||||||
|
type mappedMixedField;
|
||||||
|
|
||||||
|
// What/how to sample:
|
||||||
|
sampleMode nearestPatchFaceAMI;
|
||||||
|
|
||||||
|
// Simulation world to sample
|
||||||
|
// Overwrite -> sampleWorld slabN;
|
||||||
|
|
||||||
|
// Region to sample
|
||||||
|
sampleRegion region0;
|
||||||
|
|
||||||
|
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||||
|
samplePatch to_top;
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
boundaryField
|
||||||
|
{
|
||||||
|
top_to_1
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab1;
|
||||||
|
}
|
||||||
|
|
||||||
|
top_to_2
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab2;
|
||||||
|
}
|
||||||
|
|
||||||
|
top_to_3
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab3;
|
||||||
|
}
|
||||||
|
|
||||||
|
top_to_4
|
||||||
|
{
|
||||||
|
$_mappedMixedField;
|
||||||
|
sampleWorld slab4;
|
||||||
|
}
|
||||||
|
|
||||||
|
top
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface
|
||||||
|
{
|
||||||
|
type zeroGradient;
|
||||||
|
}
|
||||||
|
|
||||||
|
left
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
right
|
||||||
|
{
|
||||||
|
type fixedValue;
|
||||||
|
value uniform 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
frontAndBack
|
||||||
|
{
|
||||||
|
type empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -4,12 +4,10 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Create meshes
|
# Create meshes
|
||||||
for subcase in left right
|
runApplication blockMesh
|
||||||
do
|
|
||||||
(
|
runApplication -s patches topoSet -dict system/topoSetDict.patches
|
||||||
cd "$subcase" || exit
|
|
||||||
runApplication blockMesh
|
runApplication createPatch -overwrite
|
||||||
)
|
|
||||||
done
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/constant/transportProperties
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2106 |
|
| \\ / O peration | Version: v2112 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -13,78 +13,75 @@ FoamFile
|
|||||||
object blockMeshDict;
|
object blockMeshDict;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// TOP
|
||||||
|
|
||||||
|
NSLABS 4;
|
||||||
|
|
||||||
scale 0.1;
|
scale 0.1;
|
||||||
|
|
||||||
|
transform
|
||||||
|
{
|
||||||
|
origin (0 1 0);
|
||||||
|
rotation none;
|
||||||
|
}
|
||||||
|
|
||||||
|
xdim #eval{0.5 * $NSLABS};
|
||||||
|
ydim 0.2;
|
||||||
|
zdim 0.1;
|
||||||
|
|
||||||
|
nx #eval #{ round(5 * $NSLABS) #};
|
||||||
|
|
||||||
vertices
|
vertices
|
||||||
(
|
(
|
||||||
(0 0 0)
|
(0 0 0)
|
||||||
(0.5 0 0)
|
($xdim 0 0)
|
||||||
(0.5 1 0)
|
($xdim $ydim 0)
|
||||||
(0 1 0)
|
(0 $ydim 0)
|
||||||
(0 0 0.1)
|
|
||||||
(0.5 0 0.1)
|
(0 0 $zdim)
|
||||||
(0.5 1 0.1)
|
($xdim 0 $zdim)
|
||||||
(0 1 0.1)
|
($xdim $ydim $zdim)
|
||||||
|
(0 $ydim $zdim)
|
||||||
);
|
);
|
||||||
|
|
||||||
blocks
|
blocks
|
||||||
(
|
(
|
||||||
hex (0 1 2 3 4 5 6 7) (2 2 1) simpleGrading (1 1 1)
|
hex (0 1 2 3 4 5 6 7) ($nx 2 1) grading (1 1 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
edges
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
boundary
|
boundary
|
||||||
(
|
(
|
||||||
coupled
|
left
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
faces
|
faces ((0 0));
|
||||||
(
|
}
|
||||||
(2 6 5 1)
|
|
||||||
);
|
right
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
interface // inter-world connections
|
||||||
|
{
|
||||||
|
type wall;
|
||||||
|
faces ((0 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
top
|
top
|
||||||
{
|
{
|
||||||
type wall;
|
type wall;
|
||||||
faces
|
faces ((0 3));
|
||||||
(
|
|
||||||
(3 7 6 2)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
bottom
|
|
||||||
{
|
|
||||||
type wall;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(1 5 4 0)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
left
|
|
||||||
{
|
|
||||||
type wall;
|
|
||||||
faces
|
|
||||||
(
|
|
||||||
(0 4 7 3)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
frontAndBack
|
frontAndBack
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
faces
|
faces ((0 4) (0 5));
|
||||||
(
|
|
||||||
(0 3 2 1)
|
|
||||||
(4 5 6 7)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
mergePatchPairs
|
|
||||||
(
|
|
||||||
);
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
1
tutorials/basic/laplacianFoam/multiWorld2/top/system/controlDict
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld2/top/system/controlDict
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/controlDict
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
/*--------------------------------*- 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 createPatchDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
pointSync false;
|
||||||
|
|
||||||
|
_fromSet
|
||||||
|
{
|
||||||
|
patchInfo { type patch; }
|
||||||
|
constructFrom set;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Patches to create
|
||||||
|
patches
|
||||||
|
(
|
||||||
|
{
|
||||||
|
name top_to_1;
|
||||||
|
set top_to_1;
|
||||||
|
$_fromSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name top_to_2;
|
||||||
|
set top_to_2;
|
||||||
|
$_fromSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name top_to_3;
|
||||||
|
set top_to_3;
|
||||||
|
$_fromSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name top_to_4;
|
||||||
|
set top_to_4;
|
||||||
|
$_fromSet;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../common/system/decomposeParDict
|
||||||
1
tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSchemes
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSchemes
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSchemes
|
||||||
1
tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSolution
Symbolic link
1
tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSolution
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../common/system/fvSolution
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
/*--------------------------------*- 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 topoSetDict;
|
||||||
|
}
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
_newFromPatch
|
||||||
|
{
|
||||||
|
type faceSet;
|
||||||
|
action new;
|
||||||
|
source patchToFace;
|
||||||
|
patch interface;
|
||||||
|
}
|
||||||
|
|
||||||
|
_subsetBox
|
||||||
|
{
|
||||||
|
type faceSet;
|
||||||
|
action subset;
|
||||||
|
source boxToFace;
|
||||||
|
min (0 0 -1);
|
||||||
|
span (0.05 2 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
actions
|
||||||
|
(
|
||||||
|
// slab 1 (offset 0)
|
||||||
|
{ name top_to_1; $_newFromPatch }
|
||||||
|
{
|
||||||
|
name top_to_1;
|
||||||
|
$_subsetBox;
|
||||||
|
min (0 0 -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// slab 2 (offset 1)
|
||||||
|
{ name top_to_2; $_newFromPatch }
|
||||||
|
{
|
||||||
|
name top_to_2;
|
||||||
|
$_subsetBox;
|
||||||
|
min (0.05 0 -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// slab 3 (offset 2)
|
||||||
|
{ name top_to_3; $_newFromPatch }
|
||||||
|
{
|
||||||
|
name top_to_3;
|
||||||
|
$_subsetBox;
|
||||||
|
min (0.10 0 -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// slab 4 (offset 3)
|
||||||
|
{ name top_to_4; $_newFromPatch }
|
||||||
|
{
|
||||||
|
name top_to_4;
|
||||||
|
$_subsetBox;
|
||||||
|
min (0.15 0 -1);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user