From cd829836eb8520fe84d610f52995ea7ff34c3c74 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 9 Aug 2022 13:25:09 +0100 Subject: [PATCH] tutorials/modules/incompressibleFluid/mixerSRF: New tutorial to demonstrate an SRF simulation using MRF --- .../modules/incompressibleFluid/mixerSRF/0/U | 58 +++++++ .../incompressibleFluid/mixerSRF/0/epsilon | 54 ++++++ .../modules/incompressibleFluid/mixerSRF/0/k | 56 +++++++ .../incompressibleFluid/mixerSRF/0/nut | 56 +++++++ .../incompressibleFluid/mixerSRF/0/omega | 56 +++++++ .../modules/incompressibleFluid/mixerSRF/0/p | 51 ++++++ .../mixerSRF/constant/MRFProperties | 30 ++++ .../mixerSRF/constant/momentumTransport | 29 ++++ .../mixerSRF/constant/physicalProperties | 21 +++ .../mixerSRF/system/blockMeshDict | 154 ++++++++++++++++++ .../mixerSRF/system/controlDict | 50 ++++++ .../mixerSRF/system/fvSchemes | 61 +++++++ .../mixerSRF/system/fvSolution | 53 ++++++ 13 files changed, 729 insertions(+) create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/0/U create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/0/epsilon create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/0/k create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/0/nut create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/0/omega create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/0/p create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/constant/MRFProperties create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/constant/momentumTransport create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/constant/physicalProperties create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/system/blockMeshDict create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/system/controlDict create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/system/fvSchemes create mode 100644 tutorials/modules/incompressibleFluid/mixerSRF/system/fvSolution diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/0/U b/tutorials/modules/incompressibleFluid/mixerSRF/0/U new file mode 100644 index 0000000000..fd895b6c31 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/0/U @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 -10); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform (0 0 -10); + } + + outlet + { + type pressureInletOutletVelocity; + value $internalField; + } + + innerWall + { + type fixedValue; + value uniform (0 0 0); + } + + outerWall + { + type noSlip; + } + + cyclic_half0 + { + type cyclic; + } + + cyclic_half1 + { + type cyclic; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/0/epsilon b/tutorials/modules/incompressibleFluid/mixerSRF/0/epsilon new file mode 100644 index 0000000000..1b852804d6 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/0/epsilon @@ -0,0 +1,54 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 14.855; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 14.855; + } + outlet + { + type inletOutlet; + inletValue uniform 14.855; + } + innerWall + { + type epsilonWallFunction; + value uniform 14.855; + } + outerWall + { + type epsilonWallFunction; + value uniform 14.855; + } + cyclic_half0 + { + type cyclic; + } + cyclic_half1 + { + type cyclic; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/0/k b/tutorials/modules/incompressibleFluid/mixerSRF/0/k new file mode 100644 index 0000000000..6bb6d1e475 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/0/k @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.375; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.375; + } + outlet + { + type inletOutlet; + inletValue uniform 0.375; + } + innerWall + { + type kqRWallFunction; + value uniform 0.375; + } + outerWall + { + type kqRWallFunction; + value uniform 0.375; + } + cyclic_half0 + { + type cyclic; + value uniform 0.375; + } + cyclic_half1 + { + type cyclic; + value uniform 0.375; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/0/nut b/tutorials/modules/incompressibleFluid/mixerSRF/0/nut new file mode 100644 index 0000000000..513f5c5a06 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/0/nut @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + outlet + { + type calculated; + value uniform 0; + } + innerWall + { + type nutkWallFunction; + value uniform 0; + } + outerWall + { + type nutkWallFunction; + value uniform 0; + } + cyclic_half0 + { + type cyclic; + value uniform 0; + } + cyclic_half1 + { + type cyclic; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/0/omega b/tutorials/modules/incompressibleFluid/mixerSRF/0/omega new file mode 100644 index 0000000000..44521e9b9f --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/0/omega @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object omega; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform 3.5; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 3.5; + } + outlet + { + type inletOutlet; + inletValue uniform 3.5; + } + innerWall + { + type omegaWallFunction; + value uniform 3.5; + } + outerWall + { + type omegaWallFunction; + value uniform 3.5; + } + cyclic_half0 + { + type cyclic; + value uniform 3.5; + } + cyclic_half1 + { + type cyclic; + value uniform 3.5; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/0/p b/tutorials/modules/incompressibleFluid/mixerSRF/0/p new file mode 100644 index 0000000000..47371942ea --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/0/p @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type fixedValue; + value uniform 0; + } + innerWall + { + type zeroGradient; + } + outerWall + { + type zeroGradient; + } + cyclic_half0 + { + type cyclic; + } + cyclic_half1 + { + type cyclic; + } +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/constant/MRFProperties b/tutorials/modules/incompressibleFluid/mixerSRF/constant/MRFProperties new file mode 100644 index 0000000000..ce758d7b25 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/constant/MRFProperties @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object MRFProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +MRF +{ + cellZone all; + + // Fixed patches (by default they 'move' with the MRF zone) + nonRotatingPatches (inlet outlet outerWall); + + origin (0 0 0); + axis (0 0 1); + + omega 104.72; +} + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/constant/momentumTransport b/tutorials/modules/incompressibleFluid/mixerSRF/constant/momentumTransport new file mode 100644 index 0000000000..511bcd8cc8 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/constant/momentumTransport @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object momentumTransport; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + model kOmegaSST; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/constant/physicalProperties b/tutorials/modules/incompressibleFluid/mixerSRF/constant/physicalProperties new file mode 100644 index 0000000000..1a530d3929 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/constant/physicalProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "constant"; + object physicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +viscosityModel constant; + +nu [0 2 -1 0 0 0 0] 1.5e-05; + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/system/blockMeshDict b/tutorials/modules/incompressibleFluid/mixerSRF/system/blockMeshDict new file mode 100644 index 0000000000..6334639d33 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/system/blockMeshDict @@ -0,0 +1,154 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + object blockMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +vertices +( + ( 0.500 0.000 0.000) + ( 0.369 0.338 0.000) + ( 0.338 0.369 0.000) + ( 0.000 0.500 0.000) + ( 0.737 0.676 0.000) + ( 0.074 0.068 0.000) + ( 0.676 0.737 0.000) + ( 0.068 0.074 0.000) + ( 0.000 1.000 0.000) + ( 1.000 0.000 0.000) + ( 0.100 0.000 0.000) + ( 0.000 0.100 0.000) + ( 0.500 0.000 2.000) + ( 0.369 0.338 2.000) + ( 0.338 0.369 2.000) + ( 0.000 0.500 2.000) + ( 0.737 0.676 2.000) + ( 0.074 0.068 2.000) + ( 0.676 0.737 2.000) + ( 0.068 0.074 2.000) + ( 0.000 1.000 2.000) + ( 1.000 0.000 2.000) + ( 0.100 0.000 2.000) + ( 0.000 0.100 2.000) +); + +blocks +( + hex (1 0 9 4 13 12 21 16) all (10 20 40) simpleGrading (1 1 1) + hex (2 1 4 6 14 13 16 18) all (2 20 40) simpleGrading (1 1 1) + hex (3 2 6 8 15 14 18 20) all (10 20 40) simpleGrading (1 1 1) + hex (5 10 0 1 17 22 12 13) all (10 20 40) simpleGrading (1 1 1) + hex (11 7 2 3 23 19 14 15) all (10 20 40) simpleGrading (1 1 1) +); + +edges +( + arc 0 1 ( 0.470 0.171 0.000 ) + arc 12 13 ( 0.470 0.171 2.000 ) + arc 2 3 ( 0.171 0.470 0.000 ) + arc 14 15 ( 0.171 0.470 2.000 ) + arc 9 4 ( 0.940 0.342 0.000 ) + arc 21 16 ( 0.940 0.342 2.000 ) + arc 5 10 ( 0.094 0.034 0.000 ) + arc 17 22 ( 0.094 0.034 2.000 ) + arc 6 8 ( 0.342 0.940 0.000 ) + arc 18 20 ( 0.342 0.940 2.000 ) + arc 11 7 ( 0.034 0.094 0.000 ) + arc 23 19 ( 0.034 0.094 2.000 ) +); + +boundary +( + inlet + { + type patch; + faces + ( + (13 12 21 16) + (14 13 16 18) + (15 14 18 20) + (17 22 12 13) + (23 19 14 15) + ); + } + + outlet + { + type patch; + faces + ( + (1 4 9 0) + (2 6 4 1) + (3 8 6 2) + (5 1 0 10) + (11 3 2 7) + ); + } + + innerWall + { + type wall; + faces + ( + (2 1 13 14) + (5 10 22 17) + (5 17 13 1) + (11 7 19 23) + (7 2 14 19) + ); + } + + outerWall + { + type wall; + faces + ( + (4 16 21 9) + (6 18 16 4) + (8 20 18 6) + ); + } + + cyclic_half0 + { + type cyclic; + neighbourPatch cyclic_half1; + transformType rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + faces + ( + (0 9 21 12) + (10 0 12 22) + ); + } + + cyclic_half1 + { + type cyclic; + neighbourPatch cyclic_half0; + transformType rotational; + rotationAxis (0 0 1); + rotationCentre (0 0 0); + faces + ( + (3 15 20 8) + (11 23 15 3) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/system/controlDict b/tutorials/modules/incompressibleFluid/mixerSRF/system/controlDict new file mode 100644 index 0000000000..13b3018d1b --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/system/controlDict @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application foamRun; + +solver incompressibleFluid; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/system/fvSchemes b/tutorials/modules/incompressibleFluid/mixerSRF/system/fvSchemes new file mode 100644 index 0000000000..44c8b59896 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/system/fvSchemes @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + limited cellLimited Gauss linear 1; +} + +divSchemes +{ + default none; + + div(phi,U) bounded Gauss linearUpwind limited; + + div(phi,k) bounded Gauss upwind; + div(phi,omega) bounded Gauss upwind; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +wallDist +{ + method meshWave; +} + + +// ************************************************************************* // diff --git a/tutorials/modules/incompressibleFluid/mixerSRF/system/fvSolution b/tutorials/modules/incompressibleFluid/mixerSRF/system/fvSolution new file mode 100644 index 0000000000..3f4f8858d8 --- /dev/null +++ b/tutorials/modules/incompressibleFluid/mixerSRF/system/fvSolution @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.01; + } + + "(U|k|epsilon|omega|R|nuTilda).*" + { + solver PBiCGStab; + preconditioner DILU; + + tolerance 1e-7; + relTol 0.1; + } +} + +PIMPLE +{ + nNonOrthogonalCorrectors 0; + consistent yes; +} + +relaxationFactors +{ + equations + { + ".*" 0.7; + "U.*" 0.9; + } +} + + +// ************************************************************************* //