From ac02c6044285c942d1af1cbfc6d93f568022fc91 Mon Sep 17 00:00:00 2001 From: henry <Henry Weller h.weller@opencfd.co.uk> Date: Fri, 26 Jun 2009 17:19:09 +0100 Subject: [PATCH] Changed Boussinesq solvers to use p rather than pd and added hotRoom tutorial cases for them. --- .../buoyantBoussinesqPisoFoam/Make/options | 1 + .../buoyantBoussinesqPisoFoam/TEqn.H | 4 +- .../buoyantBoussinesqPisoFoam/UEqn.H | 27 +- .../buoyantBoussinesqPisoFoam.C | 42 +- .../buoyantBoussinesqPisoFoam/createFields.H | 35 +- .../{pdEqn.H => pEqn.H} | 19 +- .../readTransportProperties.H | 13 - .../writeAdditionalFields.H | 29 -- .../buoyantBoussinesqSimpleFoam/TEqn.H | 4 +- .../buoyantBoussinesqSimpleFoam/UEqn.H | 8 +- .../buoyantBoussinesqSimpleFoam.C | 34 +- .../createFields.H | 30 +- .../{pdEqn.H => pEqn.H} | 23 +- .../readTransportProperties.H | 10 +- .../writeAdditionalFields.H | 29 -- .../buoyantPisoFoam/createFields.H | 1 - src/finiteVolume/Make/files | 1 - ...ssinesqBuoyantPressureFvPatchScalarField.C | 149 ------ ...ssinesqBuoyantPressureFvPatchScalarField.H | 148 ------ ...xedFluxBuoyantPressureFvPatchScalarField.C | 38 +- ...xedFluxBuoyantPressureFvPatchScalarField.H | 5 + .../totalPressureFvPatchScalarField.C | 1 - .../buoyantBoussinesqPisoFoam/hotRoom/0/T | 443 ++++++++++++++++++ .../buoyantBoussinesqPisoFoam/hotRoom/0/T.org | 443 ++++++++++++++++++ .../buoyantBoussinesqPisoFoam/hotRoom/0/U | 42 ++ .../hotRoom/0/alphat | 42 ++ .../hotRoom/0/epsilon | 42 ++ .../hotRoom/0/epsilon.old | 42 ++ .../buoyantBoussinesqPisoFoam/hotRoom/0/k | 42 ++ .../buoyantBoussinesqPisoFoam/hotRoom/0/k.old | 42 ++ .../buoyantBoussinesqPisoFoam/hotRoom/0/mut | 42 ++ .../buoyantBoussinesqPisoFoam/hotRoom/0/nut | 42 ++ .../buoyantBoussinesqPisoFoam/hotRoom/0/p | 45 ++ .../hotRoom/Allclean | 7 + .../buoyantBoussinesqPisoFoam/hotRoom/Allrun | 10 + .../hotRoom/constant/RASProperties | 100 ++++ .../hotRoom/constant/environmentalProperties | 21 + .../hotRoom/constant/polyMesh/blockMeshDict | 63 +++ .../hotRoom/constant/polyMesh/boundary | 40 ++ .../hotRoom/constant/transportProperties | 42 ++ .../hotRoom/system/controlDict | 50 ++ .../hotRoom/system/fvSchemes | 68 +++ .../hotRoom/system/fvSolution | 87 ++++ .../buoyantBoussinesqSimpleFoam/hotRoom/0/T | 443 ++++++++++++++++++ .../hotRoom/0/T.org | 443 ++++++++++++++++++ .../buoyantBoussinesqSimpleFoam/hotRoom/0/U | 42 ++ .../hotRoom/0/alphat | 42 ++ .../hotRoom/0/epsilon | 42 ++ .../hotRoom/0/epsilon.old | 42 ++ .../buoyantBoussinesqSimpleFoam/hotRoom/0/k | 42 ++ .../hotRoom/0/k.old | 42 ++ .../buoyantBoussinesqSimpleFoam/hotRoom/0/mut | 42 ++ .../buoyantBoussinesqSimpleFoam/hotRoom/0/nut | 42 ++ .../buoyantBoussinesqSimpleFoam/hotRoom/0/p | 45 ++ .../hotRoom/Allclean | 7 + .../hotRoom/Allrun | 10 + .../hotRoom/constant/RASProperties | 100 ++++ .../hotRoom/constant/environmentalProperties | 21 + .../hotRoom/constant/polyMesh/blockMeshDict | 63 +++ .../hotRoom/constant/polyMesh/boundary | 40 ++ .../hotRoom/constant/transportProperties | 42 ++ .../hotRoom/system/controlDict | 47 ++ .../hotRoom/system/fvSchemes | 68 +++ .../hotRoom/system/fvSolution | 88 ++++ .../hotRoom/system/controlDict | 4 +- 65 files changed, 3666 insertions(+), 497 deletions(-) rename applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/{pdEqn.H => pEqn.H} (55%) delete mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H delete mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H rename applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/{pdEqn.H => pEqn.H} (64%) delete mode 100644 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon.old create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k.old create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/mut create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p create mode 100755 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean create mode 100755 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/environmentalProperties create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes create mode 100644 tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T.org create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/alphat create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon.old create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k.old create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/mut create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/p create mode 100755 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean create mode 100755 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/RASProperties create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/environmentalProperties create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/blockMeshDict create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/boundary create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/transportProperties create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/controlDict create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes create mode 100644 tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options index a53061a93cc..041d2e06054 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I../buoyantBoussinesqSimpleFoam \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H index e2a89d14415..ece4b8ffe5c 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H @@ -2,7 +2,7 @@ volScalarField kappaEff ( "kappaEff", - turbulence->nu() + turbulence->nut()/Prt + turbulence->nu()/Pr + turbulence->nut()/Prt ); fvScalarMatrix TEqn @@ -15,4 +15,6 @@ TEqn.relax(); TEqn.solve(); + + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H index 3b5b5be2492..35387f4ff40 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H @@ -1,23 +1,26 @@ // Solve the momentum equation - tmp<fvVectorMatrix> UEqn + fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) ); - UEqn().relax(); + UEqn.relax(); - solve - ( - UEqn() - == - -fvc::reconstruct + if (momentumPredictor) + { + solve ( + UEqn + == + fvc::reconstruct ( - fvc::snGrad(pd) - - betaghf*fvc::snGrad(T) - ) * mesh.magSf() - ) - ); + ( + fvc::interpolate(rhok)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) + ) + ); + } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C index e3cece5b91f..3f0ece93cb3 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C @@ -54,18 +54,17 @@ Description int main(int argc, char *argv[]) { - -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "readTimeControls.H" -# include "CourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "CourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -73,26 +72,23 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readTimeControls.H" -# include "readPISOControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "CourantNo.H" + #include "setDeltaT.H" -# include "UEqn.H" + #include "UEqn.H" + #include "TEqn.H" // --- PISO loop for (int corr=0; corr<nCorr; corr++) { -# include "TEqn.H" -# include "pdEqn.H" + #include "pEqn.H" } turbulence->correct(); - if (runTime.write()) - { -# include "writeAdditionalFields.H" - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H index 5f3f13626db..dde0e38b339 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H @@ -14,13 +14,12 @@ mesh ); - // kinematic pd - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -53,15 +52,25 @@ incompressible::RASModel::New(U, phi, laminarTransport) ); - Info<< "Calculating field beta*(g.h)\n" << endl; - surfaceScalarField betaghf("betagh", beta*(g & mesh.Cf())); - - label pdRefCell = 0; - scalar pdRefValue = 0.0; + label pRefCell = 0; + scalar pRefValue = 0.0; setRefCell ( - pd, - mesh.solutionDict().subDict("SIMPLE"), - pdRefCell, - pdRefValue + p, + mesh.solutionDict().subDict("PISO"), + pRefCell, + pRefValue + ); + + + // Kinematic density for buoyancy force + volScalarField rhok + ( + IOobject + ( + "rhok", + runTime.timeName(), + mesh + ), + 1.0 - beta*(T - TRef) ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pdEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H similarity index 55% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pdEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H index 25e2a9817fb..ff0c26f0589 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pdEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H @@ -1,9 +1,8 @@ { - volScalarField rUA("rUA", 1.0/UEqn().A()); + volScalarField rUA("rUA", 1.0/UEqn.A()); surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - U = rUA*UEqn().H(); - UEqn.clear(); + U = rUA*UEqn.H(); surfaceScalarField phiU ( @@ -11,31 +10,31 @@ + fvc::ddtPhiCorr(rUA, U, phi) ); - phi = phiU + betaghf*fvc::snGrad(T)*rUAf*mesh.magSf(); + phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); if (corr == nCorr-1 && nonOrth == nNonOrthCorr) { - pdEqn.solve(mesh.solver(pd.name() + "Final")); + pEqn.solve(mesh.solver(p.name() + "Final")); } else { - pdEqn.solve(mesh.solver(pd.name())); + pEqn.solve(mesh.solver(p.name())); } if (nonOrth == nNonOrthCorr) { - phi += pdEqn.flux(); + phi -= pEqn.flux(); } } - U -= rUA*fvc::reconstruct((phi - phiU)/rUAf); + U += rUA*fvc::reconstruct((phi - phiU)/rUAf); U.correctBoundaryConditions(); #include "continuityErrs.H" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H deleted file mode 100644 index 585128dfdeb..00000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/readTransportProperties.H +++ /dev/null @@ -1,13 +0,0 @@ - singlePhaseTransportModel laminarTransport(U, phi); - - // thermal expansion coefficient [1/K] - dimensionedScalar beta(laminarTransport.lookup("beta")); - - // reference temperature [K] - dimensionedScalar TRef(laminarTransport.lookup("TRef")); - - // reference kinematic pressure [m2/s2] - dimensionedScalar pRef(laminarTransport.lookup("pRef")); - - // turbulent Prandtl number - dimensionedScalar Prt(laminarTransport.lookup("Prt")); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H deleted file mode 100644 index 20f7c6ae1dc..00000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/writeAdditionalFields.H +++ /dev/null @@ -1,29 +0,0 @@ -{ - volScalarField rhoEff - ( - IOobject - ( - "rhoEff", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - 1.0 - beta*(T - TRef) - ); - rhoEff.write(); - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rhoEff*(g & mesh.C()) + pRef - ); - p.write(); -} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index d00f0877eaf..7452a0495ad 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -2,7 +2,7 @@ volScalarField kappaEff ( "kappaEff", - turbulence->nu() + turbulence->nut()/Prt + turbulence->nu()/Pr + turbulence->nut()/Prt ); fvScalarMatrix TEqn @@ -16,4 +16,6 @@ eqnResidual = TEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); + + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index cf5c4a19789..a813a2d8b7a 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -13,12 +13,12 @@ ( UEqn() == - -fvc::reconstruct + fvc::reconstruct ( ( - fvc::snGrad(pd) - - betaghf*fvc::snGrad(T) - ) * mesh.magSf() + fvc::interpolate(rhok)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) ) ).initialResidual(); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index fafb49d8484..63b938fa362 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -54,15 +54,14 @@ Description int main(int argc, char *argv[]) { + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" -# include "setRootCase.H" -# include "createTime.H" -# include "createMesh.H" -# include "readEnvironmentalProperties.H" -# include "createFields.H" -# include "initContinuityErrs.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -70,30 +69,27 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; -# include "readSIMPLEControls.H" -# include "initConvergenceCheck.H" + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" - pd.storePrevIter(); + p.storePrevIter(); // Pressure-velocity SIMPLE corrector { -# include "UEqn.H" -# include "TEqn.H" -# include "pdEqn.H" + #include "UEqn.H" + #include "TEqn.H" + #include "pEqn.H" } turbulence->correct(); - if (runTime.write()) - { -# include "writeAdditionalFields.H" - } + runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; -# include "convergenceCheck.H" + #include "convergenceCheck.H" } Info<< "End\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index 5f3f13626db..0e668e9d987 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -14,13 +14,12 @@ mesh ); - // kinematic pd - Info<< "Reading field pd\n" << endl; - volScalarField pd + Info<< "Reading field p\n" << endl; + volScalarField p ( IOobject ( - "pd", + "p", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -56,12 +55,25 @@ Info<< "Calculating field beta*(g.h)\n" << endl; surfaceScalarField betaghf("betagh", beta*(g & mesh.Cf())); - label pdRefCell = 0; - scalar pdRefValue = 0.0; + label pRefCell = 0; + scalar pRefValue = 0.0; setRefCell ( - pd, + p, mesh.solutionDict().subDict("SIMPLE"), - pdRefCell, - pdRefValue + pRefCell, + pRefValue + ); + + + // Kinematic density for buoyancy force + volScalarField rhok + ( + IOobject + ( + "rhok", + runTime.timeName(), + mesh + ), + 1.0 - beta*(T - TRef) ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H similarity index 64% rename from applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H index e782d26c8dc..e1d42d738e8 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pdEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H @@ -6,41 +6,42 @@ UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); - adjustPhi(phi, U, pd); - surfaceScalarField buoyancyPhi = -betaghf*fvc::snGrad(T)*rUAf*mesh.magSf(); - phi -= buoyancyPhi; + adjustPhi(phi, U, p); + surfaceScalarField buoyancyPhi = + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); + phi += buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pdEqn + fvScalarMatrix pEqn ( - fvm::laplacian(rUAf, pd) == fvc::div(phi) + fvm::laplacian(rUAf, p) == fvc::div(phi) ); - pdEqn.setReference(pdRefCell, pdRefValue); + pEqn.setReference(pRefCell, pRefValue); // retain the residual from the first iteration if (nonOrth == 0) { - eqnResidual = pdEqn.solve().initialResidual(); + eqnResidual = pEqn.solve().initialResidual(); maxResidual = max(eqnResidual, maxResidual); } else { - pdEqn.solve(); + pEqn.solve(); } if (nonOrth == nNonOrthCorr) { // Calculate the conservative fluxes - phi -= pdEqn.flux(); + phi -= pEqn.flux(); // Explicitly relax pressure for momentum corrector - pd.relax(); + p.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U -= rUA*fvc::reconstruct((buoyancyPhi + pdEqn.flux())/rUAf); + U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); U.correctBoundaryConditions(); } } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H index 585128dfdeb..82d101d8c1b 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/readTransportProperties.H @@ -1,13 +1,13 @@ singlePhaseTransportModel laminarTransport(U, phi); - // thermal expansion coefficient [1/K] + // Thermal expansion coefficient [1/K] dimensionedScalar beta(laminarTransport.lookup("beta")); - // reference temperature [K] + // Reference temperature [K] dimensionedScalar TRef(laminarTransport.lookup("TRef")); - // reference kinematic pressure [m2/s2] - dimensionedScalar pRef(laminarTransport.lookup("pRef")); + // Laminar Prandtl number + dimensionedScalar Pr(laminarTransport.lookup("Pr")); - // turbulent Prandtl number + // Turbulent Prandtl number dimensionedScalar Prt(laminarTransport.lookup("Prt")); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H deleted file mode 100644 index 20f7c6ae1dc..00000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/writeAdditionalFields.H +++ /dev/null @@ -1,29 +0,0 @@ -{ - volScalarField rhoEff - ( - IOobject - ( - "rhoEff", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - 1.0 - beta*(T - TRef) - ); - rhoEff.write(); - - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pd + rhoEff*(g & mesh.C()) + pRef - ); - p.write(); -} diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H index b5c84e435e3..b8ac5595e47 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H @@ -65,4 +65,3 @@ dimensionedScalar initialMass = fvc::domainIntegrate(rho); dimensionedScalar totalVolume = sum(mesh.V()); - diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 313110bd43a..0524c0037bd 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -109,7 +109,6 @@ $(derivedFvPatchFields)/directMappedFixedValue/directMappedFixedValueFvPatchFiel $(derivedFvPatchFields)/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C $(derivedFvPatchFields)/fan/fanFvPatchFields.C $(derivedFvPatchFields)/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C -$(derivedFvPatchFields)/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedInternalValueFvPatchField/fixedInternalValueFvPatchFields.C $(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C deleted file mode 100644 index 9a75eed1688..00000000000 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C +++ /dev/null @@ -1,149 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(p, iF) -{} - - -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -( - const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper) -{} - - -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -( - const fvPatch& p, - const DimensionedField<scalar, volMesh>& iF, - const dictionary& -) -: - fixedGradientFvPatchScalarField(p, iF) -{ - fvPatchField<scalar>::operator=(patchInternalField()); - gradient() = 0.0; -} - - -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -( - const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& wbppsf -) -: - fixedGradientFvPatchScalarField(wbppsf) -{} - - -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField:: -fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -( - const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& wbppsf, - const DimensionedField<scalar, volMesh>& iF -) -: - fixedGradientFvPatchScalarField(wbppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void fixedFluxBoussinesqBuoyantPressureFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const dictionary& environmentalProperties - = db().lookupObject<IOdictionary>("environmentalProperties"); - - dimensionedVector g(environmentalProperties.lookup("g")); - - const dictionary& transportProperties - = db().lookupObject<IOdictionary>("transportProperties"); - - dimensionedScalar beta(transportProperties.lookup("beta")); - - const fvPatchField<scalar>& T = - patch().lookupPatchField<volScalarField, scalar>("T"); - - gradient() = beta.value()*T.snGrad()*(g.value() & patch().Cf()); - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -void fixedFluxBoussinesqBuoyantPressureFvPatchScalarField::write -( - Ostream& os -) const -{ - fixedGradientFvPatchScalarField::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField -( - fvPatchScalarField, - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H deleted file mode 100644 index 094f8805606..00000000000 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBoussinesqBuoyantPressure/fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.H +++ /dev/null @@ -1,148 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - -Description - Boundary condition on pressure for use with buoyant solvers employing the - Boussinesq approximation to balance the flux generated by the temperature - gradient. - -SourceFiles - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField.C - -\*---------------------------------------------------------------------------*/ - -#ifndef fixedFluxBoussinesqBuoyantPressureFvPatchScalarFields_H -#define fixedFluxBoussinesqBuoyantPressureFvPatchScalarFields_H - -#include "fvPatchFields.H" -#include "fixedGradientFvPatchFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class fixedFluxBoussinesqBuoyantPressureFvPatchScalarField Declaration -\*---------------------------------------------------------------------------*/ - -class fixedFluxBoussinesqBuoyantPressureFvPatchScalarField -: - public fixedGradientFvPatchScalarField -{ -public: - - //- Runtime type information - TypeName("fixedFluxBoussinesqBuoyantPressure"); - - - // Constructors - - //- Construct from patch and internal field - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct from patch, internal field and dictionary - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - ( - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const dictionary& - ); - - //- Construct by mapping given - // fixedFluxBoussinesqBuoyantPressureFvPatchScalarField onto a new - // patch - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - ( - const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField&, - const fvPatch&, - const DimensionedField<scalar, volMesh>&, - const fvPatchFieldMapper& - ); - - //- Construct as copy - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - ( - const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField& - ); - - //- Construct and return a clone - virtual tmp<fvPatchScalarField> clone() const - { - return tmp<fvPatchScalarField> - ( - new fixedFluxBoussinesqBuoyantPressureFvPatchScalarField(*this) - ); - } - - //- Construct as copy setting internal field reference - fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - ( - const fixedFluxBoussinesqBuoyantPressureFvPatchScalarField&, - const DimensionedField<scalar, volMesh>& - ); - - //- Construct and return a clone setting internal field reference - virtual tmp<fvPatchScalarField> clone - ( - const DimensionedField<scalar, volMesh>& iF - ) const - { - return tmp<fvPatchScalarField> - ( - new fixedFluxBoussinesqBuoyantPressureFvPatchScalarField - ( - *this, - iF - ) - ); - } - - - // Member functions - - //- Update the coefficients associated with the patch field - virtual void updateCoeffs(); - - //- Write - virtual void write(Ostream&) const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C index b6f48ff6ada..279918b47af 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.C @@ -43,56 +43,61 @@ fixedFluxBuoyantPressureFvPatchScalarField const DimensionedField<scalar, volMesh>& iF ) : - fixedGradientFvPatchScalarField(p, iF) + fixedGradientFvPatchScalarField(p, iF), + rhoName_("rho") {} fixedFluxBuoyantPressureFvPatchScalarField:: fixedFluxBuoyantPressureFvPatchScalarField ( - const fixedFluxBuoyantPressureFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, - const fvPatchFieldMapper& mapper + const dictionary& dict ) : - fixedGradientFvPatchScalarField(ptf, p, iF, mapper) -{} + fixedGradientFvPatchScalarField(p, iF), + rhoName_(dict.lookupOrDefault<word>("rho", "rho")) +{ + fvPatchField<scalar>::operator=(patchInternalField()); + gradient() = 0.0; +} fixedFluxBuoyantPressureFvPatchScalarField:: fixedFluxBuoyantPressureFvPatchScalarField ( + const fixedFluxBuoyantPressureFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, - const dictionary& + const fvPatchFieldMapper& mapper ) : - fixedGradientFvPatchScalarField(p, iF) -{ - fvPatchField<scalar>::operator=(patchInternalField()); - gradient() = 0.0; -} + fixedGradientFvPatchScalarField(ptf, p, iF, mapper), + rhoName_(ptf.rhoName_) +{} fixedFluxBuoyantPressureFvPatchScalarField:: fixedFluxBuoyantPressureFvPatchScalarField ( - const fixedFluxBuoyantPressureFvPatchScalarField& wbppsf + const fixedFluxBuoyantPressureFvPatchScalarField& ptf ) : - fixedGradientFvPatchScalarField(wbppsf) + fixedGradientFvPatchScalarField(ptf), + rhoName_(ptf.rhoName_) {} fixedFluxBuoyantPressureFvPatchScalarField:: fixedFluxBuoyantPressureFvPatchScalarField ( - const fixedFluxBuoyantPressureFvPatchScalarField& wbppsf, + const fixedFluxBuoyantPressureFvPatchScalarField& ptf, const DimensionedField<scalar, volMesh>& iF ) : - fixedGradientFvPatchScalarField(wbppsf, iF) + fixedGradientFvPatchScalarField(ptf, iF), + rhoName_(ptf.rhoName_) {} @@ -111,7 +116,7 @@ void fixedFluxBuoyantPressureFvPatchScalarField::updateCoeffs() dimensionedVector g(environmentalProperties.lookup("g")); const fvPatchField<scalar>& rho = - patch().lookupPatchField<volScalarField, scalar>("rho"); + patch().lookupPatchField<volScalarField, scalar>(rhoName_); // If the variable name is "pd" assume it is p - rho*g.h // and set the gradient appropriately. @@ -132,6 +137,7 @@ void fixedFluxBuoyantPressureFvPatchScalarField::updateCoeffs() void fixedFluxBuoyantPressureFvPatchScalarField::write(Ostream& os) const { fixedGradientFvPatchScalarField::write(os); + os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H index 8e433cb8f16..ec5dc7dd990 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedFluxBuoyantPressure/fixedFluxBuoyantPressureFvPatchScalarField.H @@ -55,6 +55,11 @@ class fixedFluxBuoyantPressureFvPatchScalarField : public fixedGradientFvPatchScalarField { + // Private data + + //- Name of the density field used to calculate the buoyancy force + word rhoName_; + public: diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C index 76267d4fa6a..56ee8a0753d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C @@ -30,7 +30,6 @@ License #include "volFields.H" #include "surfaceFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T new file mode 100644 index 00000000000..a5a03f6a2e3 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T @@ -0,0 +1,443 @@ +/*--------------------------------*- 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 300; + +boundaryField +{ + floor + { + type fixedValue; + value nonuniform List<scalar> +400 +( +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +) +; + } + ceiling + { + type fixedValue; + value uniform 300; + } + fixedWalls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org new file mode 100644 index 00000000000..a5a03f6a2e3 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org @@ -0,0 +1,443 @@ +/*--------------------------------*- 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 300; + +boundaryField +{ + floor + { + type fixedValue; + value nonuniform List<scalar> +400 +( +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +) +; + } + ceiling + { + type fixedValue; + value uniform 300; + } + fixedWalls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U new file mode 100644 index 00000000000..0b6b191dab0 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type fixedValue; + value uniform (0 0 0); + } + + ceiling + { + type fixedValue; + value uniform (0 0 0); + } + + fixedWalls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat new file mode 100644 index 00000000000..3bcb9c03b13 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type alphatWallFunction; + value uniform 0; + } + ceiling + { + type alphatWallFunction; + value uniform 0; + } + fixedWalls + { + type alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon new file mode 100644 index 00000000000..892d69375d9 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type epsilonWallFunction; + value uniform 0.01; + } + ceiling + { + type epsilonWallFunction; + value uniform 0.01; + } + fixedWalls + { + type epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon.old b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon.old new file mode 100644 index 00000000000..23851291dc6 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon.old @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type compressible::epsilonWallFunction; + value uniform 0.01; + } + ceiling + { + type compressible::epsilonWallFunction; + value uniform 0.01; + } + fixedWalls + { + type compressible::epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k new file mode 100644 index 00000000000..38c2a542ef4 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type kQRWallFunction; + value uniform 0.1; + } + ceiling + { + type kQRWallFunction; + value uniform 0.1; + } + fixedWalls + { + type kQRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k.old b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k.old new file mode 100644 index 00000000000..4ec7f08960c --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k.old @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type compressible::kQRWallFunction; + value uniform 0.1; + } + ceiling + { + type compressible::kQRWallFunction; + value uniform 0.1; + } + fixedWalls + { + type compressible::kQRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/mut new file mode 100644 index 00000000000..7c893682965 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/mut @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type mutWallFunction; + value uniform 0; + } + ceiling + { + type mutWallFunction; + value uniform 0; + } + fixedWalls + { + type mutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut new file mode 100644 index 00000000000..a81ad6b59fd --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type nutWallFunction; + value uniform 0; + } + ceiling + { + type nutWallFunction; + value uniform 0; + } + fixedWalls + { + type nutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p new file mode 100644 index 00000000000..2014ca6e8c0 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p @@ -0,0 +1,45 @@ +/*--------------------------------*- 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 +{ + floor + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + ceiling + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + fixedWalls + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean new file mode 100755 index 00000000000..83fcec83eca --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +cp 0/T.org 0/T diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun new file mode 100755 index 00000000000..92490b5b5ea --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun @@ -0,0 +1,10 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application="buoyantBoussinesqPisoFoam" + +compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom +runApplication blockMesh +runApplication setHotRoom +runApplication $application diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties new file mode 100644 index 00000000000..35b5a409f23 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/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/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/environmentalProperties b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/environmentalProperties new file mode 100644 index 00000000000..a866ff549fd --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/environmentalProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- 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 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict new file mode 100644 index 00000000000..fa2bb5c4c6e --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict @@ -0,0 +1,63 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (10 0 0) + (10 5 0) + (0 5 0) + (0 0 10) + (10 0 10) + (10 5 10) + (0 5 10) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall floor + ( + (1 5 4 0) + ) + wall ceiling + ( + (3 7 6 2) + ) + wall fixedWalls + ( + (0 4 7 3) + (2 6 5 1) + (0 3 2 1) + (4 5 6 7) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary new file mode 100644 index 00000000000..0d4d0e498da --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary @@ -0,0 +1,40 @@ +/*--------------------------------*- 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 polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + floor + { + type wall; + nFaces 400; + startFace 11200; + } + ceiling + { + type wall; + nFaces 400; + startFace 11600; + } + fixedWalls + { + type wall; + nFaces 800; + startFace 12000; + } +) + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties new file mode 100644 index 00000000000..f48fda19cca --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/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/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict new file mode 100644 index 00000000000..26a1219ee04 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict @@ -0,0 +1,50 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 0.5; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes new file mode 100644 index 00000000000..6be8f0129f6 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes @@ -0,0 +1,68 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + 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(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; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution new file mode 100644 index 00000000000..7afa2f50aa9 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution @@ -0,0 +1,87 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0.1; + } + + pFinal + { + solver PCG; + preconditioner DIC; + tolerance 1e-07; + relTol 0; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + T + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + R + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + momentumPredictor yes; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T new file mode 100644 index 00000000000..a5a03f6a2e3 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T @@ -0,0 +1,443 @@ +/*--------------------------------*- 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 300; + +boundaryField +{ + floor + { + type fixedValue; + value nonuniform List<scalar> +400 +( +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +) +; + } + ceiling + { + type fixedValue; + value uniform 300; + } + fixedWalls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T.org b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T.org new file mode 100644 index 00000000000..a5a03f6a2e3 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/T.org @@ -0,0 +1,443 @@ +/*--------------------------------*- 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 300; + +boundaryField +{ + floor + { + type fixedValue; + value nonuniform List<scalar> +400 +( +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +600 +600 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +300 +) +; + } + ceiling + { + type fixedValue; + value uniform 300; + } + fixedWalls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U new file mode 100644 index 00000000000..0b6b191dab0 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/U @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type fixedValue; + value uniform (0 0 0); + } + + ceiling + { + type fixedValue; + value uniform (0 0 0); + } + + fixedWalls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/alphat new file mode 100644 index 00000000000..3bcb9c03b13 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/alphat @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type alphatWallFunction; + value uniform 0; + } + ceiling + { + type alphatWallFunction; + value uniform 0; + } + fixedWalls + { + type alphatWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon new file mode 100644 index 00000000000..892d69375d9 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type epsilonWallFunction; + value uniform 0.01; + } + ceiling + { + type epsilonWallFunction; + value uniform 0.01; + } + fixedWalls + { + type epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon.old b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon.old new file mode 100644 index 00000000000..23851291dc6 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/epsilon.old @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type compressible::epsilonWallFunction; + value uniform 0.01; + } + ceiling + { + type compressible::epsilonWallFunction; + value uniform 0.01; + } + fixedWalls + { + type compressible::epsilonWallFunction; + value uniform 0.01; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k new file mode 100644 index 00000000000..38c2a542ef4 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type kQRWallFunction; + value uniform 0.1; + } + ceiling + { + type kQRWallFunction; + value uniform 0.1; + } + fixedWalls + { + type kQRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k.old b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k.old new file mode 100644 index 00000000000..4ec7f08960c --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/k.old @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type compressible::kQRWallFunction; + value uniform 0.1; + } + ceiling + { + type compressible::kQRWallFunction; + value uniform 0.1; + } + fixedWalls + { + type compressible::kQRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/mut new file mode 100644 index 00000000000..7c893682965 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/mut @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 mut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + floor + { + type mutWallFunction; + value uniform 0; + } + ceiling + { + type mutWallFunction; + value uniform 0; + } + fixedWalls + { + type mutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut new file mode 100644 index 00000000000..a81ad6b59fd --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/nut @@ -0,0 +1,42 @@ +/*--------------------------------*- 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 +{ + floor + { + type nutWallFunction; + value uniform 0; + } + ceiling + { + type nutWallFunction; + value uniform 0; + } + fixedWalls + { + type nutWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/p new file mode 100644 index 00000000000..2014ca6e8c0 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/0/p @@ -0,0 +1,45 @@ +/*--------------------------------*- 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 +{ + floor + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + ceiling + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } + + fixedWalls + { + type fixedFluxBuoyantPressure; + rho rhok; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean new file mode 100755 index 00000000000..83fcec83eca --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allclean @@ -0,0 +1,7 @@ +#!/bin/sh + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase +cp 0/T.org 0/T diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun new file mode 100755 index 00000000000..628624c7029 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun @@ -0,0 +1,10 @@ +#!/bin/sh +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application="buoyantBoussinesqSimpleFoam" + +compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom +runApplication blockMesh +runApplication setHotRoom +runApplication $application diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/RASProperties new file mode 100644 index 00000000000..35b5a409f23 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/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/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/environmentalProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/environmentalProperties new file mode 100644 index 00000000000..a866ff549fd --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/environmentalProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- 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 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/blockMeshDict new file mode 100644 index 00000000000..fa2bb5c4c6e --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/blockMeshDict @@ -0,0 +1,63 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (10 0 0) + (10 5 0) + (0 5 0) + (0 0 10) + (10 0 10) + (10 5 10) + (0 5 10) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + wall floor + ( + (1 5 4 0) + ) + wall ceiling + ( + (3 7 6 2) + ) + wall fixedWalls + ( + (0 4 7 3) + (2 6 5 1) + (0 3 2 1) + (4 5 6 7) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/boundary new file mode 100644 index 00000000000..0d4d0e498da --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/polyMesh/boundary @@ -0,0 +1,40 @@ +/*--------------------------------*- 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 polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +3 +( + floor + { + type wall; + nFaces 400; + startFace 11200; + } + ceiling + { + type wall; + nFaces 400; + startFace 11600; + } + fixedWalls + { + type wall; + nFaces 800; + startFace 12000; + } +) + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/transportProperties b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/constant/transportProperties new file mode 100644 index 00000000000..f48fda19cca --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/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/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/controlDict new file mode 100644 index 00000000000..bfc52cf914e --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/controlDict @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1000; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes new file mode 100644 index 00000000000..b54bb863160 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSchemes @@ -0,0 +1,68 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + 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(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; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution new file mode 100644 index 00000000000..e11f41a5e11 --- /dev/null +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution @@ -0,0 +1,88 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + T + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + R + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + rho 1; + p 0.7; + U 0.2; + T 0.7; + k 0.7; + epsilon 0.7; + R 0.7; +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict index cb2e7470f67..26a1219ee04 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict @@ -21,9 +21,9 @@ startTime 0; stopAt endTime; -endTime 400; +endTime 1000; -deltaT 0.25; +deltaT 1; writeControl timeStep; -- GitLab