From b73de97f97e1b9b978306324dac2a41aa41cb3ad Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 6 Nov 2024 20:25:39 +0000 Subject: [PATCH] ENH: createPatch: demo case --- .../TJunctionSwitching_createPatch/Allclean | 12 + .../TJunctionSwitching_createPatch/Allrun | 20 ++ .../TJunctionSwitching_createPatch/README.txt | 1 + .../bottom/constant/transportProperties | 22 ++ .../bottom/constant/turbulenceProperties | 29 ++ .../bottom/system/blockMeshDict | 94 ++++++ .../bottom/system/controlDict | 52 ++++ .../bottom/system/fvSchemes | 60 ++++ .../bottom/system/fvSolution | 73 +++++ .../central/constant/transportProperties | 22 ++ .../central/constant/turbulenceProperties | 29 ++ .../central/system/blockMeshDict | 285 ++++++++++++++++++ .../central/system/controlDict | 52 ++++ .../central/system/decomposeParDict | 22 ++ .../central/system/fvSchemes | 60 ++++ .../central/system/fvSolution | 73 +++++ .../constant/transportProperties | 22 ++ .../constant/turbulenceProperties | 29 ++ .../inlet/constant/transportProperties | 22 ++ .../inlet/constant/turbulenceProperties | 29 ++ .../inlet/system/blockMeshDict | 96 ++++++ .../inlet/system/controlDict | 52 ++++ .../inlet/system/fvSchemes | 60 ++++ .../inlet/system/fvSolution | 73 +++++ .../system/blockMeshDict | 102 +++++++ .../system/controlDict | 52 ++++ .../system/createPatchDict | 178 +++++++++++ .../system/fvSchemes | 60 ++++ .../system/fvSolution | 73 +++++ .../system/topoSetDict | 35 +++ .../top/constant/transportProperties | 22 ++ .../top/constant/turbulenceProperties | 29 ++ .../top/system/blockMeshDict | 96 ++++++ .../top/system/controlDict | 52 ++++ .../top/system/fvSchemes | 60 ++++ .../top/system/fvSolution | 73 +++++ 36 files changed, 2121 insertions(+) create mode 100755 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allclean create mode 100755 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allrun create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/README.txt create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/transportProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/turbulenceProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/blockMeshDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/controlDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSchemes create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSolution create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/transportProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/turbulenceProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/blockMeshDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/controlDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/decomposeParDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSchemes create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSolution create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/transportProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/turbulenceProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/transportProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/turbulenceProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/blockMeshDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/controlDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSchemes create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSolution create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/blockMeshDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/controlDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/createPatchDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSchemes create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSolution create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/topoSetDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/transportProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/turbulenceProperties create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/blockMeshDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/controlDict create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSchemes create mode 100644 tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSolution diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allclean b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allclean new file mode 100755 index 00000000000..971952b17a5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allclean @@ -0,0 +1,12 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +(cd inlet && cleanCase) +(cd top && cleanCase) +(cd bottom && cleanCase) + +cleanCase + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allrun b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allrun new file mode 100755 index 00000000000..0f9fd8248aa --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/Allrun @@ -0,0 +1,20 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh + +(cd inlet && runApplication blockMesh) +(cd top && runApplication blockMesh) +(cd bottom && runApplication blockMesh) + +runApplication -s inlet mergeMeshes . inlet -overwrite +runApplication -s top mergeMeshes . top -overwrite +runApplication -s bottom mergeMeshes . bottom -overwrite + +runApplication createPatch -overwrite + +runApplication checkMesh + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/README.txt b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/README.txt new file mode 100644 index 00000000000..4c437c9f114 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/README.txt @@ -0,0 +1 @@ +Equivalent of TJunctionSwitching but using mergeMeshes + createPatch diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/transportProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/transportProperties new file mode 100644 index 00000000000..5818777c874 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1e-05; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/turbulenceProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/turbulenceProperties new file mode 100644 index 00000000000..ce528794d09 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/blockMeshDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/blockMeshDict new file mode 100644 index 00000000000..62b729dd5b9 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/blockMeshDict @@ -0,0 +1,94 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+-+ +// |inlet | | +// +-----------+-+ +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +scale 1; + +vertices +( + (0.2 -0.21 0) //8=0 + (0.22 -0.21 0) //9=1 + (0.22 -0.02 0) //10=2 + (0.2 -0.02 0) //11=3 + (0.2 -0.21 0.01) //24=4 + (0.22 -0.21 0.01) //25=5 + (0.22 -0.02 0.01) //26=6 + (0.2 -0.02 0.01) //27=7 +); + +blocks +( + // bottom block + hex (0 1 2 3 4 5 6 7) bottom (5 50 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + bottom_outlet + { + type patch; + faces + ( + (0 1 5 4) + ); + } + + bottom_walls + { + type wall; + faces + ( + // Bottom block + (0 4 7 3) + (1 2 6 5) + ); + } + + + // Central - Bottom block + // ~~~~~~~~~~~~~~~~~~~~~ + + bottom_couple + { + type wall; + faces + ( + (2 3 7 6) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/controlDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/controlDict new file mode 100644 index 00000000000..4f95ace5cd4 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/controlDict @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.4; + +deltaT 0.001; + +writeControl adjustableRunTime; +writeInterval 0.01; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 1.0; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSchemes b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSchemes new file mode 100644 index 00000000000..ab4978bc6d5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / 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; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + + turbulence Gauss limitedLinear 1; + div(phi,k) $turbulence; + div(phi,epsilon) $turbulence; + div(phi,nuTilda) $turbulence; + div(phi,s) $turbulence; + div(phi,R) $turbulence; + div(R) Gauss linear; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSolution b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSolution new file mode 100644 index 00000000000..e72c53b52da --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/bottom/system/fvSolution @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + } + + "(pFinal|pcorrFinal)" + { + solver GAMG; + tolerance 1e-06; + relTol 0; + smoother GaussSeidel; + } + + "(U|k|epsilon|s)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0.1; + } + + "(U|k|epsilon|s)Final" + { + $U; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; + correctPhi false; +} + +relaxationFactors +{ + equations + { + "U.*" 1; + "k.*" 1; + "epsilon.*" 1; + "s.*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/transportProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/transportProperties new file mode 100644 index 00000000000..5818777c874 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1e-05; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/turbulenceProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/turbulenceProperties new file mode 100644 index 00000000000..ce528794d09 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/blockMeshDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/blockMeshDict new file mode 100644 index 00000000000..faa96b63196 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/blockMeshDict @@ -0,0 +1,285 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+-+ +// |inlet | | +// +-----------+-+ +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +scale 1; + +vertices +( + (0.0 -0.01 0) //0 + (0.19 -0.01 0) + (0.19 0.01 0) //2 + (0.0 0.01 0) + + (0.19 -0.02 0) //4 + (0.23 -0.02 0) + (0.23 0.02 0) //6 + (0.19 0.02 0) + + (0.2 -0.21 0) //8 + (0.22 -0.21 0) + (0.22 -0.02 0) //10 + (0.2 -0.02 0) + + (0.2 0.02 0) //12 + (0.22 0.02 0) + (0.22 0.21 0) //14 + (0.2 0.21 0) + + // Z + (0.0 -0.01 0.01) + (0.19 -0.01 0.01) + (0.19 0.01 0.01) + (0.0 0.01 0.01) + + (0.19 -0.02 0.01) + (0.23 -0.02 0.01) + (0.23 0.02 0.01) + (0.19 0.02 0.01) + + (0.2 -0.21 0.01) + (0.22 -0.21 0.01) + (0.22 -0.02 0.01) + (0.2 -0.02 0.01) + + (0.2 0.02 0.01) + (0.22 0.02 0.01) + (0.22 0.21 0.01) + (0.2 0.21 0.01) +); + +blocks +( + // inlet block + hex (0 1 2 3 16 17 18 19) inlet (50 5 1) simpleGrading (1 1 1) + + // central block + hex (4 5 6 7 20 21 22 23) central (12 12 1) simpleGrading (1 1 1) + + // bottom block + hex (8 9 10 11 24 25 26 27) bottom (5 50 1) simpleGrading (1 1 1) + + // top block + hex (12 13 14 15 28 29 30 31) top (5 50 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 16 19 3) + ); + } + + outlet1 + { + type patch; + faces + ( + (8 9 25 24) + ); + } + + outlet2 + { + type patch; + faces + ( + (14 15 31 30) + ); + } + + walls + { + type wall; + faces + ( + // Inlet block + (2 3 19 18) + (0 1 17 16) + // Central block + (5 6 22 21) + // Bottom block + (8 24 27 11) + (9 10 26 25) + // Top block + (13 14 30 29) + (12 28 31 15) + ); + } + + + // Inlet - Central block + // ~~~~~~~~~~~~~~~~~~~~~ + + inlet_central_couple + { + type cyclicACMI; + neighbourPatch central_inlet_couple; + nonOverlapPatch inlet_central_blockage; + faces + ( + (1 2 18 17) + ); + } + inlet_central_blockage + { + type wall; + faces + ( + (1 2 18 17) + ); + } + central_inlet_couple + { + type cyclicACMI; + neighbourPatch inlet_central_couple; + nonOverlapPatch central_inlet_blockage; + faces + ( + (4 20 23 7) + ); + } + central_inlet_blockage + { + type wall; + faces + ( + (4 20 23 7) + ); + } + + + // Central - Bottom block + // ~~~~~~~~~~~~~~~~~~~~~ + + bottom_central_couple + { + type cyclicACMI; + neighbourPatch central_bottom_couple; + nonOverlapPatch bottom_central_blockage; + faces + ( + (10 11 27 26) + ); + + scale table + ( + (0.00 1.0) + (0.20 1.0) + (0.30 0.0) + ); + } + bottom_central_blockage + { + type wall; + faces + ( + (10 11 27 26) + ); + } + central_bottom_couple + { + type cyclicACMI; + neighbourPatch bottom_central_couple; + nonOverlapPatch central_bottom_blockage; + faces + ( + (4 5 21 20) + ); + } + central_bottom_blockage + { + type wall; + faces + ( + (4 5 21 20) + ); + } + + + // Central - Top block + // ~~~~~~~~~~~~~~~~~~~ + + top_central_couple + { + type cyclicACMI; + neighbourPatch central_top_couple; + nonOverlapPatch top_central_blockage; + faces + ( + (12 13 29 28) + ); + + scale table + ( + (0.00 0.0) + (0.20 0.0) + (0.30 1.0) + ); + } + top_central_blockage + { + type wall; + faces + ( + (12 13 29 28) + ); + } + central_top_couple + { + type cyclicACMI; + neighbourPatch top_central_couple; + nonOverlapPatch central_top_blockage; + faces + ( + (6 7 23 22) + ); + } + central_top_blockage + { + type wall; + faces + ( + (6 7 23 22) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/controlDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/controlDict new file mode 100644 index 00000000000..4f95ace5cd4 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/controlDict @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.4; + +deltaT 0.001; + +writeControl adjustableRunTime; +writeInterval 0.01; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 1.0; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/decomposeParDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/decomposeParDict new file mode 100644 index 00000000000..cda353f3659 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/decomposeParDict @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 3; + +method scotch; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSchemes b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSchemes new file mode 100644 index 00000000000..ab4978bc6d5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / 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; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + + turbulence Gauss limitedLinear 1; + div(phi,k) $turbulence; + div(phi,epsilon) $turbulence; + div(phi,nuTilda) $turbulence; + div(phi,s) $turbulence; + div(phi,R) $turbulence; + div(R) Gauss linear; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSolution b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSolution new file mode 100644 index 00000000000..e72c53b52da --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/central/system/fvSolution @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + } + + "(pFinal|pcorrFinal)" + { + solver GAMG; + tolerance 1e-06; + relTol 0; + smoother GaussSeidel; + } + + "(U|k|epsilon|s)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0.1; + } + + "(U|k|epsilon|s)Final" + { + $U; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; + correctPhi false; +} + +relaxationFactors +{ + equations + { + "U.*" 1; + "k.*" 1; + "epsilon.*" 1; + "s.*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/transportProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/transportProperties new file mode 100644 index 00000000000..5818777c874 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1e-05; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/turbulenceProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/turbulenceProperties new file mode 100644 index 00000000000..ce528794d09 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/transportProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/transportProperties new file mode 100644 index 00000000000..5818777c874 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1e-05; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/turbulenceProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/turbulenceProperties new file mode 100644 index 00000000000..ce528794d09 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/blockMeshDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/blockMeshDict new file mode 100644 index 00000000000..8268bd1c66b --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/blockMeshDict @@ -0,0 +1,96 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+-+ +// |inlet | | +// +-----------+-+ +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +scale 1; + +vertices +( + (0.0 -0.01 0) //0 + (0.19 -0.01 0) + (0.19 0.01 0) //2 + (0.0 0.01 0) + + // Z + (0.0 -0.01 0.01) //16=4 + (0.19 -0.01 0.01) //17=5 + (0.19 0.01 0.01) //18=6 + (0.0 0.01 0.01) //19=7 +); + +blocks +( + // inlet block + hex (0 1 2 3 4 5 6 7) inlet (50 5 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet_inlet + { + type patch; + faces + ( + (0 4 7 3) + ); + } + + inlet_walls + { + type wall; + faces + ( + // Inlet block + (2 3 7 6) + (0 1 5 4) + ); + } + + + // Inlet - Central block + // ~~~~~~~~~~~~~~~~~~~~~ + + inlet_couple + { + type wall; + faces + ( + (1 2 6 5) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/controlDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/controlDict new file mode 100644 index 00000000000..4f95ace5cd4 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/controlDict @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.4; + +deltaT 0.001; + +writeControl adjustableRunTime; +writeInterval 0.01; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 1.0; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSchemes b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSchemes new file mode 100644 index 00000000000..ab4978bc6d5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / 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; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + + turbulence Gauss limitedLinear 1; + div(phi,k) $turbulence; + div(phi,epsilon) $turbulence; + div(phi,nuTilda) $turbulence; + div(phi,s) $turbulence; + div(phi,R) $turbulence; + div(R) Gauss linear; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSolution b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSolution new file mode 100644 index 00000000000..e72c53b52da --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/inlet/system/fvSolution @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + } + + "(pFinal|pcorrFinal)" + { + solver GAMG; + tolerance 1e-06; + relTol 0; + smoother GaussSeidel; + } + + "(U|k|epsilon|s)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0.1; + } + + "(U|k|epsilon|s)Final" + { + $U; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; + correctPhi false; +} + +relaxationFactors +{ + equations + { + "U.*" 1; + "k.*" 1; + "epsilon.*" 1; + "s.*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/blockMeshDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/blockMeshDict new file mode 100644 index 00000000000..660f8f94df5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/blockMeshDict @@ -0,0 +1,102 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+-+ +// |inlet | | +// +-----------+-+ +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +scale 1; + +vertices +( + (0.19 -0.02 0) //4=0 + (0.23 -0.02 0) //5=1 + (0.23 0.02 0) //6=2 + (0.19 0.02 0) //7=3 + + (0.19 -0.02 0.01) //20=4 + (0.23 -0.02 0.01) //21=5 + (0.23 0.02 0.01) //22=6 + (0.19 0.02 0.01) //23=7 +); + +blocks +( + // central block + hex (0 1 2 3 4 5 6 7) central (12 12 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + central_walls + { + type wall; + faces + ( + // Central block + (1 2 6 5) + ); + } + + // Connecting to inlet + central_inlet + { + type wall; + faces + ( + (0 4 7 3) + ); + } + + // Connecting to bottom + central_bottom + { + type wall; + faces + ( + (0 1 5 4) + ); + } + + // Connecting to top + central_top + { + type wall; + faces + ( + (2 3 7 6) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/controlDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/controlDict new file mode 100644 index 00000000000..f9550bda3a6 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/controlDict @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pimpleFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 0.4; + +deltaT 0.001; + +writeControl adjustableRunTime; +writeInterval 0.01; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 1.0; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/createPatchDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/createPatchDict new file mode 100644 index 00000000000..aed1a3c4f89 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/createPatchDict @@ -0,0 +1,178 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createPatchDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Do a synchronisation of coupled points after creation of any patches. +// Note: this does not work with points that are on multiple coupled patches +// with transformations (i.e. cyclics). +pointSync false; + +// Patches to create. +patches +( + // Central <-> Inlet + // ~~~~~~~~~~~~~~~~~ + + { + //- Master side patch + name central_inlet_couple; + patchInfo + { + type cyclicACMI; + nonOverlapPatch central_inlet_blockage; + neighbourPatch inlet_central_couple; + } + constructFrom patches; + patches (central_inlet); + } + { + //- Blockage + name central_inlet_blockage; + patchInfo + { + type wall; + } + constructFrom patches; + patches (central_inlet); + } + + { + //- Master side patch + name inlet_central_couple; + patchInfo + { + type cyclicACMI; + nonOverlapPatch inlet_central_blockage; + neighbourPatch central_inlet_couple; + } + constructFrom patches; + patches (inlet_couple); + } + { + //- Blockage + name inlet_central_blockage; + patchInfo + { + type wall; + } + constructFrom patches; + patches (inlet_couple); + } + + + + // Central <-> Bottom + // ~~~~~~~~~~~~~~~~~~ + + { + //- Master side patch + name central_bottom_couple; + patchInfo + { + type cyclicACMI; + nonOverlapPatch central_bottom_blockage; + neighbourPatch bottom_central_couple; + } + constructFrom patches; + patches (central_bottom); + } + { + //- Blockage + name central_bottom_blockage; + patchInfo + { + type wall; + } + constructFrom patches; + patches (central_bottom); + } + + { + //- Master side patch + name bottom_central_couple; + patchInfo + { + type cyclicACMI; + nonOverlapPatch bottom_central_blockage; + neighbourPatch central_bottom_couple; + } + constructFrom patches; + patches (bottom_couple); + } + { + //- Blockage + name bottom_central_blockage; + patchInfo + { + type wall; + } + constructFrom patches; + patches (bottom_couple); + } + + + + // Central <-> Top + // ~~~~~~~~~~~~~~~ + + { + //- Master side patch + name central_top_couple; + patchInfo + { + type cyclicACMI; + nonOverlapPatch central_top_blockage; + neighbourPatch top_central_couple; + } + constructFrom patches; + patches (central_top); + } + { + //- Blockage + name central_top_blockage; + patchInfo + { + type wall; + } + constructFrom patches; + patches (central_top); + } + + { + //- Master side patch + name top_central_couple; + patchInfo + { + type cyclicACMI; + nonOverlapPatch top_central_blockage; + neighbourPatch central_top_couple; + } + constructFrom patches; + patches (top_couple); + } + { + //- Blockage + name top_central_blockage; + patchInfo + { + type wall; + } + constructFrom patches; + patches (top_couple); + } +); + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSchemes b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSchemes new file mode 100644 index 00000000000..ab4978bc6d5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / 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; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + + turbulence Gauss limitedLinear 1; + div(phi,k) $turbulence; + div(phi,epsilon) $turbulence; + div(phi,nuTilda) $turbulence; + div(phi,s) $turbulence; + div(phi,R) $turbulence; + div(R) Gauss linear; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSolution b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSolution new file mode 100644 index 00000000000..e72c53b52da --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/fvSolution @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + } + + "(pFinal|pcorrFinal)" + { + solver GAMG; + tolerance 1e-06; + relTol 0; + smoother GaussSeidel; + } + + "(U|k|epsilon|s)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0.1; + } + + "(U|k|epsilon|s)Final" + { + $U; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; + correctPhi false; +} + +relaxationFactors +{ + equations + { + "U.*" 1; + "k.*" 1; + "epsilon.*" 1; + "s.*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/topoSetDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/topoSetDict new file mode 100644 index 00000000000..22a4a1571a5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/system/topoSetDict @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name central_inlet_A; + type faceSet; + action new; + source patchToFace; + patch central_inlet_A; + } + { + name inlet_couple_A; + type faceSet; + action new; + source patchToFace; + patch inlet_couple_A; + } +); + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/transportProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/transportProperties new file mode 100644 index 00000000000..5818777c874 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/transportProperties @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu 1e-05; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/turbulenceProperties b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/turbulenceProperties new file mode 100644 index 00000000000..ce528794d09 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/constant/turbulenceProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RAS; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/blockMeshDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/blockMeshDict new file mode 100644 index 00000000000..a7c4e5b5b41 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/blockMeshDict @@ -0,0 +1,96 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+-+ +// |inlet | | +// +-----------+-+ +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +scale 1; + +vertices +( + (0.2 0.02 0) //12=0 + (0.22 0.02 0) //13=1 + (0.22 0.21 0) //14=2 + (0.2 0.21 0) //15=3 + + // Z + (0.2 0.02 0.01) //28=4 + (0.22 0.02 0.01) //29=5 + (0.22 0.21 0.01) //30=6 + (0.2 0.21 0.01) //31=7 +); + +blocks +( + // top block + hex (0 1 2 3 4 5 6 7) top (5 50 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + top_outlet + { + type patch; + faces + ( + //(14 15 31 30) + (2 3 7 6) + ); + } + + top_walls + { + type wall; + faces + ( + // Top block + (1 2 6 5) + (0 4 7 3) + ); + } + + // Central - Top block + // ~~~~~~~~~~~~~~~~~~~ + + top_couple + { + type wall; + faces + ( + (0 1 5 4) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/controlDict b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/controlDict new file mode 100644 index 00000000000..4f95ace5cd4 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/controlDict @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.4; + +deltaT 0.001; + +writeControl adjustableRunTime; +writeInterval 0.01; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 1.0; + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSchemes b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSchemes new file mode 100644 index 00000000000..ab4978bc6d5 --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSchemes @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / 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; +} + +divSchemes +{ + default none; + + div(phi,U) Gauss limitedLinearV 1; + + turbulence Gauss limitedLinear 1; + div(phi,k) $turbulence; + div(phi,epsilon) $turbulence; + div(phi,nuTilda) $turbulence; + div(phi,s) $turbulence; + div(phi,R) $turbulence; + div(R) Gauss linear; + + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSolution b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSolution new file mode 100644 index 00000000000..e72c53b52da --- /dev/null +++ b/tutorials/mesh/createPatch/TJunctionSwitching_createPatch/top/system/fvSolution @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + } + + "(pFinal|pcorrFinal)" + { + solver GAMG; + tolerance 1e-06; + relTol 0; + smoother GaussSeidel; + } + + "(U|k|epsilon|s)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0.1; + } + + "(U|k|epsilon|s)Final" + { + $U; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; + correctPhi false; +} + +relaxationFactors +{ + equations + { + "U.*" 1; + "k.*" 1; + "epsilon.*" 1; + "s.*" 1; + } +} + + +// ************************************************************************* // -- GitLab