diff --git a/tutorials/pimpleFoam/t-junction/0/U b/tutorials/pimpleFoam/t-junction/0/U new file mode 100644 index 0000000000000000000000000000000000000000..8851e66583e7cfb1de3ec1aa63fdc95278a4c66c --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/0/U @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://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 +{ + inlet + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + + outlet1 + { + type inletOutlet; + inletValue uniform (0 0 0); + value uniform (0 0 0); + } + + outlet2 + { + type inletOutlet; + inletValue uniform (0 0 0); + value uniform (0 0 0); + } + + defaultFaces + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/0/epsilon b/tutorials/pimpleFoam/t-junction/0/epsilon new file mode 100644 index 0000000000000000000000000000000000000000..8e5b3e553d196c92fbfd8148146609c1e9b254ca --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/0/epsilon @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 0.01; // 1cm - half channel height + value uniform 1; + } + + outlet1 + { + type inletOutlet; + inletValue uniform 1; + } + + outlet2 + { + type inletOutlet; + inletValue uniform 1; + } + + defaultFaces + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/0/k b/tutorials/pimpleFoam/t-junction/0/k new file mode 100644 index 0000000000000000000000000000000000000000..35b2bd3ff9a83789500a9b5d2488c086f274ae0b --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/0/k @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; // 5% turbulence + value uniform 1; + } + + outlet1 + { + type inletOutlet; + inletValue uniform 1; + } + + outlet2 + { + type inletOutlet; + inletValue uniform 1; + } + + defaultFaces + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/0/nuTilda b/tutorials/pimpleFoam/t-junction/0/nuTilda new file mode 100644 index 0000000000000000000000000000000000000000..6ea76a6b637460e79b57d09daedf5360e5595044 --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/0/nuTilda @@ -0,0 +1,44 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet1 + { + type zeroGradient; + } + + outlet2 + { + type zeroGradient; + } + + defaultFaces + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/0/p b/tutorials/pimpleFoam/t-junction/0/p new file mode 100644 index 0000000000000000000000000000000000000000..b3d464605830159b73ceec6b1d2c199c5cf6eab4 --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/0/p @@ -0,0 +1,53 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://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 100000; + +boundaryField +{ + inlet + { + type totalPressure; + p0 uniform 100040; + U U; + phi phi; + rho none; + psi none; + gamma 1; + value uniform 100040; + } + + outlet1 + { + type fixedValue; + value uniform 100010; + } + + outlet2 + { + type fixedValue; + value uniform 100000; + } + + defaultFaces + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/README.txt b/tutorials/pimpleFoam/t-junction/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..0905f8784d3f59c9372dcbf858c093d8c4477ee7 --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/README.txt @@ -0,0 +1,2 @@ +15/8/8 Simple T-junction. Inlet on left, one outlet at bottom, one at top. +To test multiple outlets. diff --git a/tutorials/pimpleFoam/t-junction/constant/RASProperties b/tutorials/pimpleFoam/t-junction/constant/RASProperties new file mode 100644 index 0000000000000000000000000000000000000000..e46e0a858b12c777bb11bc364b144cd6feb2b1da --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/constant/RASProperties @@ -0,0 +1,200 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; +} + +RNGkEpsilonCoeffs +{ + Cmu 0.0845; + C1 1.42; + C2 1.68; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; +} + +realizableKECoeffs +{ + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1; + alphaEps 0.833333; +} + +kOmegaSSTCoeffs +{ + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + gamma1 0.5532; + gamma2 0.4403; + beta1 0.0750; + beta2 0.0828; + betaStar 0.09; + a1 0.31; + c1 10; + + Cmu 0.09; +} + +NonlinearKEShihCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76932; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; +} + +LienCubicKECoeffs +{ + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; +} + +QZetaCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaZeta 0.76923; + anisotropic no; +} + +LaunderSharmaKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; +} + +LamBremhorstKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphaEps 0.76923; +} + +LienCubicKELowReCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + A1 1.25; + A2 1000; + Ctau1 -4; + Ctau2 13; + Ctau3 -2; + alphaKsi 0.9; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; +} + +LienLeschzinerLowReCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + alphak 1; + alphaEps 0.76923; + Am 0.016; + Aepsilon 0.263; + Amu 0.00222; +} + +LRRCoeffs +{ + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; +} + +LaunderGibsonRSTMCoeffs +{ + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaEps 0.76923; + alphaR 1.22; +} + +SpalartAllmarasCoeffs +{ + alphaNut 1.5; + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2; + Cv1 7.1; + Cv2 5.0; +} + +wallFunctionCoeffs +{ + kappa 0.4187; + E 9; +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict b/tutorials/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..d8f6e3bb6ef8c12a381ef57d1033f8c091703f2a --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict @@ -0,0 +1,109 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+ | +// |inlet | +// +-----------+ | +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +convertToMeters 1; + +vertices +( + (0.0 -0.01 0) //0 + (0.2 -0.01 0) + (0.2 0.01 0) //2 + (0.0 0.01 0) + + (0.22 -0.01 0) //4 + (0.22 0.01 0) + + (0.2 -0.21 0) //6 + (0.22 -0.21 0) + + (0.2 0.21 0) //8 + (0.22 0.21 0) + + // Z + (0.0 -0.01 0.02) //0 + (0.2 -0.01 0.02) + (0.2 0.01 0.02) //2 + (0.0 0.01 0.02) + + (0.22 -0.01 0.02) //4 + (0.22 0.01 0.02) + + (0.2 -0.21 0.02) //6 + (0.22 -0.21 0.02) + + (0.2 0.21 0.02) //8 + (0.22 0.21 0.02) + +); + +blocks +( + // inlet block + hex (0 1 2 3 10 11 12 13) (50 5 5) simpleGrading (1 1 1) + + // central block + hex (1 4 5 2 11 14 15 12) (5 5 5) simpleGrading (1 1 1) + + // bottom block + hex (6 7 4 1 16 17 14 11) (5 50 5) simpleGrading (1 1 1) + + // top block + hex (2 5 9 8 12 15 19 18) (5 50 5) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch inlet + ( + (0 10 13 3) + ) + + patch outlet1 + ( + (6 7 17 16) + ) + + patch outlet2 + ( + (8 18 19 9) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/constant/polyMesh/boundary b/tutorials/pimpleFoam/t-junction/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..4ea7f95a3e9c35ac60edb879d026c17c690eddce --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/constant/polyMesh/boundary @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + inlet + { + type patch; + nFaces 25; + startFace 10050; + } + outlet1 + { + type patch; + nFaces 25; + startFace 10075; + } + outlet2 + { + type patch; + nFaces 25; + startFace 10100; + } + defaultFaces + { + type wall; + nFaces 3075; + startFace 10125; + } +) + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/constant/transportProperties b/tutorials/pimpleFoam/t-junction/constant/transportProperties new file mode 100644 index 0000000000000000000000000000000000000000..fd5fc94660c15bb124be01fc5bfb49f4e27dde73 --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/constant/transportProperties @@ -0,0 +1,37 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [0 2 -1 0 0 0 0] 1e-05; + +CrossPowerLawCoeffs +{ + nu0 nu0 [0 2 -1 0 0 0 0] 1e-06; + nuInf nuInf [0 2 -1 0 0 0 0] 1e-06; + m m [0 0 1 0 0 0 0] 1; + n n [0 0 0 0 0 0 0] 1; +} + +BirdCarreauCoeffs +{ + nu0 nu0 [0 2 -1 0 0 0 0] 1e-06; + nuInf nuInf [0 2 -1 0 0 0 0] 1e-06; + k k [0 0 1 0 0 0 0] 0; + n n [0 0 0 0 0 0 0] 1; +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/system/controlDict b/tutorials/pimpleFoam/t-junction/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..b5f0d20f7e2cd66501bd7b248f537d0db8804fb9 --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/system/controlDict @@ -0,0 +1,82 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application turbFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; +maxCo 5; + +functions +( + probes + { + // Type of functionObject + type probes; + + // Where to load it from (if not already in solver) + functionObjectLibs ("libsampling.so"); + + // Name of the directory for the probe data + name probes; + + // Locations to be probed. runTime modifiable! + probeLocations + ( + (1E-6 0 0.01) // at inlet + (0.21 -0.20999 0.01) // at outlet1 + (0.21 0.20999 0.01) // at outlet2 + (0.21 0 0.01) // at central block + ); + + // Fields to be probed. runTime modifiable! + fields + ( + p + U + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/system/fvSchemes b/tutorials/pimpleFoam/t-junction/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..bbe7fab0d2e1553b63c1695352cb9fe538ecd597 --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/system/fvSchemes @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div(phi,R) Gauss limitedLinear 1; + div(R) Gauss linear; + div(phi,nuTilda) Gauss limitedLinear 1; + div((nuEff*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(nuEff,U) Gauss linear corrected; + laplacian((1|A(U)),p) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; + laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; + interpolate(U) linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + +// ************************************************************************* // diff --git a/tutorials/pimpleFoam/t-junction/system/fvSolution b/tutorials/pimpleFoam/t-junction/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..995edf623c2b4a9ff14788cf5b6202105c66d15b --- /dev/null +++ b/tutorials/pimpleFoam/t-junction/system/fvSolution @@ -0,0 +1,88 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p GAMG + { + tolerance 1e-6; + relTol 0.01; + + smoother GaussSeidel; + + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + pFinal GAMG + { + tolerance 1e-6; + relTol 0.0; + + smoother GaussSeidel; + + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + }; + + U PBiCG + { + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + }; + UFinal PBiCG + { + preconditioner DILU; + tolerance 1e-05; + relTol 0; + }; + k PBiCG + { + preconditioner DILU; + tolerance 1e-05; + relTol 0; + }; + epsilon PBiCG + { + preconditioner DILU; + tolerance 1e-05; + relTol 0; + }; +} + +PIMPLE +{ + nOuterCorrectors 2; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + //p 0.3; + U 1.0; + k 1.0; + epsilon 1.0; +} + + +// ************************************************************************* //