diff --git a/applications/solvers/combustion/chemFoam/output.H b/applications/solvers/combustion/chemFoam/output.H index 5620fe6820..2e84c59a48 100644 --- a/applications/solvers/combustion/chemFoam/output.H +++ b/applications/solvers/combustion/chemFoam/output.H @@ -1,6 +1,6 @@ runTime.write(); - Info<< "Sh = " << Sh + Info<< "Qdot = " << Qdot << ", T = " << thermo.T()[0] << ", p = " << thermo.p()[0] << ", " << Y[0].name() << " = " << Y[0][0] @@ -8,4 +8,3 @@ post<< runTime.value() << token::TAB << thermo.T()[0] << token::TAB << thermo.p()[0] << endl; - diff --git a/applications/solvers/combustion/chemFoam/solveChemistry.H b/applications/solvers/combustion/chemFoam/solveChemistry.H index cb4258c31d..e32a1ab0bd 100644 --- a/applications/solvers/combustion/chemFoam/solveChemistry.H +++ b/applications/solvers/combustion/chemFoam/solveChemistry.H @@ -1,3 +1,3 @@ - dtChem = chemistry.solve(runTime.deltaT().value()); - scalar Sh = chemistry.Sh()()[0]/rho[0]; - integratedHeat += Sh*runTime.deltaT().value(); +dtChem = chemistry.solve(runTime.deltaT().value()); +scalar Qdot = chemistry.Qdot()()[0]/rho[0]; +integratedHeat += Qdot*runTime.deltaT().value(); diff --git a/applications/solvers/combustion/fireFoam/YEEqn.H b/applications/solvers/combustion/fireFoam/YEEqn.H index e968600171..d400bf36bb 100644 --- a/applications/solvers/combustion/fireFoam/YEEqn.H +++ b/applications/solvers/combustion/fireFoam/YEEqn.H @@ -10,7 +10,7 @@ tmp> mvConvection ); { combustion->correct(); - dQ = combustion->dQ(); + Qdot = combustion->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) @@ -67,7 +67,7 @@ tmp> mvConvection ) - fvm::laplacian(turbulence->alphaEff(), he) == - combustion->Sh() + Qdot + radiation->Sh(thermo) + parcels.Sh(he) + surfaceFilm.Sh() diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 30e7d30377..85d26aed87 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -131,18 +131,18 @@ Switch solvePyrolysisRegion additionalControlsDict.lookupOrDefault("solvePyrolysisRegion", true) ); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); diff --git a/applications/solvers/combustion/reactingFoam/EEqn.H b/applications/solvers/combustion/reactingFoam/EEqn.H index 9267c9a9be..f92598bbed 100644 --- a/applications/solvers/combustion/reactingFoam/EEqn.H +++ b/applications/solvers/combustion/reactingFoam/EEqn.H @@ -17,7 +17,7 @@ ) - fvm::laplacian(turbulence->alphaEff(), he) == - reaction->Sh() + Qdot + fvOptions(rho, he) ); diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index 7c3f0f117b..4d209a3d81 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -11,7 +11,7 @@ tmp> mvConvection { reaction->correct(); - dQ = reaction->dQ(); + Qdot = reaction->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index e4475e5d1b..6fcf83624c 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -117,18 +117,18 @@ forAll(Y, i) } fields.add(thermo.he()); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H index a4b328f367..675aef3f5a 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H @@ -117,18 +117,18 @@ forAll(Y, i) } fields.add(thermo.he()); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H index fbd45dd20c..687dffcc13 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H @@ -96,18 +96,18 @@ forAll(Y, i) } fields.add(thermo.he()); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index 5c24294ef6..b0f9c02b65 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -43,13 +43,16 @@ License // Damping coefficient (1-0) scalar rDeltaTDampingCoeff ( - pimpleDict.lookupOrDefault("rDeltaTDampingCoeff", 1) + pimpleDict.lookupOrDefault("rDeltaTDampingCoeff", 1.0) ); // Maximum change in cell temperature per iteration // (relative to previous value) scalar alphaTemp(pimpleDict.lookupOrDefault("alphaTemp", 0.05)); + // Maximum change in cell concentration per iteration + // (relative to reference value) + scalar alphaY(pimpleDict.lookupOrDefault("alphaY", 1.0)); Info<< "Time scales min/max:" << endl; @@ -68,34 +71,89 @@ License rDeltaT.max(1/maxDeltaT); Info<< " Flow = " - << gMin(1/rDeltaT.primitiveField()) << ", " - << gMax(1/rDeltaT.primitiveField()) << endl; + << 1/gMax(rDeltaT.primitiveField()) << ", " + << 1/gMin(rDeltaT.primitiveField()) << endl; } - // Reaction source time scale - if (alphaTemp < 1.0) + // Heat release rate time scale + if (alphaTemp < 1) { volScalarField::Internal rDeltaTT ( - mag(reaction->Sh())/(alphaTemp*rho*thermo.Cp()*T) + mag(Qdot)/(alphaTemp*rho*thermo.Cp()*T) ); Info<< " Temperature = " - << gMin(1/(rDeltaTT.field() + VSMALL)) << ", " - << gMax(1/(rDeltaTT.field() + VSMALL)) << endl; + << 1/(gMax(rDeltaTT.field()) + VSMALL) << ", " + << 1/(gMin(rDeltaTT.field()) + VSMALL) << endl; - rDeltaT.ref() = max + rDeltaT.ref() = max(rDeltaT(), rDeltaTT); + } + + // Reaction rate time scale + if (alphaY < 1) + { + dictionary Yref(pimpleDict.subDict("Yref")); + + volScalarField::Internal rDeltaTY ( - rDeltaT(), - rDeltaTT + IOobject + ( + "rDeltaTY", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("rDeltaTY", rDeltaT.dimensions(), 0) ); + + bool foundY = false; + + forAll(Y, i) + { + if (i != inertIndex && composition.active(i)) + { + volScalarField& Yi = Y[i]; + + if (Yref.found(Yi.name())) + { + foundY = true; + scalar Yrefi = readScalar(Yref.lookup(Yi.name())); + + rDeltaTY.field() = max + ( + mag + ( + reaction->R(Yi)().source() + /((Yrefi*alphaY)*(rho*mesh.V())) + ), + rDeltaTY + ); + } + } + } + + if (foundY) + { + Info<< " Composition = " + << 1/(gMax(rDeltaTY.field()) + VSMALL) << ", " + << 1/(gMin(rDeltaTY.field()) + VSMALL) << endl; + + rDeltaT.ref() = max(rDeltaT(), rDeltaTY); + } + else + { + IOWarningIn(args.executable().c_str(), Yref) + << "Cannot find any active species in Yref " << Yref + << endl; + } } // Update tho boundary values of the reciprocal time-step rDeltaT.correctBoundaryConditions(); // Spatially smooth the time scale field - if (rDeltaTSmoothingCoeff < 1.0) + if (rDeltaTSmoothingCoeff < 1) { fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); } @@ -105,7 +163,7 @@ License // - only increase at a fraction of old time scale if ( - rDeltaTDampingCoeff < 1.0 + rDeltaTDampingCoeff < 1 && runTime.timeIndex() > runTime.startTimeIndex() + 1 ) { @@ -120,8 +178,8 @@ License rDeltaT.correctBoundaryConditions(); Info<< " Overall = " - << gMin(1/rDeltaT.primitiveField()) - << ", " << gMax(1/rDeltaT.primitiveField()) << endl; + << 1/gMax(rDeltaT.primitiveField()) + << ", " << 1/gMin(rDeltaT.primitiveField()) << endl; } diff --git a/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H index 8d32932607..1a1f014da0 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/EEqn.H @@ -18,7 +18,7 @@ - fvm::laplacian(turbulence->alphaEff(), he) == rho*(U&g) - + combustion->Sh() + + Qdot + coalParcels.Sh(he) + limestoneParcels.Sh(he) + radiation->Sh(thermo) diff --git a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H index 4edbce9b42..49e3f70d89 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H @@ -12,7 +12,7 @@ tmp> mvConvection { combustion->correct(); - dQ = combustion->dQ(); + Qdot = combustion->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index d3daf7265c..4e4f45e721 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -131,18 +131,18 @@ volScalarField dpdt Info<< "Creating field kinetic energy K\n" << endl; volScalarField K("K", 0.5*magSqr(U)); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H index 7e2ed6074d..c31ad040a1 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H @@ -80,7 +80,7 @@ License ( (coalParcels.hsTrans() + limestoneParcels.hsTrans()) /(mesh.V()*runTime.deltaT()) - + combustion->Sh()() + + Qdot ) /( alphaTemp diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H index 4c2d95da9d..325009f067 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H @@ -21,7 +21,7 @@ + parcels.Sh(he) + surfaceFilm.Sh() + radiation->Sh(thermo) - + combustion->Sh() + + Qdot + fvOptions(rho, he) ); diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index 555b5bc0bc..eb24899013 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -12,7 +12,7 @@ tmp> mvConvection { combustion->correct(); - dQ = combustion->dQ(); + Qdot = combustion->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 8ec3c94169..0159cdba15 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -134,18 +134,18 @@ Switch solvePrimaryRegion additionalControlsDict.lookup("solvePrimaryRegion") ); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H index 194e03c59d..2ba1ef693f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/EEqn.H @@ -20,7 +20,7 @@ rho*(U&g) + parcels.Sh(he) + radiation->Sh(thermo) - + combustion->Sh() + + Qdot + fvOptions(rho, he) ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H index db6628936c..60a27fec85 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/YEqn.H @@ -11,7 +11,7 @@ tmp> mvConvection { combustion->correct(); - dQ = combustion->dQ(); + Qdot = combustion->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index e5ed566eba..2da47d4ced 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -121,18 +121,18 @@ forAll(Y, i) } fields.add(thermo.he()); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H index 63398fb001..28bc211e05 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H @@ -79,7 +79,7 @@ License mag ( parcels.hsTrans()/(mesh.V()*runTime.deltaT()) - + combustion->Sh()() + + Qdot ) /( alphaTemp diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H index 8239d44621..9bc1254428 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/EEqn.H @@ -14,7 +14,7 @@ rho*(U&g) + parcels.Sh(he) + radiation->Sh(thermo) - + combustion->Sh() + + Qdot + fvOptions(rho, he) ); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H index 7c7cf9a4c0..1510f8e391 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H @@ -11,7 +11,7 @@ tmp> mvConvection { combustion->correct(); - dQ = combustion->dQ(); + Qdot = combustion->Qdot(); volScalarField Yt(0.0*Y[0]); forAll(Y, i) diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H index 16f297c995..328fc67224 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H @@ -103,18 +103,18 @@ forAll(Y, i) } fields.add(thermo.he()); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/sprayFoam/createFields.H b/applications/solvers/lagrangian/sprayFoam/createFields.H index 91b7bc2b6d..e2124b3685 100644 --- a/applications/solvers/lagrangian/sprayFoam/createFields.H +++ b/applications/solvers/lagrangian/sprayFoam/createFields.H @@ -117,18 +117,18 @@ forAll(Y, i) } fields.add(thermo.he()); -volScalarField dQ +volScalarField Qdot ( IOobject ( - "dQ", + "Qdot", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C index 666932b2f0..16d2d524c5 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayDyMFoam/sprayDyMFoam.C @@ -138,7 +138,7 @@ int main(int argc, char *argv[]) if (runTime.write()) { - combustion->dQ()().write(); + combustion->Qdot()().write(); } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C index 8509ecaf53..21646fed97 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/sprayEngineFoam.C @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) if (runTime.write()) { - combustion->dQ()().write(); + combustion->Qdot()().write(); } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C index 86e8371bf2..a4eaaeaad5 100644 --- a/applications/solvers/lagrangian/sprayFoam/sprayFoam.C +++ b/applications/solvers/lagrangian/sprayFoam/sprayFoam.C @@ -78,32 +78,42 @@ int main(int argc, char *argv[]) parcels.evolve(); - #include "rhoEqn.H" - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) + if (pimple.solveFlow()) { - #include "UEqn.H" - #include "YEqn.H" - #include "EEqn.H" + #include "rhoEqn.H" - // --- Pressure corrector loop - while (pimple.correct()) + // --- Pressure-velocity PIMPLE corrector loop + while (pimple.loop()) { - #include "pEqn.H" + #include "UEqn.H" + #include "YEqn.H" + #include "EEqn.H" + + // --- Pressure corrector loop + while (pimple.correct()) + { + #include "pEqn.H" + } + + if (pimple.turbCorr()) + { + turbulence->correct(); + } } - if (pimple.turbCorr()) + rho = thermo.rho(); + + if (runTime.write()) { - turbulence->correct(); + combustion->Qdot()().write(); } } - - rho = thermo.rho(); - - if (runTime.write()) + else { - combustion->dQ()().write(); + if (runTime.writeTime()) + { + parcels.write(); + } } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index b5dd4ab37a..cabb9e2ebf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -135,7 +135,7 @@ Foam::AnisothermalPhaseModel::heEqn() he ) == - this->Sh() + this->Qdot() ); // Add the appropriate pressure-work term diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C index bd4dda226f..e92cae4c9f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C @@ -65,7 +65,7 @@ Foam::InertPhaseModel::R template Foam::tmp -Foam::InertPhaseModel::Sh() const +Foam::InertPhaseModel::Qdot() const { return tmp ( @@ -73,7 +73,7 @@ Foam::InertPhaseModel::Sh() const ( IOobject ( - IOobject::groupName("Sh", this->name()), + IOobject::groupName("Qdot", this->name()), this->mesh().time().timeName(), this->mesh() ), diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H index 26c9661ab7..c152da488a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.H @@ -78,8 +78,8 @@ public: volScalarField& Yi ) const; - //- Return the reaction heat source - virtual tmp Sh() const; + //- Return the heat release rate + virtual tmp Qdot() const; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C index b15f2898b5..aef23273f2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C @@ -105,9 +105,9 @@ Foam::ReactingPhaseModel::R template Foam::tmp -Foam::ReactingPhaseModel::Sh() const +Foam::ReactingPhaseModel::Qdot() const { - return reaction_->Sh(); + return reaction_->Qdot(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H index e05c71b44a..fdda42ca09 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.H @@ -87,8 +87,8 @@ public: volScalarField& Yi ) const; - //- Return the reacton heat source - virtual tmp Sh() const; + //- Return heat release rate + virtual tmp Qdot() const; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H index 3b225202e9..f268beae62 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H @@ -7,8 +7,7 @@ volScalarField rAU1 1.0 /( U1Eqn.A() - + max(phase1.residualAlpha() - alpha1, scalar(0)) - *rho1/runTime.deltaT() + + byDt(max(phase1.residualAlpha() - alpha1, scalar(0))*rho1) ) ); volScalarField rAU2 @@ -17,8 +16,7 @@ volScalarField rAU2 1.0 /( U2Eqn.A() - + max(phase2.residualAlpha() - alpha2, scalar(0)) - *rho2/runTime.deltaT() + + byDt(max(phase2.residualAlpha() - alpha2, scalar(0))*rho2) ) ); @@ -101,8 +99,8 @@ while (pimple.correct()) rAU1 *( U1Eqn.H() - + max(phase1.residualAlpha() - alpha1, scalar(0)) - *rho1*U1.oldTime()/runTime.deltaT() + + byDt(max(phase1.residualAlpha() - alpha1, scalar(0))*rho1) + *U1.oldTime() ); volVectorField HbyA2 @@ -114,8 +112,8 @@ while (pimple.correct()) rAU2 *( U2Eqn.H() - + max(phase2.residualAlpha() - alpha2, scalar(0)) - *rho2*U2.oldTime()/runTime.deltaT() + + byDt(max(phase2.residualAlpha() - alpha2, scalar(0))*rho2) + *U2.oldTime() ); surfaceScalarField ghSnGradRho @@ -175,11 +173,9 @@ while (pimple.correct()) ( IOobject::groupName("phiHbyA", phase1.name()), fvc::flux(HbyA1) - + phiCorrCoeff1*fvc::interpolate(alpha1.oldTime()*rho1.oldTime()*rAU1) - *( - MRF.absolute(phi1.oldTime()) - - fvc::flux(U1.oldTime()) - )/runTime.deltaT() + + phiCorrCoeff1 + *fvc::interpolate(byDt(alpha1.oldTime()*rho1.oldTime()*rAU1)) + *(MRF.absolute(phi1.oldTime()) - fvc::flux(U1.oldTime())) - phiF1() - phig1 ); @@ -189,11 +185,9 @@ while (pimple.correct()) ( IOobject::groupName("phiHbyA", phase2.name()), fvc::flux(HbyA2) - + phiCorrCoeff2*fvc::interpolate(alpha2.oldTime()*rho2.oldTime()*rAU2) - *( - MRF.absolute(phi2.oldTime()) - - fvc::flux(U2.oldTime()) - )/runTime.deltaT() + + phiCorrCoeff2 + *fvc::interpolate(byDt(alpha2.oldTime()*rho2.oldTime()*rAU2)) + *(MRF.absolute(phi2.oldTime()) - fvc::flux(U2.oldTime())) - phiF2() - phig2 ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H index c7bccf66ea..557eb02678 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H @@ -1,2 +1,2 @@ -ddtPhi1 = fvc::ddt(phi1); -ddtPhi2 = fvc::ddt(phi2); +tddtPhi1 = fvc::ddt(phi1); +tddtPhi2 = fvc::ddt(phi2); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H index 14e66e47a8..b4c6de5f1a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H @@ -1,2 +1,7 @@ -surfaceScalarField ddtPhi1(fvc::ddt(phi1)); -surfaceScalarField ddtPhi2(fvc::ddt(phi2)); +tmp tddtPhi1; +tmp tddtPhi2; + +if (faceMomentum) +{ + #include "DDtU.H" +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/createRDeltaTf.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createRDeltaTf.H similarity index 100% rename from applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/createRDeltaTf.H rename to applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createRDeltaTf.H diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H index 7950d76b94..05bca24c45 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H @@ -159,7 +159,7 @@ while (pimple.correct()) (alphaRhof10 + Vmf) *byDt(MRF.absolute(phi1.oldTime())) + fvc::flux(U1Eqn.H()) - + Vmf*ddtPhi2 + + Vmf*tddtPhi2() + Kdf*MRF.absolute(phi2) - Ff1() ); @@ -177,7 +177,7 @@ while (pimple.correct()) (alphaRhof20 + Vmf) *byDt(MRF.absolute(phi2.oldTime())) + fvc::flux(U2Eqn.H()) - + Vmf*ddtPhi1 + + Vmf*tddtPhi1() + Kdf*MRF.absolute(phi1) - Ff2() ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C index f180257e9c..399a596944 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C @@ -45,6 +45,18 @@ Description namespace Foam { + tmp byDt(const volScalarField& vf) + { + if (fv::localEulerDdt::enabled(vf.mesh())) + { + return fv::localEulerDdt::localRDeltaT(vf.mesh())*vf; + } + else + { + return vf/vf.mesh().time().deltaT(); + } + } + tmp byDt(const surfaceScalarField& sf) { if (fv::localEulerDdt::enabled(sf.mesh())) @@ -92,7 +104,7 @@ int main(int argc, char *argv[]) ) ); - #include "createRDeltaTf.H" + #include "pUf/createRDeltaTf.H" #include "pUf/createDDtU.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C index 69818cf604..702464b813 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.C @@ -83,7 +83,7 @@ cosine::fLiquid 1 - cos ( constant::mathematical::pi - *(alphaLiquid1_ - alphaLiquid) + *(alphaLiquid - alphaLiquid0_) /(alphaLiquid1_ - alphaLiquid0_) ) ) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H index 17815d94a0..2983335b26 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/cosine/cosine.H @@ -32,13 +32,11 @@ Description - alphaLiquid0 0.05 \verbatim - Ioilev, A., Samigulin, M., Ustinenko, V., Kucherova, P., Tentner, - A., Lo, S., & Splawski, A. (2007). - Advances in the modeling of cladding heat transfer - and critical heat flux in boiling water reactor fuel assemblies. - In Proc. 12th International Topical Meeting on Nuclear Reactor - Thermal Hydraulics (NURETH-12), - Pittsburgh, Pennsylvania, USA. + Tentner, A., Lo, S., & Kozlov, V. (2006). + Advances in computational fluid dynamics modeling + of two-phase flow in boiling water reactor fuel assemblies. + In International Conference of Nuclear Engineering, + Miami, Florida, USA. \endverbatim SourceFiles diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H index 3e635de085..81d2550fff 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/partitioningModels/linear/linear.H @@ -31,10 +31,8 @@ Description - alphaLiquid1 0.1 - alphaLiquid0 0.05 - Reference: \verbatim - Ioilev, A., Samigulin, M., Ustinenko, V., Kucherova, P., Tentner, A., - Lo, S., & Splawski, A. (2007). + Ioilev, A., Samigulin, M., Ustinenko (2007). Advances in the modeling of cladding heat transfer and critical heat flux in boiling water reactor fuel assemblies. In Proc. 12th International Topical Meeting on diff --git a/applications/test/fileNameClean/Test-fileNameClean.C b/applications/test/fileNameClean/Test-fileNameClean.C index 99d621fea8..9441beecc8 100644 --- a/applications/test/fileNameClean/Test-fileNameClean.C +++ b/applications/test/fileNameClean/Test-fileNameClean.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-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) argList::noBanner(); argList::noParallel(); argList::validArgs.insert("fileName .. fileNameN"); - argList::addOption("istream", "fileName", "test Istream values"); + argList::addOption("istream", "file", "test Istream values"); argList args(argc, argv, false, true); diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index fbb98236c8..7d8889ed38 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -874,6 +874,12 @@ int main(int argc, char *argv[]) "factor", "geometry scaling factor - default is 1" ); + argList::addOption + ( + "2D", + "thickness", + "use when converting a 2-D mesh (applied before scale)" + ); argList::addBoolOption ( "writeSets", @@ -960,22 +966,26 @@ int main(int argc, char *argv[]) // Construct shapes from face lists cellShapeList cellShapes(nCells); - // Extrude 2-D mesh into 3-D - Info<< "dimension of grid: " << dimensionOfGrid << endl; faceList frontAndBackFaces; if (dimensionOfGrid == 2) { - const scalar extrusionFactor = 0.01; + // Extrude 2-D mesh into 3-D, in z-direction - boundBox box(max(points), min(points)); + scalar twoDThickness = 1.0; - const scalar zOffset = extrusionFactor*box.mag(); + if (!args.optionReadIfPresent("2D", twoDThickness)) + { + const scalar extrusionFactor = 0.02; //0.01 in each direction + boundBox box(points); + twoDThickness = extrusionFactor*box.mag(); + } - // two-dimensional grid. Extrude in z-direction - Info<< "Grid is 2-D. Extruding in z-direction by: " - << 2*zOffset << endl; + Info<< "Grid is 2-D. Extruding in z-direction by: " << twoDThickness + << endl; + + const scalar zOffset = twoDThickness / 2; pointField oldPoints = points; diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C index 1a24ab8623..e4b5e8b4e8 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) ( "2D", "thickness", - "use when converting a 2-D geometry" + "use when converting a 2-D mesh (applied before scale)" ); argList args(argc, argv); diff --git a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options index aa1ba3b9bb..21d9fd8131 100644 --- a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options +++ b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/Make/options @@ -29,7 +29,7 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -ldecompositionMethods \ - -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ + -L$(FOAM_LIBBIN)/dummy -lscotchDecomp -lptscotchDecomp \ -ledgeMesh \ -ltriSurface \ -ldynamicMesh \ diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options index 904dd290a9..ede07dde71 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/Make/options @@ -35,6 +35,6 @@ EXE_LIBS = \ -ltriSurface \ -ldynamicMesh \ -ldecompositionMethods \ - -L$(FOAM_LIBBIN)/dummy -lptscotchDecomp \ + -L$(FOAM_LIBBIN)/dummy -lscotchDecomp -lptscotchDecomp \ -lsampling \ -lfileFormats diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 8af787b162..e4bd6ceb23 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -710,7 +710,7 @@ int main(int argc, char *argv[]) Foam::argList::addOption ( "outFile", - "fileName", + "file", "name of the file to save the simplified surface to" ); #include "addProfilingOption.H" diff --git a/applications/utilities/mesh/manipulation/renumberMesh/Make/options b/applications/utilities/mesh/manipulation/renumberMesh/Make/options index f285297247..f073a1c414 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/Make/options +++ b/applications/utilities/mesh/manipulation/renumberMesh/Make/options @@ -17,4 +17,5 @@ EXE_LIBS = \ -lrenumberMethods \ -lreconstruct \ $(LINK_FLAGS) \ - -ldecompositionMethods -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp + -ldecompositionMethods \ + -L$(FOAM_LIBBIN)/dummy -lmetisDecomp -lscotchDecomp diff --git a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C index ce7d047f51..75e48487c1 100644 --- a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C +++ b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -396,7 +396,7 @@ int main(int argc, char *argv[]) ); if (entPtr) { - Info<< *entPtr << endl; + Info<< *entPtr; } } else if (args.optionFound("remove")) @@ -467,7 +467,11 @@ int main(int argc, char *argv[]) const tokenList& tokens = entPtr->stream(); forAll(tokens, i) { - Info<< tokens[i] << token::SPACE; + Info<< tokens[i]; + if (i < tokens.size() - 1) + { + Info<< token::SPACE; + } } Info<< endl; } @@ -478,7 +482,7 @@ int main(int argc, char *argv[]) } else { - Info<< *entPtr << endl; + Info<< *entPtr; } } } diff --git a/bin/stressComponents b/bin/stressComponents new file mode 100755 index 0000000000..d325b6f100 --- /dev/null +++ b/bin/stressComponents @@ -0,0 +1,39 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2016-2017 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 . +# +# Script +# stressComponents +# +# Description +# Script to suggest using the new "-postProcess" solver option. +# +#------------------------------------------------------------------------------ +Script=${0##*/} + +echo $Script "has been superceded by the -postProcess solver option:" +echo " -funcs '(R components(turbulenceProperties:R))'" +echo "e.g." +echo "simpleFoam -postProcess -funcs '(R components(turbulenceProperties:R))'" + +#------------------------------------------------------------------------------ diff --git a/bin/wallGradU b/bin/wallGradU new file mode 100755 index 0000000000..ec4588a9be --- /dev/null +++ b/bin/wallGradU @@ -0,0 +1,37 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2017 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 . +# +# Script +# wallGradU +# +# Description +# Script to suggest using the new "postProcess" utility. +# +#------------------------------------------------------------------------------ +Script=${0##*/} + +echo $Script "has been superceded by the postProcess utility:" +echo " postProcess -func 'grad(U)'" + +#------------------------------------------------------------------------------ diff --git a/bin/wdot b/bin/wdot new file mode 100755 index 0000000000..8e66e1cadf --- /dev/null +++ b/bin/wdot @@ -0,0 +1,37 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2017 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 . +# +# Script +# wdot +# +# Description +# Script to suggest using the new "postProcess" utility. +# +#------------------------------------------------------------------------------ +Script=${0##*/} + +echo $Script "has been superceded by the postProcess utility:" +echo "postProcess -func XiReactionRate" + +#------------------------------------------------------------------------------ diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg b/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg index fe068107c7..d6003adbe1 100644 --- a/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg +++ b/etc/caseDicts/postProcessing/forces/forceCoeffs.cfg @@ -9,6 +9,5 @@ #includeEtc "caseDicts/postProcessing/forces/forces.cfg" type forceCoeffs; -rhoInf 1; // Redundant for incompressible // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible index 429e70d6e8..00b81861a1 100644 --- a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible @@ -25,6 +25,6 @@ dragDir (1 0 0); CofR (0 0 0); pitchAxis (0 1 0); -#includeEtc "caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg" +#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible index 6e6e5bf6c3..2a8b99f561 100644 --- a/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible @@ -24,6 +24,6 @@ dragDir (1 0 0); CofR (0 0 0); pitchAxis (0 1 0); -#includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg" +#includeEtc "caseDicts/postProcessing/forces/forceCoeffsIncompressible.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible.cfg similarity index 90% rename from etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg rename to etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible.cfg index 7a14f0b994..512781c44c 100644 --- a/etc/caseDicts/postProcessing/forces/forceCoeffsCompressible.cfg +++ b/etc/caseDicts/postProcessing/forces/forceCoeffsIncompressible.cfg @@ -8,4 +8,7 @@ #includeEtc "caseDicts/postProcessing/forces/forceCoeffs.cfg" +rho rhoInf; +rhoInf 1; // Redundant, but currently read in + // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forces.cfg b/etc/caseDicts/postProcessing/forces/forces.cfg index 70ec555ff0..6094cf30de 100644 --- a/etc/caseDicts/postProcessing/forces/forces.cfg +++ b/etc/caseDicts/postProcessing/forces/forces.cfg @@ -12,7 +12,6 @@ libs ("libforces.so"); writeControl timeStep; writeInterval 1; -rho rhoInf; // Incompressible solver log off; // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesCompressible b/etc/caseDicts/postProcessing/forces/forcesCompressible index 6ee0057ace..c8b892bd69 100644 --- a/etc/caseDicts/postProcessing/forces/forcesCompressible +++ b/etc/caseDicts/postProcessing/forces/forcesCompressible @@ -16,6 +16,6 @@ patches (patch1 patch2); CofR (0 0 0); pitchAxis (0 1 0); -#includeEtc "caseDicts/postProcessing/forces/forcesCompressible.cfg" +#includeEtc "caseDicts/postProcessing/forces/forces.cfg" // ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/forces/forcesIncompressible b/etc/caseDicts/postProcessing/forces/forcesIncompressible index 92e202856b..1cf8fcb9e4 100644 --- a/etc/caseDicts/postProcessing/forces/forcesIncompressible +++ b/etc/caseDicts/postProcessing/forces/forcesIncompressible @@ -11,7 +11,7 @@ Description \*---------------------------------------------------------------------------*/ -#includeEtc "caseDicts/postProcessing/forces/forces.cfg" +#includeEtc "caseDicts/postProcessing/forces/forcesIncompressible.cfg" rhoInf 1.225; // Fluid density patches (patch1 patch2); diff --git a/etc/caseDicts/postProcessing/forces/forcesCompressible.cfg b/etc/caseDicts/postProcessing/forces/forcesIncompressible.cfg similarity index 95% rename from etc/caseDicts/postProcessing/forces/forcesCompressible.cfg rename to etc/caseDicts/postProcessing/forces/forcesIncompressible.cfg index 75043239c6..98d5b241d5 100644 --- a/etc/caseDicts/postProcessing/forces/forcesCompressible.cfg +++ b/etc/caseDicts/postProcessing/forces/forcesIncompressible.cfg @@ -8,6 +8,6 @@ #includeEtc "caseDicts/postProcessing/forces/forces.cfg" -rhoInf 1; // Redundant +rho rhoInf; // ************************************************************************* // diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C index cbca722504..73ca0d9ec4 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License @@ -93,7 +93,7 @@ Foam::interpolation2DTable::interpolation2DTable(const dictionary& dict) : List>>>(), boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))), - fileName_(dict.lookup("fileName")), + fileName_(dict.lookup("file")), reader_(tableReader::New(dict)) { readTable(); @@ -445,7 +445,7 @@ void Foam::interpolation2DTable::checkOrder() const template void Foam::interpolation2DTable::write(Ostream& os) const { - os.writeKeyword("fileName") + os.writeKeyword("file") << fileName_ << token::END_STATEMENT << nl; os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl; diff --git a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C index a0ee169188..32e76884b6 100644 --- a/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C +++ b/src/OpenFOAM/interpolations/interpolationLookUpTable/interpolationLookUpTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -284,7 +284,7 @@ Foam::interpolationLookUpTable::interpolationLookUpTable ) : List(), - fileName_(fileName(dict.lookup("fileName")).expand()), + fileName_(fileName(dict.lookup("file")).expand()), dim_(0), min_(0.0), delta_(0.0), diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C index 8f09b560ac..6d71af1403 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C +++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -97,7 +97,7 @@ Foam::interpolationTable::interpolationTable(const dictionary& dict) : List>(), boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))), - fileName_(dict.lookup("fileName")), + fileName_(dict.lookup("file")), reader_(tableReader::New(dict)) { readTable(); @@ -229,7 +229,7 @@ void Foam::interpolationTable::check() const template void Foam::interpolationTable::write(Ostream& os) const { - os.writeKeyword("fileName") + os.writeKeyword("file") << fileName_ << token::END_STATEMENT << nl; os.writeKeyword("outOfBounds") << boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl; diff --git a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C index b82b4d3010..259b60f261 100644 --- a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C +++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C @@ -2,8 +2,8 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -215,7 +215,7 @@ Foam::Function1Types::CSV::CSV componentColumns_(coeffs_.lookup("componentColumns")), separator_(coeffs_.lookupOrDefault("separator", string(","))[0]), mergeSeparators_(readBool(coeffs_.lookup("mergeSeparators"))), - fName_(fName != fileName::null ? fName : coeffs_.lookup("fileName")) + fName_(fName != fileName::null ? fName : coeffs_.lookup("file")) { if (componentColumns_.size() != pTraits::nComponents) { @@ -273,7 +273,7 @@ void Foam::Function1Types::CSV::writeData(Ostream& os) const TableBase::writeEntries(os); os.writeEntry("nHeaderLine", nHeaderLine_); - os.writeEntry("refColumn", refColumn_); + os.writeEntry("refColumn", refColumn_); // Force writing labelList in ascii const enum IOstream::streamFormat fmt = os.format(); @@ -281,9 +281,9 @@ void Foam::Function1Types::CSV::writeData(Ostream& os) const os.writeEntry("componentColumns", componentColumns_); os.format(fmt); - os.writeEntry("separator", string(separator_)); + os.writeEntry("separator", string(separator_)); os.writeEntry("mergeSeparators", mergeSeparators_); - os.writeEntry("fileName", fName_); + os.writeEntry("file", fName_); os.endBlock() << flush; } diff --git a/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C index 3682836999..56982731e3 100644 --- a/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C +++ b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C @@ -2,8 +2,8 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,7 +38,7 @@ Foam::Function1Types::TableFile::TableFile fName_("none") { const dictionary coeffs(dict.subDict(entryName + "Coeffs")); - coeffs.lookup("fileName") >> fName_; + coeffs.lookup("file") >> fName_; fileName expandedFile(fName_); IFstream is(expandedFile.expand()); @@ -86,7 +86,7 @@ void Foam::Function1Types::TableFile::writeData(Ostream& os) const // the values themselves TableBase::writeEntries(os); - os.writeEntry("fileName", fName_); + os.writeEntry("file", fName_); os.endBlock() << flush; } diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H index 2d8f11d3af..7ba6f797c9 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H @@ -27,17 +27,19 @@ Class Description Polynomial templated on size (order): - poly = sum(coeff_[i]*x^i) logCoeff*log(x) + \verbatim + poly = sum(coeffs[i]*x^i) + logCoeff*log(x) + \endverbatim - where 0 \<= i \<= N + where 0 <= i <= N - integer powers, starting at zero - - value(x) to evaluate the poly for a given value - - derivative(x) returns derivative at value - - integral(x1, x2) returns integral between two scalar values - - integral() to return a new, integral coeff polynomial + - \c value(x) to evaluate the poly for a given value + - \c derivative(x) returns derivative at value + - \c integral(x1, x2) returns integral between two scalar values + - \c integral() to return a new, integral coeff polynomial - increases the size (order) - - integralMinus1() to return a new, integral coeff polynomial where + - \c integralMinus1() to return a new, integral coeff polynomial where the base poly starts at order -1 SourceFiles diff --git a/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H b/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H index 1fe767582d..500469d94f 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H @@ -27,16 +27,18 @@ Class Description Polynomial function representation - poly = logCoeff*log(x) + sum(coeff_[i]*x^i) + \verbatim + poly = logCoeff*log(x) + sum(coeffs[i]*x^i) + \endverbatim - where 0 \<= i \<= N + where 0 <= i <= N - integer powers, starting at zero - - value(x) to evaluate the poly for a given value - - integrate(x1, x2) between two scalar values - - integral() to return a new, integral coeff polynomial + - \c value(x) to evaluate the poly for a given value + - \c integrate(x1, x2) between two scalar values + - \c integral() to return a new, integral coeff polynomial - increases the size (order) - - integralMinus1() to return a new, integral coeff polynomial where + - \c integralMinus1() to return a new, integral coeff polynomial where the base poly starts at order -1 See also diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 5fd8fdf104..fa3b7feaed 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -116,29 +116,14 @@ Foam::combustionModels::PaSR::R(volScalarField& Y) const template Foam::tmp -Foam::combustionModels::PaSR::dQ() const +Foam::combustionModels::PaSR::Qdot() const { return tmp ( new volScalarField ( IOobject::groupName("PaSR:dQ", this->phaseName_), - kappa_*laminar::dQ() - ) - ); -} - - -template -Foam::tmp -Foam::combustionModels::PaSR::Sh() const -{ - return tmp - ( - new volScalarField - ( - IOobject::groupName("PaSR:Sh", this->phaseName_), - kappa_*laminar::Sh() + kappa_*laminar::Qdot() ) ); } diff --git a/src/combustionModels/PaSR/PaSR.H b/src/combustionModels/PaSR/PaSR.H index 085d7245ee..3189e46ceb 100644 --- a/src/combustionModels/PaSR/PaSR.H +++ b/src/combustionModels/PaSR/PaSR.H @@ -110,11 +110,8 @@ public: //- Fuel consumption rate matrix. virtual tmp R(volScalarField& Y) const; - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; + //- Heat release rate [kg/m/s3] + virtual tmp Qdot() const; //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/combustionModel/combustionModel.C b/src/combustionModels/combustionModel/combustionModel.C index b27a5f2320..3094e4bdff 100644 --- a/src/combustionModels/combustionModel/combustionModel.C +++ b/src/combustionModels/combustionModel/combustionModel.C @@ -81,7 +81,6 @@ Foam::combustionModel::~combustionModel() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - bool Foam::combustionModel::read() { if (regIOobject::read()) @@ -97,25 +96,4 @@ bool Foam::combustionModel::read() } -Foam::tmp Foam::combustionModel::Sh() const -{ - return tmp - ( - new volScalarField - ( - IOobject - ( - IOobject::groupName("Sh", phaseName_), - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) - ) - ); -} - - // ************************************************************************* // diff --git a/src/combustionModels/combustionModel/combustionModel.H b/src/combustionModels/combustionModel/combustionModel.H index d428e27a78..bfb46167b1 100644 --- a/src/combustionModels/combustionModel/combustionModel.H +++ b/src/combustionModels/combustionModel/combustionModel.H @@ -140,11 +140,8 @@ public: //- Fuel consumption rate matrix, i.e. source term for fuel equation virtual tmp R(volScalarField& Y) const = 0; - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const = 0; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; + //- Heat release rate [kg/m/s3] + virtual tmp Qdot() const = 0; //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index dcf9c6450c..679a086780 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -136,15 +136,15 @@ Foam::combustionModels::laminar::R(volScalarField& Y) const template Foam::tmp -Foam::combustionModels::laminar::dQ() const +Foam::combustionModels::laminar::Qdot() const { - tmp tdQ + tmp tQdot ( new volScalarField ( IOobject ( - IOobject::groupName(typeName + ":dQ", this->phaseName_), + IOobject::groupName(typeName + ":Qdot", this->phaseName_), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -152,47 +152,16 @@ Foam::combustionModels::laminar::dQ() const false ), this->mesh(), - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ) ); if (this->active()) { - tdQ.ref() = this->chemistryPtr_->dQ(); + tQdot.ref() = this->chemistryPtr_->Qdot(); } - return tdQ; -} - - -template -Foam::tmp -Foam::combustionModels::laminar::Sh() const -{ - tmp tSh - ( - new volScalarField - ( - IOobject - ( - IOobject::groupName(typeName + ":Sh", this->phaseName_), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) - ) - ); - - if (this->active()) - { - tSh.ref() = this->chemistryPtr_->Sh(); - } - - return tSh; + return tQdot; } diff --git a/src/combustionModels/laminar/laminar.H b/src/combustionModels/laminar/laminar.H index 7c882c8bbb..073cd101e5 100644 --- a/src/combustionModels/laminar/laminar.H +++ b/src/combustionModels/laminar/laminar.H @@ -108,11 +108,8 @@ public: //- Fuel consumption rate matrix. virtual tmp R(volScalarField& Y) const; - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; + //- Heat release rate [kg/m/s3] + virtual tmp Qdot() const; //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C index 7caeac0fe4..190459f5ae 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/combustionModels/noCombustion/noCombustion.C @@ -75,15 +75,15 @@ Foam::combustionModels::noCombustion::R template Foam::tmp -Foam::combustionModels::noCombustion::dQ() const +Foam::combustionModels::noCombustion::Qdot() const { - tmp tdQ + tmp tQdot ( new volScalarField ( IOobject ( - IOobject::groupName("dQ", this->phaseName_), + IOobject::groupName("Qdot", this->phaseName_), this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, @@ -91,37 +91,11 @@ Foam::combustionModels::noCombustion::dQ() const false ), this->mesh(), - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) + dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) ) ); - return tdQ; -} - - -template -Foam::tmp -Foam::combustionModels::noCombustion::Sh() const -{ - tmp tSh - ( - new volScalarField - ( - IOobject - ( - IOobject::groupName("Sh", this->phaseName_), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) - ) - ); - - return tSh; + return tQdot; } diff --git a/src/combustionModels/noCombustion/noCombustion.H b/src/combustionModels/noCombustion/noCombustion.H index 74711d613c..0438c62121 100644 --- a/src/combustionModels/noCombustion/noCombustion.H +++ b/src/combustionModels/noCombustion/noCombustion.H @@ -92,11 +92,8 @@ public: //- Fuel consumption rate matrix virtual tmp R(volScalarField& Y) const; - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; + //- Heat release rate [kg/m/s3] + virtual tmp Qdot() const; //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index c2a243747b..668a3c0726 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -127,7 +127,7 @@ tmp singleStepCombustion::R template tmp -singleStepCombustion::Sh() const +singleStepCombustion::Qdot() const { const label fuelI = singleMixturePtr_->fuelIndex(); volScalarField& YFuel = @@ -137,37 +137,6 @@ singleStepCombustion::Sh() const } -template -tmp -singleStepCombustion::dQ() const -{ - tmp tdQ - ( - new volScalarField - ( - IOobject - ( - IOobject::groupName("dQ", this->phaseName_), - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0) - ) - ); - - if (this->active()) - { - volScalarField& dQ = tdQ.ref(); - dQ.ref() = this->mesh().V()*Sh()(); - } - return tdQ; -} - - template bool singleStepCombustion::read() { diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.H b/src/combustionModels/singleStepCombustion/singleStepCombustion.H index bb31657cf8..b7c5cb5c56 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.H +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.H @@ -102,11 +102,8 @@ public: //- Fuel consumption rate matrix virtual tmp R(volScalarField& Y) const; - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Sensible enthalpy source term - virtual tmp Sh() const; + //- Heat release rate [kg/m/s3] + virtual tmp Qdot() const; //- Update properties from given dictionary virtual bool read(); diff --git a/src/combustionModels/zoneCombustion/zoneCombustion.C b/src/combustionModels/zoneCombustion/zoneCombustion.C index 3cec4e1197..3284c2aca5 100644 --- a/src/combustionModels/zoneCombustion/zoneCombustion.C +++ b/src/combustionModels/zoneCombustion/zoneCombustion.C @@ -165,17 +165,9 @@ Foam::combustionModels::zoneCombustion::R(volScalarField& Y) const template Foam::tmp -Foam::combustionModels::zoneCombustion::dQ() const +Foam::combustionModels::zoneCombustion::Qdot() const { - return filter(combustionModelPtr_->dQ()); -} - - -template -Foam::tmp -Foam::combustionModels::zoneCombustion::Sh() const -{ - return filter(combustionModelPtr_->Sh()); + return filter(combustionModelPtr_->Qdot()); } diff --git a/src/combustionModels/zoneCombustion/zoneCombustion.H b/src/combustionModels/zoneCombustion/zoneCombustion.H index ca014f98dd..351b40cab0 100644 --- a/src/combustionModels/zoneCombustion/zoneCombustion.H +++ b/src/combustionModels/zoneCombustion/zoneCombustion.H @@ -114,11 +114,8 @@ public: //- Fuel consumption rate matrix. virtual tmp R(volScalarField& Y) const; - //- Heat release rate calculated from fuel consumption rate matrix - virtual tmp dQ() const; - - //- Return source for enthalpy equation [kg/m/s3] - virtual tmp Sh() const; + //- Heat release rate [kg/m/s3] + virtual tmp Qdot() const; //- Update properties from given dictionary virtual bool read(); diff --git a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C index 2622f94867..e500ab7587 100644 --- a/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C +++ b/src/finiteVolume/cfdTools/general/solutionControl/pimpleControl/pimpleControl.C @@ -40,8 +40,9 @@ void Foam::pimpleControl::read() { solutionControl::read(false); - // Read solution controls const dictionary& pimpleDict = dict(); + + solveFlow_ = pimpleDict.lookupOrDefault("solveFlow", true); nCorrPIMPLE_ = pimpleDict.lookupOrDefault