From 56724d5a2d364c1e63d97ac3bfc58fea212dd08c Mon Sep 17 00:00:00 2001 From: henry <Henry Weller h.weller@opencfd.co.uk> Date: Tue, 30 Jun 2009 23:09:05 +0100 Subject: [PATCH] Created a runnable tutorial out of the iglooWithFridges case to demonstrate the buoyantBoussinesqSimpleFoam code. --- .../mesh/snappyHexMesh/iglooWithFridges/0/T | 48 +++++++++ .../mesh/snappyHexMesh/iglooWithFridges/0/U | 48 +++++++++ .../snappyHexMesh/iglooWithFridges/0/alphat | 50 +++++++++ .../snappyHexMesh/iglooWithFridges/0/epsilon | 50 +++++++++ .../mesh/snappyHexMesh/iglooWithFridges/0/k | 50 +++++++++ .../mesh/snappyHexMesh/iglooWithFridges/0/nut | 50 +++++++++ .../mesh/snappyHexMesh/iglooWithFridges/0/p | 52 +++++++++ .../snappyHexMesh/iglooWithFridges/Allrun | 9 ++ .../iglooWithFridges/constant/RASProperties | 100 ++++++++++++++++++ .../constant/environmentalProperties | 20 ++++ .../constant/polyMesh/blockMeshDict | 17 +-- .../constant/transportProperties | 42 ++++++++ .../iglooWithFridges/system/controlDict | 8 +- .../iglooWithFridges/system/fvSchemes | 21 ++-- .../iglooWithFridges/system/fvSolution | 64 ++++++++++- .../iglooWithFridges/system/snappyHexMeshDict | 8 +- 16 files changed, 614 insertions(+), 23 deletions(-) create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p create mode 100755 tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties create mode 100644 tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T new file mode 100644 index 00000000000..2f930360fd3 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/T @@ -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 T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 265; + +boundaryField +{ + ground + { + type fixedValue; + value uniform 265; + } + + igloo_region0 + { + type fixedValue; + value uniform 265; + } + + twoFridgeFreezers_seal_0 + { + type fixedValue; + value uniform 303; + } + + twoFridgeFreezers_herring_1 + { + type fixedValue; + value uniform 303; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U new file mode 100644 index 00000000000..5d70f2a9c02 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/U @@ -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 volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + ground + { + type fixedValue; + value uniform (0 0 0); + } + + igloo_region0 + { + type fixedValue; + value uniform (0 0 0); + } + + twoFridgeFreezers_seal_0 + { + type fixedValue; + value uniform (0 0 0); + } + + twoFridgeFreezers_herring_1 + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat new file mode 100644 index 00000000000..acdcda178a7 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/alphat @@ -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 volScalarField; + location "0"; + object alphat; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ground + { + type alphatWallFunction; + value uniform 0; + } + + igloo_region0 + { + type alphatWallFunction; + value uniform 0; + } + + twoFridgeFreezers_seal_0 + { + type alphatWallFunction; + value uniform 0; + } + + twoFridgeFreezers_herring_1 + { + type alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon new file mode 100644 index 00000000000..0fa9bf60f26 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/epsilon @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.01; + +boundaryField +{ + ground + { + type epsilonWallFunction; + value uniform 0.01; + } + + igloo_region0 + { + type epsilonWallFunction; + value uniform 0.01; + } + + twoFridgeFreezers_seal_0 + { + type epsilonWallFunction; + value uniform 0.01; + } + + twoFridgeFreezers_herring_1 + { + type epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k new file mode 100644 index 00000000000..bd0cf46f0db --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/k @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + ground + { + type kQRWallFunction; + value uniform 0.1; + } + + igloo_region0 + { + type kQRWallFunction; + value uniform 0.1; + } + + twoFridgeFreezers_seal_0 + { + type kQRWallFunction; + value uniform 0.1; + } + + twoFridgeFreezers_herring_1 + { + type kQRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut new file mode 100644 index 00000000000..e9e5f16e555 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/nut @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + ground + { + type nutWallFunction; + value uniform 0; + } + + igloo_region0 + { + type nutWallFunction; + value uniform 0; + } + + twoFridgeFreezers_seal_0 + { + type nutWallFunction; + value uniform 0; + } + + twoFridgeFreezers_herring_1 + { + type nutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p new file mode 100644 index 00000000000..2b90b18e74e --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/0/p @@ -0,0 +1,52 @@ +/*--------------------------------*- 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 0; + +boundaryField +{ + ground + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + igloo_region0 + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + twoFridgeFreezers_seal_0 + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + twoFridgeFreezers_herring_1 + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun b/tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun new file mode 100755 index 00000000000..79dc3f4b95e --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/Allrun @@ -0,0 +1,9 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication snappyHexMesh -overwrite +runApplication setFields +runApplication buoyantBoussinesqSimpleFoam + diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties new file mode 100644 index 00000000000..35b5a409f23 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/RASProperties @@ -0,0 +1,100 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + +laminarCoeffs +{ +} + +kEpsilonCoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 0.85; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +RNGkEpsilonCoeffs +{ + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; + alphah 1; + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; +} + +LaunderSharmaKECoeffs +{ + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1; + alphak 1; + alphaEps 0.76923; +} + +LRRCoeffs +{ + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; +} + +LaunderGibsonRSTMCoeffs +{ + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + alphah 1; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphaR 1; + alphaEps 0.76923; +} + +wallFunctionCoeffs +{ + kappa 0.4187; + E 9; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties new file mode 100644 index 00000000000..8ecb2a44020 --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/environmentalProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object environmentalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +g g [0 1 -2 0 0 0 0] (0 0 -9.81); + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict index d97dbb8e268..39d94d804fa 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/polyMesh/blockMeshDict @@ -40,27 +40,32 @@ edges patches ( - patch maxY + empty maxY ( (3 7 6 2) ) - patch minX + + empty minX ( (0 4 7 3) ) - patch maxX + + empty maxX ( (2 6 5 1) ) - patch minY + + empty minY ( (1 5 4 0) ) - patch minZ + + wall ground ( (0 3 2 1) ) - patch maxZ + + empty maxZ ( (4 5 6 7) ) diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties new file mode 100644 index 00000000000..f48fda19cca --- /dev/null +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/constant/transportProperties @@ -0,0 +1,42 @@ +/*---------------------------------------------------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.5.x | +| \\ / A nd | Web: http://www.openfoam.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + + root ""; + case ""; + instance ""; + local ""; + + class dictionary; + object transportProperties; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +// Laminar viscosity +nu nu [0 2 -1 0 0 0 0] 1e-05; + +// Thermal expansion coefficient +beta beta [0 0 0 -1 0 0 0] 3e-03; + +// Reference temperature +TRef TRef [0 0 0 1 0 0 0] 300; + +// Laminar Prandtl number +Pr Pr [0 0 0 0 0 0 0] 0.9; + +// Turbulent Prandtl number +Prt Prt [0 0 0 0 0 0 0] 0.7; + +// ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict index ef80311ee11..46e7cd00c33 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/controlDict @@ -15,25 +15,25 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -startFrom latestTime; +startFrom startTime; startTime 0; stopAt endTime; -endTime 100; +endTime 1000; deltaT 1; writeControl timeStep; -writeInterval 1; +writeInterval 100; purgeWrite 0; writeFormat ascii; -writePrecision 7; +writePrecision 6; writeCompression uncompressed; diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes index 2fa85964b7e..b54bb863160 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSchemes @@ -17,33 +17,40 @@ FoamFile ddtSchemes { - default Euler; + default steadyState; } gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; - div(phi,U) Gauss linear; + div(phi,U) Gauss upwind; + div(phi,T) Gauss upwind; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div((nuEff*dev(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; - laplacian(nu,U) Gauss linear corrected; - laplacian(1|A(U),p) Gauss linear corrected; - laplacian(diffusivity,cellMotionU) Gauss linear uncorrected; + laplacian(nuEff,U) Gauss linear corrected; + laplacian((1|A(U)),p) Gauss linear corrected; + laplacian(kappaEff,T) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; } interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution index 876c8c233f9..c2053ee47d6 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/fvSolution @@ -16,15 +16,73 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers -{} +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0.01; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + T + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } -PISO + R + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } +} + +SIMPLE { - nCorrectors 2; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } +relaxationFactors +{ + rho 1; + p 0.3; + U 0.7; + T 0.7; + k 0.7; + epsilon 0.7; + R 0.7; +} + // ************************************************************************* // diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict index 30da4533311..2f5d4049d69 100644 --- a/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges/system/snappyHexMeshDict @@ -42,12 +42,13 @@ geometry min (0 0 0); max (1 1 1); } + fridgeFreezer { type searchableSurfaceCollection; mergeSubRegions true; - + freezer { surface box1; @@ -73,12 +74,13 @@ geometry } } } + twoFridgeFreezers { type searchableSurfaceCollection; - + mergeSubRegions true; - + seal { surface fridgeFreezer; -- GitLab