diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options index a53061a93cc503d9368d9d3a900ac6ef801015ba..041d2e0605468bb86b7eee749a4be8de8076f910 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 e2a89d1441582292fcb5a33ec7e092eac455a5a5..ece4b8ffe5c70d80f68e7093baffe960d5e76433 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 3b5b5be24923c1b410d47c34fd14da319e117026..35387f4ff40468426b6ebc31a6fb517553759fe4 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 e3cece5b91f321694941d087e194fb3b07dec430..3f0ece93cb37bc787f8c6a5cfd39ac8fe83598e2 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 5f3f13626db0a860d7058e76ce5a90f397558c95..dde0e38b339348ac1693d4bfdf3da9889610a354 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 25e2a9817fbe680f3b52b91b5a7fc187d52a3643..ff0c26f05893f6e625e7a8a5193c2f6a08882bc5 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 585128dfdeb7d5e5212f9412d9b415c05c15b752..0000000000000000000000000000000000000000 --- 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 20f7c6ae1dcff80630dc2ca21253b1e824ea5d77..0000000000000000000000000000000000000000 --- 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 d00f0877eaf592058b956d3c9f78979d91d6dbc1..7452a0495adf2207ffb0f66e9e4484e1e7c9bad2 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 cf5c4a197893afff99ffec01847b2ce9bbd57b3e..a813a2d8b7aab17f8a45dfc9295e9ee6f161a683 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 fafb49d84846c8ab4505a3770bfd9fc55d90dd89..63b938fa3625c2a15475b5ab5eb2157ce4cd9416 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 5f3f13626db0a860d7058e76ce5a90f397558c95..0e668e9d987c132605e1aa28daee9e9aa0bf9a94 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 e782d26c8dc5ad4374d1b5a76ab7dfd72f6b9601..e1d42d738e8deff2eda578436baca131809f352f 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 585128dfdeb7d5e5212f9412d9b415c05c15b752..82d101d8c1b18d88c41af9ffd0f7e4d10fa89cd2 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 20f7c6ae1dcff80630dc2ca21253b1e824ea5d77..0000000000000000000000000000000000000000 --- 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 b5c84e435e3b2a95ad2cb8b67e215559d49758a0..b8ac5595e47cec77aa257c54a1710f91b08f20f7 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 313110bd43ad9541a65a0d4199803aa3420141c3..0524c0037bd1bdda1a962ea5b3aceb5c498e1051 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 9a75eed1688a05b8c3f308220f2033a7bb6f05d8..0000000000000000000000000000000000000000 --- 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 094f8805606650a1f2b087d1404dcad78fd1c680..0000000000000000000000000000000000000000 --- 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 b6f48ff6ada8e214e41f83c848bafabdb32de46e..279918b47af95cdb9d91b7344ff5844af91888bd 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 8e433cb8f167f0304ec840bb270c4521c9230e5b..ec5dc7dd990d69170621c253ca5b73b5d9e91b74 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 76267d4fa6a86f2083f6720b2eb58fe255610d4d..56ee8a0753d38e9eef05c766677ca1d4eccfa64d 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 0000000000000000000000000000000000000000..a5a03f6a2e3944867bd11d1adb15e3f468569dc6 --- /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 0000000000000000000000000000000000000000..a5a03f6a2e3944867bd11d1adb15e3f468569dc6 --- /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 0000000000000000000000000000000000000000..0b6b191dab023e6aa4c9701188dd93252aeb7aa9 --- /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 0000000000000000000000000000000000000000..3bcb9c03b13cf7d96e3456eabea33e5f6d0ee8e1 --- /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 0000000000000000000000000000000000000000..892d69375d9d5eab2aa804a87ee6661bbc1a9f06 --- /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 0000000000000000000000000000000000000000..23851291dc60d3b0df3be887acfbeb0bb5067ef8 --- /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 0000000000000000000000000000000000000000..38c2a542ef4c0c57799adb46dbd114f24947f474 --- /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 0000000000000000000000000000000000000000..4ec7f08960c175a6d955e2c1d3cfb98453524647 --- /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 0000000000000000000000000000000000000000..7c893682965996d4b4b48036a27527eeab2ebdf6 --- /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 0000000000000000000000000000000000000000..a81ad6b59fd8d4b8617763e08058fbb36b3b8aef --- /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 0000000000000000000000000000000000000000..2014ca6e8c05c4140f60fa97f5d77545a31b68c8 --- /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 0000000000000000000000000000000000000000..83fcec83ecad6243fdfd74b8afb16acd55518f36 --- /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 0000000000000000000000000000000000000000..92490b5b5ea392da192d42ec102f629c87c73e60 --- /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 0000000000000000000000000000000000000000..35b5a409f230c180f07469bfe0679cdf00cb419d --- /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 0000000000000000000000000000000000000000..a866ff549fd799e63d2d6946a66cf3da14d092bd --- /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 0000000000000000000000000000000000000000..fa2bb5c4c6e834caba8be30e1825ea1a45c22c92 --- /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 0000000000000000000000000000000000000000..0d4d0e498dae524c835cc1addc9707eb5af47fb3 --- /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 0000000000000000000000000000000000000000..f48fda19ccac705f76f1573b7ba40cce45abfd5b --- /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 0000000000000000000000000000000000000000..26a1219ee04433266c5a0540f5ecf239fc0d0f93 --- /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 0000000000000000000000000000000000000000..6be8f0129f6c5ae27dae2d20c5e0cd28fcf26f12 --- /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 0000000000000000000000000000000000000000..7afa2f50aa9b1dc663a24bada8c0971be911c656 --- /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 0000000000000000000000000000000000000000..a5a03f6a2e3944867bd11d1adb15e3f468569dc6 --- /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 0000000000000000000000000000000000000000..a5a03f6a2e3944867bd11d1adb15e3f468569dc6 --- /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 0000000000000000000000000000000000000000..0b6b191dab023e6aa4c9701188dd93252aeb7aa9 --- /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 0000000000000000000000000000000000000000..3bcb9c03b13cf7d96e3456eabea33e5f6d0ee8e1 --- /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 0000000000000000000000000000000000000000..892d69375d9d5eab2aa804a87ee6661bbc1a9f06 --- /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 0000000000000000000000000000000000000000..23851291dc60d3b0df3be887acfbeb0bb5067ef8 --- /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 0000000000000000000000000000000000000000..38c2a542ef4c0c57799adb46dbd114f24947f474 --- /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 0000000000000000000000000000000000000000..4ec7f08960c175a6d955e2c1d3cfb98453524647 --- /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 0000000000000000000000000000000000000000..7c893682965996d4b4b48036a27527eeab2ebdf6 --- /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 0000000000000000000000000000000000000000..a81ad6b59fd8d4b8617763e08058fbb36b3b8aef --- /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 0000000000000000000000000000000000000000..2014ca6e8c05c4140f60fa97f5d77545a31b68c8 --- /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 0000000000000000000000000000000000000000..83fcec83ecad6243fdfd74b8afb16acd55518f36 --- /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 0000000000000000000000000000000000000000..628624c70292d70d593effaa1a4e9fc9e2281550 --- /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 0000000000000000000000000000000000000000..35b5a409f230c180f07469bfe0679cdf00cb419d --- /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 0000000000000000000000000000000000000000..a866ff549fd799e63d2d6946a66cf3da14d092bd --- /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 0000000000000000000000000000000000000000..fa2bb5c4c6e834caba8be30e1825ea1a45c22c92 --- /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 0000000000000000000000000000000000000000..0d4d0e498dae524c835cc1addc9707eb5af47fb3 --- /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 0000000000000000000000000000000000000000..f48fda19ccac705f76f1573b7ba40cce45abfd5b --- /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 0000000000000000000000000000000000000000..bfc52cf914e6d70563729bb9790dda8a20daaa70 --- /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 0000000000000000000000000000000000000000..b54bb8631600a594830b214816d8a858bcf83a02 --- /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 0000000000000000000000000000000000000000..e11f41a5e1170f98a9414a25be8204bf3748df53 --- /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 cb2e7470f67597540554a58b19942872bab68d34..26a1219ee04433266c5a0540f5ecf239fc0d0f93 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;