diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/Make/files new file mode 100644 index 0000000000..3ba66e45f6 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/Make/files @@ -0,0 +1,3 @@ +overBuoyantPimpleDyMFoam.C + +EXE = $(FOAM_APPBIN)/overBuoyantPimpleDyMFoam diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/Make/options new file mode 100644 index 0000000000..1c97aae083 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/Make/options @@ -0,0 +1,30 @@ +EXE_INC = \ + -I$(FOAM_SOLVERS)/heatTransfer/buoyantPimpleFoam \ + -I$(FOAM_SOLVERS)/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/overset/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/transportModels/compressible/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ + -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lsampling \ + -lmeshTools \ + -lfvOptions \ + -lcompressibleTransportModels \ + -lfluidThermophysicalModels \ + -lradiationModels \ + -lspecie \ + -lturbulenceModels \ + -lcompressibleTurbulenceModels \ + -latmosphericModels \ + -loverset \ + -ldynamicFvMesh \ + -ltopoChangerFvMesh diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/correctPhi.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/correctPhi.H new file mode 100644 index 0000000000..a49eebc7ea --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/correctPhi.H @@ -0,0 +1,91 @@ +if (mesh.changing()) +{ + volVectorField::Boundary& bfld = U.boundaryFieldRef(); + forAll(bfld, patchi) + { + if (bfld[patchi].fixesValue()) + { + bfld[patchi].initEvaluate(); + } + } + + surfaceScalarField::Boundary& phiBfld = phi.boundaryFieldRef(); + forAll(bfld, patchi) + { + if (bfld[patchi].fixesValue()) + { + bfld[patchi].evaluate(); + + phiBfld[patchi] = + rho.boundaryField()[patchi] + * ( + bfld[patchi] + & mesh.Sf().boundaryField()[patchi] + ); + } + } +} + // Initialize BCs list for pcorr to zero-gradient + wordList pcorrTypes + ( + p.boundaryField().size(), + zeroGradientFvPatchScalarField::typeName + ); + + // Set BCs of pcorr to fixed-value for patches at which p is fixed + forAll(p.boundaryField(), patchi) + { + if (p.boundaryField()[patchi].fixesValue()) + { + pcorrTypes[patchi] = fixedValueFvPatchScalarField::typeName; + } + } + + volScalarField pcorr + ( + IOobject + ( + "pcorr", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar(p.dimensions(), Zero), + pcorrTypes + ); + + mesh.setFluxRequired(pcorr.name()); + +{ + dimensionedScalar rAUf("rAUf", dimTime, 1.0); + + while (pimple.correctNonOrthogonal()) + { + fvScalarMatrix pcorrEqn + ( + fvm::ddt(psi, pcorr) + + fvc::div(phi) + - fvm::laplacian(rAUf, pcorr) + == + divrhoU() + ); + + //pcorrEqn.solve(mesh.solver(pcorr.select(pimple.finalInnerIter()))); + //Bypass virtual layer + const dictionary& d = mesh.solver + ( + pcorr.select + ( + pimple.finalInnerIter() + ) + ); + mesh.fvMesh::solve(pcorrEqn, d); + + if (pimple.finalNonOrthogonalIter()) + { + phi += pcorrEqn.flux(); + } + } +} diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/createFieldRefs.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/createFieldRefs.H new file mode 100644 index 0000000000..502b3b4230 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/createFieldRefs.H @@ -0,0 +1 @@ +const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/createFields.H new file mode 100644 index 0000000000..4c203d0266 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/createFields.H @@ -0,0 +1,126 @@ +Info<< "Reading thermophysical properties\n" << endl; + +autoPtr pThermo(rhoThermo::New(mesh)); +rhoThermo& thermo = pThermo(); +thermo.validate(args.executable(), "h", "e"); + +volScalarField rho +( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + thermo.rho() +); + +volScalarField& p = thermo.p(); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +#include "compressibleCreatePhi.H" + + +Info<< "Creating turbulence model\n" << endl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + + +#include "readGravitationalAcceleration.H" +#include "readhRef.H" +#include "gh.H" + + +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +// Force p_rgh to be consistent with p +p_rgh = p - rho*gh; + +mesh.setFluxRequired(p_rgh.name()); + +label pRefCell = 0; +scalar pRefValue = 0.0; + +if (p_rgh.needReference()) +{ + setRefCell + ( + p, + p_rgh, + pimple.dict(), + pRefCell, + pRefValue + ); + + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); +} + +dimensionedScalar initialMass("initialMass", fvc::domainIntegrate(rho)); + +#include "createDpdt.H" + +#include "createK.H" + +#include "createMRF.H" +#include "createRadiationModel.H" +#include "createFvOptions.H" + +//- Overset specific + +// Add solver-specific interpolations +{ + wordHashSet& nonInt = + const_cast(Stencil::New(mesh).nonInterpolatedFields()); + + nonInt.insert("HbyA"); + nonInt.insert("grad(p_rgh)"); + nonInt.insert("surfaceIntegrate(phi)"); + nonInt.insert("surfaceIntegrate(phiHbyA)"); + nonInt.insert("cellMask"); + nonInt.insert("cellDisplacement"); + nonInt.insert("interpolatedCells"); + nonInt.insert("cellInterpolationWeight"); +} + +// Mask field for zeroing out contributions on hole cells +#include "createCellMask.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/overBuoyantPimpleDyMFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/overBuoyantPimpleDyMFoam.C new file mode 100644 index 0000000000..329fa7bcb8 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/overBuoyantPimpleDyMFoam.C @@ -0,0 +1,212 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2019 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 3 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, see . + +Application + overBuoyantPimpleDymFoam + +Group + grpHeatTransferSolvers + +Description + Transient solver for buoyant, turbulent flow of compressible fluids for + ventilation and heat-transfer with overset feature + + Turbulence is modelled using a run-time selectable compressible RAS or + LES model. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "dynamicFvMesh.H" +#include "rhoThermo.H" +#include "turbulentFluidThermoModel.H" +#include "radiationModel.H" +#include "fvOptions.H" +#include "pimpleControl.H" +#include "pressureControl.H" + +#include "CorrectPhi.H" +#include "cellCellStencilObject.H" +#include "localMin.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + argList::addNote + ( + "Transient solver for buoyant, turbulent fluid flow" + " of compressible fluids, including radiation." + ); + + #include "postProcess.H" + + #include "addCheckCaseOptions.H" + #include "setRootCaseLists.H" + #include "createTime.H" + #include "createDynamicFvMesh.H" + #include "createDyMControls.H" + #include "createFields.H" + #include "createFieldRefs.H" + #include "initContinuityErrs.H" + + #include "createRhoUfIfPresent.H" + #include "createControls.H" + + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + turbulence->validate(); + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + + #include "readControls.H" + #include "readDyMControls.H" + + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + // Store divrhoU from the previous mesh so that it can be mapped + // and used in correctPhi to ensure the corrected phi has the + // same divergence + autoPtr divrhoU; + if (correctPhi) + { + divrhoU.reset + ( + new volScalarField + ( + "divrhoU", + fvc::div(fvc::absolute(phi, rho, U)) + ) + ); + } + + + ++runTime; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + // --- Pressure-velocity PIMPLE corrector loop + while (pimple.loop()) + { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + // Do any mesh changes + mesh.update(); + + if (mesh.changing()) + { + MRF.update(); + + #include "setCellMask.H" + + const surfaceScalarField faceMaskOld + ( + localMin(mesh).interpolate(cellMask.oldTime()) + ); + + // Zero Uf on old faceMask (H-I) + rhoUf() *= faceMaskOld; + + //fvc::correctRhoUf(rhoUfint, rho, U, phi); + surfaceVectorField rhoUfint(fvc::interpolate(rho*U)); + + // Update Uf and phi on new C-I faces + rhoUf() += (1-faceMaskOld)*rhoUfint; + + // Update Uf boundary + forAll(rhoUf().boundaryField(), patchI) + { + rhoUf().boundaryFieldRef()[patchI] = + rhoUfint.boundaryField()[patchI]; + } + + // Calculate absolute flux from the mapped surface velocity + phi = mesh.Sf() & rhoUf(); + + if (correctPhi) + { + #include "correctPhi.H" + } + + // Zero phi on current H-I + const surfaceScalarField faceMask + ( + localMin(mesh).interpolate(cellMask) + ); + + phi *= faceMask; + U *= cellMask; + + // Make the fluxes relative to the mesh-motion + fvc::makeRelative(phi, rho, U); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + + if (pimple.firstIter()) + { + #include "rhoEqn.H" + } + + #include "UEqn.H" + #include "EEqn.H" + + // --- Pressure corrector loop + while (pimple.correct()) + { + #include "pEqn.H" + } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } + } + + rho = thermo.rho(); + + runTime.write(); + + runTime.printExecutionTime(Info); + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/pEqn.H new file mode 100644 index 0000000000..854b4418d8 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/pEqn.H @@ -0,0 +1,130 @@ + +dimensionedScalar compressibility = fvc::domainIntegrate(psi); +bool compressible = (compressibility.value() > SMALL); + +rho = thermo.rho(); + +// Thermodynamic density needs to be updated by psi*d(p) after the +// pressure solution +const volScalarField psip0(psi*p); + +volScalarField rAU(1.0/UEqn.A()); +mesh.interpolate(rAU); + +surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); +volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh)); + +surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); + +surfaceScalarField phiHbyA +( + "phiHbyA", + fvc::flux(rho*HbyA) + phig +); + +if (ddtCorr) +{ + surfaceScalarField faceMaskOld + ( + localMin(mesh).interpolate(cellMask.oldTime()) + ); + + phiHbyA += + faceMaskOld*MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi)); +} + +MRF.makeRelative(fvc::interpolate(rho), phiHbyA); + +// Update the pressure BCs to ensure flux consistency +constrainPressure(p_rgh, rho, U, phiHbyA, rhorAUf, MRF); + +fvScalarMatrix p_rghDDtEqn +( + fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + + fvc::div(phiHbyA) + == + fvOptions(psi, p_rgh, rho.name()) +); + +while (pimple.correctNonOrthogonal()) +{ + fvScalarMatrix p_rghEqn + ( + p_rghDDtEqn + - fvm::laplacian(rhorAUf, p_rgh) + ); + + p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter()))); + + if (pimple.finalNonOrthogonalIter()) + { + // Calculate the conservative fluxes + phi = phiHbyA + p_rghEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p_rgh.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U = + cellMask* + ( + HbyA + rAU*fvc::reconstruct((phig + p_rghEqn.flux())/rhorAUf) + ); + U.correctBoundaryConditions(); + fvOptions.correct(U); + K = 0.5*magSqr(U); + } +} + +p = p_rgh + rho*gh; + +#include "rhoEqn.H" +#include "compressibleContinuityErrs.H" + +if (p_rgh.needReference()) +{ + if (!compressible) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + } + else + { + p += (initialMass - fvc::domainIntegrate(psi*p)) + /compressibility; + thermo.correctRho(psi*p - psip0); + rho = thermo.rho(); + p_rgh = p - rho*gh; + } +} +else +{ + thermo.correctRho(psi*p - psip0); +} + +rho = thermo.rho(); + +{ + fvc::correctRhoUf(rhoUf, rho, U, phi); +} + +if (thermo.dpdt()) +{ + dpdt = fvc::ddt(p); + + if (mesh.moving()) + { + dpdt -= fvc::div(fvc::meshPhi(rho, U), p); + } +} + +surfaceScalarField faceMask +( + localMin(mesh).interpolate(cellMask) +); +phi *= faceMask; diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/readControls.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/readControls.H new file mode 100644 index 0000000000..8f43318cab --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleFoam/readControls.H @@ -0,0 +1,9 @@ +#include "readTimeControls.H" + +correctPhi = pimple.dict().lookupOrDefault("correctPhi", false); + +checkMeshCourantNo = + pimple.dict().lookupOrDefault("checkMeshCourantNo", false); + + +ddtCorr = pimple.dict().lookupOrDefault("ddtCorr", true); diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/T b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/T new file mode 100755 index 0000000000..476b66adb6 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/T @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + + +internalField uniform 300; + +boundaryField +{ + overset1 + { + type overset; + } + walls + { + type zeroGradient; + } + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + hole + { + type fixedValue; + value uniform 400; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/U b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/U new file mode 100755 index 0000000000..57a41f946f --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/U @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + + +internalField uniform (0 0 0); + +boundaryField +{ + overset1 + { + type overset; + } + walls + { + type uniformFixedValue; + uniformValue uniform (0 0 0); + } + inlet + { + type uniformFixedValue; + uniformValue uniform (0 0 0); + } + outlet + { + type uniformFixedValue; + uniformValue uniform (0 0 0); + } + hole + { + type movingWallVelocity; + value uniform (0 0 0); + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/alphat b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/alphat new file mode 100755 index 0000000000..ab6b28d14f --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/alphat @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 +{ + overset1 + { + type overset; + value uniform 0; + } + walls + { + type compressible::alphatWallFunction; + value uniform 0; + } + inlet + { + type compressible::alphatWallFunction; + value uniform 0; + } + outlet + { + type compressible::alphatWallFunction; + value uniform 0; + } + hole + { + type compressible::alphatWallFunction; + value uniform 0; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/epsilon b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/epsilon new file mode 100755 index 0000000000..62b26d4b23 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/epsilon @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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.1; + +boundaryField +{ + overset1 + { + type overset; + value uniform 0.1; + } + walls + { + type epsilonWallFunction; + value uniform 0.1; + } + inlet + { + type epsilonWallFunction; + value uniform 0.1; + } + outlet + { + type epsilonWallFunction; + value uniform 0.1; + } + hole + { + type epsilonWallFunction; + value uniform 0.1; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/k b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/k new file mode 100755 index 0000000000..3fbc2d9b89 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/k @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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.01; + +boundaryField +{ + overset1 + { + type overset; + value uniform 0.01; + } + walls + { + type kqRWallFunction; + value uniform 0.01; + } + inlet + { + type kqRWallFunction; + value uniform 0.01; + } + outlet + { + type kqRWallFunction; + value uniform 0.01; + } + hole + { + type kqRWallFunction; + value uniform 0.01; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/nut b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/nut new file mode 100755 index 0000000000..b76fdda7af --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/nut @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ 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 +{ + overset1 + { + type overset; + value uniform 0; + } + walls + { + type nutkWallFunction; + value uniform 0; + } + inlet + { + type nutkWallFunction; + value uniform 0; + } + outlet + { + type nutkWallFunction; + value uniform 0; + } + hole + { + type nutkWallFunction; + value uniform 0; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p new file mode 100755 index 0000000000..4da4707882 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + + +internalField uniform 100000; + +boundaryField +{ + overset1 + { + type overset; + } + walls + { + type calculated; + value uniform 100000; + } + inlet + { + type calculated; + value uniform 100000; + } + outlet + { + type calculated; + value uniform 100000; + } + hole + { + type calculated; + value uniform 100000; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p_rgh b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p_rgh new file mode 100755 index 0000000000..ffb7949e83 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/p_rgh @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + + +internalField uniform 100000; + +boundaryField +{ + overset1 + { + type overset; + value uniform 100000; + } + walls + { + type fixedFluxPressure; + value uniform 100000; + } + inlet + { + type fixedFluxPressure; + value uniform 100000; + } + outlet + { + type fixedFluxPressure; + value uniform 100000; + } + hole + { + type fixedFluxPressure; + value uniform 100000; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/pointDisplacement b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/pointDisplacement new file mode 100755 index 0000000000..9566eccf90 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/pointDisplacement @@ -0,0 +1,63 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + location "0"; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + + +internalField uniform (0 0 0); + +boundaryField +{ + overset1 + { + type zeroGradient; + patchType overset; + } + walls + { + type uniformFixedValue; + value uniform (0 0 0); + uniformValue constant (0 0 0); + } + inlet + { + type uniformFixedValue; + value uniform (0 0 0); + uniformValue constant (0 0 0); + } + outlet + { + type uniformFixedValue; + value uniform (0 0 0); + uniformValue constant (0 0 0); + } + hole + { + type zeroGradient; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/zoneID b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/zoneID new file mode 100755 index 0000000000..374c2ca457 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/0.orig/zoneID @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object zoneID; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + + +internalField uniform 0; + +boundaryField +{ + overset1 + { + type overset; + value uniform 1; + } + walls + { + type zeroGradient; + } + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + hole + { + type zeroGradient; + } + frontAndBack + { + type empty; + } + frontAndBack1 + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/Allclean b/tutorials/heatTransfer/overBuoyantPimpleFoam/Allclean new file mode 100755 index 0000000000..fad073e143 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/Allclean @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions + +cleanCase0 + +rm -f constant/polyMesh/boundary +rm -f constant/polyMesh/zoneID + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun b/tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun new file mode 100755 index 0000000000..ad941f4ac5 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun @@ -0,0 +1,17 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +./Allrun.pre + +# Serial +runApplication $(getApplication) + +# Parallel +#runApplication decomposePar -cellDist +#runParallel $(getApplication) + +#post +runApplication foamToVTK + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun.pre b/tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun.pre new file mode 100755 index 0000000000..abccd3163c --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/Allrun.pre @@ -0,0 +1,20 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +runApplication blockMesh + +# Select cellSets +runApplication -s 1 topoSet + +runApplication subsetMesh box -patch hole -overwrite + +# Select cellSets +runApplication -s 2 topoSet + +restore0Dir + +# Use cellSets to write zoneID +runApplication setFields + +#------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/dynamicMeshDict b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/dynamicMeshDict new file mode 100755 index 0000000000..9e47aa2c1c --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/dynamicMeshDict @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus-overset | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dynamicFvMesh dynamicOversetFvMesh; + +dynamicOversetFvMeshCoeffs +{ +// layerRelax 0.3; +} + +solver multiSolidBodyMotionSolver; + +multiSolidBodyMotionSolverCoeffs +{ + movingZone1 + { + solidBodyMotionFunction oscillatingLinearMotion; + oscillatingLinearMotionCoeffs + { + amplitude (0.035 0 0); + omega 2.094395; + } + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/g b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/g new file mode 100755 index 0000000000..14b9f5393e --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/thermophysicalProperties b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/thermophysicalProperties new file mode 100755 index 0000000000..7dd52e2b0d --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/thermophysicalProperties @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport sutherland; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + As 1.4792e-06; + Ts 116; + } +} + +dpdt true; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/turbulenceProperties b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/turbulenceProperties new file mode 100755 index 0000000000..58cf4dbc88 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/constant/turbulenceProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +RAS +{ + RASModel kEpsilon; + + turbulence on; + + printCoeffs on; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/blockMeshDict b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/blockMeshDict new file mode 100755 index 0000000000..1a61ee13c5 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/blockMeshDict @@ -0,0 +1,122 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 0.001; + +vertices +( + ( -2.00 0.0 0) + ( 107.00 0.0 0) + ( 107.00 45.0 0) + ( -2.00 45.0 0) + ( -2.00 0.0 10) + ( 107.00 0.0 10) + ( 107.00 45.0 10) + ( -2.00 45.0 10) + + // movingZone1 + ( 44.5 5.0 0) + ( 60.5 5.0 0) + ( 60.5 40.0 0) + ( 44.5 40.0 0) + ( 44.5 5.0 10) + ( 60.5 5.0 10) + ( 60.5 40.0 10) + ( 44.5 40.0 10) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (109 55 1) simpleGrading (1 1 1) + hex (8 9 10 11 12 13 14 15) movingZone1 (16 48 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + overset1 + { + type overset; + faces + ( + ( 8 12 15 11) + (10 14 13 9) + (11 15 14 10) + ( 9 13 12 8) + ); + } + + + walls + { + type wall; + faces + ( + (3 7 6 2) + (1 5 4 0) + ); + } + + inlet + { + type wall; + faces + ( + (0 4 7 3) + ); + } + + outlet + { + type wall; + faces + ( + (2 6 5 1) + ); + } + + // Populated by subsetMesh + hole + { + type wall; + faces (); + } + + frontAndBack + { + type empty; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } + + frontAndBack1 + { + type empty; + faces + ( + ( 8 11 10 9) + (12 13 14 15) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/controlDict b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/controlDict new file mode 100755 index 0000000000..da8c0a38d4 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/controlDict @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +DebugSwitches +{ + overset 0; + dynamicOversetFvMesh 0; + cellVolumeWeight 0; +} + +application overBuoyantPimpleDyMFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1.5; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.05; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep no; + +maxCo 1; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/decomposeParDict b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/decomposeParDict new file mode 100755 index 0000000000..daf891ae5a --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/decomposeParDict @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: plus | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + + +method scotch; + +hierarchicalCoeffs +{ + n (2 1 1); + delta 0.001; + order xyz; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSchemes b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSchemes new file mode 100755 index 0000000000..322d3343c6 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSchemes @@ -0,0 +1,79 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss upwind; + + div(phi,epsilon) Gauss limitedLinear 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,h) Gauss limitedLinear 1; + div(phi,K) Gauss linear; + + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; + div(meshPhi,p) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; + laplacian(diffusivity,cellDisplacement) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +oversetInterpolation +{ + method cellVolumeWeight; + //method inverseDistance; + + searchBox (-0.002 0 0)(0.107 0.5 0.01); + searchBoxDivisions (200 200 1); +} + +fluxRequired +{ + default no; + pcorr ; + p ; +} + +oversetInterpolationSuppressed +{ + grad(p_rgh); + surfaceIntegrate(phiHbyA); +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSolution b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSolution new file mode 100755 index 0000000000..57a735b188 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/fvSolution @@ -0,0 +1,110 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + cellDisplacement + { + solver PCG; + preconditioner DIC; + + tolerance 1e-06; + relTol 0; + maxIter 100; + } + + "(rho|h)" + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-8; + relTol 0.1; + } + + "(rho|h)Final" + { + $rho; + tolerance 1e-8; + relTol 0; + } + + p_rgh + { + solver PBiCGStab; + preconditioner DILU; + tolerance 1e-11; + relTol 0.01; + } + + p_rghFinal + { + $p_rgh; + relTol 0; + } + + pcorr + { + $p_rghFinal; + preconditioner DIC; + } + + pcorrFinal + { + $pcorr; + relTol 0; + } + + "(U|k|epsilon)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 0; + } + + "(U|k|epsilon)Final" + { + $U; + tolerance 1e-6; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor true; + correctPhi false; + checkMeshCourantNo yes; + nOuterCorrectors 1; + nCorrectors 4; + nNonOrthogonalCorrectors 0; + ddtCorr true; + pRefCell 0; + pRefValue 1e5; +} + +relaxationFactors +{ + fields + { + } + equations + { + ".*" 1; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/setFieldsDict b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/setFieldsDict new file mode 100755 index 0000000000..3f6cb9534f --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/setFieldsDict @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue zoneID 123 +); + +regions +( + // Set cell values + // (does zerogradient on boundaries) + cellToCell + { + set c0; + + fieldValues + ( + volScalarFieldValue zoneID 0 + ); + } + + cellToCell + { + set c1; + + fieldValues + ( + volScalarFieldValue zoneID 1 + ); + } + +); + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/overBuoyantPimpleFoam/system/topoSetDict b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/topoSetDict new file mode 100755 index 0000000000..d824673724 --- /dev/null +++ b/tutorials/heatTransfer/overBuoyantPimpleFoam/system/topoSetDict @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1812 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source regionToCell; + insidePoints ((0.0001 0.0001 0.0001)); + } + + { + name c1; + type cellSet; + action new; + source cellToCell; + set c0; + } + + { + name c1; + type cellSet; + action invert; + } + + // Select box to remove from region 1 and 2 + + { + name box; + type cellSet; + action new; + source cellToCell; + set c1; + } + + { + name box; + type cellSet; + action subset; + source boxToCell; + boxes + ( + (0.0485 0.01 -100)(0.0565 0.035 100) + ); + } + + { + name box; + type cellSet; + action invert; + } +); + +// ************************************************************************* //