diff --git a/applications/solvers/compressible/rhoSimpleFoam/EEqn.H b/applications/solvers/compressible/rhoSimpleFoam/EEqn.H new file mode 100644 index 0000000000..e4c79b40cc --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/EEqn.H @@ -0,0 +1,19 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + fvm::div(phi, he) + + ( + he.name() == "e" + ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) + : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) + ) + - fvm::laplacian(turbulence->alphaEff(), he) + ); + + EEqn.relax(); + EEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index d8fdff55ae..dea35b7657 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -5,6 +5,7 @@ psiThermo::New(mesh) ); psiThermo& thermo = pThermo(); + thermo.validate(args.executable(), "h", "e"); volScalarField rho ( @@ -20,7 +21,6 @@ ); volScalarField& p = thermo.p(); - volScalarField& e = thermo.he(); const volScalarField& psi = thermo.psi(); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/eEqn.H b/applications/solvers/compressible/rhoSimpleFoam/eEqn.H deleted file mode 100644 index a1ea771573..0000000000 --- a/applications/solvers/compressible/rhoSimpleFoam/eEqn.H +++ /dev/null @@ -1,18 +0,0 @@ -{ - // Kinetic + pressure energy - volScalarField Ekp("Ekp", 0.5*magSqr(U) + p/rho); - - fvScalarMatrix eEqn - ( - fvm::div(phi, e) - - fvm::Sp(fvc::div(phi), e) - - fvm::laplacian(turbulence->alphaEff(), e) - == - fvc::div(phi)*Ekp - fvc::div(phi, Ekp) - ); - - eEqn.relax(); - eEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/EEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/EEqn.H new file mode 100644 index 0000000000..ff467c0382 --- /dev/null +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/EEqn.H @@ -0,0 +1,21 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + fvm::div(phi, he) + + ( + he.name() == "e" + ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) + : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) + ) + - fvm::laplacian(turbulence->alphaEff(), he) + ); + + pZones.addEnergySource(thermo, rho, EEqn); + + EEqn.relax(); + EEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/createFields.H index 96bdb2a122..4fff74d224 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/createFields.H @@ -5,6 +5,7 @@ rhoThermo::New(mesh) ); rhoThermo& thermo = pThermo(); + thermo.validate(args.executable(), "h", "e"); volScalarField rho ( @@ -20,7 +21,6 @@ ); volScalarField& p = thermo.p(); - volScalarField& e = thermo.he(); Info<< "Reading field U\n" << endl; volVectorField U diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/eEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/eEqn.H deleted file mode 100644 index 5d0f174623..0000000000 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/eEqn.H +++ /dev/null @@ -1,20 +0,0 @@ -{ - // Kinetic + pressure energy - volScalarField Ekp("Ekp", 0.5*magSqr(U) + p/rho); - - fvScalarMatrix eEqn - ( - fvm::div(phi, e) - - fvm::Sp(fvc::div(phi), e) - - fvm::laplacian(turbulence->alphaEff(), e) - == - fvc::div(phi)*Ekp - fvc::div(phi, Ekp) - ); - - pZones.addEnergySource(thermo, rho, eEqn); - - eEqn.relax(); - eEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C index 22a58da1cc..3898295b91 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousMRFSimpleFoam/rhoPorousMRFSimpleFoam.C @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) // Pressure-velocity SIMPLE corrector { #include "UEqn.H" - #include "eEqn.H" + #include "EEqn.H" #include "pEqn.H" } diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index 0eee9129b5..312196583e 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) // Pressure-velocity SIMPLE corrector { #include "UEqn.H" - #include "eEqn.H" + #include "EEqn.H" #include "pEqn.H" } diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C index 561c5e2dc9..f707570f60 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/rhoSimplecFoam.C @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) // Velocity-pressure-enthalpy SIMPLEC corrector { #include "UEqn.H" - #include "eEqn.H" + #include "EEqn.H" #include "pEqn.H" } diff --git a/applications/solvers/compressible/sonicFoam/EEqn.H b/applications/solvers/compressible/sonicFoam/EEqn.H new file mode 100644 index 0000000000..15979381a9 --- /dev/null +++ b/applications/solvers/compressible/sonicFoam/EEqn.H @@ -0,0 +1,10 @@ +{ + solve + ( + fvm::ddt(rho, e) + fvm::div(phi, e) + + fvc::ddt(rho, K) + fvc::div(phi, volScalarField("Ekp", K + p/rho)) + - fvm::laplacian(turbulence->alphaEff(), e) + ); + + thermo.correct(); +} diff --git a/applications/solvers/compressible/sonicFoam/createFields.H b/applications/solvers/compressible/sonicFoam/createFields.H index 3c39d3e7aa..c3421369e7 100644 --- a/applications/solvers/compressible/sonicFoam/createFields.H +++ b/applications/solvers/compressible/sonicFoam/createFields.H @@ -5,6 +5,7 @@ psiThermo::New(mesh) ); psiThermo& thermo = pThermo(); + thermo.validate(args.executable(), "e"); volScalarField& p = thermo.p(); volScalarField& e = thermo.he(); diff --git a/applications/solvers/compressible/sonicFoam/eEqn.H b/applications/solvers/compressible/sonicFoam/eEqn.H deleted file mode 100644 index cfd908ded8..0000000000 --- a/applications/solvers/compressible/sonicFoam/eEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - solve - ( - fvm::ddt(rho, e) - + fvm::div(phi, e) - - fvm::laplacian(turbulence->alphaEff(), e) - == - - (fvc::ddt(rho, K) + fvc::div(phi, volScalarField("Ekp", K + p/rho))) - ); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H index 99ca26fce3..4d700b3a41 100644 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/pEqn.H @@ -17,7 +17,8 @@ surfaceScalarField phid volScalarField Dp("Dp", rho*rAU); -for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +// Non-orthogonal pressure corrector loop +while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( @@ -28,7 +29,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) pEqn.solve(); - if (nonOrth == nNonOrthCorr) + if (pimple.finalNonOrthogonalIter()) { phi = pEqn.flux(); } diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/EEqn.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/EEqn.H new file mode 100644 index 0000000000..994c2862b8 --- /dev/null +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/EEqn.H @@ -0,0 +1,11 @@ +{ + solve + ( + fvm::ddt(rho, e) + fvm::div(phi, e) + + fvc::ddt(rho, K) + fvc::div(phi, K) + + fvc::div(phi/fvc::interpolate(rho) + mesh.phi(), p, "div(phiv,p)") + - fvm::laplacian(turbulence->alphaEff(), e) + ); + + thermo.correct(); +} diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/eEqn.H b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/eEqn.H deleted file mode 100644 index 0c17353ec4..0000000000 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/eEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - solve - ( - fvm::ddt(rho, e) - + fvm::div(phi, e) - - fvm::laplacian(turbulence->alphaEff(), e) - == - - p*fvc::div(phi/fvc::interpolate(rho) + mesh.phi()) - ); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C index 163baa5b69..2f7ac9962a 100644 --- a/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C @@ -34,6 +34,7 @@ Description #include "psiThermo.H" #include "turbulenceModel.H" #include "motionSolver.H" +#include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,6 +46,8 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "initContinuityErrs.H" + pimpleControl pimple(mesh); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -62,19 +65,23 @@ int main(int argc, char *argv[]) #include "rhoEqn.H" - #include "UEqn.H" - - #include "eEqn.H" - - - // --- PISO loop - - for (int corr=0; corrcorrect(); + // --- Pressure corrector loop + while (pimple.correct()) + { + #include "pEqn.H" + } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } + } rho = thermo.rho(); diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index 954404b6a4..71d032d422 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -33,6 +33,7 @@ Description #include "fvCFD.H" #include "psiThermo.H" #include "turbulenceModel.H" +#include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,6 +45,8 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "initContinuityErrs.H" + pimpleControl pimple(mesh); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -52,20 +55,28 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - #include "readPISOControls.H" + #include "readTimeControls.H" #include "compressibleCourantNo.H" #include "rhoEqn.H" - #include "UEqn.H" - // --- PISO loop - for (int corr=0; corrcorrect(); + // --- Pressure corrector loop + while (pimple.correct()) + { + #include "pEqn.H" + } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } + } rho = thermo.rho(); diff --git a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C index 19a530a6aa..1ac1ae4ae3 100644 --- a/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicLiquidFoam/sonicLiquidFoam.C @@ -31,6 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,6 +45,8 @@ int main(int argc, char *argv[]) #include "createFields.H" #include "initContinuityErrs.H" + pimpleControl pimple(mesh); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -52,57 +55,59 @@ int main(int argc, char *argv[]) { Info<< "Time = " << runTime.timeName() << nl << endl; - #include "readPISOControls.H" + #include "readTimeControls.H" #include "compressibleCourantNo.H" #include "rhoEqn.H" - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - - fvm::laplacian(mu, U) - ); - - solve(UEqn == -fvc::grad(p)); - - - // --- PISO loop - - for (int corr=0; corralphaEff(), he) + ); + + EEqn.relax(); + EEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C index 07ec2300c0..dfa88b59a9 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) while (pimple.loop()) { #include "UEqn.H" - #include "hEqn.H" + #include "EEqn.H" // --- Pressure corrector loop while (pimple.correct()) diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index f2edc4cdba..f6b183e3fc 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -5,6 +5,7 @@ rhoThermo::New(mesh) ); rhoThermo& thermo = pThermo(); + thermo.validate(args.executable(), "h", "e"); volScalarField rho ( @@ -20,7 +21,6 @@ ); volScalarField& p = thermo.p(); - volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H deleted file mode 100644 index b1d9e4e8b0..0000000000 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix hEqn - ( - fvm::ddt(rho, h) - + fvm::div(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - dpdt - - (fvc::ddt(rho, K) + fvc::div(phi, K)) - ); - - hEqn.relax(); - hEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Allwmake b/applications/solvers/heatTransfer/buoyantSimpleFoam/Allwmake new file mode 100755 index 0000000000..0fe8e8f4ad --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Allwmake @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake +wmake buoyantSimpleRadiationFoam + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H new file mode 100644 index 0000000000..e4c79b40cc --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/EEqn.H @@ -0,0 +1,19 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + fvm::div(phi, he) + + ( + he.name() == "e" + ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) + : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) + ) + - fvm::laplacian(turbulence->alphaEff(), he) + ); + + EEqn.relax(); + EEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index 2a355a21de..4a9387c188 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) // Pressure-velocity SIMPLE corrector { #include "UEqn.H" - #include "hEqn.H" + #include "EEqn.H" #include "pEqn.H" } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/EEqn.H new file mode 100644 index 0000000000..0d1f41d0c3 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/EEqn.H @@ -0,0 +1,22 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + fvm::div(phi, he) + + ( + he.name() == "e" + ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho)) + : fvc::div(phi, volScalarField("K", 0.5*magSqr(U))) + ) + - fvm::laplacian(turbulence->alphaEff(), he) + == + radiation->Sh(thermo) + ); + + EEqn.relax(); + EEqn.solve(); + + thermo.correct(); + radiation->correct(); +} diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/files b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/Make/files similarity index 98% rename from applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/files rename to applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/Make/files index 79ebcd90aa..a8347c5525 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/files +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/Make/files @@ -1,4 +1,3 @@ buoyantSimpleRadiationFoam.C EXE = $(FOAM_APPBIN)/buoyantSimpleRadiationFoam - diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/Make/options similarity index 94% rename from applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options rename to applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/Make/options index f2ebc095ff..f26046adb2 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I../buoyantSimpleFoam \ + -I.. \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C similarity index 98% rename from applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C rename to applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C index 07718aa41d..d02853591e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) // Pressure-velocity SIMPLE corrector { #include "UEqn.H" - #include "hEqn.H" + #include "EEqn.H" #include "pEqn.H" } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index d2fff48837..bb7a65cb1d 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -5,6 +5,7 @@ psiThermo::New(mesh) ); psiThermo& thermo = pThermo(); + thermo.validate(args.executable(), "h", "e"); volScalarField rho ( @@ -20,7 +21,6 @@ ); volScalarField& p = thermo.p(); - volScalarField& h = thermo.he(); const volScalarField& psi = thermo.psi(); Info<< "Reading field U\n" << endl; diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H deleted file mode 100644 index 24ed135c08..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H +++ /dev/null @@ -1,15 +0,0 @@ -{ - fvScalarMatrix hEqn - ( - fvm::div(phi, h) - - fvm::Sp(fvc::div(phi), h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)") - ); - - hEqn.relax(); - hEqn.solve(); - - thermo.correct(); -} diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/hEqn.H deleted file mode 100644 index 2c422a5cab..0000000000 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/hEqn.H +++ /dev/null @@ -1,19 +0,0 @@ -{ - fvScalarMatrix hEqn - ( - fvm::div(phi, h) - - fvm::Sp(fvc::div(phi), h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - - fvc::div(phi, 0.5*magSqr(U), "div(phi,K)") - + radiation->Sh(thermo) - ); - - hEqn.relax(); - - hEqn.solve(); - - thermo.correct(); - - radiation->correct(); -} diff --git a/etc/controlDict b/etc/controlDict index 2199d7ec7a..caf1e22933 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -884,6 +884,7 @@ DebugSwitches wallHeatTransfer 0; wallLayerCells 0; wallModel 0; + warnUnboundedGauss 1; waveTransmissive 0; wedge 0; weighted 0; diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index e3754f0a58..8234e573c5 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -119,7 +119,7 @@ singleStepCombustion::R { const label fNorm = singleMixturePtr_->specieProd()[specieI]; const volScalarField fres(singleMixturePtr_->fres(specieI)); - wSpecie /= max(fNorm*(Y - fres), 1e-2); + wSpecie /= max(fNorm*(Y - fres), scalar(1e-2)); return -fNorm*wSpecie*fres + fNorm*fvm::Sp(wSpecie, Y); } diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 22988f3216..17abbc6363 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -345,6 +345,7 @@ convectionSchemes = finiteVolume/convectionSchemes $(convectionSchemes)/convectionScheme/convectionSchemes.C $(convectionSchemes)/gaussConvectionScheme/gaussConvectionSchemes.C $(convectionSchemes)/multivariateGaussConvectionScheme/multivariateGaussConvectionSchemes.C +$(convectionSchemes)/boundedConvectionScheme/boundedConvectionSchemes.C laplacianSchemes = finiteVolume/laplacianSchemes $(laplacianSchemes)/laplacianScheme/laplacianSchemes.C diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C new file mode 100644 index 0000000000..1e5c911763 --- /dev/null +++ b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.C @@ -0,0 +1,103 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ 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 . + +\*---------------------------------------------------------------------------*/ + +#include "boundedConvectionScheme.H" +#include "fvcSurfaceIntegrate.H" +#include "fvMatrices.H" +#include "fvmSup.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fv +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +tmp > +boundedConvectionScheme::interpolate +( + const surfaceScalarField& phi, + const GeometricField& vf +) const +{ + return scheme_().interpolate(phi, vf); +} + + +template +tmp > +boundedConvectionScheme::flux +( + const surfaceScalarField& faceFlux, + const GeometricField& vf +) const +{ + return scheme_().flux(faceFlux, vf); +} + + +template +tmp > +boundedConvectionScheme::fvmDiv +( + const surfaceScalarField& faceFlux, + const GeometricField& vf +) const +{ + return + scheme_().fvmDiv(faceFlux, vf) + - fvm::Sp(fvc::surfaceIntegrate(faceFlux), vf); +} + + +template +tmp > +boundedConvectionScheme::fvcDiv +( + const surfaceScalarField& faceFlux, + const GeometricField& vf +) const +{ + return + scheme_().fvcDiv(faceFlux, vf) + - fvc::surfaceIntegrate(faceFlux)*vf; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H new file mode 100644 index 0000000000..9426104d33 --- /dev/null +++ b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionScheme.H @@ -0,0 +1,150 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\/ 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 . + +Class + Foam::fv::boundedConvectionScheme + +Description + Bounded form of the selected convection scheme. + + Boundedness is achieved by subtracting div(phi)*vf or Sp(div(phi), vf) + which is non-conservative if div(phi) != 0 but conservative otherwise. + + Can be used for convection of bounded scalar properties in steady-state + solvers to improve stability if insufficient convergence of the pressure + equation causes temporary divergence of the flux field. + +SourceFiles + boundedConvectionScheme.C + +\*---------------------------------------------------------------------------*/ + +#ifndef boundedConvectionScheme_H +#define boundedConvectionScheme_H + +#include "convectionScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace fv +{ + +/*---------------------------------------------------------------------------*\ + Class boundedConvectionScheme Declaration +\*---------------------------------------------------------------------------*/ + +template +class boundedConvectionScheme +: + public fv::convectionScheme +{ + // Private data + + tmp > scheme_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + boundedConvectionScheme(const boundedConvectionScheme&); + + //- Disallow default bitwise assignment + void operator=(const boundedConvectionScheme&); + + +public: + + //- Runtime type information + TypeName("bounded"); + + + // Constructors + + //- Construct from flux and Istream + boundedConvectionScheme + ( + const fvMesh& mesh, + const surfaceScalarField& faceFlux, + Istream& is + ) + : + convectionScheme(mesh, faceFlux), + scheme_ + ( + fv::convectionScheme::New(mesh, faceFlux, is) + ) + {} + + + // Member Functions + + tmp > interpolate + ( + const surfaceScalarField&, + const GeometricField& + ) const; + + tmp > flux + ( + const surfaceScalarField&, + const GeometricField& + ) const; + + tmp > fvmDiv + ( + const surfaceScalarField&, + const GeometricField& + ) const; + + tmp > fvcDiv + ( + const surfaceScalarField&, + const GeometricField& + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "boundedConvectionScheme.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForceI.H b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionSchemes.C similarity index 59% rename from src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForceI.H rename to src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionSchemes.C index e156c58d14..33385d4ecf 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForceI.H +++ b/src/finiteVolume/finiteVolume/convectionSchemes/boundedConvectionScheme/boundedConvectionSchemes.C @@ -23,44 +23,17 @@ License \*---------------------------------------------------------------------------*/ +#include "boundedConvectionScheme.H" +#include "fvMesh.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -template -const Foam::volVectorField& Foam::VirtualMassForce::DUcDt() const +namespace Foam { - if (DUcDtPtr_) - { - return *DUcDtPtr_; - } - else - { - FatalErrorIn - ( - "const volVectorField& VirtualMassForce::DUcDt()" - "const" - ) << "DUcDt field not allocated" << abort(FatalError); - - return *reinterpret_cast(0); - } -} - - -template -inline const Foam::interpolation& -Foam::VirtualMassForce::DUcDtInterp() const +namespace fv { - if (!DUcDtInterpPtr_.valid()) - { - FatalErrorIn - ( - "inline const Foam::interpolation&" - "Foam::VirtualMassForce::DUcDtInterp() const" - ) << "Carrier pahase DUcDt interpolation object not set" - << abort(FatalError); - } - - return DUcDtInterpPtr_(); + makeFvConvectionScheme(boundedConvectionScheme) +} } - // ************************************************************************* // diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H index 1b27e361a9..61d6c22d37 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H +++ b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,6 +47,10 @@ namespace Foam namespace fv { +//- Temporary debug switch to provide warning about backward-compatibility +// issue with setting div schemes for steady-state +extern int warnUnboundedGauss; + /*---------------------------------------------------------------------------*\ Class gaussConvectionScheme Declaration \*---------------------------------------------------------------------------*/ @@ -103,7 +107,29 @@ public: ( surfaceInterpolationScheme::New(mesh, faceFlux, is) ) - {} + { + is.rewind(); + word bounded(is); + + if + ( + warnUnboundedGauss + && word(mesh.ddtScheme("default")) == "steadyState" + && bounded != "bounded" + ) + { + fileNameList controlDictFiles(findEtcFiles("controlDict")); + + IOWarningIn("gaussConvectionScheme", is) + << "Unbounded 'Gauss' div scheme used in " + "steady-state solver, use 'bounded Gauss' " + "to ensure boundedness.\n" + << " To remove this warning switch off " + << "'boundedGauss' in " + << controlDictFiles[controlDictFiles.size()-1] + << endl; + } + } // Member Functions diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionSchemes.C b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionSchemes.C index 55a5e6049d..c5ea8dbac7 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionSchemes.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionSchemes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,6 +32,11 @@ namespace Foam { namespace fv { + int warnUnboundedGauss + ( + Foam::debug::debugSwitch("warnUnboundedGauss", true) + ); + makeFvConvectionScheme(gaussConvectionScheme) } } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index 321fba33ad..29e696dc81 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -470,8 +470,8 @@ public: //- Total rotational kinetic energy in the system inline scalar rotationalKineticEnergyOfSystem() const; - //- Penetration for percentage of the current total mass - inline scalar penetration(const scalar& prc) const; + //- Penetration for fraction [0-1] of the current total mass + inline scalar penetration(const scalar& fraction) const; //- Mean diameter Dij inline scalar Dij(const label i, const label j) const; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index a6bdf47cc4..2e793ac71e 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "fvmSup.H" +#include "SortableList.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -336,106 +337,130 @@ inline Foam::scalar Foam::KinematicCloud::Dmax() const reduce(d, maxOp()); - return d; + return max(0.0, d); } template inline Foam::scalar Foam::KinematicCloud::penetration ( - const scalar& prc + const scalar& fraction ) const { - scalar distance = 0.0; - scalar mTot = 0.0; - - label np = this->size(); - - // arrays containing the parcels mass and - // distance from injector in ascending order - scalarField mass(np); - scalarField dist(np); - - if (np > 0) + if ((fraction < 0) || (fraction > 1)) { - label n = 0; - - // first arrange the parcels in ascending order - // the first parcel is closest to its injection position - // and the last one is most far away. - forAllConstIter(typename KinematicCloud, *this, iter) - { - const parcelType& p = iter(); - scalar mi = p.nParticle()*p.mass(); - scalar di = mag(p.position() - p.position0()); - mTot += mi; - - // insert at the last place - mass[n] = mi; - dist[n] = di; - - label i = 0; - bool found = false; - - // insert the parcel in the correct place - // and move the others - while ((i < n) && (!found)) - { - if (di < dist[i]) - { - found = true; - for (label j=n; j>i; j--) - { - mass[j] = mass[j-1]; - dist[j] = dist[j-1]; - } - mass[i] = mi; - dist[i] = di; - } - i++; - } - n++; - } + FatalErrorIn + ( + "inline Foam::scalar Foam::KinematicCloud::penetration" + "(" + "const scalar&" + ") const" + ) + << "fraction should be in the range 0 < fraction < 1" + << exit(FatalError); } - reduce(mTot, sumOp()); + scalar distance = 0.0; - if (np > 0) + const label nParcel = this->size(); + globalIndex globalParcels(nParcel); + const label nParcelSum = globalParcels.size(); + + if (nParcelSum == 0) { - scalar mLimit = prc*mTot; - scalar mOff = (1.0 - prc)*mTot; + return distance; + } - if (np > 1) + // lists of parcels mass and distance from initial injection point + List mass(nParcel, 0.0); + List dist(nParcel, 0.0); + + label i = 0; + scalar mSum = 0.0; + forAllConstIter(typename KinematicCloud, *this, iter) + { + const parcelType& p = iter(); + scalar m = p.nParticle()*p.mass(); + scalar d = mag(p.position() - p.position0()); + mSum += m; + + mass[i] = m; + dist[i] = d; + + i++; + } + + // calculate total mass across all processors + reduce(mSum, sumOp()); + + // flatten the mass list + List allMass(nParcelSum, 0.0); + SubList + ( + allMass, + globalParcels.localSize(Pstream::myProcNo()), + globalParcels.offset(Pstream::myProcNo()) + ).assign(mass); + + // flatten the distance list + SortableList allDist(nParcelSum, 0.0); + SubList + ( + allDist, + globalParcels.localSize(Pstream::myProcNo()), + globalParcels.offset(Pstream::myProcNo()) + ).assign(dist); + + // sort allDist distances into ascending order + // note: allMass masses are left unsorted + allDist.sort(); + + if (nParcelSum > 1) + { + const scalar mLimit = fraction*mSum; + const labelList& indices = allDist.indices(); + + if (mLimit > (mSum - allMass[indices.last()])) { - // 'prc' is large enough that the parcel most far - // away will be used, no need to loop... - if (mLimit > mTot - mass[np-1]) - { - distance = dist[np-1]; - } - else - { - scalar mOffSum = 0.0; - label i = np; - - while ((mOffSum < mOff) && (i>0)) - { - i--; - mOffSum += mass[i]; - } - distance = - dist[i+1] - + (dist[i] - dist[i+1])*(mOffSum - mOff) - /mass[i+1] ; - } + distance = allDist.last(); } else { - distance = dist[0]; + // assuming that 'fraction' is generally closer to 1 than 0, loop + // through in reverse distance order + const scalar mThreshold = (1.0 - fraction)*mSum; + scalar mCurrent = 0.0; + label i0 = 0; + + forAllReverse(indices, i) + { + label indI = indices[i]; + + mCurrent += allMass[indI]; + + if (mCurrent > mThreshold) + { + i0 = i; + break; + } + } + + if (i0 == indices.size() - 1) + { + distance = allDist.last(); + } + else + { + // linearly interpolate to determine distance + scalar alpha = (mCurrent - mThreshold)/allMass[indices[i0]]; + distance = allDist[i0] + alpha*(allDist[i0+1] - allDist[i0]); + } } } - - reduce(distance, maxOp()); + else + { + distance = allDist.first(); + } return distance; } diff --git a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H index 01c80c16e2..d7a0fcf0d0 100644 --- a/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/baseClasses/kinematicCloud/kinematicCloud.H @@ -89,7 +89,7 @@ public: virtual scalar rotationalKineticEnergyOfSystem() const = 0; //- Penetration for percentage of the current total mass -// virtual scalar penetration(const scalar& prc) const = 0; +// virtual scalar penetration(const scalar& fraction) const = 0; //- Mean diameter Dij virtual scalar Dij(const label i, const label j) const = 0; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C index a1d121ee29..c9d61f6d34 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "PressureGradientForce.H" +#include "fvcDdt.H" #include "fvcGrad.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -33,12 +34,13 @@ Foam::PressureGradientForce::PressureGradientForce ( CloudType& owner, const fvMesh& mesh, - const dictionary& dict + const dictionary& dict, + const word& forceType ) : - ParticleForce(owner, mesh, dict, typeName, true), - UName_(this->coeffs().lookup("U")), - gradUPtr_(NULL) + ParticleForce(owner, mesh, dict, forceType, true), + UName_(this->coeffs().template lookupOrDefault("U", "U")), + DUcDtInterpPtr_(NULL) {} @@ -50,7 +52,7 @@ Foam::PressureGradientForce::PressureGradientForce : ParticleForce(pgf), UName_(pgf.UName_), - gradUPtr_(NULL) + DUcDtInterpPtr_(NULL) {} @@ -66,18 +68,48 @@ Foam::PressureGradientForce::~PressureGradientForce() template void Foam::PressureGradientForce::cacheFields(const bool store) { + static word fName("DUcDt"); + + bool fieldExists = this->mesh().template foundObject(fName); + if (store) { - const volVectorField& U = this->mesh().template - lookupObject(UName_); - gradUPtr_ = fvc::grad(U).ptr(); + if (!fieldExists) + { + const volVectorField& Uc = this->mesh().template + lookupObject(UName_); + + volVectorField* DUcDtPtr = new volVectorField + ( + fName, + fvc::ddt(Uc) + (Uc & fvc::grad(Uc)) + ); + + DUcDtPtr->store(); + } + + const volVectorField& DUcDt = this->mesh().template + lookupObject(fName); + + DUcDtInterpPtr_.reset + ( + interpolation::New + ( + this->owner().solution().interpolationSchemes(), + DUcDt + ).ptr() + ); } else { - if (gradUPtr_) + DUcDtInterpPtr_.clear(); + + if (fieldExists) { - delete gradUPtr_; - gradUPtr_ = NULL; + const volVectorField& DUcDt = this->mesh().template + lookupObject(fName); + + const_cast(DUcDt).checkOut(); } } } @@ -95,11 +127,24 @@ Foam::forceSuSp Foam::PressureGradientForce::calcCoupled { forceSuSp value(vector::zero, 0.0); - const volTensorField& gradU = *gradUPtr_; - value.Su() = mass*p.rhoc()/p.rho()*(p.U() & gradU[p.cell()]); + vector DUcDt = + DUcDtInterp().interpolate(p.position(), p.currentTetIndices()); + + value.Su() = mass*p.rhoc()/p.rho()*DUcDt; return value; } +template +Foam::scalar Foam::PressureGradientForce::massAdd +( + const typename CloudType::parcelType&, + const scalar +) const +{ + return 0.0; +} + + // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H index 663723a820..b1986348fb 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,6 +38,7 @@ SourceFiles #include "ParticleForce.H" #include "volFields.H" +#include "interpolation.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,13 +54,15 @@ class PressureGradientForce : public ParticleForce { - // Private data +protected: + + // Protected data //- Name of velocity field const word UName_; - //- Velocity gradient field - const volTensorField* gradUPtr_; + //- Rate of change of carrier phase velocity interpolator + autoPtr > DUcDtInterpPtr_; public: @@ -75,7 +78,8 @@ public: ( CloudType& owner, const fvMesh& mesh, - const dictionary& dict + const dictionary& dict, + const word& forceType = typeName ); //- Construct copy @@ -99,8 +103,8 @@ public: // Access - //- Return const access to the velocity gradient field - inline const volTensorField& gradU() const; + //- Return the rate of change of carrier phase velocity interpolator + inline const interpolation& DUcDtInterp() const; // Evaluation @@ -117,6 +121,13 @@ public: const scalar Re, const scalar muc ) const; + + //- Return the added mass + virtual scalar massAdd + ( + const typename CloudType::parcelType& p, + const scalar mass + ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForceI.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForceI.H index c9bd24c62c..6c085241de 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForceI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForceI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,23 +26,20 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -const Foam::volTensorField& Foam::PressureGradientForce::gradU() -const +inline const Foam::interpolation& +Foam::PressureGradientForce::DUcDtInterp() const { - if (gradUPtr_) - { - return *gradUPtr_; - } - else + if (!DUcDtInterpPtr_.valid()) { FatalErrorIn ( - "const volTensorField& PressureGradientForce::gradU()" - "const" - ) << "gradU field not allocated" << abort(FatalError); - - return *reinterpret_cast(0); + "inline const Foam::interpolation&" + "Foam::PressureGradientForce::DUcDtInterp() const" + ) << "Carrier phase DUcDt interpolation object not set" + << abort(FatalError); } + + return DUcDtInterpPtr_(); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C index 3dca602dd4..c701e07a00 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.C @@ -24,8 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "VirtualMassForce.H" -#include "fvcDdt.H" -#include "fvcGrad.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -34,14 +32,12 @@ Foam::VirtualMassForce::VirtualMassForce ( CloudType& owner, const fvMesh& mesh, - const dictionary& dict + const dictionary& dict, + const word& forceType ) : - ParticleForce(owner, mesh, dict, typeName, true), - UName_(this->coeffs().template lookupOrDefault("U", "U")), - Cvm_(readScalar(this->coeffs().lookup("Cvm"))), - DUcDtPtr_(NULL), - DUcDtInterpPtr_(NULL) + PressureGradientForce(owner, mesh, dict, forceType), + Cvm_(readScalar(this->coeffs().lookup("Cvm"))) {} @@ -51,11 +47,8 @@ Foam::VirtualMassForce::VirtualMassForce const VirtualMassForce& vmf ) : - ParticleForce(vmf), - UName_(vmf.UName_), - Cvm_(vmf.Cvm_), - DUcDtPtr_(NULL), - DUcDtInterpPtr_(NULL) + PressureGradientForce(vmf), + Cvm_(vmf.Cvm_) {} @@ -71,36 +64,7 @@ Foam::VirtualMassForce::~VirtualMassForce() template void Foam::VirtualMassForce::cacheFields(const bool store) { - if (store && !DUcDtPtr_) - { - const volVectorField& Uc = this->mesh().template - lookupObject(UName_); - - DUcDtPtr_ = new volVectorField - ( - "DUcDt", - fvc::ddt(Uc) + (Uc & fvc::grad(Uc)) - ); - - DUcDtInterpPtr_.reset - ( - interpolation::New - ( - this->owner().solution().interpolationSchemes(), - *DUcDtPtr_ - ).ptr() - ); - } - else - { - DUcDtInterpPtr_.clear(); - - if (DUcDtPtr_) - { - delete DUcDtPtr_; - DUcDtPtr_ = NULL; - } - } + PressureGradientForce::cacheFields(store); } @@ -114,12 +78,10 @@ Foam::forceSuSp Foam::VirtualMassForce::calcCoupled const scalar muc ) const { - forceSuSp value(vector::zero, 0.0); + forceSuSp value = + PressureGradientForce::calcCoupled(p, dt, mass, Re, muc); - vector DUcDt = - DUcDtInterp().interpolate(p.position(), p.currentTetIndices()); - - value.Su() = mass*p.rhoc()/p.rho()*Cvm_*DUcDt; + value.Su() *= Cvm_; return value; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H index c5277ec696..ea0d580932 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/VirtualMass/VirtualMassForce.H @@ -28,7 +28,6 @@ Description Calculates particle virtual mass force SourceFiles - VirtualMassForceI.H VirtualMassForce.C \*---------------------------------------------------------------------------*/ @@ -36,9 +35,7 @@ SourceFiles #ifndef VirtualMassForce_H #define VirtualMassForce_H -#include "ParticleForce.H" -#include "volFields.H" -#include "interpolation.H" +#include "PressureGradientForce.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -52,22 +49,13 @@ namespace Foam template class VirtualMassForce : - public ParticleForce + public PressureGradientForce { // Private data - //- Name of velocity field - const word UName_; - //- Virtual mass coefficient - typically 0.5 scalar Cvm_; - //- Rate of change of carrier phase velocity - volVectorField* DUcDtPtr_; - - //- Rate of change of carrier phase velocity interpolator - autoPtr > DUcDtInterpPtr_; - public: @@ -82,7 +70,8 @@ public: ( CloudType& owner, const fvMesh& mesh, - const dictionary& dict + const dictionary& dict, + const word& forceType = typeName ); //- Construct copy @@ -104,15 +93,6 @@ public: // Member Functions - // Access - - //- Return the rate of change of carrier phase velocity - inline const volVectorField& DUcDt() const; - - //- Return the rate of change of carrier phase velocity interpolator - inline const interpolation& DUcDtInterp() const; - - // Evaluation //- Cache fields @@ -143,8 +123,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "VirtualMassForceI.H" - #ifdef NoRepository #include "VirtualMassForce.C" #endif diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C index b675bac3a3..0e11217066 100644 --- a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C +++ b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C @@ -123,7 +123,7 @@ temperatureThermoBaffleFvPatchScalarField && !owner_ ) { - Info << "Creating thermal baffle..." << nbrMesh << endl; + Info << "Creating thermal baffle" << nbrMesh << endl; baffle_.reset(baffle::New(thisMesh, dict).ptr()); owner_ = true; dict.lookup("thermoType") >> solidThermoType_; diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H index f0c3181a90..a8949e89df 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H +++ b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -132,11 +132,9 @@ public: const word& modelType, const fvMesh& mesh, const dictionary& dict - ); - //- Destructor virtual ~thermoBaffle2D(); @@ -182,6 +180,7 @@ public: //- Return sensible enthalpy/internal energy inline tmp he() const; + // Evolution //- Pre-evolve thermal baffle @@ -191,7 +190,6 @@ public: virtual void evolveRegion(); - // I-O //- Provide some feedback diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index a2ad3c88f7..13d6f0462c 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -164,6 +164,89 @@ Foam::basicThermo::~basicThermo() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +void Foam::basicThermo::validate +( + const word& app, + const word& a +) const +{ + if (!(he().name() == a)) + { + FatalErrorIn(app) + << "Supported energy type is " << a + << ", thermodynamics package provides " << he().name() + << exit(FatalError); + } +} + +void Foam::basicThermo::validate +( + const word& app, + const word& a, + const word& b +) const +{ + if (!(he().name() == a || he().name() == b)) + { + FatalErrorIn(app) + << "Supported energy types are " << a << " and " << b + << ", thermodynamics package provides " << he().name() + << exit(FatalError); + } +} + +void Foam::basicThermo::validate +( + const word& app, + const word& a, + const word& b, + const word& c +) const +{ + if + ( + !( + he().name() == a + || he().name() == b + || he().name() == c + ) + ) + { + FatalErrorIn(app) + << "Supported energy types are " << a << ", " << b << " and " << c + << ", thermodynamics package provides " << he().name() + << exit(FatalError); + } +} + +void Foam::basicThermo::validate +( + const word& app, + const word& a, + const word& b, + const word& c, + const word& d +) const +{ + if + ( + !( + he().name() == a + || he().name() == b + || he().name() == c + || he().name() == d + ) + ) + { + FatalErrorIn(app) + << "Supported energy types are " << a << ", " << b + << ", " << c << " and " << d + << ", thermodynamics package provides " << he().name() + << exit(FatalError); + } +} + + Foam::volScalarField& Foam::basicThermo::p() { return p_; diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index c9559d4ef0..d25c9c1ef4 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -111,6 +111,45 @@ public: // Member functions + //- Check that the thermodynamics package is consistent + // with energy forms supported by the application + void validate + ( + const word& app, + const word& + ) const; + + //- Check that the thermodynamics package is consistent + // with energy forms supported by the application + void validate + ( + const word& app, + const word&, + const word& + ) const; + + //- Check that the thermodynamics package is consistent + // with energy forms supported by the application + void validate + ( + const word& app, + const word&, + const word&, + const word& + ) const; + + //- Check that the thermodynamics package is consistent + // with energy forms supported by the application + void validate + ( + const word& app, + const word&, + const word&, + const word&, + const word& + ) const; + + //- Update properties virtual void correct() = 0; diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C index c439348fc0..af89aec73a 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C @@ -142,6 +142,24 @@ makeBasicMixture // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +makeBasicMixture +( + pureMixture, + constTransport, + sensibleInternalEnergy, + eConstThermo, + perfectGas +); + +makeBasicMixture +( + pureMixture, + sutherlandTransport, + sensibleInternalEnergy, + eConstThermo, + perfectGas +); + makeBasicMixture ( pureMixture, diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C index 56baf3fa0b..b5a48fc315 100644 --- a/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo/hePsiThermos.C @@ -84,27 +84,27 @@ makeThermo /* * * * * * * * * * * * * * Internal-energy-based * * * * * * * * * * * * * */ -// makeThermo -// ( -// psiThermo, -// hePsiThermo, -// pureMixture, -// constTransport, -// sensibleInternalEnergy, -// eConstThermo, -// perfectGas -// ); +makeThermo +( + psiThermo, + hePsiThermo, + pureMixture, + constTransport, + sensibleInternalEnergy, + eConstThermo, + perfectGas +); -// makeThermo -// ( -// psiThermo, -// hePsiThermo, -// pureMixture, -// sutherlandTransport, -// sensibleInternalEnergy, -// eConstThermo, -// perfectGas -// ); +makeThermo +( + psiThermo, + hePsiThermo, + pureMixture, + sutherlandTransport, + sensibleInternalEnergy, + eConstThermo, + perfectGas +); makeThermo ( diff --git a/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.C b/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.C index 8d6c67c538..8348899c45 100644 --- a/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.C +++ b/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.C @@ -43,6 +43,21 @@ constSolidRad::constSolidRad(const dictionary& dict) {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::constSolidRad::constSolidRad::write(Ostream& os) const +{ + thermo::write(os); + + dictionary dict("radiation"); + dict.add("kappaRad", kappaRad_); + dict.add("sigmaS", sigmaS_); + dict.add("emissivity", emissivity_); + os << indent << dict.dictName() << dict; +} + + // * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H b/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H index af239b91a7..60977f6e83 100644 --- a/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H +++ b/src/thermophysicalModels/solidSpecie/radiation/const/constSolidRad.H @@ -58,7 +58,7 @@ Ostream& operator<< ); /*---------------------------------------------------------------------------*\ - Class constSolidRad Declaration + Class constSolidRad Declaration \*---------------------------------------------------------------------------*/ template @@ -116,6 +116,9 @@ public: //- Return emissivity[] inline scalar emissivity(scalar T) const; + //- Write to Ostream + void write(Ostream& os) const; + // Member operators diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C index a1a38cc3d0..e2c5ae6719 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C @@ -39,6 +39,22 @@ Foam::constAnIsoSolidTransport::constAnIsoSolidTransport {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::constAnIsoSolidTransport::constAnIsoSolidTransport::write +( + Ostream& os +) const +{ + thermo::write(os); + + dictionary dict("transport"); + dict.add("kappa", kappa_); + os << indent << dict.dictName() << dict; +} + + // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H index 693afd432a..e09d43a1cd 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.H @@ -62,7 +62,7 @@ Ostream& operator<< /*---------------------------------------------------------------------------*\ - Class constAnIsoSolidTransport Declaration + Class constAnIsoSolidTransport Declaration \*---------------------------------------------------------------------------*/ template @@ -79,11 +79,7 @@ class constAnIsoSolidTransport // Private Member Functions //- Construct from components - inline constAnIsoSolidTransport - ( - const thermo& t, - const vector kappa - ); + inline constAnIsoSolidTransport(const thermo& t, const vector kappa); public: @@ -110,6 +106,9 @@ public: //- Un-isotropic thermal conductivity [W/mK] inline vector Kappa(const scalar T) const; + //- Write to Ostream + void write(Ostream& os) const; + // Member operators diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C index 5e7f34cf27..e2fc5096bd 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.C @@ -39,6 +39,22 @@ Foam::constIsoSolidTransport::constIsoSolidTransport {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::constIsoSolidTransport::constIsoSolidTransport::write +( + Ostream& os +) const +{ + thermo::write(os); + + dictionary dict("transport"); + dict.add("kappa", kappa_); + os << indent << dict.dictName() << dict; +} + + // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H index 998a60f5ce..b32ae358ee 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/const/constIsoSolidTransport.H @@ -63,7 +63,7 @@ Ostream& operator<< /*---------------------------------------------------------------------------*\ - Class constIsoSolidTransport Declaration + Class constIsoSolidTransport Declaration \*---------------------------------------------------------------------------*/ template @@ -73,18 +73,14 @@ class constIsoSolidTransport { // Private data - //- Constant isotropic thermal conductivity. + //- Constant isotropic thermal conductivity scalar kappa_; // Private Member Functions //- Construct from components - inline constIsoSolidTransport - ( - const thermo& t, - const scalar kappa - ); + inline constIsoSolidTransport(const thermo& t, const scalar kappa); public: @@ -99,8 +95,7 @@ public: ); //- Construct from Istream - //constIsoSolidTransport(Istream&); - constIsoSolidTransport(const dictionary&); + constIsoSolidTransport(const dictionary& dict); // Member functions @@ -111,6 +106,9 @@ public: //- Un-isotropic thermal conductivity [W/mK] inline vector Kappa(const scalar T) const; + //- Write to Ostream + void write(Ostream& os) const; + // Member operators diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C index b479bd4b66..10070c48ba 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C @@ -46,6 +46,24 @@ Foam::exponentialSolidTransport::exponentialSolidTransport } +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::exponentialSolidTransport::exponentialSolidTransport::write +( + Ostream& os +) const +{ + thermo::write(os); + + dictionary dict("transport"); + dict.add("kappa0", kappa0_); + dict.add("n0", n0_); + dict.add("Tref", Tref_); + os << indent << dict.dictName() << dict; +} + + // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H index b89215b421..1ace8a3c45 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.H @@ -60,7 +60,7 @@ Ostream& operator<< /*---------------------------------------------------------------------------*\ - Class exponentialSolidTransport Declaration + Class exponentialSolidTransport Declaration \*---------------------------------------------------------------------------*/ template @@ -116,6 +116,9 @@ public: //- Thermal conductivity [W/mK] inline vector Kappa(const scalar T) const; + //- Write to Ostream + void write(Ostream& os) const; + // Member operators diff --git a/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H b/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H index 88a8d8aab6..3a154f7fee 100644 --- a/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H +++ b/src/thermophysicalModels/solidThermo/heSolidThermo/heSolidThermo.H @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class heSolidThermo Declaration + Class heSolidThermo Declaration \*---------------------------------------------------------------------------*/ template @@ -62,6 +62,7 @@ class heSolidThermo //- Construct as copy (not implemented) heSolidThermo(const heSolidThermo&); + public: //- Runtime type information @@ -104,30 +105,17 @@ public: // Per patch calculation - //- Anisotropic thermal conductivity [W//m/K] - virtual tmp Kappa - ( - const label patchI - ) const; + //- Anisotropic thermal conductivity [W/m/K] + virtual tmp Kappa(const label patchI) const; //- Absorption coefficient [1/m] - virtual tmp kappaRad - ( - const label patchI - ) const; + virtual tmp kappaRad(const label patchI) const; //- Scatter coefficient - virtual tmp sigmaS - ( - const label patchI - ) const; + virtual tmp sigmaS(const label patchI) const; //- Emissivity coefficient [1/m] - virtual tmp emissivity - ( - const label patchI - ) const; - + virtual tmp emissivity(const label patchI) const; }; @@ -135,7 +123,7 @@ public: } // End namespace Foam -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository # include "heSolidThermo.C" diff --git a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C index ee80730baa..9d186eb039 100644 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C +++ b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.C @@ -292,7 +292,7 @@ void kEpsilon::correct() ( fvm::ddt(rho_, epsilon_) + fvm::div(phi_, epsilon_) - - fvm::Sp(fvc::ddt(rho_) + fvc::div(phi_), epsilon_) + //***HGW - fvm::Sp(fvc::ddt(rho_) + fvc::div(phi_), epsilon_) - fvm::laplacian(DepsilonEff(), epsilon_) == C1_*G*epsilon_/k_ @@ -314,7 +314,7 @@ void kEpsilon::correct() ( fvm::ddt(rho_, k_) + fvm::div(phi_, k_) - - fvm::Sp(fvc::ddt(rho_) + fvc::div(phi_), k_) + //***HGW - fvm::Sp(fvc::ddt(rho_) + fvc::div(phi_), k_) - fvm::laplacian(DkEff(), k_) == G diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C index f85d85791a..e33fa644c2 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.C @@ -51,7 +51,7 @@ temperatureThermoBaffle1DFvPatchScalarField baffleActivated_(true), thickness_(p.size()), Qs_(p.size()), - solid_(NULL) + solidPtr_(NULL) {} @@ -70,7 +70,7 @@ temperatureThermoBaffle1DFvPatchScalarField baffleActivated_(ptf.baffleActivated_), thickness_(ptf.thickness_), Qs_(ptf.Qs_), - solid_(ptf.solid_) + solidPtr_(ptf.solidPtr_) {} @@ -88,19 +88,19 @@ temperatureThermoBaffle1DFvPatchScalarField baffleActivated_(readBool(dict.lookup("baffleActivated"))), thickness_(scalarField("thickness", dict, p.size())), Qs_(scalarField("Qs", dict, p.size())), - solid_(new solidThermoData(dict)) + solidPtr_(new solidType(dict)) { if (!isA(this->patch().patch())) { FatalErrorIn ( "temperatureThermoBaffle1DFvPatchScalarField::" - "temperatureThermoBaffle1DFvPatchScalarField\n" - "(\n" - " const fvPatch& p,\n" - " const DimensionedField& iF,\n" - " const dictionary& dict\n" - ")\n" + "temperatureThermoBaffle1DFvPatchScalarField" + "(" + "const fvPatch&,\n" + "const DimensionedField&, " + "const dictionary&" + ")" ) << "\n patch type '" << patch().type() << "' not type '" << mappedPatchBase::typeName << "'" << "\n for patch " << patch().name() @@ -141,7 +141,7 @@ temperatureThermoBaffle1DFvPatchScalarField baffleActivated_(ptf.baffleActivated_), thickness_(ptf.thickness_), Qs_(ptf.Qs_), - solid_(ptf.solid_) + solidPtr_(ptf.solidPtr_) {} @@ -158,7 +158,7 @@ temperatureThermoBaffle1DFvPatchScalarField baffleActivated_(ptf.baffleActivated_), thickness_(ptf.thickness_), Qs_(ptf.Qs_), - solid_(ptf.solid_) + solidPtr_(ptf.solidPtr_) {} @@ -197,10 +197,8 @@ void temperatureThermoBaffle1DFvPatchScalarField::updateCoeffs() int oldTag = UPstream::msgType(); UPstream::msgType() = oldTag+1; - const mappedPatchBase& mpp = refCast - ( - patch().patch() - ); + const mappedPatchBase& mpp = + refCast(patch().patch()); const label patchI = patch().index(); @@ -208,8 +206,7 @@ void temperatureThermoBaffle1DFvPatchScalarField::updateCoeffs() if (baffleActivated_) { - const fvPatch& nbrPatch = - patch().boundaryMesh()[mpp.samplePolyPatch().index()]; + const fvPatch& nbrPatch = patch().boundaryMesh()[nbrPatchI]; const compressible::turbulenceModel& model = db().template lookupObject @@ -248,10 +245,7 @@ void temperatureThermoBaffle1DFvPatchScalarField::updateCoeffs() const temperatureThermoBaffle1DFvPatchScalarField& nbrField = refCast ( - nbrPatch.template lookupPatchField - ( - TName_ - ) + nbrPatch.template lookupPatchField(TName_) ); scalarField nbrTi(nbrField.patchInternalField()); @@ -278,7 +272,8 @@ void temperatureThermoBaffle1DFvPatchScalarField::updateCoeffs() // Create fields for solid properties forAll(KDeltaw, i) { - KDeltaw[i] = solid_().kappa((Tp[i] + nbrTw[i])/2.0)/thickness_[i]; + KDeltaw[i] = + solidPtr_().kappa((Tp[i] + nbrTw[i])/2.0)/thickness_[i]; } const scalarField q @@ -362,7 +357,7 @@ write(Ostream& os) const os.writeKeyword("baffleActivated") << baffleActivated_ << token::END_STATEMENT << nl; Qs_.writeEntry("Qs", os); - solid_().write(os); + solidPtr_->write(os); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.H index 5122284847..524fb9c95a 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureThermoBaffle1D/temperatureThermoBaffle1DFvPatchScalarField.H @@ -48,7 +48,7 @@ namespace compressible { /*---------------------------------------------------------------------------*\ - Class temperatureThermoBaffle1DFvPatchScalarField Declaration + Class temperatureThermoBaffle1DFvPatchScalarField Declaration \*---------------------------------------------------------------------------*/ template @@ -58,74 +58,6 @@ class temperatureThermoBaffle1DFvPatchScalarField { // Private data - class solidThermoData - { - // Solid thermo - autoPtr solidPtr_; - - // Solid dictionaries - dictionary specieDict_; - dictionary transportDict_; - dictionary radiationDict_; - dictionary thermoDict_; - dictionary densityDict_; - - - public: - - // Constructor from components - solidThermoData(const dictionary& dict) - : - solidPtr_(new solidType(dict)), - specieDict_(dict.subDict("specie")), - transportDict_(dict.subDict("transport")), - radiationDict_(dict.subDict("radiation")), - thermoDict_(dict.subDict("thermodynamics")), - densityDict_(dict.subDict("equationOfState")) - {} - - - // Null constructor - solidThermoData() - : - solidPtr_(), - specieDict_(), - transportDict_(), - radiationDict_(), - thermoDict_(), - densityDict_() - {} - - - // Destructor - virtual ~solidThermoData() - {} - - - // Member Functions - - void write(Ostream& os) const - { - os.writeKeyword("specie"); - os << specieDict_ << nl; - os.writeKeyword("transport"); - os << transportDict_ << nl; - os.writeKeyword("radiation"); - os << radiationDict_ << nl; - os.writeKeyword("thermodynamics"); - os << thermoDict_ << nl; - os.writeKeyword("density"); - os << densityDict_ << nl; - } - - - scalar kappa(const scalar T) const - { - return solidPtr_().kappa(T); - } - }; - - //- Name of the temperature field word TName_; @@ -138,8 +70,16 @@ class temperatureThermoBaffle1DFvPatchScalarField //- Superficial heat source [W/m2] scalarField Qs_; - //- Solid thermo - autoPtr solid_; + // Solid thermo + autoPtr solidPtr_; + + + // Private Member Functions + + scalar kappa(const scalar T) const + { + return solidPtr_().kappa(T); + } public: diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C index 29757f1ea6..fbae992c25 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C @@ -79,7 +79,8 @@ turbulentHeatFluxTemperatureFvPatchScalarField fixedGradientFvPatchScalarField(p, iF), temperatureCoupledBase(patch(), "undefined", "undefined-K"), heatSource_(hsPower), - q_(p.size(), 0.0) + q_(p.size(), 0.0), + QrName_("undefinedQr") {} @@ -95,7 +96,8 @@ turbulentHeatFluxTemperatureFvPatchScalarField fixedGradientFvPatchScalarField(ptf, p, iF, mapper), temperatureCoupledBase(patch(), ptf.KMethod(), ptf.kappaName()), heatSource_(ptf.heatSource_), - q_(ptf.q_, mapper) + q_(ptf.q_, mapper), + QrName_(ptf.QrName_) {} @@ -110,7 +112,8 @@ turbulentHeatFluxTemperatureFvPatchScalarField fixedGradientFvPatchScalarField(p, iF), temperatureCoupledBase(patch(), dict), heatSource_(heatSourceTypeNames_.read(dict.lookup("heatSource"))), - q_("q", dict, p.size()) + q_("q", dict, p.size()), + QrName_(dict.lookupOrDefault("Qr", "none")) { fvPatchField::operator=(patchInternalField()); gradient() = 0.0; @@ -126,7 +129,8 @@ turbulentHeatFluxTemperatureFvPatchScalarField fixedGradientFvPatchScalarField(thftpsf), temperatureCoupledBase(patch(), thftpsf.KMethod(), thftpsf.kappaName()), heatSource_(thftpsf.heatSource_), - q_(thftpsf.q_) + q_(thftpsf.q_), + QrName_(thftpsf.QrName_) {} @@ -140,7 +144,8 @@ turbulentHeatFluxTemperatureFvPatchScalarField fixedGradientFvPatchScalarField(thftpsf, iF), temperatureCoupledBase(patch(), thftpsf.KMethod(), thftpsf.kappaName()), heatSource_(thftpsf.heatSource_), - q_(thftpsf.q_) + q_(thftpsf.q_), + QrName_(thftpsf.QrName_) {} @@ -183,17 +188,25 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs() const scalarField& Tp = *this; + scalarField qr(this->size(), 0.0); + + //- qr is negative going into the domain + if (QrName_ != "none") + { + qr = patch().lookupPatchField(QrName_); + } + switch (heatSource_) { case hsPower: { const scalar Ap = gSum(patch().magSf()); - gradient() = q_/(Ap*kappa(Tp)); + gradient() = (q_/Ap + qr)/kappa(Tp); break; } case hsFlux: { - gradient() = q_/kappa(Tp); + gradient() = (q_ + qr)/kappa(Tp); break; } default: @@ -220,6 +233,7 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::write << token::END_STATEMENT << nl; temperatureCoupledBase::write(os); q_.writeEntry("q", os); + os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H index 254ed52b75..740183e359 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.H @@ -37,6 +37,7 @@ Description heatSource flux; // power [W]; flux [W/m2] q uniform 10; // heat power or flux kappa fluidThermo; // calculate kappa=alphaEff*thermo.Cp + Qr none; // name of the radiative flux value uniform 300; // initial temperature value } @@ -93,6 +94,9 @@ private: //- Heat power [W] or flux [W/m2] scalarField q_; + //- Name of radiative in flux field + word QrName_; + public: diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/p_rgh b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/p_rgh index c1bf8f9b66..f0770e8bd9 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/p_rgh +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/0/p_rgh @@ -53,7 +53,7 @@ boundaryField "(region0_to.*)" { - type buoyantPressure; + type fixedFluxPressure; value $internalField; } } diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/constant/polyMesh/boundary b/tutorials/compressible/rhoCentralFoam/shockTube/constant/polyMesh/boundary index a38765097f..ef087376e6 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/constant/polyMesh/boundary +++ b/tutorials/compressible/rhoCentralFoam/shockTube/constant/polyMesh/boundary @@ -26,6 +26,7 @@ FoamFile empty { type empty; + inGroups 1(empty); nFaces 400; startFace 101; } diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/polyMesh/boundary b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/polyMesh/boundary index 2abc731c97..53cce9211b 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/polyMesh/boundary @@ -32,12 +32,14 @@ FoamFile bottom { type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 25; startFace 10415; } top { type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 125; startFace 10440; } @@ -50,6 +52,7 @@ FoamFile defaultFaces { type empty; + inGroups 1(empty); nFaces 10500; startFace 10675; } diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution index 45bb949628..e07aa4bafc 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - p + "p.*" { solver PBiCG; preconditioner DILU; @@ -25,14 +25,14 @@ solvers relTol 0; } - "(U|e)" + "(U|e).*" { $p; tolerance 1e-05; relTol 0; } - rho + "rho.*" { solver PCG; preconditioner DIC; @@ -41,9 +41,10 @@ solvers } } -PISO +PIMPLE { - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/polyMesh/boundary b/tutorials/compressible/sonicFoam/laminar/shockTube/constant/polyMesh/boundary index e4b48d35f4..7fc4ff3fe5 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/constant/polyMesh/boundary @@ -26,6 +26,7 @@ FoamFile empty { type empty; + inGroups 1(empty); nFaces 4000; startFace 1001; } diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution index b894099c4c..9ed6e1a982 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - "(p|U|e)" + "(p|U|e).*" { solver PBiCG; preconditioner DILU; @@ -25,7 +25,7 @@ solvers relTol 0; } - rho + "rho.*" { solver PCG; preconditioner DIC; @@ -34,9 +34,10 @@ solvers } } -PISO +PIMPLE { - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary index 59a99aa3f0..b6f0d11024 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/constant/polyMesh/boundary @@ -32,6 +32,7 @@ FoamFile SYMP3 { type empty; + inGroups 1(empty); nFaces 80000; startFace 80170; } diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution index 530a5bbd34..afc24d24a2 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution @@ -17,12 +17,12 @@ FoamFile solvers { - rho + "rho.*" { solver diagonal; } - p + "p.*" { solver PBiCG; preconditioner DILU; @@ -30,22 +30,23 @@ solvers relTol 0; } - "(U|e)" + "(U|e).*" { $p; tolerance 1e-9; } - "(k|epsilon)" + "(k|epsilon).*" { $p; tolerance 1e-10; } } -PISO +PIMPLE { - nCorrectors 2; + nOuterCorrectors 1; + nCorrectors 2; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/compressible/sonicFoam/ras/prism/constant/polyMesh/boundary b/tutorials/compressible/sonicFoam/ras/prism/constant/polyMesh/boundary index 635f185a35..0b093a1e0f 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicFoam/ras/prism/constant/polyMesh/boundary @@ -50,6 +50,7 @@ FoamFile defaultFaces { type empty; + inGroups 1(empty); nFaces 13272; startFace 13463; } diff --git a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution index 3f46bc0a25..56886cc6e1 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution @@ -17,12 +17,12 @@ FoamFile solvers { - rho + "rho.*" { solver diagonal; } - p + "p.*" { solver PBiCG; preconditioner DILU; @@ -30,22 +30,23 @@ solvers relTol 0; } - "(U|e|R)" + "(U|e|R).*" { $p; tolerance 1e-05; } - "(k|epsilon)" + "(k|epsilon).*" { $p; tolerance 1e-08; } } -PISO +PIMPLE { - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/polyMesh/boundary b/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/polyMesh/boundary index add55d69d6..b1ca7310c6 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/polyMesh/boundary +++ b/tutorials/compressible/sonicLiquidFoam/decompressionTank/constant/polyMesh/boundary @@ -26,6 +26,7 @@ FoamFile axis { type symmetryPlane; + inGroups 1(symmetryPlane); nFaces 120; startFace 7500; } @@ -38,12 +39,14 @@ FoamFile back { type empty; + inGroups 1(empty); nFaces 3725; startFace 7625; } front { type empty; + inGroups 1(empty); nFaces 3725; startFace 11350; } diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution index f63bb3a65b..5f012bcea7 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution +++ b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution @@ -17,7 +17,7 @@ FoamFile solvers { - p + "p.*" { solver PBiCG; preconditioner DILU; @@ -25,14 +25,14 @@ solvers relTol 0; } - U + "U.*" { $p; tolerance 1e-05; relTol 0; } - rho + "rho.*" { solver PCG; preconditioner DIC; @@ -41,9 +41,10 @@ solvers } } -PISO +PIMPLE { - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties index 05bbb78407..410aa5f42a 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,7 +15,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType heRhoThermo,sensibleEnthalpy>>>>; +thermoType heRhoThermo,sensibleEnthalpy>>>>; +//thermoType heRhoThermo,sensibleInternalEnergy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes index a6897b72d5..9ca38f0376 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSchemes @@ -30,23 +30,19 @@ divSchemes default none; div(phi,U) Gauss upwind; div(phi,h) Gauss upwind; + div(phi,e) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(phi,K) Gauss linear; + div(phi,Ekp) Gauss linear; div(R) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p_rgh) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution index 42d96d946f..7127fdc8c6 100644 --- a/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantPimpleFoam/hotRoom/system/fvSolution @@ -39,7 +39,7 @@ solvers relTol 0; } - "(U|h|k|epsilon|R)" + "(U|h|e|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -47,7 +47,7 @@ solvers relTol 0.1; } - "(U|h|k|epsilon|R)Final" + "(U|h|e|k|epsilon|R)Final" { $U; relTol 0; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes index 599b1530bc..c52c053c84 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSchemes @@ -27,12 +27,12 @@ gradSchemes divSchemes { default none; - div(phi,U) Gauss limitedLinear 0.2; - div(phi,K) Gauss limitedLinear 0.2; - div(phi,h) Gauss limitedLinear 0.2; - div(phi,k) Gauss limitedLinear 0.2; - div(phi,epsilon) Gauss limitedLinear 0.2; - div(phi,omega) Gauss limitedLinear 0.2; + div(phi,U) bounded Gauss limitedLinear 0.2; + div(phi,K) bounded Gauss limitedLinear 0.2; + div(phi,h) bounded Gauss limitedLinear 0.2; + div(phi,k) bounded Gauss limitedLinear 0.2; + div(phi,epsilon) bounded Gauss limitedLinear 0.2; + div(phi,omega) bounded Gauss limitedLinear 0.2; div((muEff*dev2(T(grad(U))))) Gauss linear; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U index e24d69c202..1cee83b6cf 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U @@ -15,32 +15,32 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 1 -1 0 0 0 0 ]; +dimensions [0 1 -1 0 0 0 0]; -internalField uniform ( 0.1 0 0 ); +internalField uniform (0.1 0 0); boundaryField { floor { type fixedValue; - value uniform ( 0 0 0 ); + value uniform (0 0 0); } ceiling { type fixedValue; - value uniform ( 0 0 0 ); + value uniform (0 0 0); } inlet { type fixedValue; - value uniform ( 0.1 0 0 ); + value uniform (0.1 0 0); } outlet { type inletOutlet; - inletValue uniform ( 0 0 0 ); - value uniform ( 0 0 0 ); + inletValue uniform (0 0 0); + value uniform (0.1 0 0); } fixedWalls { diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/boundary b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/boundary index 48ad5decf7..406f4e1f0a 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/boundary +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile fixedWalls { type empty; + inGroups 1(empty); nFaces 4000; startFace 4062; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict index 2b5f43bcd4..0bc3e79b5c 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict @@ -77,7 +77,7 @@ dictionaryReplacement { "baffle.*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 0; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle index dcdadf9491..15a97c9a89 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle @@ -77,7 +77,7 @@ dictionaryReplacement { "baffle1.*" { - type buoyantPressure; + type fixedFluxPressure; value $internalField; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion index 5ab7e81015..5657d6092f 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion @@ -78,7 +78,7 @@ dictionaryReplacement { "region0_to_.*" { - type buoyantPressure; + type fixedFluxPressure; value $internalField; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes index 46f978cc82..573f34703a 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes @@ -27,12 +27,12 @@ gradSchemes divSchemes { default none; - div(phi,U) Gauss limitedLinear 0.2; - div(phi,K) Gauss limitedLinear 0.2; - div(phi,h) Gauss limitedLinear 0.2; - div(phi,k) Gauss limitedLinear 0.2; - div(phi,epsilon) Gauss limitedLinear 0.2; - div(phi,omega) Gauss limitedLinear 0.2; + div(phi,U) bounded Gauss limitedLinear 0.2; + div(phi,K) bounded Gauss limitedLinear 0.2; + div(phi,h) bounded Gauss limitedLinear 0.2; + div(phi,k) bounded Gauss limitedLinear 0.2; + div(phi,epsilon) bounded Gauss limitedLinear 0.2; + div(phi,omega) bounded Gauss limitedLinear 0.2; div((muEff*dev2(T(grad(U))))) Gauss linear; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/g b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/g index e0ac2653b5..037e3b47f3 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/g +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/g @@ -16,7 +16,6 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -2 0 0 0 0]; -value ( 0 -9.81 0 ); - +value (0 -9.81 0); // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties index 521cf3b421..885c152f4f 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hePsiThermo,sensibleEnthalpy>>>>; +thermoType hePsiThermo,sensibleEnthalpy>>>>; pRef 100000; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes index 991a5277f6..62bdbb235b 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSchemes @@ -28,25 +28,17 @@ gradSchemes divSchemes { default none; - div(phi,U) Gauss upwind; - div(phi,h) Gauss upwind; - div(phi,K) Gauss upwind; - div(phi,k) Gauss upwind; - div(phi,epsilon) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; + div(phi,U) bounded Gauss upwind; + div(phi,h) bounded Gauss upwind; + div(phi,K) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear uncorrected; - laplacian(Dp,p_rgh) Gauss linear uncorrected; - laplacian(alphaEff,h) Gauss linear uncorrected; - laplacian(DkEff,k) Gauss linear uncorrected; - laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; - laplacian(DREff,R) Gauss linear uncorrected; + default Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution index c80f4db413..f7365e5f6d 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution @@ -21,15 +21,15 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-08; + tolerance 1e-8; relTol 0.01; } - "(U|h|k|epsilon|R)" + "(U|h|e|k|epsilon|R)" { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-6; relTol 0.1; } } @@ -45,6 +45,7 @@ SIMPLE p_rgh 1e-2; U 1e-3; h 1e-3; + e 1e-3; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; @@ -60,8 +61,8 @@ relaxationFactors } equations { - U 0.2; - h 0.2; + U 0.3; + "(h|e)" 0.3; "(k|epsilon|R)" 0.5; } } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSchemes index 3b6deefb69..2ceace5b7c 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSchemes @@ -28,26 +28,17 @@ gradSchemes divSchemes { default none; - div(phi,U) Gauss upwind; - div(phi,K) Gauss upwind; - div(phi,h) Gauss upwind; - div(phi,k) Gauss upwind; - div(phi,epsilon) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; + div(phi,U) bounded Gauss upwind; + div(phi,K) bounded Gauss upwind; + div(phi,h) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p_rgh) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(gammaRad,G) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes index 817fe7274b..c36da33bd6 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSchemes @@ -28,27 +28,18 @@ gradSchemes divSchemes { default none; - div(phi,U) Gauss upwind; - div(phi,K) Gauss upwind; - div(phi,h) Gauss upwind; - div(phi,k) Gauss upwind; - div(phi,epsilon) Gauss upwind; - div(phi,R) Gauss upwind; - div(R) Gauss linear; + div(phi,U) bounded Gauss upwind; + div(phi,K) bounded Gauss upwind; + div(phi,h) bounded Gauss upwind; + div(phi,k) bounded Gauss upwind; + div(phi,epsilon) bounded Gauss upwind; div(Ji,Ii_h) Gauss linearUpwind grad(Ii_h); div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { - default none; - laplacian(muEff,U) Gauss linear corrected; - laplacian(Dp,p_rgh) Gauss linear corrected; - laplacian(alphaEff,h) Gauss linear corrected; - laplacian(DkEff,k) Gauss linear corrected; - laplacian(DepsilonEff,epsilon) Gauss linear corrected; - laplacian(DREff,R) Gauss linear corrected; - laplacian(gammaRad,G) Gauss linear corrected; + default Gauss linear corrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict index df39888478..67aee46ff3 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict @@ -100,7 +100,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict index c1a4e6bf16..118c410a83 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict @@ -135,7 +135,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict index 1a7f5ecdd5..f403d950dc 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict @@ -149,7 +149,7 @@ dictionaryReplacement ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 0; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict.save b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict.save index 797ef03aa2..d6817628c6 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict.save +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/changeDictionaryDict.save @@ -100,7 +100,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/changeDictionaryDict index 18b85ea2e9..8bb4a2ed54 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/topAir/changeDictionaryDict @@ -136,7 +136,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict index 7abf71ca46..3ccca13960 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/changeDictionaryDict @@ -102,7 +102,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict index c1a4e6bf16..118c410a83 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/changeDictionaryDict @@ -135,7 +135,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict index df39888478..67aee46ff3 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict @@ -100,7 +100,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/changeDictionaryDict index c1a4e6bf16..118c410a83 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/system/topAir/changeDictionaryDict @@ -135,7 +135,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict index c9197f1b24..8bb6b43941 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/bottomAir/changeDictionaryDict @@ -97,7 +97,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict index 704d77ce70..cff14264b6 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/system/topAir/changeDictionaryDict @@ -132,7 +132,7 @@ dictionaryReplacement { ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/p_rgh.org b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/p_rgh.org index 79523d2e24..396d380dad 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/p_rgh.org +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/0/p_rgh.org @@ -22,7 +22,7 @@ boundaryField { walls { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org index 15bc97e933..0394387374 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/0/p_rgh.org @@ -22,7 +22,7 @@ boundaryField { walls { - type buoyantPressure; + type fixedFluxPressure; value uniform 1e5; } } diff --git a/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh b/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh index d30fb85487..d2958fafeb 100644 --- a/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh +++ b/tutorials/multiphase/interFoam/ras/waterChannel/0/p_rgh @@ -34,7 +34,7 @@ boundaryField ".*" { - type buoyantPressure; + type fixedFluxPressure; value uniform 0; } }