diff --git a/tutorials/IO/fileHandler/Allrun b/tutorials/IO/fileHandler/Allrun index 02a76ea205..16be0ee264 100755 --- a/tutorials/IO/fileHandler/Allrun +++ b/tutorials/IO/fileHandler/Allrun @@ -21,11 +21,14 @@ application=$(getApplication) #- Test writing collated format runApplication decomposePar -fileHandler collated +#runParallel redistributePar -decompose -fileHandler collated runParallel $application -fileHandler collated runApplication reconstructPar -latestTime -fileHandler collated +#runParallel -s reconstruct redistributePar -reconstruct -latestTime -fileHandler collated #- Test writing uncollated format runApplication -s uncollated decomposePar -fileHandler uncollated -force +#runParallel -s uncollated redistributePar -decompose -fileHandler uncollated runParallel -s uncollated $application -fileHandler uncollated diff --git a/tutorials/IO/fileHandler/Test-distributed b/tutorials/IO/fileHandler/Test-distributed index 462f6bbd9a..95e9bcdf2e 100755 --- a/tutorials/IO/fileHandler/Test-distributed +++ b/tutorials/IO/fileHandler/Test-distributed @@ -46,7 +46,10 @@ CASE_ROOTS #export FOAM_ABORT=true -runParallel -s decompose redistributePar -decompose -case test-distribute/machineA/testcase +runParallel -s decompose redistributePar \ + -decompose \ + -case test-distribute/machineA/testcase \ + -fileHandler masterUncollated runParallel checkMesh -case test-distribute/machineA/testcase diff --git a/tutorials/IO/fileHandler_dynamicCode/0/U b/tutorials/IO/fileHandler_dynamicCode/0/U new file mode 100644 index 0000000000..f525dbc89f --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/0/U @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ 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 noSlip; + } + + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/0/p b/tutorials/IO/fileHandler_dynamicCode/0/p new file mode 100644 index 0000000000..b2996b1aea --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/0/p @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ 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/IO/fileHandler_dynamicCode/constant/transportProperties b/tutorials/IO/fileHandler_dynamicCode/constant/transportProperties new file mode 100644 index 0000000000..a3caf60520 --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/constant/transportProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +nu 0.01; + + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/blockMeshDict b/tutorials/IO/fileHandler_dynamicCode/system/blockMeshDict new file mode 100644 index 0000000000..c2da56f474 --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/blockMeshDict @@ -0,0 +1,72 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 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) (5 5 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) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/controlDict b/tutorials/IO/fileHandler_dynamicCode/system/controlDict new file mode 100644 index 0000000000..4d2efdabad --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/controlDict @@ -0,0 +1,111 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +DebugSwitches +{ +// OSspecific 1; +// POSIX 2; +// codeStream 1; +// codedBase 1; +// masterUncollated 1; +// hostCollated 1; +// collated 1; +// fileMonitor 1; +} + +OptimisationSwitches +{ + fileModificationSkew 1; +} + +//- Set deltaT +#include "solverControls" + + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; +//stopAt #codeStream +//{ +// code +// #{ +// os << "nextWrite;" << nl; +// #}; +//}; + + +endTime 0.04; + +//deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ + fileUpdate + { + type timeActivatedFileUpdate; + libs (utilityFunctionObjects); + writeControl timeStep; + writeInterval 1; + fileToUpdate "/solverControls"; + + timeVsFile + ( + (-1 "/solverControls.0" ) + ( 0.02 "/solverControls.5" ) + ); + } + + // Wait a bit to make runTimeModifiable work. + // - see also fileModificationSkew + // - could also directly use system FO + sleep + { + type coded; + libs (utilityFunctionObjects); + name sleep; + writeControl timeStep; + + codeExecute + #{ + sleep(1); + #}; + } +} + + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/decomposeParDict b/tutorials/IO/fileHandler_dynamicCode/system/decomposeParDict new file mode 100644 index 0000000000..deb7d98a7f --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/decomposeParDict @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 5; + +method hierarchical; + +coeffs +{ + n (5 1 1); +} + + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/fvSchemes b/tutorials/IO/fileHandler_dynamicCode/system/fvSchemes new file mode 100644 index 0000000000..2a4d2c9557 --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/fvSchemes @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + 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; +} + + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/fvSolution b/tutorials/IO/fileHandler_dynamicCode/system/fvSolution new file mode 100644 index 0000000000..059a9f375c --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/fvSolution @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.05; + } + + pFinal + { + $p; + 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/IO/fileHandler_dynamicCode/system/solverControls b/tutorials/IO/fileHandler_dynamicCode/system/solverControls new file mode 100644 index 0000000000..cd39033a9a --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/solverControls @@ -0,0 +1,11 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +deltaT 0.001; + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/solverControls.0 b/tutorials/IO/fileHandler_dynamicCode/system/solverControls.0 new file mode 100644 index 0000000000..418c6b27d6 --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/solverControls.0 @@ -0,0 +1,11 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +deltaT 0.005; + +// ************************************************************************* // diff --git a/tutorials/IO/fileHandler_dynamicCode/system/solverControls.5 b/tutorials/IO/fileHandler_dynamicCode/system/solverControls.5 new file mode 100644 index 0000000000..cd39033a9a --- /dev/null +++ b/tutorials/IO/fileHandler_dynamicCode/system/solverControls.5 @@ -0,0 +1,11 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2312 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +deltaT 0.001; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/decomposeParDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/decomposeParDict index cac126a2fb..5a7e0bb079 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/decomposeParDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/decomposeParDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2306 | +| \\ / O peration | Version: v2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -14,8 +14,6 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -numberOfSubdomains 2; - method scotch;