From c1cd9c4cd7485eaf0ae83b53384ea375d6a25980 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 15 Aug 2008 12:20:42 +0100 Subject: [PATCH 01/11] pimpleFoam tutorial --- tutorials/pimpleFoam/t-junction/0/U | 50 +++++ tutorials/pimpleFoam/t-junction/0/epsilon | 49 +++++ tutorials/pimpleFoam/t-junction/0/k | 48 +++++ tutorials/pimpleFoam/t-junction/0/nuTilda | 44 ++++ tutorials/pimpleFoam/t-junction/0/p | 53 +++++ tutorials/pimpleFoam/t-junction/README.txt | 2 + .../t-junction/constant/RASProperties | 200 ++++++++++++++++++ .../constant/polyMesh/blockMeshDict | 109 ++++++++++ .../t-junction/constant/polyMesh/boundary | 46 ++++ .../t-junction/constant/transportProperties | 37 ++++ .../pimpleFoam/t-junction/system/controlDict | 82 +++++++ .../pimpleFoam/t-junction/system/fvSchemes | 69 ++++++ .../pimpleFoam/t-junction/system/fvSolution | 88 ++++++++ 13 files changed, 877 insertions(+) create mode 100644 tutorials/pimpleFoam/t-junction/0/U create mode 100644 tutorials/pimpleFoam/t-junction/0/epsilon create mode 100644 tutorials/pimpleFoam/t-junction/0/k create mode 100644 tutorials/pimpleFoam/t-junction/0/nuTilda create mode 100644 tutorials/pimpleFoam/t-junction/0/p create mode 100644 tutorials/pimpleFoam/t-junction/README.txt create mode 100644 tutorials/pimpleFoam/t-junction/constant/RASProperties create mode 100644 tutorials/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict create mode 100644 tutorials/pimpleFoam/t-junction/constant/polyMesh/boundary create mode 100644 tutorials/pimpleFoam/t-junction/constant/transportProperties create mode 100644 tutorials/pimpleFoam/t-junction/system/controlDict create mode 100644 tutorials/pimpleFoam/t-junction/system/fvSchemes create mode 100644 tutorials/pimpleFoam/t-junction/system/fvSolution diff --git a/tutorials/pimpleFoam/t-junction/0/U b/tutorials/pimpleFoam/t-junction/0/U new file mode 100644 index 0000000000..8851e66583 --- /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 0000000000..8e5b3e553d --- /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 0000000000..35b2bd3ff9 --- /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 0000000000..6ea76a6b63 --- /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 0000000000..b3d4646058 --- /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 0000000000..0905f8784d --- /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 0000000000..e46e0a858b --- /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 0000000000..d8f6e3bb6e --- /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 0000000000..4ea7f95a3e --- /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 0000000000..fd5fc94660 --- /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 0000000000..b5f0d20f7e --- /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 0000000000..bbe7fab0d2 --- /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 0000000000..995edf623c --- /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; +} + + +// ************************************************************************* // From 4386ef3d07ece894d1098871d813d6f97fd0ab56 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 19 Aug 2008 13:47:10 +0100 Subject: [PATCH 02/11] typo in comment --- applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 9b09d73bbe..858d83749e 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - rhoSimpleFoam + rhoPimpleFoam Description Transient solver for turbulent flow of compressible fluids for From c2b09b20a6fdcfee9e9668c2cb2044535749e709 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 19 Aug 2008 13:47:45 +0100 Subject: [PATCH 03/11] built into FOAM_USER_APPBIN --- applications/solvers/incompressible/pimpleFoam/Make/files | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/incompressible/pimpleFoam/Make/files b/applications/solvers/incompressible/pimpleFoam/Make/files index 92943d3370..f4ec4391df 100644 --- a/applications/solvers/incompressible/pimpleFoam/Make/files +++ b/applications/solvers/incompressible/pimpleFoam/Make/files @@ -1,3 +1,3 @@ pimpleFoam.C -EXE = $(FOAM_USER_APPBIN)/pimpleFoam +EXE = $(FOAM_APPBIN)/pimpleFoam From ff64d2d0d2fcb3697cd4fe958458cd968c276e16 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 19 Aug 2008 13:49:00 +0100 Subject: [PATCH 04/11] unused options --- applications/test/speed/Make/options | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/test/speed/Make/options b/applications/test/speed/Make/options index e69de29bb2..e680561987 100644 --- a/applications/test/speed/Make/options +++ b/applications/test/speed/Make/options @@ -0,0 +1 @@ +EXE_INC = /* -ffast-math -mtune=core2 */ From 7fd0b8d9f866c0f726ad684313e5447d10180059 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 19 Aug 2008 13:51:52 +0100 Subject: [PATCH 05/11] passing motionDict; geometric test on problem cells --- .../autoHexMeshDriver/autoHexMeshDriver.C | 4 +- .../autoHexMeshDriver/autoRefineDriver.C | 15 +- .../autoHexMeshDriver/autoRefineDriver.H | 10 +- .../meshRefinement/meshRefinement.C | 433 ++++++++++++++---- .../meshRefinement/meshRefinement.H | 73 ++- .../meshRefinement/meshRefinementRefine.C | 25 +- 6 files changed, 436 insertions(+), 124 deletions(-) diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C index 48f52d7880..c07b950d0a 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.C @@ -491,6 +491,8 @@ void Foam::autoHexMeshDriver::doMesh() if (wantRefine) { + const dictionary& motionDict = dict_.subDict("motionDict"); + autoRefineDriver refineDriver ( meshRefinerPtr_(), @@ -502,7 +504,7 @@ void Foam::autoHexMeshDriver::doMesh() // Get all the refinement specific params refinementParameters refineParams(dict_, 1); - refineDriver.doRefine(dict_, refineParams, wantSnap); + refineDriver.doRefine(dict_, refineParams, wantSnap, motionDict); // Write mesh writeMesh("Refined mesh"); diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index 7bbe58ff8f..ca0c0cbddc 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -497,7 +497,8 @@ Foam::label Foam::autoRefineDriver::shellRefine void Foam::autoRefineDriver::baffleAndSplitMesh ( const refinementParameters& refineParams, - const bool handleSnapProblems + const bool handleSnapProblems, + const dictionary& motionDict ) { Info<< nl @@ -514,6 +515,7 @@ void Foam::autoRefineDriver::baffleAndSplitMesh ( handleSnapProblems, !handleSnapProblems, // merge free standing baffles? + motionDict, const_cast(mesh.time()), globalToPatch_, refineParams.keepPoints()[0] @@ -568,7 +570,8 @@ void Foam::autoRefineDriver::zonify void Foam::autoRefineDriver::splitAndMergeBaffles ( const refinementParameters& refineParams, - const bool handleSnapProblems + const bool handleSnapProblems, + const dictionary& motionDict ) { Info<< nl @@ -588,6 +591,7 @@ void Foam::autoRefineDriver::splitAndMergeBaffles ( handleSnapProblems, false, // merge free standing baffles? + motionDict, const_cast(mesh.time()), globalToPatch_, refineParams.keepPoints()[0] @@ -685,7 +689,8 @@ void Foam::autoRefineDriver::doRefine ( const dictionary& refineDict, const refinementParameters& refineParams, - const bool prepareForSnapping + const bool prepareForSnapping, + const dictionary& motionDict ) { Info<< nl @@ -734,13 +739,13 @@ void Foam::autoRefineDriver::doRefine ); // Introduce baffles at surface intersections - baffleAndSplitMesh(refineParams, prepareForSnapping); + baffleAndSplitMesh(refineParams, prepareForSnapping, motionDict); // Mesh is at its finest. Do optional zoning. zonify(refineParams); // Pull baffles apart - splitAndMergeBaffles(refineParams, prepareForSnapping); + splitAndMergeBaffles(refineParams, prepareForSnapping, motionDict); // Do something about cells with refined faces on the boundary if (prepareForSnapping) diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H index 8aa33855de..f1747a29be 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.H @@ -46,7 +46,6 @@ namespace Foam class featureEdgeMesh; class refinementParameters; - /*---------------------------------------------------------------------------*\ Class autoRefineDriver Declaration \*---------------------------------------------------------------------------*/ @@ -112,7 +111,8 @@ class autoRefineDriver void baffleAndSplitMesh ( const refinementParameters& refineParams, - const bool handleSnapProblems + const bool handleSnapProblems, + const dictionary& motionDict ); //- Add zones @@ -121,7 +121,8 @@ class autoRefineDriver void splitAndMergeBaffles ( const refinementParameters& refineParams, - const bool handleSnapProblems + const bool handleSnapProblems, + const dictionary& motionDict ); //- Merge refined boundary faces (from exposing coarser cell) @@ -163,7 +164,8 @@ public: ( const dictionary& refineDict, const refinementParameters& refineParams, - const bool prepareForSnapping + const bool prepareForSnapping, + const dictionary& motionDict ); }; diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index 4fe3005766..7f5bc29a79 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -50,6 +50,7 @@ License #include "globalIndex.H" #include "meshTools.H" #include "OFstream.H" +#include "geomDecomp.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -426,15 +427,14 @@ Foam::autoPtr Foam::meshRefinement::doRemoveCells // Determine for multi-processor regions the lowest numbered cell on the lowest // numbered processor. -void Foam::meshRefinement::getRegionMaster +void Foam::meshRefinement::getCoupledRegionMaster ( + const globalIndex& globalCells, const boolList& blockedFace, const regionSplit& globalRegion, Map