diff --git a/applications/test/multiWorld/left/0/T b/applications/test/multiWorld/left/0/T deleted file mode 100644 index a03c149999140676a9cb969843731dda86418733..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/left/0/T +++ /dev/null @@ -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; - } -} - -// ************************************************************************* // diff --git a/applications/test/multiWorld/mpirun.schema b/applications/test/multiWorld/mpirun.schema deleted file mode 100644 index 49aadf442eeb5354ff0fd93de00bb438be920cbc..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/mpirun.schema +++ /dev/null @@ -1,2 +0,0 @@ --np 2 laplacianFoam -case left -world LEFT -parallel --np 2 laplacianFoam -case right -world RIGHT -parallel diff --git a/applications/test/multiWorld/mpirun_left_right.schema b/applications/test/multiWorld/mpirun_left_right.schema deleted file mode 100644 index 133e452fb6034c4b2dc67c794bad8b389eb1b787..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/mpirun_left_right.schema +++ /dev/null @@ -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 diff --git a/applications/test/multiWorld/right/0/T b/applications/test/multiWorld/right/0/T deleted file mode 100644 index eb9be91317e5d8d11c8425daa8ae7266ace14332..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/right/0/T +++ /dev/null @@ -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; - } -} - -// ************************************************************************* // diff --git a/applications/test/multiWorld/right/constant/transportProperties b/applications/test/multiWorld/right/constant/transportProperties deleted file mode 120000 index d0e9cc0e1caac311626efaec509ece91b57722f9..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/right/constant/transportProperties +++ /dev/null @@ -1 +0,0 @@ -../../left/constant/transportProperties \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/mpirun.schema b/tutorials/basic/laplacianFoam/multiWorld/mpirun.schema deleted file mode 100644 index cc3c3af9f1c56337363e136847e987d70bcc4a7a..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/mpirun.schema +++ /dev/null @@ -1,2 +0,0 @@ --np 2 laplacianFoam -case left -world LEFT -parallel --np 2 laplacianFoam -case right -world RIGHT -parallel diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld/right/constant/transportProperties deleted file mode 120000 index d0e9cc0e1caac311626efaec509ece91b57722f9..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/right/constant/transportProperties +++ /dev/null @@ -1 +0,0 @@ -../../left/constant/transportProperties \ No newline at end of file diff --git a/applications/test/multiWorld/Allclean b/tutorials/basic/laplacianFoam/multiWorld1/Allclean similarity index 71% rename from applications/test/multiWorld/Allclean rename to tutorials/basic/laplacianFoam/multiWorld1/Allclean index 336db4138515a5a9192bca1dabf80608d59140c6..4512a2f0dccbc1477353dbf99d1bda82139549aa 100755 --- a/applications/test/multiWorld/Allclean +++ b/tutorials/basic/laplacianFoam/multiWorld1/Allclean @@ -3,12 +3,14 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ -for subcase in left right +for subcase in $(./list-worlds) do ( - cd "$subcase" && cleanCase + cd "$subcase" || exit + cleanCase0 + rm -f *_mapped.obj 2>/dev/null ) done -rm -f log.* +rm -rf log.* 2>/dev/null #------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allrun b/tutorials/basic/laplacianFoam/multiWorld1/Allrun similarity index 60% rename from tutorials/basic/laplacianFoam/multiWorld/Allrun rename to tutorials/basic/laplacianFoam/multiWorld1/Allrun index 4ad24b00fe199b4c5bc1f74227a3bea0242d497e..73f3d91f7d7e92fb4ade8ca1ae1dedfe58d69c2d 100755 --- a/tutorials/basic/laplacianFoam/multiWorld/Allrun +++ b/tutorials/basic/laplacianFoam/multiWorld1/Allrun @@ -5,25 +5,19 @@ cd "${0%/*}" || exit # Run from this directory # Run serial ./Allrun.pre -mpirun -app ./mpirun_left_right.schema +echo "Begin run" +mpirun -app ./mpirun_worlds.schema # Run with database -mv -f log.run_left* log.run_right* - -for subcase in left right -do -( - cd "$subcase" || exit - foamListTimes -rm - restore0Dir - foamDictionary 0/T -entry boundaryField.coupled.sampleDatabase -add true -) -done - -mpirun -app ./mpirun_left_right.schema +./Allrun.addDatabase +mv -f log.run_* 2>/dev/null +echo "Begin run with database" +mpirun -app ./mpirun_worlds.schema ## Run parallel ## ./Allrun.pre-parallel ## mpirun -app ./mpirun.schema +echo "End" + #------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld1/Allrun.addDatabase b/tutorials/basic/laplacianFoam/multiWorld1/Allrun.addDatabase new file mode 100755 index 0000000000000000000000000000000000000000..17ba9cf53dd20b4ea3c0869d68264598e4a78855 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld1/Allrun.addDatabase @@ -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 + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre b/tutorials/basic/laplacianFoam/multiWorld1/Allrun.pre similarity index 68% rename from tutorials/basic/laplacianFoam/multiWorld/Allrun.pre rename to tutorials/basic/laplacianFoam/multiWorld1/Allrun.pre index 61541f6f5f6e7bcc684ee947c77322044fc39c64..05ad890d2a6d4e7967743b186d96ffe6c630ccd9 100755 --- a/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre +++ b/tutorials/basic/laplacianFoam/multiWorld1/Allrun.pre @@ -4,11 +4,19 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ # Create meshes and initial fields -for subcase in left right +for subcase in $(./list-worlds) do ( cd "$subcase" || exit - runApplication blockMesh && restore0Dir + echo "case=$subcase" + if [ -x ./Allrun.pre ] + then + ./Allrun.pre + else + runApplication blockMesh + fi + restore0Dir + echo ) done diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel b/tutorials/basic/laplacianFoam/multiWorld1/Allrun.pre-parallel similarity index 93% rename from tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel rename to tutorials/basic/laplacianFoam/multiWorld1/Allrun.pre-parallel index d6227536a020652e3382016073612cc4e213154c..ded773acc3820fd3151a33a491cfe26b9106c4fc 100755 --- a/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel +++ b/tutorials/basic/laplacianFoam/multiWorld1/Allrun.pre-parallel @@ -4,7 +4,7 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ # Create meshes and initial fields -for subcase in left right +for subcase in $(./list-worlds) do ( cd "$subcase" || exit diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld1/common/constant/transportProperties similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/left/constant/transportProperties rename to tutorials/basic/laplacianFoam/multiWorld1/common/constant/transportProperties diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld1/common/system/controlDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/common/system/controlDict rename to tutorials/basic/laplacianFoam/multiWorld1/common/system/controlDict diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld1/common/system/decomposeParDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/common/system/decomposeParDict rename to tutorials/basic/laplacianFoam/multiWorld1/common/system/decomposeParDict diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld1/common/system/fvSchemes similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/common/system/fvSchemes rename to tutorials/basic/laplacianFoam/multiWorld1/common/system/fvSchemes diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld1/common/system/fvSolution similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/common/system/fvSolution rename to tutorials/basic/laplacianFoam/multiWorld1/common/system/fvSolution diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld1/left/0.orig/T similarity index 98% rename from tutorials/basic/laplacianFoam/multiWorld/left/0.orig/T rename to tutorials/basic/laplacianFoam/multiWorld1/left/0.orig/T index f94e100bd8d579cc3db4888d3b7dd973783bc11b..ea1ba37ff224a34ba1775102ae30361edbf6211d 100644 --- a/tutorials/basic/laplacianFoam/multiWorld/left/0.orig/T +++ b/tutorials/basic/laplacianFoam/multiWorld1/left/0.orig/T @@ -29,7 +29,7 @@ boundaryField sampleMode nearestPatchFaceAMI; // Simulation world to sample - sampleWorld RIGHT; + sampleWorld right; // Region to sample sampleRegion region0; diff --git a/tutorials/basic/laplacianFoam/multiWorld1/left/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld1/left/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld1/left/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld1/left/system/blockMeshDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/left/system/blockMeshDict rename to tutorials/basic/laplacianFoam/multiWorld1/left/system/blockMeshDict diff --git a/applications/test/multiWorld/left/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld1/left/system/controlDict similarity index 100% rename from applications/test/multiWorld/left/system/controlDict rename to tutorials/basic/laplacianFoam/multiWorld1/left/system/controlDict diff --git a/applications/test/multiWorld/left/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld1/left/system/decomposeParDict similarity index 100% rename from applications/test/multiWorld/left/system/decomposeParDict rename to tutorials/basic/laplacianFoam/multiWorld1/left/system/decomposeParDict diff --git a/applications/test/multiWorld/left/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld1/left/system/fvSchemes similarity index 100% rename from applications/test/multiWorld/left/system/fvSchemes rename to tutorials/basic/laplacianFoam/multiWorld1/left/system/fvSchemes diff --git a/applications/test/multiWorld/left/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld1/left/system/fvSolution similarity index 100% rename from applications/test/multiWorld/left/system/fvSolution rename to tutorials/basic/laplacianFoam/multiWorld1/left/system/fvSolution diff --git a/tutorials/basic/laplacianFoam/multiWorld1/list-worlds b/tutorials/basic/laplacianFoam/multiWorld1/list-worlds new file mode 100755 index 0000000000000000000000000000000000000000..536d4dfe2ef5903e0c48c3702bf574a04d3b92e9 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld1/list-worlds @@ -0,0 +1,6 @@ +#!/bin/sh +#------------------------------------------------------------------------------ + +echo left right + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld1/mpirun.schema b/tutorials/basic/laplacianFoam/multiWorld1/mpirun.schema new file mode 100644 index 0000000000000000000000000000000000000000..e0ec9b4140139a6cd798e7cb78f7442836a35552 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld1/mpirun.schema @@ -0,0 +1,2 @@ +-np 2 laplacianFoam -case left -world left -parallel +-np 2 laplacianFoam -case right -world right -parallel diff --git a/tutorials/basic/laplacianFoam/multiWorld/mpirun_left_right.schema b/tutorials/basic/laplacianFoam/multiWorld1/mpirun_worlds.schema similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/mpirun_left_right.schema rename to tutorials/basic/laplacianFoam/multiWorld1/mpirun_worlds.schema diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld1/right/0.orig/T similarity index 98% rename from tutorials/basic/laplacianFoam/multiWorld/right/0.orig/T rename to tutorials/basic/laplacianFoam/multiWorld1/right/0.orig/T index b98bee77b2913ac8207f12251471ae408604403a..b9521e967aad1cc689aba8b960bc7177afe940c1 100644 --- a/tutorials/basic/laplacianFoam/multiWorld/right/0.orig/T +++ b/tutorials/basic/laplacianFoam/multiWorld1/right/0.orig/T @@ -29,7 +29,7 @@ boundaryField sampleMode nearestPatchFaceAMI; // Simulation world to sample - sampleWorld LEFT; + sampleWorld left; // Region to sample sampleRegion region0; diff --git a/tutorials/basic/laplacianFoam/multiWorld1/right/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld1/right/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld1/right/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld1/right/system/blockMeshDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/right/system/blockMeshDict rename to tutorials/basic/laplacianFoam/multiWorld1/right/system/blockMeshDict diff --git a/applications/test/multiWorld/right/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld1/right/system/controlDict similarity index 100% rename from applications/test/multiWorld/right/system/controlDict rename to tutorials/basic/laplacianFoam/multiWorld1/right/system/controlDict diff --git a/applications/test/multiWorld/right/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld1/right/system/decomposeParDict similarity index 100% rename from applications/test/multiWorld/right/system/decomposeParDict rename to tutorials/basic/laplacianFoam/multiWorld1/right/system/decomposeParDict diff --git a/applications/test/multiWorld/right/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld1/right/system/fvSchemes similarity index 100% rename from applications/test/multiWorld/right/system/fvSchemes rename to tutorials/basic/laplacianFoam/multiWorld1/right/system/fvSchemes diff --git a/applications/test/multiWorld/right/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld1/right/system/fvSolution similarity index 100% rename from applications/test/multiWorld/right/system/fvSolution rename to tutorials/basic/laplacianFoam/multiWorld1/right/system/fvSolution diff --git a/applications/test/multiWorld/run_world.sh b/tutorials/basic/laplacianFoam/multiWorld1/run_world.sh similarity index 71% rename from applications/test/multiWorld/run_world.sh rename to tutorials/basic/laplacianFoam/multiWorld1/run_world.sh index 2f2ac9f9761e1fd7355b1407fea35a838fc214b8..5e574ef4e261b83998709944cb44e2caa0b48089 100755 --- a/applications/test/multiWorld/run_world.sh +++ b/tutorials/basic/laplacianFoam/multiWorld1/run_world.sh @@ -15,9 +15,11 @@ then fi 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" -read dummy +log="log.run_$worldCase" + +"$application" -case "$worldCase" -world "$worldName" > "$log" 2>&1 # ---------------------------------------------------------------------------- diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allclean b/tutorials/basic/laplacianFoam/multiWorld2/Allclean similarity index 71% rename from tutorials/basic/laplacianFoam/multiWorld/Allclean rename to tutorials/basic/laplacianFoam/multiWorld2/Allclean index d9d9ef5636ac7f1d370da7542466843621e63711..4512a2f0dccbc1477353dbf99d1bda82139549aa 100755 --- a/tutorials/basic/laplacianFoam/multiWorld/Allclean +++ b/tutorials/basic/laplacianFoam/multiWorld2/Allclean @@ -3,12 +3,14 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ -for subcase in left right +for subcase in $(./list-worlds) do ( - cd "$subcase" && cleanCase0 + cd "$subcase" || exit + cleanCase0 + rm -f *_mapped.obj 2>/dev/null ) done -rm -f log.* +rm -rf log.* 2>/dev/null #------------------------------------------------------------------------------ diff --git a/applications/test/multiWorld/Allrun b/tutorials/basic/laplacianFoam/multiWorld2/Allrun similarity index 52% rename from applications/test/multiWorld/Allrun rename to tutorials/basic/laplacianFoam/multiWorld2/Allrun index a5604a34e680744d2c77cb8c1f5cf603a758ea41..cc3093f244fceee0436878d3b7fe5144ef506dab 100755 --- a/applications/test/multiWorld/Allrun +++ b/tutorials/basic/laplacianFoam/multiWorld2/Allrun @@ -5,15 +5,19 @@ cd "${0%/*}" || exit # Run from this directory # Run serial ./Allrun.pre -mpirun -app ./mpirun_left_right.schema +echo "Begin run - interworld communication" +mpirun -app ./mpirun_full.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 +# Run with database +if false +then + ./Allrun.addDatabase + rm -f log.run* 2>/dev/null + echo "Begin run - database data exchange" + mpirun -app ./mpirun_full.schema +fi + +echo "Can load with: paraview --script=load-worlds.py &" +echo "End" #------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld2/Allrun.addDatabase b/tutorials/basic/laplacianFoam/multiWorld2/Allrun.addDatabase new file mode 100755 index 0000000000000000000000000000000000000000..5b5b26469e6b71c50bb8ea33c478f12b16bacf08 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/Allrun.addDatabase @@ -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 + +#------------------------------------------------------------------------------ diff --git a/applications/test/multiWorld/Allrun.pre-parallel b/tutorials/basic/laplacianFoam/multiWorld2/Allrun.pre similarity index 58% rename from applications/test/multiWorld/Allrun.pre-parallel rename to tutorials/basic/laplacianFoam/multiWorld2/Allrun.pre index eaad67c68b6d7ea8f2840281d1c2f78c22545a45..928c9e254283c63362d90aaf99f9562b578a7b12 100755 --- a/applications/test/multiWorld/Allrun.pre-parallel +++ b/tutorials/basic/laplacianFoam/multiWorld2/Allrun.pre @@ -3,12 +3,21 @@ cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ -# Create meshes -for subcase in left right +# Create meshes and initial fields +for subcase in $(./list-worlds) do ( 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 diff --git a/applications/test/multiWorld/left/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld2/common/constant/transportProperties similarity index 92% rename from applications/test/multiWorld/left/constant/transportProperties rename to tutorials/basic/laplacianFoam/multiWorld2/common/constant/transportProperties index 5bb8a0784a5314f9e91470b8a1fc154f2546ea63..fb641eeeb3a2d644d8c349d81d6eaf43516f2e73 100644 --- a/applications/test/multiWorld/left/constant/transportProperties +++ b/tutorials/basic/laplacianFoam/multiWorld2/common/constant/transportProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | +| \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/test/multiWorld/common/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld2/common/system/controlDict similarity index 94% rename from applications/test/multiWorld/common/system/controlDict rename to tutorials/basic/laplacianFoam/multiWorld2/common/system/controlDict index aff336cb41b469990066660c788dca0cb7a6fe7a..7ee2771851a04636fe1313241e73fd89bf593dab 100644 --- a/applications/test/multiWorld/common/system/controlDict +++ b/tutorials/basic/laplacianFoam/multiWorld2/common/system/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | +| \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -19,9 +19,9 @@ libs (utilityFunctionObjects); DebugSwitches { + multiWorld 1; // mappedPatchBase 1; -// syncObjects 1; - +// syncObjects 2; } diff --git a/applications/test/multiWorld/common/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld2/common/system/decomposeParDict similarity index 100% rename from applications/test/multiWorld/common/system/decomposeParDict rename to tutorials/basic/laplacianFoam/multiWorld2/common/system/decomposeParDict diff --git a/applications/test/multiWorld/common/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld2/common/system/fvSchemes similarity index 95% rename from applications/test/multiWorld/common/system/fvSchemes rename to tutorials/basic/laplacianFoam/multiWorld2/common/system/fvSchemes index 6e67d123db9c73e348e3e5113f4007800cead2ee..028412c048bc60930f515133d664e80d877458a6 100644 --- a/applications/test/multiWorld/common/system/fvSchemes +++ b/tutorials/basic/laplacianFoam/multiWorld2/common/system/fvSchemes @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | +| \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/applications/test/multiWorld/common/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld2/common/system/fvSolution similarity index 93% rename from applications/test/multiWorld/common/system/fvSolution rename to tutorials/basic/laplacianFoam/multiWorld2/common/system/fvSolution index 737bf06d151fea540892b46abdd3adafc68d40d7..a7c94ca0baf966142adfbe3283a2d22ad68bb866 100644 --- a/applications/test/multiWorld/common/system/fvSolution +++ b/tutorials/basic/laplacianFoam/multiWorld2/common/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | +| \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/basic/laplacianFoam/multiWorld2/list-worlds b/tutorials/basic/laplacianFoam/multiWorld2/list-worlds new file mode 100755 index 0000000000000000000000000000000000000000..0ca989fc697bf3436bf060c26a909bfb7bfeb54f --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/list-worlds @@ -0,0 +1,6 @@ +#!/bin/sh +#------------------------------------------------------------------------------ + +echo top slab1 slab2 slab3 slab4 + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld2/load-worlds.py b/tutorials/basic/laplacianFoam/multiWorld2/load-worlds.py new file mode 100644 index 0000000000000000000000000000000000000000..ff80ba41b8938e8ace95e434977e5a8b21143614 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/load-worlds.py @@ -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() + +#================================================================ diff --git a/tutorials/basic/laplacianFoam/multiWorld2/mpirun_full.schema b/tutorials/basic/laplacianFoam/multiWorld2/mpirun_full.schema new file mode 100644 index 0000000000000000000000000000000000000000..f2af1722c0c1a00430de480699e27624fb3e6b3a --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/mpirun_full.schema @@ -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 diff --git a/tutorials/basic/laplacianFoam/multiWorld/run_world.sh b/tutorials/basic/laplacianFoam/multiWorld2/run_world.sh similarity index 58% rename from tutorials/basic/laplacianFoam/multiWorld/run_world.sh rename to tutorials/basic/laplacianFoam/multiWorld2/run_world.sh index 2f2ac9f9761e1fd7355b1407fea35a838fc214b8..8fe4a93df596c44affadd69a5ac67cc2be97f9a2 100755 --- a/tutorials/basic/laplacianFoam/multiWorld/run_world.sh +++ b/tutorials/basic/laplacianFoam/multiWorld2/run_world.sh @@ -2,12 +2,6 @@ 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" @@ -15,9 +9,11 @@ then fi worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')" -worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')" +# worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')" +worldName="$worldCase" + +log="log.run_$worldCase" -"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase" -read dummy +"$application" -case "$worldCase" -world "$worldName" > "$log" 2>&1 # ---------------------------------------------------------------------------- diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab1/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld2/slab1/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..5cf8ed43c2aa5e8207a2a7b879aa04308fd8fcfe --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab1/0.orig/T @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab1/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld2/slab1/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab1/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..8ee7c1603ad534e32b92060f168de9baa9536ec0 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/blockMeshDict @@ -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)); + } +); + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/controlDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict rename to tutorials/basic/laplacianFoam/multiWorld2/slab1/system/controlDict diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/decomposeParDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict rename to tutorials/basic/laplacianFoam/multiWorld2/slab1/system/decomposeParDict diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/fvSchemes similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes rename to tutorials/basic/laplacianFoam/multiWorld2/slab1/system/fvSchemes diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld2/slab1/system/fvSolution similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution rename to tutorials/basic/laplacianFoam/multiWorld2/slab1/system/fvSolution diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab2/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld2/slab2/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..c2cf629f7dba637d8509c84faf87c5c310fb83d1 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab2/0.orig/T @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab2/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld2/slab2/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab2/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/applications/test/multiWorld/right/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld2/slab2/system/blockMeshDict similarity index 51% rename from applications/test/multiWorld/right/system/blockMeshDict rename to tutorials/basic/laplacianFoam/multiWorld2/slab2/system/blockMeshDict index e2833174626dfe1e8a10ee71c5c6742608750616..c482516dbfe58c63b31b94cccdddba2f29150a54 100644 --- a/applications/test/multiWorld/right/system/blockMeshDict +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab2/system/blockMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | +| \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -14,76 +14,70 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +SLAB_OFFSET 1; + scale 0.1; +transform +{ + origin (#eval{0.5 * $SLAB_OFFSET} 0 0); + rotation none; +} + +xdim 0.5; +ydim 1; +zdim 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) -); + (0 0 0) + ($xdim 0 0) + ($xdim $ydim 0) + (0 $ydim 0) -blocks -( - hex (0 1 2 3 4 5 6 7) (2 2 1) simpleGrading (1 1 1) + (0 0 $zdim) + ($xdim 0 $zdim) + ($xdim $ydim $zdim) + (0 $ydim $zdim) ); -edges +blocks ( + hex (0 1 2 3 4 5 6 7) (2 2 1) grading (1 1 1) ); boundary ( - coupled + slab2_to_1 // left-side (face 0) { - type wall; - faces - ( - (0 4 7 3) - ); + type wall; + faces ((0 0)); } - top + + slab2_to_3 // right-side (face 1) { - type wall; - faces - ( - (3 7 6 2) - ); + type wall; + faces ((0 1)); } - bottom + + bottom // face 2 { - type wall; - faces - ( - (1 5 4 0) - ); + type wall; + faces ((0 2)); } - right + + to_top // top: face 3 { - type wall; - faces - ( - (2 6 5 1) - ); + type wall; + faces ((0 3)); } - frontAndBack + + frontAndBack // face 4 5 { - type empty; - faces - ( - (0 3 2 1) - (4 5 6 7) - ); + type empty; + faces ((0 4) (0 5)); } ); -mergePatchPairs -( -); // ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld2/slab2/system/controlDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/right/system/controlDict rename to tutorials/basic/laplacianFoam/multiWorld2/slab2/system/controlDict diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld2/slab2/system/decomposeParDict similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/right/system/decomposeParDict rename to tutorials/basic/laplacianFoam/multiWorld2/slab2/system/decomposeParDict diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld2/slab2/system/fvSchemes similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/right/system/fvSchemes rename to tutorials/basic/laplacianFoam/multiWorld2/slab2/system/fvSchemes diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld2/slab2/system/fvSolution similarity index 100% rename from tutorials/basic/laplacianFoam/multiWorld/right/system/fvSolution rename to tutorials/basic/laplacianFoam/multiWorld2/slab2/system/fvSolution diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld2/slab3/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..23bd2a6fbfa113372302884cfc34231f0c280b7c --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/0.orig/T @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld2/slab3/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..afb6537de04720a5654fe278b7b87adef745df7e --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/blockMeshDict @@ -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)); + } +); + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/controlDict new file mode 120000 index 0000000000000000000000000000000000000000..e38bfb1f6b29ad74081447310151d1d7cb723d8c --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/controlDict @@ -0,0 +1 @@ +../../common/system/controlDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..9276e7939a3791b19a21ab0f390795f8b35de238 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/decomposeParDict @@ -0,0 +1 @@ +../../common/system/decomposeParDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..274d17e172845cf7de4dddb3e6ed0a5464d437af --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSchemes @@ -0,0 +1 @@ +../../common/system/fvSchemes \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..504f0b1c9e2057fe941ed5718c4be80647f41b98 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab3/system/fvSolution @@ -0,0 +1 @@ +../../common/system/fvSolution \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld2/slab4/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..e22efdd6aab245573c39c5f2d13b3b61eb9ef417 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/0.orig/T @@ -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; + } +} + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld2/slab4/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..493d29f16479d3495cc47a42d4c83b7e9dfee6b0 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/blockMeshDict @@ -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)); + } +); + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/controlDict new file mode 120000 index 0000000000000000000000000000000000000000..e38bfb1f6b29ad74081447310151d1d7cb723d8c --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/controlDict @@ -0,0 +1 @@ +../../common/system/controlDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..9276e7939a3791b19a21ab0f390795f8b35de238 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/decomposeParDict @@ -0,0 +1 @@ +../../common/system/decomposeParDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..274d17e172845cf7de4dddb3e6ed0a5464d437af --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSchemes @@ -0,0 +1 @@ +../../common/system/fvSchemes \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..504f0b1c9e2057fe941ed5718c4be80647f41b98 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/slab4/system/fvSolution @@ -0,0 +1 @@ +../../common/system/fvSolution \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/0.orig/T b/tutorials/basic/laplacianFoam/multiWorld2/top/0.orig/T new file mode 100644 index 0000000000000000000000000000000000000000..d480b95498e6971196d301eee7549b88240b79b8 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/0.orig/T @@ -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; + } +} + +// ************************************************************************* // diff --git a/applications/test/multiWorld/Allrun.pre b/tutorials/basic/laplacianFoam/multiWorld2/top/Allrun.pre similarity index 72% rename from applications/test/multiWorld/Allrun.pre rename to tutorials/basic/laplacianFoam/multiWorld2/top/Allrun.pre index eaad67c68b6d7ea8f2840281d1c2f78c22545a45..1863e020ca34f866b1850cd44e4d0ee63fe694b0 100755 --- a/applications/test/multiWorld/Allrun.pre +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/Allrun.pre @@ -4,12 +4,10 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ # Create meshes -for subcase in left right -do -( - cd "$subcase" || exit - runApplication blockMesh -) -done +runApplication blockMesh + +runApplication -s patches topoSet -dict system/topoSetDict.patches + +runApplication createPatch -overwrite #------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/constant/transportProperties b/tutorials/basic/laplacianFoam/multiWorld2/top/constant/transportProperties new file mode 120000 index 0000000000000000000000000000000000000000..e6a4e4f7fc53f2c83e8fcde854665db55f6466d2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/constant/transportProperties @@ -0,0 +1 @@ +../../common/constant/transportProperties \ No newline at end of file diff --git a/applications/test/multiWorld/left/system/blockMeshDict b/tutorials/basic/laplacianFoam/multiWorld2/top/system/blockMeshDict similarity index 55% rename from applications/test/multiWorld/left/system/blockMeshDict rename to tutorials/basic/laplacianFoam/multiWorld2/top/system/blockMeshDict index eb3f42e5735d5049237c7557eea9c560fb57674e..1fed71bacc98b96a6988875dc5838a61efd74023 100644 --- a/applications/test/multiWorld/left/system/blockMeshDict +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/blockMeshDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | +| \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -13,78 +13,75 @@ FoamFile object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// TOP + +NSLABS 4; 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 ( - (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) + (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) simpleGrading (1 1 1) + hex (0 1 2 3 4 5 6 7) ($nx 2 1) grading (1 1 1) ); -edges -( -); boundary ( - coupled + left { - type wall; - faces - ( - (2 6 5 1) - ); + type wall; + faces ((0 0)); } - top + right { - type wall; - faces - ( - (3 7 6 2) - ); + type wall; + faces ((0 1)); } - bottom + + interface // inter-world connections { - type wall; - faces - ( - (1 5 4 0) - ); + type wall; + faces ((0 2)); } - left + + top { - type wall; - faces - ( - (0 4 7 3) - ); + type wall; + faces ((0 3)); } + frontAndBack { - type empty; - faces - ( - (0 3 2 1) - (4 5 6 7) - ); + type empty; + faces ((0 4) (0 5)); } ); -mergePatchPairs -( -); // ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld2/top/system/controlDict new file mode 120000 index 0000000000000000000000000000000000000000..e38bfb1f6b29ad74081447310151d1d7cb723d8c --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/controlDict @@ -0,0 +1 @@ +../../common/system/controlDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/system/createPatchDict b/tutorials/basic/laplacianFoam/multiWorld2/top/system/createPatchDict new file mode 100644 index 0000000000000000000000000000000000000000..9d333f1df2ddf31cc66e633df9318f88190f529d --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/createPatchDict @@ -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; + } +); + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld2/top/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..9276e7939a3791b19a21ab0f390795f8b35de238 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/decomposeParDict @@ -0,0 +1 @@ +../../common/system/decomposeParDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..274d17e172845cf7de4dddb3e6ed0a5464d437af --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSchemes @@ -0,0 +1 @@ +../../common/system/fvSchemes \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..504f0b1c9e2057fe941ed5718c4be80647f41b98 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/fvSolution @@ -0,0 +1 @@ +../../common/system/fvSolution \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld2/top/system/topoSetDict.patches b/tutorials/basic/laplacianFoam/multiWorld2/top/system/topoSetDict.patches new file mode 100644 index 0000000000000000000000000000000000000000..2249d242f8436e8aca041ee1e3bc6f3cd3672bb2 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld2/top/system/topoSetDict.patches @@ -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); + } +); + + +// ************************************************************************* //