From 83b432c9d2e3e4e78e2241f1330faae711269316 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Fri, 23 Oct 2020 10:07:35 +0100 Subject: [PATCH] TUT: cavity: add Allrun-parallel The change helps to carry out and monitor parallelisation tests for FOs and topoSets. --- .../pisoFoam/RAS/cavity/0.orig/U | 1 + .../pisoFoam/RAS/cavity/0.orig/epsilon | 9 ++----- .../pisoFoam/RAS/cavity/0.orig/k | 9 ++----- .../pisoFoam/RAS/cavity/0.orig/nuTilda | 8 ++---- .../pisoFoam/RAS/cavity/0.orig/nut | 9 ++----- .../pisoFoam/RAS/cavity/0.orig/omega | 9 ++----- .../pisoFoam/RAS/cavity/0.orig/p | 8 ++---- .../pisoFoam/RAS/cavity/Allrun-parallel | 16 +++++++++++ .../RAS/cavity/constant/transportProperties | 2 +- .../RAS/cavity/constant/turbulenceProperties | 4 +-- .../pisoFoam/RAS/cavity/system/controlDict | 1 - .../RAS/cavity/system/decomposeParDict | 27 +++++++++++++++++++ .../pisoFoam/RAS/cavity/system/fvSchemes | 1 - .../pisoFoam/RAS/cavity/system/fvSolution | 1 - 14 files changed, 59 insertions(+), 46 deletions(-) create mode 100755 tutorials/incompressible/pisoFoam/RAS/cavity/Allrun-parallel create mode 100644 tutorials/incompressible/pisoFoam/RAS/cavity/system/decomposeParDict diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/U b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/U index d8db8b10fa..c0d149f83c 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/U +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/U @@ -37,4 +37,5 @@ boundaryField } } + // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/epsilon b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/epsilon index 2a8fbc661b..8df60d74cd 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/epsilon +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/epsilon @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "0"; object epsilon; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -21,16 +20,12 @@ internalField uniform 0.00754; boundaryField { - movingWall - { - type epsilonWallFunction; - value uniform 0.00754; - } - fixedWalls + "(movingWall|fixedWalls)" { type epsilonWallFunction; value uniform 0.00754; } + frontAndBack { type empty; diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/k b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/k index ad89250a56..187c7cc2fb 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/k +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/k @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -21,16 +20,12 @@ internalField uniform 0.00375; boundaryField { - movingWall - { - type kqRWallFunction; - value uniform 0.00375; - } - fixedWalls + "(movingWall|fixedWalls)" { type kqRWallFunction; value uniform 0.00375; } + frontAndBack { type empty; diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nuTilda b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nuTilda index 06f765cc1d..462cc6bcf0 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nuTilda +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nuTilda @@ -20,12 +20,7 @@ internalField uniform 0; boundaryField { - movingWall - { - type zeroGradient; - } - - fixedWalls + "(movingWall|fixedWalls)" { type zeroGradient; } @@ -36,4 +31,5 @@ boundaryField } } + // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nut b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nut index 329b136dc2..c1793ae08c 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nut +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/nut @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "0"; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -21,16 +20,12 @@ internalField uniform 0; boundaryField { - movingWall - { - type nutkWallFunction; - value uniform 0; - } - fixedWalls + "(movingWall|fixedWalls)" { type nutkWallFunction; value uniform 0; } + frontAndBack { type empty; diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/omega b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/omega index 2ccd99d9f1..a91bfaf69d 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/omega +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/omega @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class volScalarField; - location "0"; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -21,16 +20,12 @@ internalField uniform 22.4; boundaryField { - movingWall - { - type omegaWallFunction; - value uniform 22.4; - } - fixedWalls + "(movingWall|fixedWalls)" { type omegaWallFunction; value uniform 22.4; } + frontAndBack { type empty; diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/p b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/p index 1155021cf8..30c0929642 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/p +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/0.orig/p @@ -20,12 +20,7 @@ internalField uniform 0; boundaryField { - movingWall - { - type zeroGradient; - } - - fixedWalls + "(movingWall|fixedWalls)" { type zeroGradient; } @@ -36,4 +31,5 @@ boundaryField } } + // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/Allrun-parallel b/tutorials/incompressible/pisoFoam/RAS/cavity/Allrun-parallel new file mode 100755 index 0000000000..f128afc39b --- /dev/null +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/Allrun-parallel @@ -0,0 +1,16 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +restore0Dir + +runApplication decomposePar + +runParallel topoSet + +runParallel $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/constant/transportProperties b/tutorials/incompressible/pisoFoam/RAS/cavity/constant/transportProperties index 5f7a26145d..74bb7e67a1 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/constant/transportProperties +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/constant/transportProperties @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -19,4 +18,5 @@ transportModel Newtonian; nu 1e-05; + // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/constant/turbulenceProperties b/tutorials/incompressible/pisoFoam/RAS/cavity/constant/turbulenceProperties index eecafe7d21..e932a3226c 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/constant/turbulenceProperties +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/constant/turbulenceProperties @@ -10,12 +10,11 @@ FoamFile version 2.0; format ascii; class dictionary; - location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -simulationType RAS; +simulationType RAS; RAS { @@ -26,4 +25,5 @@ RAS printCoeffs on; } + // ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict b/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict index fb66b4aa0f..c7c2be4166 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/system/controlDict @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/system/decomposeParDict b/tutorials/incompressible/pisoFoam/RAS/cavity/system/decomposeParDict new file mode 100644 index 0000000000..be0f40a81d --- /dev/null +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/system/decomposeParDict @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method hierarchical; + +coeffs +{ + n (2 2 1); +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSchemes b/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSchemes index c4b4140c87..7ed8de8c00 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSchemes +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSchemes @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSolution b/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSolution index b1a4efe1d1..eb57b59fa0 100644 --- a/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSolution +++ b/tutorials/incompressible/pisoFoam/RAS/cavity/system/fvSolution @@ -10,7 +10,6 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //