From ffeb9ddd3f2162a196c12e16557fa4111268f583 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 14 Mar 2014 14:59:32 +0000 Subject: [PATCH] ENH: resitributePar: tutorial --- tutorials/mesh/redistributePar/cavity/0/U | 41 +++++ tutorials/mesh/redistributePar/cavity/0/p | 39 +++++ .../mesh/redistributePar/cavity/Allclean | 10 ++ tutorials/mesh/redistributePar/cavity/Allrun | 35 +++++ .../cavity/constant/polyMesh/blockMeshDict | 75 +++++++++ .../cavity/constant/polyMesh/boundary | 43 ++++++ .../cavity/constant/transportProperties | 21 +++ .../redistributePar/cavity/system/controlDict | 49 ++++++ .../cavity/system/controlDict-latestTime | 49 ++++++ .../cavity/system/controlDict-startTime | 49 ++++++ .../cavity/system/decomposeParDict | 143 ++++++++++++++++++ .../cavity/system/decomposeParDict-2 | 143 ++++++++++++++++++ .../cavity/system/decomposeParDict-5 | 143 ++++++++++++++++++ .../redistributePar/cavity/system/fvSchemes | 57 +++++++ .../redistributePar/cavity/system/fvSolution | 46 ++++++ .../cavity/system/renumberMeshDict-random | 112 ++++++++++++++ 16 files changed, 1055 insertions(+) create mode 100644 tutorials/mesh/redistributePar/cavity/0/U create mode 100644 tutorials/mesh/redistributePar/cavity/0/p create mode 100755 tutorials/mesh/redistributePar/cavity/Allclean create mode 100755 tutorials/mesh/redistributePar/cavity/Allrun create mode 100644 tutorials/mesh/redistributePar/cavity/constant/polyMesh/blockMeshDict create mode 100644 tutorials/mesh/redistributePar/cavity/constant/polyMesh/boundary create mode 100644 tutorials/mesh/redistributePar/cavity/constant/transportProperties create mode 100644 tutorials/mesh/redistributePar/cavity/system/controlDict create mode 100644 tutorials/mesh/redistributePar/cavity/system/controlDict-latestTime create mode 100644 tutorials/mesh/redistributePar/cavity/system/controlDict-startTime create mode 100644 tutorials/mesh/redistributePar/cavity/system/decomposeParDict create mode 100644 tutorials/mesh/redistributePar/cavity/system/decomposeParDict-2 create mode 100644 tutorials/mesh/redistributePar/cavity/system/decomposeParDict-5 create mode 100644 tutorials/mesh/redistributePar/cavity/system/fvSchemes create mode 100644 tutorials/mesh/redistributePar/cavity/system/fvSolution create mode 100644 tutorials/mesh/redistributePar/cavity/system/renumberMeshDict-random diff --git a/tutorials/mesh/redistributePar/cavity/0/U b/tutorials/mesh/redistributePar/cavity/0/U new file mode 100644 index 0000000000..711702f987 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/0/U @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + movingWall + { + type fixedValue; + value uniform (1 0 0); + } + + fixedWalls + { + type fixedValue; + value uniform (0 0 0); + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/0/p b/tutorials/mesh/redistributePar/cavity/0/p new file mode 100644 index 0000000000..3e00d9eb31 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/0/p @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + movingWall + { + type zeroGradient; + } + + fixedWalls + { + type zeroGradient; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/Allclean b/tutorials/mesh/redistributePar/cavity/Allclean new file mode 100755 index 0000000000..94d03552c6 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Restore default dictionaries +cp system/decomposeParDict-2 system/decomposeParDict +cp system/controlDict-startTime system/controlDict + +cleanCase diff --git a/tutorials/mesh/redistributePar/cavity/Allrun b/tutorials/mesh/redistributePar/cavity/Allrun new file mode 100755 index 0000000000..ba9ae31374 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/Allrun @@ -0,0 +1,35 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +cp system/decomposeParDict-2 system/decomposeParDict +#runApplication decomposePar + +#- redistributePar to do decomposition +runParallel redistributePar 2 -decompose + +#- bit of renumbering and running +runParallel -l log.renumberMesh-CuthillMcKee renumberMesh 2 -overwrite +runParallel -l log.icoFoam-CuthillMcKee icoFoam 2 + +#- bit of bad renumbering and running +runParallel -l log.renumberMesh-parallel renumberMesh 2 -overwrite -dict system/renumberMeshDict-random +runParallel -l log.icoFoam-random icoFoam 2 + +#- pick up last result +cp system/controlDict-latestTime system/controlDict +#- redistribute to 5 processors +cp system/decomposeParDict-5 system/decomposeParDict +runParallel -l log.redistributePar-5 redistributePar 5 +#- run a bit more +runParallel -l log.icoFoam-5 icoFoam 5 + +#- reconstruct mesh and results +runParallel -l log.redistributePar-1 redistributePar 5 -reconstruct + + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/mesh/redistributePar/cavity/constant/polyMesh/blockMeshDict b/tutorials/mesh/redistributePar/cavity/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..165a600c7b --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/constant/polyMesh/blockMeshDict @@ -0,0 +1,75 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +vertices +( + (0 0 0) + (1 0 0) + (1 1 0) + (0 1 0) + (0 0 0.1) + (1 0 0.1) + (1 1 0.1) + (0 1 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + movingWall + { + type wall; + faces + ( + (3 7 6 2) + ); + } + fixedWalls + { + type wall; + faces + ( + (0 4 7 3) + (2 6 5 1) + (1 5 4 0) + ); + } + frontAndBack + { + type empty; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/constant/polyMesh/boundary b/tutorials/mesh/redistributePar/cavity/constant/polyMesh/boundary new file mode 100644 index 0000000000..6eb3105b4d --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/constant/polyMesh/boundary @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + movingWall + { + type wall; + inGroups 1(wall); + nFaces 20; + startFace 760; + } + fixedWalls + { + type wall; + inGroups 1(wall); + nFaces 60; + startFace 780; + } + frontAndBack + { + type empty; + inGroups 1(empty); + nFaces 800; + startFace 840; + } +) + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/constant/transportProperties b/tutorials/mesh/redistributePar/cavity/constant/transportProperties new file mode 100644 index 0000000000..fa1c1ca0b1 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/constant/transportProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +nu nu [ 0 2 -1 0 0 0 0 ] 0.01; + + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/controlDict b/tutorials/mesh/redistributePar/cavity/system/controlDict new file mode 100644 index 0000000000..d2fa09cc52 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/controlDict-latestTime b/tutorials/mesh/redistributePar/cavity/system/controlDict-latestTime new file mode 100644 index 0000000000..e1dacd6767 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/controlDict-latestTime @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1.0; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/controlDict-startTime b/tutorials/mesh/redistributePar/cavity/system/controlDict-startTime new file mode 100644 index 0000000000..d2fa09cc52 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/controlDict-startTime @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/decomposeParDict b/tutorials/mesh/redistributePar/cavity/system/decomposeParDict new file mode 100644 index 0000000000..39483a01e3 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/decomposeParDict @@ -0,0 +1,143 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +//- Keep owner and neighbour on same processor for faces in patches: +// (makes sense only for cyclic patches) +//preservePatches (cyclic_half0 cyclic_half1); + +//- Keep all of faceSet on a single processor. This puts all cells +// connected with a point, edge or face on the same processor. +// (just having face connected cells might not guarantee a balanced +// decomposition) +// The processor can be -1 (the decompositionMethod chooses the processor +// for a good load balance) or explicitly provided (upsets balance). +//singleProcessorFaceSets ((f0 -1)); + + +//- Keep owner and neighbour of baffles on same processor (i.e. keep it +// detectable as a baffle). Baffles are two boundary face sharing the +// same points. +//preserveBaffles true; + +//- Use the volScalarField named here as a weight for each cell in the +// decomposition. For example, use a particle population field to decompose +// for a balanced number of particles in a lagrangian simulation. +// weightField dsmcRhoNMean; + +method scotch; +//method hierarchical; +// method simple; +// method metis; +// method manual; +// method multiLevel; +// method structured; // does 2D decomposition of structured mesh + +multiLevelCoeffs +{ + // Decomposition methods to apply in turn. This is like hierarchical but + // fully general - every method can be used at every level. + + level0 + { + numberOfSubdomains 64; + //method simple; + //simpleCoeffs + //{ + // n (2 1 1); + // delta 0.001; + //} + method scotch; + } + level1 + { + numberOfSubdomains 4; + method scotch; + } +} + +// Desired output + +simpleCoeffs +{ + n (2 1 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + +structuredCoeffs +{ + // Patches to do 2D decomposition on. Structured mesh only; cells have + // to be in 'columns' on top of patches. + patches (movingWall); + + // Method to use on the 2D subset + method scotch; +} + +//// Is the case distributed? Note: command-line argument -roots takes +//// precedence +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/decomposeParDict-2 b/tutorials/mesh/redistributePar/cavity/system/decomposeParDict-2 new file mode 100644 index 0000000000..39483a01e3 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/decomposeParDict-2 @@ -0,0 +1,143 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +//- Keep owner and neighbour on same processor for faces in patches: +// (makes sense only for cyclic patches) +//preservePatches (cyclic_half0 cyclic_half1); + +//- Keep all of faceSet on a single processor. This puts all cells +// connected with a point, edge or face on the same processor. +// (just having face connected cells might not guarantee a balanced +// decomposition) +// The processor can be -1 (the decompositionMethod chooses the processor +// for a good load balance) or explicitly provided (upsets balance). +//singleProcessorFaceSets ((f0 -1)); + + +//- Keep owner and neighbour of baffles on same processor (i.e. keep it +// detectable as a baffle). Baffles are two boundary face sharing the +// same points. +//preserveBaffles true; + +//- Use the volScalarField named here as a weight for each cell in the +// decomposition. For example, use a particle population field to decompose +// for a balanced number of particles in a lagrangian simulation. +// weightField dsmcRhoNMean; + +method scotch; +//method hierarchical; +// method simple; +// method metis; +// method manual; +// method multiLevel; +// method structured; // does 2D decomposition of structured mesh + +multiLevelCoeffs +{ + // Decomposition methods to apply in turn. This is like hierarchical but + // fully general - every method can be used at every level. + + level0 + { + numberOfSubdomains 64; + //method simple; + //simpleCoeffs + //{ + // n (2 1 1); + // delta 0.001; + //} + method scotch; + } + level1 + { + numberOfSubdomains 4; + method scotch; + } +} + +// Desired output + +simpleCoeffs +{ + n (2 1 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + +structuredCoeffs +{ + // Patches to do 2D decomposition on. Structured mesh only; cells have + // to be in 'columns' on top of patches. + patches (movingWall); + + // Method to use on the 2D subset + method scotch; +} + +//// Is the case distributed? Note: command-line argument -roots takes +//// precedence +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/decomposeParDict-5 b/tutorials/mesh/redistributePar/cavity/system/decomposeParDict-5 new file mode 100644 index 0000000000..3d64ff6c1a --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/decomposeParDict-5 @@ -0,0 +1,143 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 5; + +//- Keep owner and neighbour on same processor for faces in zones: +// preserveFaceZones (heater solid1 solid3); + +//- Keep owner and neighbour on same processor for faces in patches: +// (makes sense only for cyclic patches) +//preservePatches (cyclic_half0 cyclic_half1); + +//- Keep all of faceSet on a single processor. This puts all cells +// connected with a point, edge or face on the same processor. +// (just having face connected cells might not guarantee a balanced +// decomposition) +// The processor can be -1 (the decompositionMethod chooses the processor +// for a good load balance) or explicitly provided (upsets balance). +//singleProcessorFaceSets ((f0 -1)); + + +//- Keep owner and neighbour of baffles on same processor (i.e. keep it +// detectable as a baffle). Baffles are two boundary face sharing the +// same points. +//preserveBaffles true; + +//- Use the volScalarField named here as a weight for each cell in the +// decomposition. For example, use a particle population field to decompose +// for a balanced number of particles in a lagrangian simulation. +// weightField dsmcRhoNMean; + +method scotch; +//method hierarchical; +// method simple; +// method metis; +// method manual; +// method multiLevel; +// method structured; // does 2D decomposition of structured mesh + +multiLevelCoeffs +{ + // Decomposition methods to apply in turn. This is like hierarchical but + // fully general - every method can be used at every level. + + level0 + { + numberOfSubdomains 64; + //method simple; + //simpleCoeffs + //{ + // n (2 1 1); + // delta 0.001; + //} + method scotch; + } + level1 + { + numberOfSubdomains 4; + method scotch; + } +} + +// Desired output + +simpleCoeffs +{ + n (2 1 1); + delta 0.001; +} + +hierarchicalCoeffs +{ + n (1 2 1); + delta 0.001; + order xyz; +} + +metisCoeffs +{ + /* + processorWeights + ( + 1 + 1 + 1 + 1 + ); + */ +} + +scotchCoeffs +{ + //processorWeights + //( + // 1 + // 1 + // 1 + // 1 + //); + //writeGraph true; + //strategy "b"; +} + +manualCoeffs +{ + dataFile "decompositionData"; +} + +structuredCoeffs +{ + // Patches to do 2D decomposition on. Structured mesh only; cells have + // to be in 'columns' on top of patches. + patches (movingWall); + + // Method to use on the 2D subset + method scotch; +} + +//// Is the case distributed? Note: command-line argument -roots takes +//// precedence +//distributed yes; +//// Per slave (so nProcs-1 entries) the directory above the case. +//roots +//( +// "/tmp" +// "/tmp" +//); + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/fvSchemes b/tutorials/mesh/redistributePar/cavity/system/fvSchemes new file mode 100644 index 0000000000..dede0a6cba --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/fvSchemes @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/fvSolution b/tutorials/mesh/redistributePar/cavity/system/fvSolution new file mode 100644 index 0000000000..f9e556f155 --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/fvSolution @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/redistributePar/cavity/system/renumberMeshDict-random b/tutorials/mesh/redistributePar/cavity/system/renumberMeshDict-random new file mode 100644 index 0000000000..0409293dec --- /dev/null +++ b/tutorials/mesh/redistributePar/cavity/system/renumberMeshDict-random @@ -0,0 +1,112 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh renumbering dictionary"; + object renumberMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Write maps from renumbered back to original mesh +writeMaps true; + +// Optional entry: sort cells on coupled boundaries to last for use with +// e.g. nonBlockingGaussSeidel. +sortCoupledFaceCells false; + +// Optional entry: renumber on a block-by-block basis. It uses a +// blockCoeffs dictionary to construct a decompositionMethod to do +// a block subdivision) and then applies the renumberMethod to each +// block in turn. This can be used in large cases to keep the blocks +// fitting in cache with all the the cache misses bunched at the end. +// This number is the approximate size of the blocks - this gets converted +// to a number of blocks that is the input to the decomposition method. +//blockSize 1000; + +// Optional entry: sort points into internal and boundary points +//orderPoints false; + +// Optional: suppress renumbering cellSets,faceSets,pointSets +//renumberSets false; + + +//method CuthillMcKee; +//method Sloan; +//method manual; +method random; +//method structured; +//method spring; +//method zoltan; // only if compiled with zoltan support + +//CuthillMcKeeCoeffs +//{ +// // Reverse CuthillMcKee (RCM) or plain +// reverse true; +//} + +manualCoeffs +{ + // In system directory: new-to-original (i.e. order) labelIOList + dataFile "cellMap"; +} + + +// For extruded (i.e. structured in one direction) meshes +structuredCoeffs +{ + // Patches that mesh was extruded from. These determine the starting + // layer of cells + patches (movingWall); + // Method to renumber the starting layer of cells + method random; + + // Renumber in columns (depthFirst) or in layers + depthFirst true; + + // Reverse ordering + reverse false; +} + + +springCoeffs +{ + // Maximum jump of cell indices. Is fraction of number of cells + maxCo 0.01; + + // Limit the amount of movement; the fraction maxCo gets decreased + // with every iteration + freezeFraction 0.999; + + // Maximum number of iterations + maxIter 1000; +} + + +blockCoeffs +{ + method scotch; + //method hierarchical; + //hierarchicalCoeffs + //{ + // n (1 2 1); + // delta 0.001; + // order xyz; + //} +} + + +zoltanCoeffs +{ + ORDER_METHOD LOCAL_HSFC; +} + + +// ************************************************************************* //