From aca366d2933fa77b167ff617b0e2429f971a9dd7 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Wed, 14 Jul 2021 15:47:00 +0200 Subject: [PATCH] TUT: replace remaining templated thermoType TUT: some simplification for multiWorld test STYLE: remove some editor junk --- applications/test/multiWorld/Allclean | 14 ++++ applications/test/multiWorld/Allrun | 4 +- applications/test/multiWorld/Allrun.pre | 15 ++++ .../test/multiWorld/Allrun.pre-parallel | 15 ++++ .../test/multiWorld/common/system/controlDict | 75 ++++++++++++++++++ .../multiWorld/common/system/decomposeParDict | 28 +++++++ .../test/multiWorld/common/system/fvSchemes | 52 +++++++++++++ .../test/multiWorld/common/system/fvSolution | 35 +++++++++ .../test/multiWorld/left/system/controlDict | 76 +------------------ .../multiWorld/left/system/decomposeParDict | 26 +------ .../test/multiWorld/left/system/fvSchemes | 53 +------------ .../test/multiWorld/left/system/fvSolution | 36 +-------- applications/test/multiWorld/mpirun.schema | 9 +-- .../test/multiWorld/mpirun_left_right.schema | 4 +- .../test/multiWorld/right/system/controlDict | 2 +- .../multiWorld/right/system/decomposeParDict | 2 +- .../test/multiWorld/right/system/fvSchemes | 2 +- .../test/multiWorld/right/system/fvSolution | 2 +- applications/test/multiWorld/run_left.sh | 3 - applications/test/multiWorld/run_right.sh | 3 - applications/test/multiWorld/run_world.sh | 23 ++++++ .../pointPatchField/pointPatchFieldNew.C | 2 +- .../basic/laplacianFoam/multiWorld/Allrun | 20 +---- .../basic/laplacianFoam/multiWorld/Allrun.pre | 15 ++++ .../multiWorld/Allrun.pre-parallel | 15 ++++ .../multiWorld/common/system/controlDict | 65 ++++++++++++++++ .../multiWorld/common/system/decomposeParDict | 26 +++++++ .../multiWorld/common/system/fvSchemes | 51 +++++++++++++ .../multiWorld/common/system/fvSolution | 34 +++++++++ .../multiWorld/left/system/controlDict | 66 +--------------- .../multiWorld/left/system/decomposeParDict | 25 +----- .../multiWorld/left/system/fvSchemes | 52 +------------ .../multiWorld/left/system/fvSolution | 35 +-------- .../multiWorld/mpirun_left_right.schema | 4 +- .../multiWorld/right/system/controlDict | 2 +- .../multiWorld/right/system/decomposeParDict | 2 +- .../multiWorld/right/system/fvSchemes | 2 +- .../multiWorld/right/system/fvSolution | 2 +- .../laplacianFoam/multiWorld/run_left.sh | 3 - .../laplacianFoam/multiWorld/run_right.sh | 3 - .../laplacianFoam/multiWorld/run_world.sh | 23 ++++++ .../PDRFoam/pipeLattice/fuels/methane | 2 - .../OpenCFD/constant/thermophysicalProperties | 11 ++- 43 files changed, 524 insertions(+), 415 deletions(-) create mode 100755 applications/test/multiWorld/Allclean create mode 100755 applications/test/multiWorld/Allrun.pre create mode 100755 applications/test/multiWorld/Allrun.pre-parallel create mode 100644 applications/test/multiWorld/common/system/controlDict create mode 100644 applications/test/multiWorld/common/system/decomposeParDict create mode 100644 applications/test/multiWorld/common/system/fvSchemes create mode 100644 applications/test/multiWorld/common/system/fvSolution mode change 100644 => 120000 applications/test/multiWorld/left/system/controlDict mode change 100644 => 120000 applications/test/multiWorld/left/system/decomposeParDict mode change 100644 => 120000 applications/test/multiWorld/left/system/fvSchemes mode change 100644 => 120000 applications/test/multiWorld/left/system/fvSolution delete mode 100755 applications/test/multiWorld/run_left.sh delete mode 100755 applications/test/multiWorld/run_right.sh create mode 100755 applications/test/multiWorld/run_world.sh create mode 100755 tutorials/basic/laplacianFoam/multiWorld/Allrun.pre create mode 100755 tutorials/basic/laplacianFoam/multiWorld/Allrun.pre-parallel create mode 100644 tutorials/basic/laplacianFoam/multiWorld/common/system/controlDict create mode 100644 tutorials/basic/laplacianFoam/multiWorld/common/system/decomposeParDict create mode 100644 tutorials/basic/laplacianFoam/multiWorld/common/system/fvSchemes create mode 100644 tutorials/basic/laplacianFoam/multiWorld/common/system/fvSolution mode change 100644 => 120000 tutorials/basic/laplacianFoam/multiWorld/left/system/controlDict mode change 100644 => 120000 tutorials/basic/laplacianFoam/multiWorld/left/system/decomposeParDict mode change 100644 => 120000 tutorials/basic/laplacianFoam/multiWorld/left/system/fvSchemes mode change 100644 => 120000 tutorials/basic/laplacianFoam/multiWorld/left/system/fvSolution delete mode 100755 tutorials/basic/laplacianFoam/multiWorld/run_left.sh delete mode 100755 tutorials/basic/laplacianFoam/multiWorld/run_right.sh create mode 100755 tutorials/basic/laplacianFoam/multiWorld/run_world.sh diff --git a/applications/test/multiWorld/Allclean b/applications/test/multiWorld/Allclean new file mode 100755 index 00000000000..336db413851 --- /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 e889d48c467..a5604a34e68 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 00000000000..eaad67c68b6 --- /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 00000000000..eaad67c68b6 --- /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 00000000000..aff336cb41b --- /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 00000000000..501cb8db4e4 --- /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 00000000000..6e67d123db9 --- /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 00000000000..737bf06d151 --- /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 aff336cb41b..00000000000 --- 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 00000000000..e38bfb1f6b2 --- /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 926ce23810d..00000000000 --- 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 00000000000..9276e7939a3 --- /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 6e67d123db9..00000000000 --- 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 00000000000..274d17e1728 --- /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 737bf06d151..00000000000 --- 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 00000000000..504f0b1c9e2 --- /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 faa5932bdb1..49aadf442ee 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 c811e563f4f..133e452fb60 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 a538e4c6da2..e38bfb1f6b2 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 44a7cb6766c..9276e7939a3 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 d443e22599e..274d17e1728 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 30d61e5f30f..504f0b1c9e2 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 ff10c97611e..00000000000 --- 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 529bea06fba..00000000000 --- 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 00000000000..2f2ac9f9761 --- /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 73cbe376cae..42dafa64190 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 e709fcb730a..4ad24b00fe1 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 00000000000..61541f6f5f6 --- /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 00000000000..d6227536a02 --- /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 00000000000..1aef7a6b6d6 --- /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 00000000000..528a9bdc2ad --- /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 00000000000..5fa3d1b62d0 --- /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 00000000000..3d57616a02d --- /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 1aef7a6b6d6..00000000000 --- 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 00000000000..e38bfb1f6b2 --- /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 66180fcba9b..00000000000 --- 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 00000000000..9276e7939a3 --- /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 5fa3d1b62d0..00000000000 --- 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 00000000000..274d17e1728 --- /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 3d57616a02d..00000000000 --- 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 00000000000..504f0b1c9e2 --- /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 a3246667da6..000b17e65c9 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 a538e4c6da2..e38bfb1f6b2 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 44a7cb6766c..9276e7939a3 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 d443e22599e..274d17e1728 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 30d61e5f30f..504f0b1c9e2 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 d0e6bc68da3..00000000000 --- 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 4177518422f..00000000000 --- 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 00000000000..2f2ac9f9761 --- /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 12168eed0f0..99c326b5f88 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 f583a68f3f4..8815c41c2d5 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 -- GitLab