diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H index 3b61f2c7b9..4a2d03490d 100644 --- a/applications/solvers/combustion/fireFoam/UEqn.H +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -7,30 +7,13 @@ fvVectorMatrix UEqn UEqn.relax(); -if (oCorr == nOuterCorr - 1) -{ - solve +solve +( + UEqn + == + fvc::reconstruct ( - UEqn - == - fvc::reconstruct - ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ), - mesh.solver("UFinal") - ); -} -else -{ - solve - ( - UEqn - == - fvc::reconstruct - ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - ); -} + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) +); diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index 20f418e035..cff27389d0 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -70,6 +70,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 907398581f..8d1ed0d9f8 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -30,14 +30,20 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) closedVolume = p.needReference(); - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H index a58cd28dec..c76ab5110b 100644 --- a/applications/solvers/combustion/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -31,14 +31,20 @@ - fvm::laplacian(rho*rUA, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -64,14 +70,20 @@ - fvm::laplacian(rho*rUA, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index 3a5bb614fe..e361d5f0cc 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -69,8 +69,14 @@ int main(int argc, char *argv[]) #include "chemistry.H" #include "rhoEqn.H" - for (label ocorr=1; ocorr <= nOuterCorr; ocorr++) + for (label oCorr=1; oCorr <= nOuterCorr; oCorr++) { + bool finalIter = oCorr == nOuterCorr-1; + if (finalIter) + { + mesh.data::add("finalIteration", true); + } + #include "UEqn.H" #include "YEqn.H" #include "hsEqn.H" @@ -80,6 +86,11 @@ int main(int argc, char *argv[]) { #include "pEqn.H" } + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } turbulence->correct(); diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index 9c12cf9585..954907d203 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -7,27 +7,13 @@ tmp UEqn + turbulence->divDevRhoReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); volScalarField rUA = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index 1433ea5cc3..4642e10ef8 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -37,12 +37,7 @@ mesh ); -# include "compressibleCreatePhi.H" - - dimensionedScalar pMin - ( - mesh.solutionDict().subDict("PIMPLE").lookup("pMin") - ); + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -56,9 +51,6 @@ ) ); - //dimensionedScalar initialMass = fvc::domainIntegrate(rho); - - Info<< "Creating field DpDt\n" << endl; volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPimpleFoam/hEqn.H b/applications/solvers/compressible/rhoPimpleFoam/hEqn.H index e66b99442b..3125cc3ffa 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/hEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/hEqn.H @@ -8,16 +8,8 @@ DpDt ); - if (oCorr == nOuterCorr-1) - { - hEqn.relax(); - hEqn.solve(mesh.solver("hFinal")); - } - else - { - hEqn.relax(); - hEqn.solve(); - } + hEqn.relax(); + hEqn.solve(); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index 0f3dfe450b..c0dba194e7 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -1,6 +1,5 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn().A(); U = rUA*UEqn().H(); if (nCorr <= 1) @@ -29,19 +28,20 @@ if (transonic) - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -55,7 +55,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - //+ fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rUA, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -68,19 +68,20 @@ else - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -92,30 +93,15 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -//if (oCorr != nOuterCorr-1) -{ - // Explicitly relax pressure for momentum corrector - p.relax(); +// Explicitly relax pressure for momentum corrector +p.relax(); - rho = thermo.rho(); - rho.relax(); - Info<< "rho max/min : " << max(rho).value() - << " " << min(rho).value() << endl; -} +// Recalculate density from the relaxed pressure +rho = thermo.rho(); +Info<< "rho max/min : " << max(rho).value() + << " " << min(rho).value() << endl; U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - -bound(p, pMin); - -// For closed-volume cases adjust the pressure and density levels -// to obey overall mass continuity -/* -if (closedVolume) -{ - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); -} -*/ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index d4055f658d..5d21da05b6 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -61,15 +61,22 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - rho.storePrevIter(); - } + #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/files b/applications/solvers/compressible/rhoPisoFoam/Make/files deleted file mode 100644 index 3c89295014..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoPisoFoam.C - -EXE = $(FOAM_APPBIN)/rhoPisoFoam diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/options b/applications/solvers/compressible/rhoPisoFoam/Make/options deleted file mode 100644 index 5c62488b65..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/Make/options +++ /dev/null @@ -1,13 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lmeshTools \ - -lbasicThermophysicalModels \ - -lspecie \ - -lcompressibleRASModels \ - -lcompressibleLESModels diff --git a/applications/solvers/compressible/rhoPisoFoam/UEqn.H b/applications/solvers/compressible/rhoPisoFoam/UEqn.H deleted file mode 100644 index 64dd52b1b0..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/UEqn.H +++ /dev/null @@ -1,11 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/compressible/rhoPisoFoam/createFields.H b/applications/solvers/compressible/rhoPisoFoam/createFields.H deleted file mode 100644 index fdb706a14c..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/createFields.H +++ /dev/null @@ -1,58 +0,0 @@ - Info<< "Reading thermophysical properties\n" << endl; - - autoPtr pThermo - ( - basicPsiThermo::New(mesh) - ); - basicPsiThermo& thermo = pThermo(); - - volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); - const volScalarField& psi = thermo.psi(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() - ); - - Info<< "\nReading 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 - ) - ); - - - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPisoFoam/hEqn.H b/applications/solvers/compressible/rhoPisoFoam/hEqn.H deleted file mode 100644 index ae60d3316e..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/hEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - solve - ( - fvm::ddt(rho, h) - + fvm::div(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - DpDt - ); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/rhoPisoFoam/pEqn.H b/applications/solvers/compressible/rhoPisoFoam/pEqn.H deleted file mode 100644 index 280842ecc3..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/pEqn.H +++ /dev/null @@ -1,68 +0,0 @@ -rho = thermo.rho(); - -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); - -if (transonic) -{ - surfaceScalarField phid - ( - "phid", - fvc::interpolate(psi) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi == pEqn.flux(); - } - } -} -else -{ - phi = - fvc::interpolate(rho)* - ( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi += pEqn.flux(); - } - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U -= rUA*fvc::grad(p); -U.correctBoundaryConditions(); - -DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C b/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C deleted file mode 100644 index 105717378e..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C +++ /dev/null @@ -1,93 +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 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 - rhoPisoFoam - -Description - Transient PISO solver for compressible, laminar or turbulent flow. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "basicPsiThermo.H" -#include "turbulenceModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - - #include "createTime.H" - #include "createMesh.H" - #include "createFields.H" - #include "initContinuityErrs.H" - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" - - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readTimeControls.H" - #include "readPISOControls.H" - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - #include "rhoEqn.H" - #include "UEqn.H" - - // --- PISO loop - for (int corr=1; corr<=nCorr; corr++) - { - #include "hEqn.H" - #include "pEqn.H" - } - - turbulence->correct(); - - rho = thermo.rho(); - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H index 3b4ead17e7..a331d7dbb8 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H @@ -7,14 +7,7 @@ tmp UEqn + turbulence->divDevRhoReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); mrfZones.addCoriolis(rho, UEqn()); pZones.addResistance(UEqn()); @@ -23,14 +16,7 @@ volScalarField rUA = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H index c74fb4d84b..56f8e9f3b5 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H @@ -30,19 +30,20 @@ if (transonic) - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -70,19 +71,20 @@ else - fvm::laplacian(rho*rUA, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C index 4bae5c1e7b..7f93493f3b 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C @@ -65,17 +65,23 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - rho.storePrevIter(); - } - #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H index 09b75191db..5285e6e3b2 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H @@ -45,9 +45,14 @@ scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - dimensionedScalar pMin + dimensionedScalar rhoMax ( - mesh.solutionDict().subDict("SIMPLE").lookup("pMin") + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax") + ); + + dimensionedScalar rhoMin + ( + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin") ); Info<< "Creating turbulence model\n" << endl; diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H index 9e5138de8a..ff0b91bcb7 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/hEqn.H @@ -5,8 +5,8 @@ - fvm::Sp(fvc::div(phi), h) - fvm::laplacian(turbulence->alphaEff(), h) == - fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)")) - - p*fvc::div(phi/fvc::interpolate(rho)) + fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)") + - (rho/psi)*fvc::div(phi/fvc::interpolate(rho)) ); pZones.addEnthalpySource(thermo, rho, hEqn); diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H index 40b7cb3969..0386899612 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H @@ -1,3 +1,8 @@ +rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); + if (pressureImplicitPorosity) { U = trTU()&UEqn().H(); @@ -58,8 +63,6 @@ else U.correctBoundaryConditions(); -bound(p, pMin); - // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity if (closedVolume) @@ -69,5 +72,7 @@ if (closedVolume) } rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 122280cfac..aa3de6d6fb 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -37,7 +37,7 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" label pRefCell = 0; diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files new file mode 100644 index 0000000000..19c4661a3c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantBoussinesqPimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantBoussinesqPimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options similarity index 100% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H similarity index 99% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H index ece4b8ffe5..a7a019a210 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H @@ -13,7 +13,6 @@ ); TEqn.relax(); - TEqn.solve(); rhok = 1.0 - beta*(T - TRef); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C similarity index 77% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 0269b95c90..a035a20feb 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - buoyantBoussinesqPisoFoam + buoyantBoussinesqPimpleFoam Description Transient solver for buoyant, turbulent flow of incompressible fluids @@ -72,20 +72,40 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; #include "readTimeControls.H" - #include "readPISOControls.H" + #include "readPIMPLEControls.H" #include "CourantNo.H" #include "setDeltaT.H" - #include "UEqn.H" - #include "TEqn.H" - - // --- PISO loop - for (int corr=0; corrcorrect(); + if (nOuterCorr != 1) + { + p.storePrevIter(); + } + + #include "UEqn.H" + #include "TEqn.H" + + // --- PISO loop + for (int corr=0; corrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } + } runTime.write(); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H similarity index 92% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H index dde0e38b33..704918bb09 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H @@ -42,9 +42,9 @@ mesh ); -# include "createPhi.H" + #include "createPhi.H" -# include "readTransportProperties.H" + #include "readTransportProperties.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -57,7 +57,7 @@ setRefCell ( p, - mesh.solutionDict().subDict("PISO"), + mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue ); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H new file mode 100644 index 0000000000..21be033f9b --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H @@ -0,0 +1,52 @@ +{ + volScalarField rUA("rUA", 1.0/UEqn.A()); + surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); + + U = rUA*UEqn.H(); + + phi = (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, U, phi); + + surfaceScalarField buoyancyPhi = + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); + phi += buoyancyPhi; + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(rUAf, p) == fvc::div(phi) + ); + + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); + + if (nonOrth == nNonOrthCorr) + { + // Calculate the conservative fluxes + phi -= pEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); + U.correctBoundaryConditions(); + } + } + + #include "continuityErrs.H" +} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files deleted file mode 100644 index d7b85221d8..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantBoussinesqPisoFoam.C - -EXE = $(FOAM_APPBIN)/buoyantBoussinesqPisoFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H deleted file mode 100644 index ff0c26f058..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H +++ /dev/null @@ -1,41 +0,0 @@ -{ - volScalarField rUA("rUA", 1.0/UEqn.A()); - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - - U = rUA*UEqn.H(); - - surfaceScalarField phiU - ( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, U, phi) - ); - - phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(rUAf, p) == fvc::div(phi) - ); - - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi -= pEqn.flux(); - } - } - - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); - U.correctBoundaryConditions(); - - #include "continuityErrs.H" -} diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files new file mode 100644 index 0000000000..f4053436b5 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantPimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantPimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/buoyantPisoFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C similarity index 76% rename from applications/solvers/heatTransfer/buoyantPisoFoam/buoyantPisoFoam.C rename to applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index cc649d221d..c4ac77758e 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/buoyantPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - buoyantPisoFoam + buoyantPimpleFoam Description Transient solver for buoyant, turbulent flow of compressible fluids for @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) while (runTime.run()) { #include "readTimeControls.H" - #include "readPISOControls.H" + #include "readPIMPLEControls.H" #include "compressibleCourantNo.H" #include "setDeltaT.H" @@ -69,21 +69,39 @@ int main(int argc, char *argv[]) #include "rhoEqn.H" - #include "UEqn.H" - - #include "hEqn.H" - - // --- PISO loop - - for (int corr=0; corrcorrect(); + + rho = thermo.rho(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } - turbulence->correct(); - - rho = thermo.rho(); - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H similarity index 100% rename from applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H similarity index 58% rename from applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index c954c0ecb1..a1c3dbfed5 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -12,16 +12,15 @@ U = rUA*UEqn.H(); - surfaceScalarField phiU + phi = fvc::interpolate(rho)* ( - fvc::interpolate(rho) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) ); - phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); + surfaceScalarField buoyancyPhi = + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); + phi += buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { @@ -32,27 +31,39 @@ - fvm::laplacian(rhorUAf, p) ); - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { + // Calculate the conservative fluxes phi += pEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U += rUA*fvc::reconstruct((buoyancyPhi + pEqn.flux())/rhorUAf); + U.correctBoundaryConditions(); } } // Second part of thermodynamic density update thermo.rho() += psi*p; - U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); - U.correctBoundaryConditions(); - DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); #include "rhoEqn.H" diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files b/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files deleted file mode 100644 index 65e5d52305..0000000000 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantPisoFoam.C - -EXE = $(FOAM_APPBIN)/buoyantPisoFoam diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index b0aa0852b2..de368a646e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -22,16 +22,7 @@ ); pEqn.setReference(pRefCell, pRefValue); - - // retain the residual from the first iteration - if (nonOrth == 0) - { - pEqn.solve(); - } - else - { - pEqn.solve(); - } + pEqn.solve(); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H b/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H deleted file mode 100644 index 2876a48b52..0000000000 --- a/applications/solvers/incompressible/pimpleDyMFoam/UEqn.H +++ /dev/null @@ -1,16 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(U) - + fvm::div(phi, U) - + turbulence->divDevReff(U) - ); - - if (ocorr != nOuterCorr-1) - { - UEqn.relax(); - } - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/incompressible/pimpleFoam/Allwmake b/applications/solvers/incompressible/pimpleFoam/Allwmake new file mode 100755 index 0000000000..71517c7319 --- /dev/null +++ b/applications/solvers/incompressible/pimpleFoam/Allwmake @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake +wmake pimpleDyMFoam + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/incompressible/pimpleFoam/UEqn.H b/applications/solvers/incompressible/pimpleFoam/UEqn.H index 12b4260e5d..3574c6553a 100644 --- a/applications/solvers/incompressible/pimpleFoam/UEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/UEqn.H @@ -7,27 +7,13 @@ tmp UEqn + turbulence->divDevReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); volScalarField rUA = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { diff --git a/applications/solvers/incompressible/pimpleFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pEqn.H index 41f99bb542..b5dc23a58c 100644 --- a/applications/solvers/incompressible/pimpleFoam/pEqn.H +++ b/applications/solvers/incompressible/pimpleFoam/pEqn.H @@ -21,19 +21,20 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) pEqn.setReference(pRefCell, pRefValue); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -43,11 +44,8 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) #include "continuityErrs.H" -// Explicitly relax pressure for momentum corrector except for last corrector -if (oCorr != nOuterCorr-1) -{ - p.relax(); -} +// Explicitly relax pressure for momentum corrector +p.relax(); U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/Make/files b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/files similarity index 100% rename from applications/solvers/incompressible/pimpleDyMFoam/Make/files rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/files diff --git a/applications/solvers/incompressible/pimpleDyMFoam/Make/options b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options similarity index 98% rename from applications/solvers/incompressible/pimpleDyMFoam/Make/options rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options index 40023adad7..6af3735d63 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/Make/options +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/Make/options @@ -1,4 +1,5 @@ EXE_INC = \ + -I.. \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ diff --git a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H similarity index 100% rename from applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/correctPhi.H diff --git a/applications/solvers/incompressible/pimpleDyMFoam/createFields.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H similarity index 100% rename from applications/solvers/incompressible/pimpleDyMFoam/createFields.H rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H new file mode 100644 index 0000000000..155f43a632 --- /dev/null +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H @@ -0,0 +1,55 @@ +U = rAU*UEqn().H(); + +if (nCorr <= 1) +{ + UEqn.clear(); +} + +phi = (fvc::interpolate(U) & mesh.Sf()); + +if (p.needReference()) +{ + fvc::makeRelative(phi, U); + adjustPhi(phi, U, p); + fvc::makeAbsolute(phi, U); +} + +for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +{ + fvScalarMatrix pEqn + ( + fvm::laplacian(rAU, p) == fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); + + if (nonOrth == nNonOrthCorr) + { + phi -= pEqn.flux(); + } +} + +#include "continuityErrs.H" + +p.relax(); + +// Make the fluxes relative to the mesh motion +fvc::makeRelative(phi, U); + +U -= rAU*fvc::grad(p); +U.correctBoundaryConditions(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C similarity index 65% rename from applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C index ccb209b61a..0ec3c5b0aa 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pimpleDyMFoam.C @@ -84,8 +84,14 @@ int main(int argc, char *argv[]) } // --- PIMPLE loop - for (int ocorr=0; ocorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/readControls.H b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H similarity index 81% rename from applications/solvers/incompressible/pimpleDyMFoam/readControls.H rename to applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H index 3bd20c5c5c..ef396ec9ff 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/readControls.H +++ b/applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/readControls.H @@ -1,5 +1,5 @@ -# include "readTimeControls.H" -# include "readPIMPLEControls.H" + #include "readTimeControls.H" + #include "readPIMPLEControls.H" bool correctPhi = false; if (pimple.found("correctPhi")) diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 5fb87ef128..780c51e7f3 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -62,6 +62,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H index c0daa0e7ca..ed0fbf776c 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/UEqn.H @@ -15,14 +15,7 @@ //- fvc::div(rho*turbulence->nuEff()*dev(fvc::grad(U)().T())) ); - if (oCorr == nOuterCorr-1) - { - UEqn.relax(1); - } - else - { - UEqn.relax(); - } + UEqn.relax(); if (momentumPredictor) { @@ -34,7 +27,6 @@ ( fvc::interpolate(rho)*(g & mesh.Sf()) - mesh.magSf()*fvc::snGrad(p) - ), - mesh.solver(oCorr == nOuterCorr-1 ? "UFinal" : "U") + ) ); } diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H index f1e07558cb..25003e1b25 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H @@ -22,18 +22,20 @@ pEqn.setReference(pRefCell, pRefValue); - if + pEqn.solve ( - corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C index f3b98ba8fe..cf6fc95a9c 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/twoLiquidMixingFoam.C @@ -68,6 +68,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index bf28d148dd..30defe5104 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -543,4 +543,6 @@ $(writers)/gnuplotGraph/gnuplotGraph.C $(writers)/xmgrGraph/xmgrGraph.C $(writers)/jplotGraph/jplotGraph.C +meshes/data/data.C + LIB = $(FOAM_LIBBIN)/libOpenFOAM diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index b4960c341d..f420291fd6 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -27,6 +27,7 @@ License #include "Time.H" #include "demandDrivenData.H" #include "dictionary.H" +#include "data.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -918,6 +919,15 @@ bool Foam::GeometricField::needReference() const template class PatchField, class GeoMesh> void Foam::GeometricField::relax(const scalar alpha) { + if (debug) + { + InfoIn + ( + "GeometricField::relax" + "(const scalar alpha)" + ) << "Relaxing" << endl << this->info() << " by " << alpha << endl; + } + operator==(prevIter() + alpha*(*this - prevIter())); } @@ -925,16 +935,33 @@ void Foam::GeometricField::relax(const scalar alpha) template class PatchField, class GeoMesh> void Foam::GeometricField::relax() { - scalar alpha = 0; + word name = this->name(); - if (this->mesh().relax(this->name())) + if (this->mesh().data::lookupOrDefault("finalIteration", false)) { - alpha = this->mesh().relaxationFactor(this->name()); + name += "Final"; } - if (alpha > 0) + if (this->mesh().relax(name)) { - relax(alpha); + relax(this->mesh().relaxationFactor(name)); + } +} + + +template class PatchField, class GeoMesh> +Foam::word Foam::GeometricField::select +( + bool final +) const +{ + if (final) + { + return this->name() + "Final"; + } + else + { + return this->name(); } } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index fa8ec179e4..992b4a5c83 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -476,6 +476,11 @@ public: // alpha is read from controlDict void relax(); + //- Select the final iteration parameters if `final' is true + // by returning the field name + "Final" + // otherwise the standard parameters by returning the field name + word select(bool final) const; + // Member function *this operators diff --git a/src/finiteVolume/finiteVolume/fvData/fvData.C b/src/OpenFOAM/meshes/data/data.C similarity index 87% rename from src/finiteVolume/finiteVolume/fvData/fvData.C rename to src/OpenFOAM/meshes/data/data.C index e662c3d394..6e8813f779 100644 --- a/src/finiteVolume/finiteVolume/fvData/fvData.C +++ b/src/OpenFOAM/meshes/data/data.C @@ -23,23 +23,23 @@ License \*---------------------------------------------------------------------------*/ -#include "fvData.H" +#include "data.H" #include "Time.H" #include "lduMatrix.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -int Foam::fvData::debug(Foam::debug::debugSwitch("fvData", false)); +int Foam::data::debug(Foam::debug::debugSwitch("data", false)); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fvData::fvData(const objectRegistry& obr) +Foam::data::data(const objectRegistry& obr) : IOdictionary ( IOobject ( - "fvData", + "data", obr.time().system(), obr, IOobject::NO_READ, @@ -53,13 +53,13 @@ Foam::fvData::fvData(const objectRegistry& obr) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const Foam::dictionary& Foam::fvData::solverPerformanceDict() const +const Foam::dictionary& Foam::data::solverPerformanceDict() const { return subDict("solverPerformance"); } -void Foam::fvData::setSolverPerformance +void Foam::data::setSolverPerformance ( const word& name, const lduMatrix::solverPerformance& sp diff --git a/src/finiteVolume/finiteVolume/fvData/fvData.H b/src/OpenFOAM/meshes/data/data.H similarity index 85% rename from src/finiteVolume/finiteVolume/fvData/fvData.H rename to src/OpenFOAM/meshes/data/data.H index ab6c27e33b..c8e6f98421 100644 --- a/src/finiteVolume/finiteVolume/fvData/fvData.H +++ b/src/OpenFOAM/meshes/data/data.H @@ -22,20 +22,21 @@ License along with OpenFOAM. If not, see . Class - Foam::fvData + Foam::data Description - Database for finite volume solution data, solver performance and - other reduced data. fvMesh is derived from fvData so that all fields have - access to the fvData from the mesh reference they hold. + Database for solution data, solver performance and other reduced data. + + fvMesh is derived from data so that all fields have access to the data from + the mesh reference they hold. SourceFiles - fvData.C + data.C \*---------------------------------------------------------------------------*/ -#ifndef fvData_H -#define fvData_H +#ifndef data_H +#define data_H #include "IOdictionary.H" #include "lduMatrix.H" @@ -46,20 +47,20 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class fvData Declaration + Class data Declaration \*---------------------------------------------------------------------------*/ -class fvData +class data : public IOdictionary { // Private Member Functions //- Disallow default bitwise copy construct - fvData(const fvData&); + data(const data&); //- Disallow default bitwise assignment - void operator=(const fvData&); + void operator=(const data&); public: @@ -71,7 +72,7 @@ public: // Constructors //- Construct for objectRegistry - fvData(const objectRegistry& obr); + data(const objectRegistry& obr); // Member Functions diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 85714b5f9c..cdb0a70337 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -270,7 +270,6 @@ $(multivariateSchemes)/limitedCubic/multivariateLimitedCubic.C finiteVolume/fv/fv.C finiteVolume/fvSchemes/fvSchemes.C -finiteVolume/fvData/fvData.C ddtSchemes = finiteVolume/ddtSchemes $(ddtSchemes)/ddtScheme/ddtSchemes.C diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index fcb479465b..ea181f7761 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -506,6 +506,13 @@ void Foam::fvMatrix::relax(const scalar alpha) return; } + if (debug) + { + InfoIn("fvMatrix::relax(const scalar alpha)") + << "Relaxing " << psi_.name() << " by " << alpha + << endl; + } + Field& S = source(); scalarField& D = diag(); @@ -591,9 +598,14 @@ void Foam::fvMatrix::relax(const scalar alpha) template void Foam::fvMatrix::relax() { - if (psi_.mesh().relax(psi_.name())) + word name = psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ); + + if (psi_.mesh().relax(name)) { - relax(psi_.mesh().relaxationFactor(psi_.name())); + relax(psi_.mesh().relaxationFactor(name)); } } diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C index e1984ef878..b4889660f6 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C @@ -167,21 +167,48 @@ template Foam::autoPtr::fvSolver> Foam::fvMatrix::solver() { - return solver(psi_.mesh().solverDict(psi_.name())); + return solver + ( + psi_.mesh().solverDict + ( + psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ) + ) + ); } template Foam::lduMatrix::solverPerformance Foam::fvMatrix::fvSolver::solve() { - return solve(psi_.mesh().solverDict(psi_.name())); + return solve + ( + psi_.mesh().solverDict + ( + psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ) + ) + ); } template Foam::lduMatrix::solverPerformance Foam::fvMatrix::solve() { - return solve(psi_.mesh().solverDict(psi_.name())); + return solve + ( + psi_.mesh().solverDict + ( + psi_.select + ( + psi_.mesh().data::lookupOrDefault("finalIteration", false) + ) + ) + ); } diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 64ea8c4103..601c1a30e0 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -153,7 +153,7 @@ Foam::fvMesh::fvMesh(const IOobject& io) surfaceInterpolation(*this), fvSchemes(static_cast(*this)), fvSolution(static_cast(*this)), - fvData(static_cast(*this)), + data(static_cast(*this)), boundary_(*this, boundaryMesh()), lduPtr_(NULL), curTimeIndex_(time().timeIndex()), @@ -248,7 +248,7 @@ Foam::fvMesh::fvMesh surfaceInterpolation(*this), fvSchemes(static_cast(*this)), fvSolution(static_cast(*this)), - fvData(static_cast(*this)), + data(static_cast(*this)), boundary_(*this), lduPtr_(NULL), curTimeIndex_(time().timeIndex()), @@ -281,7 +281,7 @@ Foam::fvMesh::fvMesh surfaceInterpolation(*this), fvSchemes(static_cast(*this)), fvSolution(static_cast(*this)), - fvData(static_cast(*this)), + data(static_cast(*this)), boundary_(*this), lduPtr_(NULL), curTimeIndex_(time().timeIndex()), diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index 68ca4eeed9..3348915e56 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -54,7 +54,7 @@ SourceFiles #include "surfaceInterpolation.H" #include "fvSchemes.H" #include "fvSolution.H" -#include "fvData.H" +#include "data.H" #include "DimensionedField.H" #include "volFieldsFwd.H" #include "surfaceFieldsFwd.H" @@ -83,7 +83,7 @@ class fvMesh public surfaceInterpolation, public fvSchemes, public fvSolution, - public fvData + public data { // Private data diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/B b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/B similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/B rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/B diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/T b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/T similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/T rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/T diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/U b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U similarity index 93% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/U rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U index 7ed39fbf24..1cbf4b00ef 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/U +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/U @@ -20,7 +20,7 @@ internalField uniform (0 0 0); boundaryField { - inlet + inlet { type turbulentInlet; referenceField uniform (10 0 0); @@ -28,26 +28,26 @@ boundaryField value uniform (10 0 0); } - outlet + outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - upperWall + upperWall { type fixedValue; value uniform (0 0 0); } - lowerWall + lowerWall { type fixedValue; value uniform (0 0 0); } - frontAndBack + frontAndBack { type empty; } diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/alphaSgs b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphaSgs similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/alphaSgs rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/alphaSgs diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/k b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/k similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/k rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/k diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muSgs b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muSgs rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muSgs diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muTilda b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muTilda similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/muTilda rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/muTilda diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/p b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/p similarity index 93% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/p rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/p index 8fe5928e26..4893a741d7 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/0/p +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/0/p @@ -20,12 +20,12 @@ internalField uniform 1e5; boundaryField { - inlet + inlet { type zeroGradient; } - outlet + outlet { type waveTransmissive; field p; @@ -38,17 +38,17 @@ boundaryField value uniform 1e5; } - upperWall + upperWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - frontAndBack + frontAndBack { type empty; } diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/LESProperties diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary similarity index 95% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/boundary rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary index eb4a4e461d..313dcceba1 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/controlDict b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/controlDict similarity index 98% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/controlDict index ee66ef78e6..98ab2d342a 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application rhoPisoFoam; +application rhoPimpleFoam; startFrom startTime; diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes similarity index 91% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes index b98e0f6c57..1512d63d8e 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSchemes @@ -23,15 +23,13 @@ ddtSchemes gradSchemes { default Gauss linear; - grad(p) Gauss linear; - grad(U) Gauss linear; } divSchemes { default none; - div(phi,U) Gauss linear; - div(phi,h) Gauss linear; + div(phi,U) Gauss filteredLinear2V 0.2 0; + div(phi,h) Gauss filteredLinear2 0.2 0; div(phiU,p) Gauss linear; div(phi,k) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1; @@ -54,7 +52,6 @@ laplacianSchemes interpolationSchemes { default linear; - interpolate(HbyA) linear; } snGradSchemes diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSolution similarity index 77% rename from tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSolution index b016735ea1..d6834127cd 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/les/pitzDaily/system/fvSolution @@ -21,31 +21,42 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-06; + tolerance 1e-6; relTol 0; } - h + "(p|rho)Final" + { + $p; + relTol 0; + } + + "(U|h|k|nuTilda)" { solver PBiCG; preconditioner DILU; - tolerance 1e-06; + tolerance 1e-6; relTol 0; } - "(U|k|B|nuTilda)" + "(U|h|k|nuTilda)Final" { - $h; - tolerance 1e-05; + $U; relTol 0; } } -PISO +PIMPLE { - nCorrectors 2; + momentumPredictor yes; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } +relaxationFactors +{ + "(U|h|k|epsilon|omega).*" 1; +} // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/T b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/T similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/T rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/T diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/U b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/U rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/U diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/alphat similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/alphat rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/alphat diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/epsilon rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/epsilon diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/k b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/k rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/k diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/mut diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/0/p b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/p similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/0/p rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/0/p diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/RASProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/RASProperties rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/RASProperties diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict.m4 similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/blockMeshDict.m4 diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/boundary similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/polyMesh/boundary rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/polyMesh/boundary diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/porousZones b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/porousZones similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/porousZones rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/porousZones diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/controlDict b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/controlDict similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/controlDict diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes similarity index 100% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSchemes diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution similarity index 81% rename from tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution index bb9efe6559..bc91389ba3 100644 --- a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/system/fvSolution @@ -32,14 +32,7 @@ solvers relTol 0; } - rho - { - $p; - tolerance 1e-05; - relTol 0; - } - - U + "(rho|U|h|k|epsilon|omega)" { solver PBiCG; preconditioner DILU; @@ -47,9 +40,7 @@ solvers relTol 0.1; } - h { $U; } - - "(UFinal|hFinal|R|k|epsilon|omega)" + "(rho|U|h|k|epsilon|omega)Final" { $U; tolerance 1e-05; @@ -60,20 +51,18 @@ solvers PIMPLE { + momentumPredictor yes; nOuterCorrectors 50; nCorrectors 1; nNonOrthogonalCorrectors 0; - momentumPredictor yes; - pMin pMin [ 1 -1 -2 0 0 0 0 ] 1000; } relaxationFactors { - p 0.3; - rho 0.05; - U 0.7; - h 0.7; - "(k|epsilon|omega)" 0.7; + "p.*" 0.3; + "rho.*" 1; + "(U|h|k|epsilon|omega)" 0.7; + "(U|h|k|epsilon|omega)Final" 1; } diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/R b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/R similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/R rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/R diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/T b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/T similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/T rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/T diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/U b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/U similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/U rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/U diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/alphat similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/alphat rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/alphat diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/epsilon b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/epsilon rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/epsilon diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/k b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/k rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/k diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/mut rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/mut diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/omega b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/omega rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/omega diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/0/p b/tutorials/compressible/rhoPimpleFoam/ras/cavity/0/p similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/0/p rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/0/p diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/RASProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/RASProperties rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/RASProperties diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/blockMeshDict rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/blockMeshDict diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/boundary b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/boundary similarity index 92% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/boundary rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/boundary index 8947c6cace..5cfd85f252 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/polyMesh/boundary @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format ascii; + format binary; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/thermophysicalProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/thermophysicalProperties rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/thermophysicalProperties diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/constant/turbulenceProperties b/tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/constant/turbulenceProperties rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/constant/turbulenceProperties diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/controlDict b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/controlDict similarity index 94% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/system/controlDict rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/system/controlDict index 5207df21bb..8e0460733b 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/controlDict +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application rhoPisoFoam; +application rhoPimpleFoam; startFrom startTime; @@ -33,9 +33,9 @@ writeInterval 0.1; purgeWrite 0; -writeFormat ascii; +writeFormat binary; -writePrecision 6; +writePrecision 10; writeCompression off; diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSchemes b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes similarity index 100% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSchemes rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSchemes diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSolution similarity index 87% rename from tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution rename to tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSolution index 863d53ae7f..4f6ea01974 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/ras/cavity/system/fvSolution @@ -22,10 +22,16 @@ solvers solver PCG; preconditioner DIC; tolerance 1e-06; + relTol 0.01; + } + + pFinal + { + $p; relTol 0; } - rho + "rho.*" { $p; tolerance 1e-05; @@ -37,15 +43,22 @@ solvers solver PBiCG; preconditioner DILU; tolerance 1e-05; + relTol 0.1; + } + + "(U|h|R|k|epsilon|omega)Final" + { + $U; relTol 0; } } -PISO +PIMPLE { + momentumPredictor yes; + nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; - momentumPredictor yes; } diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U deleted file mode 100644 index 5e3b0435c4..0000000000 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeArgon/0/U +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / 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 -{ - periodicX - { - type cyclic; - } - periodicY - { - type cyclic; - } - periodicZ - { - type cyclic; - } -} - -// ************************************************************************* // diff --git a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U b/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U deleted file mode 100644 index 5e3b0435c4..0000000000 --- a/tutorials/discreteMethods/molecularDynamics/mdEquilibrationFoam/periodicCubeWater/0/U +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / 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 -{ - periodicX - { - type cyclic; - } - periodicY - { - type cyclic; - } - periodicZ - { - type cyclic; - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T.org similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/T.org rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/T.org diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/U rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/U diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/alphat similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/alphat rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/alphat diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/epsilon similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/epsilon rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/epsilon diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/k similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/k rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/k diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/nut similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/nut rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/nut diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/p similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/0/p rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/0/p diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allclean rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allclean diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun similarity index 83% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun index 814ade458e..cb0be1e6e0 100755 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/Allrun +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory application=`getApplication` -compileApplication ../../buoyantPisoFoam/hotRoom/setHotRoom +compileApplication ../../buoyantPimpleFoam/hotRoom/setHotRoom runApplication blockMesh runApplication setHotRoom runApplication $application diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/RASProperties rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/RASProperties diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/g b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/g similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/g rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/g diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/blockMeshDict rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/boundary similarity index 94% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/boundary index b66c382b6a..0d4d0e498d 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/transportProperties similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/constant/transportProperties rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/constant/transportProperties diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/controlDict similarity index 91% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/controlDict index 53d1882a04..1d5d0b66a7 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/controlDict +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application buoyantBoussinesqPisoFoam; +application buoyantBoussinesqPimpleFoam; startFrom startTime; @@ -23,13 +23,13 @@ startTime 0; stopAt endTime; -endTime 1000; +endTime 2000; -deltaT 1; +deltaT 2; writeControl timeStep; -writeInterval 100; +writeInterval 200; purgeWrite 0; diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes similarity index 100% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSchemes rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSchemes diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSolution similarity index 81% rename from tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution rename to tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSolution index 2526e8b4b1..8a3fb56375 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/system/fvSolution @@ -21,14 +21,13 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-07; + tolerance 1e-8; relTol 0.1; } pFinal { $p; - tolerance 1e-07; relTol 0; } @@ -36,19 +35,31 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-6; + relTol 0.1; + } + + "(U|T|k|epsilon|R)Final" + { + $U; relTol 0; } } -PISO +PIMPLE { - momentumPredictor yes; + momentumPredictor no; + nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } +relaxationFactors +{ + "(U|T|k|epsilon|R)" 1; + "(U|T|k|epsilon|R)Final" 1; +} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T.org b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T.org similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/T.org rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/T.org diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/U b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/U rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/U diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/alphat similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/alphat rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/alphat diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/epsilon b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/epsilon rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/epsilon diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/k b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/k rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/k diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/mut rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/mut diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/0/p rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/0/p diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allclean b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allclean rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allclean diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/Allrun rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/Allrun diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/RASProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/RASProperties rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/RASProperties diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/g b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/g similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/g rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/g diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/blockMeshDict rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/blockMeshDict diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/boundary similarity index 94% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/boundary rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/boundary index b66c382b6a..0d4d0e498d 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/thermophysicalProperties rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/turbulenceProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/constant/turbulenceProperties rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/turbulenceProperties diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/files b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/files similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/files rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/files diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/options b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/options similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/Make/options rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/Make/options diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/createFields.H b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/createFields.H similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/createFields.H rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/createFields.H diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/setHotRoom.C b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/setHotRoom.C similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/setHotRoom/setHotRoom.C rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/setHotRoom/setHotRoom.C diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/controlDict similarity index 93% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/controlDict index 11e3efe957..df7983f0d9 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/controlDict +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/controlDict @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application buoyantPisoFoam; +application buoyantPimpleFoam; startFrom startTime; @@ -23,9 +23,9 @@ startTime 0; stopAt endTime; -endTime 1000; +endTime 2000; -deltaT 1; +deltaT 2; writeControl timeStep; diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes similarity index 100% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSchemes rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution similarity index 86% rename from tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution rename to tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution index c1e26f6e57..eb860df2b2 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - rho + "rho.*" { solver PCG; preconditioner DIC; @@ -29,14 +29,13 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-06; + tolerance 1e-8; relTol 0.1; } pFinal { $p; - tolerance 1e-06; relTol 0; } @@ -44,13 +43,21 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-6; + relTol 0; + } + + "(U|h|k|epsilon|R)Final" + { + $U; relTol 0; } } -PISO +PIMPLE { + momentumPredictor no; + nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U index 39d9711c40..be47ccdfa5 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/0/U @@ -33,13 +33,13 @@ boundaryField { type flowRateInletVelocity; flowRate 0.00379; - value uniform (0 10.82857143 0); + value uniform (0 14.68 0); } inletSides { type flowRateInletVelocity; flowRate 0.00832; - value uniform (0 11.88571429 0); + value uniform (0 17.79 0); } outlet {