diff --git a/applications/test/multiWorld/Allclean b/applications/test/multiWorld/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..336db4138515a5a9192bca1dabf80608d59140c6 --- /dev/null +++ b/applications/test/multiWorld/Allclean @@ -0,0 +1,14 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +for subcase in left right +do +( + cd "$subcase" && cleanCase +) +done +rm -f log.* + +#------------------------------------------------------------------------------ diff --git a/applications/test/multiWorld/Allrun b/applications/test/multiWorld/Allrun index e889d48c467078e870f84c4e7351796a083d1629..a5604a34e680744d2c77cb8c1f5cf603a758ea41 100755 --- a/applications/test/multiWorld/Allrun +++ b/applications/test/multiWorld/Allrun @@ -4,11 +4,11 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ # Run serial -(cd left && runApplication blockMesh) -(cd right && runApplication blockMesh) +./Allrun.pre mpirun -app ./mpirun_left_right.schema ## Run parallel +# ./Allrun.pre-parallel #(cd left && runApplication blockMesh) #(cd left && runApplication decomposePar) #(cd right && runApplication blockMesh) diff --git a/applications/test/multiWorld/Allrun.pre b/applications/test/multiWorld/Allrun.pre new file mode 100755 index 0000000000000000000000000000000000000000..eaad67c68b6d7ea8f2840281d1c2f78c22545a45 --- /dev/null +++ b/applications/test/multiWorld/Allrun.pre @@ -0,0 +1,15 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +# Create meshes +for subcase in left right +do +( + cd "$subcase" || exit + runApplication blockMesh +) +done + +#------------------------------------------------------------------------------ diff --git a/applications/test/multiWorld/Allrun.pre-parallel b/applications/test/multiWorld/Allrun.pre-parallel new file mode 100755 index 0000000000000000000000000000000000000000..eaad67c68b6d7ea8f2840281d1c2f78c22545a45 --- /dev/null +++ b/applications/test/multiWorld/Allrun.pre-parallel @@ -0,0 +1,15 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +# Create meshes +for subcase in left right +do +( + cd "$subcase" || exit + runApplication blockMesh +) +done + +#------------------------------------------------------------------------------ diff --git a/applications/test/multiWorld/common/system/controlDict b/applications/test/multiWorld/common/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..aff336cb41b469990066660c788dca0cb7a6fe7a --- /dev/null +++ b/applications/test/multiWorld/common/system/controlDict @@ -0,0 +1,75 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2106 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs (utilityFunctionObjects); + +DebugSwitches +{ +// mappedPatchBase 1; +// syncObjects 1; + +} + + +application laplacianFoam; + +startFrom startTime; //latestTime; + +startTime 0; + +stopAt endTime; + +endTime 50; + +deltaT 1; + +//writeControl runTime; +//writeInterval 0.1; +writeControl timeStep; +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ + syncObjects + { + type syncObjects; + libs (utilityFunctionObjects); + + // Where is data located relative to runTime. Given as a filename + // with every '/' indicating a sub-objectRegistry w.r.t. runTime. + // Local data is under <root>/send/processorXXX. After execution + // data will be under the corresponding <root>/receive/processorYYY + // objectRegistry + //root "level0/level1/level2"; + } +} + +// ************************************************************************* // diff --git a/applications/test/multiWorld/common/system/decomposeParDict b/applications/test/multiWorld/common/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..501cb8db4e4cf39900b0b63e760532b498e9a9c1 --- /dev/null +++ b/applications/test/multiWorld/common/system/decomposeParDict @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2112 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method hierarchical; + +coeffs +{ + n (2 1 1); +} + + +// ************************************************************************* // diff --git a/applications/test/multiWorld/common/system/fvSchemes b/applications/test/multiWorld/common/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..6e67d123db9c73e348e3e5113f4007800cead2ee --- /dev/null +++ b/applications/test/multiWorld/common/system/fvSchemes @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2106 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; //Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(T) Gauss linear; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; + laplacian(DT,T) Gauss linear corrected; + laplacian(DTV,T) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/applications/test/multiWorld/common/system/fvSolution b/applications/test/multiWorld/common/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..737bf06d151fea540892b46abdd3adafc68d40d7 --- /dev/null +++ b/applications/test/multiWorld/common/system/fvSolution @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2106 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + T + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 2; +} + + +// ************************************************************************* // diff --git a/applications/test/multiWorld/left/system/controlDict b/applications/test/multiWorld/left/system/controlDict deleted file mode 100644 index aff336cb41b469990066660c788dca0cb7a6fe7a..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/left/system/controlDict +++ /dev/null @@ -1,75 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -libs (utilityFunctionObjects); - -DebugSwitches -{ -// mappedPatchBase 1; -// syncObjects 1; - -} - - -application laplacianFoam; - -startFrom startTime; //latestTime; - -startTime 0; - -stopAt endTime; - -endTime 50; - -deltaT 1; - -//writeControl runTime; -//writeInterval 0.1; -writeControl timeStep; -writeInterval 1; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - syncObjects - { - type syncObjects; - libs (utilityFunctionObjects); - - // Where is data located relative to runTime. Given as a filename - // with every '/' indicating a sub-objectRegistry w.r.t. runTime. - // Local data is under <root>/send/processorXXX. After execution - // data will be under the corresponding <root>/receive/processorYYY - // objectRegistry - //root "level0/level1/level2"; - } -} - -// ************************************************************************* // diff --git a/applications/test/multiWorld/left/system/controlDict b/applications/test/multiWorld/left/system/controlDict new file mode 120000 index 0000000000000000000000000000000000000000..e38bfb1f6b29ad74081447310151d1d7cb723d8c --- /dev/null +++ b/applications/test/multiWorld/left/system/controlDict @@ -0,0 +1 @@ +../../common/system/controlDict \ No newline at end of file diff --git a/applications/test/multiWorld/left/system/decomposeParDict b/applications/test/multiWorld/left/system/decomposeParDict deleted file mode 100644 index 926ce23810d12006637290f83de33e78ea22b998..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/left/system/decomposeParDict +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - note "mesh decomposition control dictionary"; - object decomposeParDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -//- The total number of domains (mandatory) -numberOfSubdomains 2; - -//- The decomposition method (mandatory) -method hierarchical; -n (2 1 1); - -// ************************************************************************* // diff --git a/applications/test/multiWorld/left/system/decomposeParDict b/applications/test/multiWorld/left/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..9276e7939a3791b19a21ab0f390795f8b35de238 --- /dev/null +++ b/applications/test/multiWorld/left/system/decomposeParDict @@ -0,0 +1 @@ +../../common/system/decomposeParDict \ No newline at end of file diff --git a/applications/test/multiWorld/left/system/fvSchemes b/applications/test/multiWorld/left/system/fvSchemes deleted file mode 100644 index 6e67d123db9c73e348e3e5113f4007800cead2ee..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/left/system/fvSchemes +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object fvSchemes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -ddtSchemes -{ - default steadyState; //Euler; -} - -gradSchemes -{ - default Gauss linear; - grad(T) Gauss linear; -} - -divSchemes -{ - default none; -} - -laplacianSchemes -{ - default none; - laplacian(DT,T) Gauss linear corrected; - laplacian(DTV,T) Gauss linear corrected; -} - -interpolationSchemes -{ - default linear; -} - -snGradSchemes -{ - default corrected; -} - - -// ************************************************************************* // diff --git a/applications/test/multiWorld/left/system/fvSchemes b/applications/test/multiWorld/left/system/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..274d17e172845cf7de4dddb3e6ed0a5464d437af --- /dev/null +++ b/applications/test/multiWorld/left/system/fvSchemes @@ -0,0 +1 @@ +../../common/system/fvSchemes \ No newline at end of file diff --git a/applications/test/multiWorld/left/system/fvSolution b/applications/test/multiWorld/left/system/fvSolution deleted file mode 100644 index 737bf06d151fea540892b46abdd3adafc68d40d7..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/left/system/fvSolution +++ /dev/null @@ -1,35 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object fvSolution; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -solvers -{ - T - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } -} - -SIMPLE -{ - nNonOrthogonalCorrectors 2; -} - - -// ************************************************************************* // diff --git a/applications/test/multiWorld/left/system/fvSolution b/applications/test/multiWorld/left/system/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..504f0b1c9e2057fe941ed5718c4be80647f41b98 --- /dev/null +++ b/applications/test/multiWorld/left/system/fvSolution @@ -0,0 +1 @@ +../../common/system/fvSolution \ No newline at end of file diff --git a/applications/test/multiWorld/mpirun.schema b/applications/test/multiWorld/mpirun.schema index faa5932bdb1a1537ebfc82afb7961e18b1c478c6..49aadf442eeb5354ff0fd93de00bb438be920cbc 100644 --- a/applications/test/multiWorld/mpirun.schema +++ b/applications/test/multiWorld/mpirun.schema @@ -1,7 +1,2 @@ --np 2 laplacianFoam -case ./left -world LEFT -parallel --np 2 laplacianFoam -case ./right -world RIGHT -parallel - -#-np 1 xterm -font fixed -title processor0 -geometry 200x15+0+0 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor0.sh -#-np 1 xterm -font fixed -title processor1 -geometry 200x15+0+200 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor1.sh -#-np 1 xterm -font fixed -title processor2 -geometry 200x15+0+400 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor2.sh -#-np 1 xterm -font fixed -title processor3 -geometry 200x15+0+600 -e /home/mattijs/OpenFOAM/OpenFOAM-plus.feature-localWorld/applications/test/multiWorld/processor3.sh +-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 index c811e563f4f04da6ef1b0562f296f9492c554a78..133e452fb6034c4b2dc67c794bad8b389eb1b787 100644 --- a/applications/test/multiWorld/mpirun_left_right.schema +++ b/applications/test/multiWorld/mpirun_left_right.schema @@ -1,2 +1,2 @@ --np 1 xterm -font fixed -title processor0 -geometry 200x15+0+0 -e ./run_left.sh --np 1 xterm -font fixed -title processor1 -geometry 200x15+0+200 -e ./run_right.sh +-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/system/controlDict b/applications/test/multiWorld/right/system/controlDict index a538e4c6da2f25aedb044d905d52ded3dc84e65d..e38bfb1f6b29ad74081447310151d1d7cb723d8c 120000 --- a/applications/test/multiWorld/right/system/controlDict +++ b/applications/test/multiWorld/right/system/controlDict @@ -1 +1 @@ -../../left/system/controlDict \ No newline at end of file +../../common/system/controlDict \ No newline at end of file diff --git a/applications/test/multiWorld/right/system/decomposeParDict b/applications/test/multiWorld/right/system/decomposeParDict index 44a7cb6766c8e16b8c1bde29aedc2a89c64caa32..9276e7939a3791b19a21ab0f390795f8b35de238 120000 --- a/applications/test/multiWorld/right/system/decomposeParDict +++ b/applications/test/multiWorld/right/system/decomposeParDict @@ -1 +1 @@ -../../left/system/decomposeParDict \ No newline at end of file +../../common/system/decomposeParDict \ No newline at end of file diff --git a/applications/test/multiWorld/right/system/fvSchemes b/applications/test/multiWorld/right/system/fvSchemes index d443e22599e875044e656526a9bb885ae7938dfe..274d17e172845cf7de4dddb3e6ed0a5464d437af 120000 --- a/applications/test/multiWorld/right/system/fvSchemes +++ b/applications/test/multiWorld/right/system/fvSchemes @@ -1 +1 @@ -../../left/system/fvSchemes \ No newline at end of file +../../common/system/fvSchemes \ No newline at end of file diff --git a/applications/test/multiWorld/right/system/fvSolution b/applications/test/multiWorld/right/system/fvSolution index 30d61e5f30fa01c4225bc40a3fdd7789f330dbd3..504f0b1c9e2057fe941ed5718c4be80647f41b98 120000 --- a/applications/test/multiWorld/right/system/fvSolution +++ b/applications/test/multiWorld/right/system/fvSolution @@ -1 +1 @@ -../../left/system/fvSolution \ No newline at end of file +../../common/system/fvSolution \ No newline at end of file diff --git a/applications/test/multiWorld/run_left.sh b/applications/test/multiWorld/run_left.sh deleted file mode 100755 index ff10c97611e3c720fb8d95764225f89e184cf628..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/run_left.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -laplacianFoam -case ./left -world LEFT 2>&1 | tee log.run_left -read dummy diff --git a/applications/test/multiWorld/run_right.sh b/applications/test/multiWorld/run_right.sh deleted file mode 100755 index 529bea06fbaed8fae2e9f708d9eb68a3616b8a64..0000000000000000000000000000000000000000 --- a/applications/test/multiWorld/run_right.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -laplacianFoam -case ./right -world RIGHT 2>&1 | tee log.run_right -read dummy diff --git a/applications/test/multiWorld/run_world.sh b/applications/test/multiWorld/run_world.sh new file mode 100755 index 0000000000000000000000000000000000000000..2f2ac9f9761e1fd7355b1407fea35a838fc214b8 --- /dev/null +++ b/applications/test/multiWorld/run_world.sh @@ -0,0 +1,23 @@ +#!/bin/sh +world="${1:?specify world/case}" +application="${2:-laplacianFoam}" + +# case "$application" in +# (-test) +# application="Test-multiWorld1" +# ;; +# esac + +if [ -z "$application" ] || ! command -v "$application" > /dev/null +then + echo "No application: $application" + exit 2 +fi + +worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')" +worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')" + +"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase" +read dummy + +# ---------------------------------------------------------------------------- diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C index 73cbe376cae0f85ee3a56eba56280154db58d495..42dafa6419027d103303940bc4d934d655e0e6a4 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------*\ ========= | - \\ / F ield |2011 OpenFOAM: The Open Source CFD Toolbox + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allrun b/tutorials/basic/laplacianFoam/multiWorld/Allrun index e709fcb730a3a73c0d009c1e92322dadff237b6b..4ad24b00fe199b4c5bc1f74227a3bea0242d497e 100755 --- a/tutorials/basic/laplacianFoam/multiWorld/Allrun +++ b/tutorials/basic/laplacianFoam/multiWorld/Allrun @@ -4,19 +4,11 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ # Run serial -for subcase in left right -do -( - cd "$subcase" || exit - runApplication blockMesh && restore0Dir -) -done - +./Allrun.pre mpirun -app ./mpirun_left_right.schema # Run with database -mv -f log.run_left log.run_left_direct -mv -f log.run_right log.run_right_direct +mv -f log.run_left* log.run_right* for subcase in left right do @@ -31,13 +23,7 @@ done mpirun -app ./mpirun_left_right.schema ## Run parallel -## for subcase in left right -## do -## ( -## cd "$subcase" || exit -## runApplication blockMesh && runApplication decomposePar -## ) -## done +## ./Allrun.pre-parallel ## mpirun -app ./mpirun.schema #------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre b/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre new file mode 100755 index 0000000000000000000000000000000000000000..61541f6f5f6e7bcc684ee947c77322044fc39c64 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre @@ -0,0 +1,15 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +# Create meshes and initial fields +for subcase in left right +do +( + cd "$subcase" || exit + runApplication blockMesh && restore0Dir +) +done + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel b/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel new file mode 100755 index 0000000000000000000000000000000000000000..d6227536a020652e3382016073612cc4e213154c --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel @@ -0,0 +1,15 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +# Create meshes and initial fields +for subcase in left right +do +( + cd "$subcase" || exit + runApplication blockMesh && restore0Dir && runApplication decomposePar +) +done + +#------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld/common/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..1aef7a6b6d61f26f05e4274c5213f172e66a7c90 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/common/system/controlDict @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2106 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs (utilityFunctionObjects); + +application laplacianFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 1; + +writeControl timeStep; +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ + syncObjects + { + type syncObjects; + libs (utilityFunctionObjects); + + // Where is data located relative to runTime. Given as a filename + // with every '/' indicating a sub-objectRegistry w.r.t. runTime. + // Local data is under <root>/send/processorXXX. After execution + // data will be under the corresponding <root>/receive/processorYYY + // objectRegistry + //root "level0/level1/level2"; + } +} + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld/common/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..528a9bdc2ad16811b2e03c5a95fc585a8339617a --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/common/system/decomposeParDict @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2112 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method hierarchical; + +coeffs +{ + n (2 1 1); +} + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..5fa3d1b62d071e908e2e2484a137eae48fdc568a --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2106 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + grad(T) Gauss linear; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; + laplacian(DT,T) Gauss linear corrected; + laplacian(DTV,T) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..3d57616a02d03e6efbc79904a00b0f510b056184 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/common/system/fvSolution @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2106 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + T + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 2; +} + + +// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict deleted file mode 100644 index 1aef7a6b6d61f26f05e4274c5213f172e66a7c90..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict +++ /dev/null @@ -1,65 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -libs (utilityFunctionObjects); - -application laplacianFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 5; - -deltaT 1; - -writeControl timeStep; -writeInterval 1; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression off; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable true; - -functions -{ - syncObjects - { - type syncObjects; - libs (utilityFunctionObjects); - - // Where is data located relative to runTime. Given as a filename - // with every '/' indicating a sub-objectRegistry w.r.t. runTime. - // Local data is under <root>/send/processorXXX. After execution - // data will be under the corresponding <root>/receive/processorYYY - // objectRegistry - //root "level0/level1/level2"; - } -} - - -// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict new file mode 120000 index 0000000000000000000000000000000000000000..e38bfb1f6b29ad74081447310151d1d7cb723d8c --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict @@ -0,0 +1 @@ +../../common/system/controlDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict deleted file mode 100644 index 66180fcba9bb26ca08a0646bdf36bfdc85e9a689..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object decomposeParDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -numberOfSubdomains 2; - -method hierarchical; - -n (2 1 1); - - -// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict new file mode 120000 index 0000000000000000000000000000000000000000..9276e7939a3791b19a21ab0f390795f8b35de238 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict @@ -0,0 +1 @@ +../../common/system/decomposeParDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes deleted file mode 100644 index 5fa3d1b62d071e908e2e2484a137eae48fdc568a..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes +++ /dev/null @@ -1,51 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object fvSchemes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -ddtSchemes -{ - default steadyState; -} - -gradSchemes -{ - default Gauss linear; - grad(T) Gauss linear; -} - -divSchemes -{ - default none; -} - -laplacianSchemes -{ - default none; - laplacian(DT,T) Gauss linear corrected; - laplacian(DTV,T) Gauss linear corrected; -} - -interpolationSchemes -{ - default linear; -} - -snGradSchemes -{ - default corrected; -} - - -// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..274d17e172845cf7de4dddb3e6ed0a5464d437af --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes @@ -0,0 +1 @@ +../../common/system/fvSchemes \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution deleted file mode 100644 index 3d57616a02d03e6efbc79904a00b0f510b056184..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution +++ /dev/null @@ -1,34 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2106 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object fvSolution; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -solvers -{ - T - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } -} - -SIMPLE -{ - nNonOrthogonalCorrectors 2; -} - - -// ************************************************************************* // diff --git a/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..504f0b1c9e2057fe941ed5718c4be80647f41b98 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution @@ -0,0 +1 @@ +../../common/system/fvSolution \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/mpirun_left_right.schema b/tutorials/basic/laplacianFoam/multiWorld/mpirun_left_right.schema index a3246667da651812a43035010a6729cd0678c867..000b17e65c9025ac294b83f6ceb063c3f6260e4a 100644 --- a/tutorials/basic/laplacianFoam/multiWorld/mpirun_left_right.schema +++ b/tutorials/basic/laplacianFoam/multiWorld/mpirun_left_right.schema @@ -1,2 +1,2 @@ --np 1 ./run_left.sh --np 1 ./run_right.sh +-np 1 ./run_world.sh left +-np 1 ./run_world.sh right diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/controlDict b/tutorials/basic/laplacianFoam/multiWorld/right/system/controlDict index a538e4c6da2f25aedb044d905d52ded3dc84e65d..e38bfb1f6b29ad74081447310151d1d7cb723d8c 120000 --- a/tutorials/basic/laplacianFoam/multiWorld/right/system/controlDict +++ b/tutorials/basic/laplacianFoam/multiWorld/right/system/controlDict @@ -1 +1 @@ -../../left/system/controlDict \ No newline at end of file +../../common/system/controlDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/decomposeParDict b/tutorials/basic/laplacianFoam/multiWorld/right/system/decomposeParDict index 44a7cb6766c8e16b8c1bde29aedc2a89c64caa32..9276e7939a3791b19a21ab0f390795f8b35de238 120000 --- a/tutorials/basic/laplacianFoam/multiWorld/right/system/decomposeParDict +++ b/tutorials/basic/laplacianFoam/multiWorld/right/system/decomposeParDict @@ -1 +1 @@ -../../left/system/decomposeParDict \ No newline at end of file +../../common/system/decomposeParDict \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSchemes b/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSchemes index d443e22599e875044e656526a9bb885ae7938dfe..274d17e172845cf7de4dddb3e6ed0a5464d437af 120000 --- a/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSchemes +++ b/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSchemes @@ -1 +1 @@ -../../left/system/fvSchemes \ No newline at end of file +../../common/system/fvSchemes \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSolution b/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSolution index 30d61e5f30fa01c4225bc40a3fdd7789f330dbd3..504f0b1c9e2057fe941ed5718c4be80647f41b98 120000 --- a/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSolution +++ b/tutorials/basic/laplacianFoam/multiWorld/right/system/fvSolution @@ -1 +1 @@ -../../left/system/fvSolution \ No newline at end of file +../../common/system/fvSolution \ No newline at end of file diff --git a/tutorials/basic/laplacianFoam/multiWorld/run_left.sh b/tutorials/basic/laplacianFoam/multiWorld/run_left.sh deleted file mode 100755 index d0e6bc68da37c7192ff7cb2633dea9a85eb7c6d4..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/run_left.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -laplacianFoam -case left -world LEFT 2>&1 | tee log.run_left -read dummy diff --git a/tutorials/basic/laplacianFoam/multiWorld/run_right.sh b/tutorials/basic/laplacianFoam/multiWorld/run_right.sh deleted file mode 100755 index 4177518422fd2c190acc6530d3cb49919f68a328..0000000000000000000000000000000000000000 --- a/tutorials/basic/laplacianFoam/multiWorld/run_right.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -laplacianFoam -case right -world RIGHT 2>&1 | tee log.run_right -read dummy diff --git a/tutorials/basic/laplacianFoam/multiWorld/run_world.sh b/tutorials/basic/laplacianFoam/multiWorld/run_world.sh new file mode 100755 index 0000000000000000000000000000000000000000..2f2ac9f9761e1fd7355b1407fea35a838fc214b8 --- /dev/null +++ b/tutorials/basic/laplacianFoam/multiWorld/run_world.sh @@ -0,0 +1,23 @@ +#!/bin/sh +world="${1:?specify world/case}" +application="${2:-laplacianFoam}" + +# case "$application" in +# (-test) +# application="Test-multiWorld1" +# ;; +# esac + +if [ -z "$application" ] || ! command -v "$application" > /dev/null +then + echo "No application: $application" + exit 2 +fi + +worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')" +worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')" + +"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase" +read dummy + +# ---------------------------------------------------------------------------- diff --git a/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane b/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane index 12168eed0f05965f414ae786456b68d8f8bb76c3..99c326b5f880005435d82c693305e66268833298 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane +++ b/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane @@ -79,8 +79,6 @@ SCOPECoeffs thermophysicalProperties { - thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; - stoichiometricAirFuelMassRatio 17.1667; fuel diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/thermophysicalProperties b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/thermophysicalProperties index f583a68f3f4e61d454eac0973001facd209932d6..8815c41c2d5d5e997d77c327c59de3b99645e0a4 100644 --- a/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/thermophysicalProperties +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/thermophysicalProperties @@ -14,7 +14,16 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hePsiThermo<pureMixture<const<hConst<perfectGas<specie>>,sensibleEnthalpy>>>; +thermoType +{ + type hePsiThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} // Note: these are the properties for a "normalised" inviscid gas // for which the speed of sound is 1 m/s at a temperature of 1K