diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index d929b14128..b25fd944c5 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -15,15 +15,15 @@ } label nSpecie = Y.size(); - PtrList specieData(Y.size()); + PtrList specieData(Y.size()); forAll(specieData, i) { specieData.set ( i, - new gasThermoPhysics + new gasHThermoPhysics ( - dynamic_cast&> + dynamic_cast&> (thermo).speciesData()[i] ) ); diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H index c6096d743d..7d843b62e0 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H @@ -5,11 +5,10 @@ rho.relax(); volScalarField rAU(1.0/UEqn().A()); volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); - volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); -if (pimple.nCorrPIMPLE() <= 1) +if (pimple.nCorrPISO() <= 1) { UEqn.clear(); } @@ -26,6 +25,8 @@ if (pimple.transonic()) ) ); + fvOptions.relativeFlux(fvc::interpolate(psi), phid); + surfaceScalarField phic ( "phic", @@ -48,12 +49,9 @@ if (pimple.transonic()) fvOptions(psi, p, rho.name()) ); - // Relax the pressure equation to maintain diagonal dominance - pEqn.relax(); - fvOptions.constrain(pEqn); - pEqn.solve(); + pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); if (pimple.finalNonOrthogonalIter()) { @@ -73,6 +71,8 @@ else ) ); + fvOptions.relativeFlux(fvc::interpolate(rho), phiHbyA); + phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf(); HbyA -= (rAU - rAtU)*fvc::grad(p); @@ -91,7 +91,7 @@ else fvOptions.constrain(pEqn); - pEqn.solve(); + pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter()))); if (pimple.finalNonOrthogonalIter()) { diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index 61917fcefd..0f5bbdb162 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -1,9 +1,4 @@ { - rho = thermo.rho(); - rho = max(rho, rhoMin); - rho = min(rho, rhoMax); - rho.relax(); - volScalarField rAU(1.0/UEqn().A()); volVectorField HbyA("HbyA", U); HbyA = rAU*UEqn().H(); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H index 57ce92a0cd..2d9a8f40d4 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/pEqn.H @@ -1,9 +1,4 @@ { - rho = thermo.rho(); - rho = max(rho, rhoMin); - rho = min(rho, rhoMax); - rho.relax(); - const volScalarField& psi = thermo.psi(); volVectorField HbyA("HbyA", U); diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H index 4ea15b9446..353593b7f4 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H @@ -1,8 +1,3 @@ -rho = thermo.rho(); -rho = max(rho, rhoMin); -rho = min(rho, rhoMax); -rho.relax(); - volScalarField rAU(1.0/UEqn().A()); volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options index cadaf0850d..365e64d1b1 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options @@ -4,11 +4,13 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ - -lincompressibleTransportModels + -lincompressibleTransportModels \ + -lradiationModels diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H index dbfc61739f..708d968d6c 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H @@ -9,10 +9,14 @@ fvm::ddt(T) + fvm::div(phi, T) - fvm::laplacian(kappaEff, T) + == + radiation->ST(rhoCpRef, T) ); TEqn.relax(); TEqn.solve(); + radiation->correct(); + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 126e10b337..65dda0653e 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -49,6 +49,7 @@ Description #include "singlePhaseTransportModel.H" #include "RASModel.H" #include "pimpleControl.H" +#include "radiationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,6 +60,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" + #include "createIncompressibleRadiationModel.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "CourantNo.H" diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H index ee2a95f208..b6cf96b5b0 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/EEqn.H @@ -17,7 +17,8 @@ ) - fvm::laplacian(turbulence->alphaEff(), he) == - fvOptions(rho, he) + radiation->Sh(thermo) + + fvOptions(rho, he) ); EEqn.relax(); @@ -29,4 +30,5 @@ fvOptions.correct(he); thermo.correct(); + radiation->correct(); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options index 688b9364b6..7cd8f48ee4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options @@ -1,4 +1,4 @@ -EXE_INC = -g \ +EXE_INC = \ -IphaseModel/lnInclude \ -ImultiphaseSystem/lnInclude \ -ImultiphaseFixedFluxPressure \ diff --git a/applications/utilities/miscellaneous/foamHelp/Allwclean b/applications/utilities/miscellaneous/foamHelp/Allwclean new file mode 100755 index 0000000000..9dca480e2e --- /dev/null +++ b/applications/utilities/miscellaneous/foamHelp/Allwclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +wclean libso helpTypes +wclean + + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C index acf9a72d24..ac9c639c49 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,38 +176,32 @@ Foam::doxygenXmlParser::doxygenXmlParser // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const +void Foam::doxygenXmlParser::skipBlock +( + IFstream& is, + const word& blockName +) const { // recurse to move forward in 'is' until come across - string closeName = ""; - // fast-forward until we reach a '<' char c; - while (is.get(c) && c != '<') - {} - - // check to see if this is a closing block - if (is.get(c) && c == '/') + while (is.good() && (closeName != blockName)) { - while (is.get(c) && c != '>') - { - closeName += c; - } + // fast-forward until we reach a '<' + while (is.get(c) && c != '<') + {} - if (closeName == blockName) + // check to see if this is a closing block + if (is.get(c) && c == '/') { - // finished reading block - return; + closeName = ""; + + while (is.get(c) && c != '>') + { + closeName += c; + } } - else - { - skipBlock(is, blockName); - } - } - else - { - skipBlock(is, blockName); } } @@ -215,7 +209,7 @@ void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const void Foam::doxygenXmlParser::skipForward ( IFstream& is, - const word blockName + const word& blockName ) const { // recurse to move forward in 'is' until come across diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H index f2abdaee8d..9853589fa3 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,8 +25,10 @@ Class Foam::doxygenXmlParser Description + Parser for doxygen XML SourceFiles + doxygenXmlParser.C \*---------------------------------------------------------------------------*/ @@ -65,10 +67,10 @@ public: // Member functions //- Skip past a block - void skipBlock(IFstream& is, const word blockName) const; + void skipBlock(IFstream& is, const word& blockName) const; //- Skip forward to block - void skipForward(IFstream& is, const word blockName) const; + void skipForward(IFstream& is, const word& blockName) const; //- Return the entry template diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C index 0b982e76a7..29ad9ddbde 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -148,7 +148,12 @@ void Foam::helpType::displayDoc { FatalErrorIn ( - "void Foam::helpType::displayDoc(const word, const string)" + "void Foam::helpType::displayDoc" + "(" + "const word&, " + "const string&, " + "const bool" + ")" ) << "No help for type " << className << " found." << " Valid options include:" << SortableList(parser.toc()) diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 09b169821d..c774d5012c 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,6 +43,24 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +bool haveAllTimes +( + const HashSet& masterTimeDirSet, + const instantList& timeDirs +) +{ + // Loop over all times + forAll(timeDirs, timeI) + { + if (!masterTimeDirSet.found(timeDirs[timeI].name())) + { + return false; + } + } + return true; +} + + int main(int argc, char *argv[]) { argList::addNote @@ -54,7 +72,7 @@ int main(int argc, char *argv[]) // enable -zeroTime to prevent accidentally trashing the initial fields timeSelector::addOptions(true, true); argList::noParallel(); -# include "addRegionOption.H" + #include "addRegionOption.H" argList::addBoolOption ( "allRegions", @@ -86,8 +104,8 @@ int main(int argc, char *argv[]) "only reconstruct new times (i.e. that do not exist already)" ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" HashSet selectedFields; if (args.optionFound("fields")) @@ -169,6 +187,11 @@ int main(int argc, char *argv[]) { masterTimeDirs = runTime.times(); } + HashSet masterTimeDirSet(2*masterTimeDirs.size()); + forAll(masterTimeDirs, i) + { + masterTimeDirSet.insert(masterTimeDirs[i].name()); + } // Set all times on processor meshes equal to reconstructed mesh @@ -222,6 +245,21 @@ int main(int argc, char *argv[]) Info<< "\n\nReconstructing fields for mesh " << regionName << nl << endl; + if + ( + newTimes + && regionNames.size() == 1 + && regionDirs[0].empty() + && haveAllTimes(masterTimeDirSet, timeDirs) + ) + { + Info<< "Skipping region " << regionName + << " since already have all times" + << endl << endl; + continue; + } + + fvMesh mesh ( IOobject @@ -240,29 +278,16 @@ int main(int argc, char *argv[]) // check face addressing for meshes that have been decomposed // with a very old foam version -# include "checkFaceAddressingComp.H" + #include "checkFaceAddressingComp.H" // Loop over all times forAll(timeDirs, timeI) { - if (newTimes) + if (newTimes && masterTimeDirSet.found(timeDirs[timeI].name())) { - // Compare on timeName, not value - bool foundTime = false; - forAll(masterTimeDirs, i) - { - if (masterTimeDirs[i].name() == timeDirs[timeI].name()) - { - foundTime = true; - break; - } - } - if (foundTime) - { - Info<< "Skipping time " << timeDirs[timeI].name() - << endl << endl; - continue; - } + Info<< "Skipping time " << timeDirs[timeI].name() + << endl << endl; + continue; } diff --git a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C index 4dce3b2028..26a6a45f57 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.C +++ b/src/OpenFOAM/db/dictionary/dictionaryEntry/dictionaryEntry.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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,6 +64,7 @@ Foam::label Foam::dictionaryEntry::startLineNumber() const } } + Foam::label Foam::dictionaryEntry::endLineNumber() const { if (size()) diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.C b/src/OpenFOAM/dimensionSet/dimensionSet.C index eb13cdf60b..1c7275b166 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.C +++ b/src/OpenFOAM/dimensionSet/dimensionSet.C @@ -430,6 +430,20 @@ Foam::dimensionSet Foam::trans(const dimensionSet& ds) } +Foam::dimensionSet Foam::atan2(const dimensionSet& ds1, const dimensionSet& ds2) +{ + if (dimensionSet::debug && ds1 != ds2) + { + FatalErrorIn("atan2(const dimensionSet&, const dimensionSet&)") + << "Arguments of atan2 have different dimensions" << endl + << " dimensions : " << ds1 << " and " << ds2 << endl + << abort(FatalError); + } + + return dimless; +} + + Foam::dimensionSet Foam::transform(const dimensionSet& ds) { return ds; diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.H b/src/OpenFOAM/dimensionSet/dimensionSet.H index 7a6faf95c4..1b03e9e27d 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.H +++ b/src/OpenFOAM/dimensionSet/dimensionSet.H @@ -354,6 +354,8 @@ public: // for transcendental functions friend dimensionSet trans(const dimensionSet&); + friend dimensionSet atan2(const dimensionSet&, const dimensionSet&); + //- Return the argument; transformations do not change the dimensions friend dimensionSet transform(const dimensionSet&); diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C index b5aea0e571..895dee69e1 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C @@ -277,6 +277,21 @@ transFunc(yn) #undef transFunc +dimensionedScalar atan2 +( + const dimensionedScalar& x, + const dimensionedScalar& y +) +{ + return dimensionedScalar + ( + "atan2(" + x.name() + ',' + y.name() + ')', + atan2(x.dimensions(), y.dimensions()), + ::atan2(x.value(), y.value()) + ); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H index bf57a98eb9..97522bab8c 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.H @@ -79,6 +79,7 @@ dimensionedScalar tan(const dimensionedScalar&); dimensionedScalar asin(const dimensionedScalar&); dimensionedScalar acos(const dimensionedScalar&); dimensionedScalar atan(const dimensionedScalar&); +dimensionedScalar atan2(const dimensionedScalar&, const dimensionedScalar&); dimensionedScalar sinh(const dimensionedScalar&); dimensionedScalar cosh(const dimensionedScalar&); dimensionedScalar tanh(const dimensionedScalar&); diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C index a4296ff91b..eedd2ac9bd 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C @@ -369,6 +369,263 @@ tmp > pow return pow(dimensionedScalar(s), tdsf); } + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template +tmp > atan2 +( + const DimensionedField& dsf1, + const DimensionedField& dsf2 +) +{ + tmp > tAtan2 + ( + new DimensionedField + ( + IOobject + ( + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + dsf1.instance(), + dsf1.db() + ), + dsf1.mesh(), + atan2(dsf1.dimensions(), dsf2.dimensions()) + ) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + return tAtan2; +} + + +template +tmp > atan2 +( + const tmp >& tdsf1, + const DimensionedField& dsf2 +) +{ + const DimensionedField& dsf1 = tdsf1(); + + tmp > tAtan2 = + reuseTmpDimensionedField::New + ( + tdsf1, + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + atan2(dsf1.dimensions(), dsf2.dimensions()) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + reuseTmpDimensionedField::clear(tdsf1); + + return tAtan2; +} + + +template +tmp > atan2 +( + const DimensionedField& dsf1, + const tmp >& tdsf2 +) +{ + const DimensionedField& dsf2 = tdsf2(); + + tmp > tAtan2 = + reuseTmpDimensionedField::New + ( + tdsf2, + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + atan2(dsf1.dimensions(), dsf2.dimensions()) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + reuseTmpDimensionedField::clear(tdsf2); + + return tAtan2; +} + +template +tmp > atan2 +( + const tmp >& tdsf1, + const tmp >& tdsf2 +) +{ + const DimensionedField& dsf1 = tdsf1(); + const DimensionedField& dsf2 = tdsf2(); + + tmp > tAtan2 = + reuseTmpTmpDimensionedField:: + New + ( + tdsf1, + tdsf2, + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + atan2(dsf1.dimensions(), dsf2.dimensions()) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + reuseTmpTmpDimensionedField::clear + ( + tdsf1, + tdsf2 + ); + + return tAtan2; +} + + +template +tmp > atan2 +( + const DimensionedField& dsf, + const dimensionedScalar& ds +) +{ + tmp > tAtan2 + ( + new DimensionedField + ( + IOobject + ( + "atan2(" + dsf.name() + ',' + ds.name() + ')', + dsf.instance(), + dsf.db() + ), + dsf.mesh(), + atan2(dsf.dimensions(), ds) + ) + ); + + atan2(tAtan2().field(), dsf.field(), ds.value()); + + return tAtan2; +} + +template +tmp > atan2 +( + const tmp >& tdsf, + const dimensionedScalar& ds +) +{ + const DimensionedField& dsf = tdsf(); + + tmp > tAtan2 = + reuseTmpDimensionedField::New + ( + tdsf, + "atan2(" + dsf.name() + ',' + ds.name() + ')', + atan2(dsf.dimensions(), ds) + ); + + atan2(tAtan2().field(), dsf.field(), ds.value()); + + reuseTmpDimensionedField::clear(tdsf); + + return tAtan2; +} + +template +tmp > atan2 +( + const DimensionedField& dsf, + const scalar& s +) +{ + return atan2(dsf, dimensionedScalar(s)); +} + +template +tmp > atan2 +( + const tmp >& tdsf, + const scalar& s +) +{ + return atan2(tdsf, dimensionedScalar(s)); +} + + +template +tmp > atan2 +( + const dimensionedScalar& ds, + const DimensionedField& dsf +) +{ + tmp > tAtan2 + ( + new DimensionedField + ( + IOobject + ( + "atan2(" + ds.name() + ',' + dsf.name() + ')', + dsf.instance(), + dsf.db() + ), + dsf.mesh(), + atan2(ds, dsf.dimensions()) + ) + ); + + atan2(tAtan2().field(), ds.value(), dsf.field()); + + return tAtan2; +} + + +template +tmp > atan2 +( + const dimensionedScalar& ds, + const tmp >& tdsf +) +{ + const DimensionedField& dsf = tdsf(); + + tmp > tAtan2 = + reuseTmpDimensionedField::New + ( + tdsf, + "atan2(" + ds.name() + ',' + dsf.name() + ')', + atan2(ds, dsf.dimensions()) + ); + + atan2(tAtan2().field(), ds.value(), dsf.field()); + + reuseTmpDimensionedField::clear(tdsf); + + return tAtan2; +} + +template +tmp > atan2 +( + const scalar& s, + const DimensionedField& dsf +) +{ + return atan2(dimensionedScalar(s), dsf); +} + +template +tmp > atan2 +( + const scalar& s, + const tmp >& tdsf +) +{ + return atan2(dimensionedScalar(s), tdsf); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // UNARY_FUNCTION(scalar, scalar, pow3, pow3) diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H index b6e76631e0..1503c2567b 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.H @@ -76,6 +76,9 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide) BINARY_FUNCTION(scalar, scalar, scalar, pow) BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow) +BINARY_FUNCTION(scalar, scalar, scalar, atan2) +BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2) + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C index ce78313efb..4c7ee46b89 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.C @@ -115,6 +115,7 @@ BINARY_OPERATOR(scalar, scalar, scalar, /, '|', divide) BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide) + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template class PatchField, class GeoMesh> @@ -440,6 +441,315 @@ tmp > pow } +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template class PatchField, class GeoMesh> +void atan2 +( + GeometricField& Atan2, + const GeometricField& gsf1, + const GeometricField& gsf2 +) +{ + atan2(Atan2.internalField(), gsf1.internalField(), gsf2.internalField()); + atan2(Atan2.boundaryField(), gsf1.boundaryField(), gsf2.boundaryField()); +} + + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const GeometricField& gsf1, + const GeometricField& gsf2 +) +{ + tmp > tAtan2 + ( + new GeometricField + ( + IOobject + ( + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + gsf1.instance(), + gsf1.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + gsf1.mesh(), + atan2(gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + return tAtan2; +} + + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const tmp >& tgsf1, + const GeometricField& gsf2 +) +{ + const GeometricField& gsf1 = tgsf1(); + + tmp > tAtan2 + ( + reuseTmpGeometricField::New + ( + tgsf1, + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + atan2(gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + reuseTmpGeometricField::clear(tgsf1); + + return tAtan2; +} + + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const GeometricField& gsf1, + const tmp >& tgsf2 +) +{ + const GeometricField& gsf2 = tgsf2(); + + tmp > tAtan2 + ( + reuseTmpGeometricField::New + ( + tgsf2, + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + atan2( gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + reuseTmpGeometricField::clear(tgsf2); + + return tAtan2; +} + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const tmp >& tgsf1, + const tmp >& tgsf2 +) +{ + const GeometricField& gsf1 = tgsf1(); + const GeometricField& gsf2 = tgsf2(); + + tmp > tAtan2 + ( + reuseTmpTmpGeometricField + ::New + ( + tgsf1, + tgsf2, + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + atan2(gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + reuseTmpTmpGeometricField + + ::clear(tgsf1, tgsf2); + + return tAtan2; +} + + +template class PatchField, class GeoMesh> +void atan2 +( + GeometricField& tAtan2, + const GeometricField& gsf, + const dimensioned& ds +) +{ + atan2(tAtan2.internalField(), gsf.internalField(), ds.value()); + atan2(tAtan2.boundaryField(), gsf.boundaryField(), ds.value()); +} + + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const GeometricField& gsf, + const dimensionedScalar& ds +) +{ + tmp > tAtan2 + ( + new GeometricField + ( + IOobject + ( + "atan2(" + gsf.name() + ',' + ds.name() + ')', + gsf.instance(), + gsf.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + gsf.mesh(), + atan2(gsf.dimensions(), ds) + ) + ); + + atan2(tAtan2(), gsf, ds); + + return tAtan2; +} + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const tmp >& tgsf, + const dimensionedScalar& ds +) +{ + const GeometricField& gsf = tgsf(); + + tmp > tAtan2 + ( + reuseTmpGeometricField::New + ( + tgsf, + "atan2(" + gsf.name() + ',' + ds.name() + ')', + atan2(gsf.dimensions(), ds) + ) + ); + + atan2(tAtan2(), gsf, ds); + + reuseTmpGeometricField::clear(tgsf); + + return tAtan2; +} + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const GeometricField& gsf, + const scalar& s +) +{ + return atan2(gsf, dimensionedScalar(s)); +} + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const tmp >& tgsf, + const scalar& s +) +{ + return atan2(tgsf, dimensionedScalar(s)); +} + + +template class PatchField, class GeoMesh> +void atan2 +( + GeometricField& tAtan2, + const dimensioned& ds, + const GeometricField& gsf +) +{ + atan2(tAtan2.internalField(), ds.value(), gsf.internalField()); + atan2(tAtan2.boundaryField(), ds.value(), gsf.boundaryField()); +} + + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const dimensionedScalar& ds, + const GeometricField& gsf +) +{ + tmp > tAtan2 + ( + new GeometricField + ( + IOobject + ( + "atan2(" + ds.name() + ',' + gsf.name() + ')', + gsf.instance(), + gsf.db(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + gsf.mesh(), + atan2(ds, gsf.dimensions()) + ) + ); + + atan2(tAtan2(), ds, gsf); + + return tAtan2; +} + + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const dimensionedScalar& ds, + const tmp >& tgsf +) +{ + const GeometricField& gsf = tgsf(); + + tmp > tAtan2 + ( + reuseTmpGeometricField::New + ( + tgsf, + "atan2(" + ds.name() + ',' + gsf.name() + ')', + atan2(ds, gsf.dimensions()) + ) + ); + + atan2(tAtan2(), ds, gsf); + + reuseTmpGeometricField::clear(tgsf); + + return tAtan2; +} + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const scalar& s, + const GeometricField& gsf +) +{ + return atan2(dimensionedScalar(s), gsf); +} + +template class PatchField, class GeoMesh> +tmp > atan2 +( + const scalar& s, + const tmp >& tgsf +) +{ + return atan2(dimensionedScalar(s), tgsf); +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // UNARY_FUNCTION(scalar, scalar, pow3, pow3) diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H index fd20e171c9..9c41fb1fec 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricScalarField/GeometricScalarField.H @@ -84,6 +84,9 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide) BINARY_FUNCTION(scalar, scalar, scalar, pow) BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow) +BINARY_FUNCTION(scalar, scalar, scalar, atan2) +BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2) + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/FSD/FSDs.C b/src/combustionModels/FSD/FSDs.C index 4ee6d7bb36..aed10a40a1 100644 --- a/src/combustionModels/FSD/FSDs.C +++ b/src/combustionModels/FSD/FSDs.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) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,11 +38,12 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy makeCombustionTypesThermo ( FSD, psiThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, psiCombustionModel ); @@ -50,7 +51,7 @@ namespace combustionModels ( FSD, psiThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, psiCombustionModel ); @@ -58,7 +59,7 @@ namespace combustionModels ( FSD, rhoThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, rhoCombustionModel ); @@ -66,7 +67,40 @@ namespace combustionModels ( FSD, rhoThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + makeCombustionTypesThermo + ( + FSD, + psiThermoCombustion, + gasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + FSD, + psiThermoCombustion, + constGasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + FSD, + rhoThermoCombustion, + gasEThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + FSD, + rhoThermoCombustion, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/combustionModels/diffusion/diffusions.C b/src/combustionModels/diffusion/diffusions.C index 73c201f0fc..0376a91bf9 100644 --- a/src/combustionModels/diffusion/diffusions.C +++ b/src/combustionModels/diffusion/diffusions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,11 +36,12 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy makeCombustionTypesThermo ( diffusion, psiThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, psiCombustionModel ); @@ -48,7 +49,7 @@ namespace combustionModels ( diffusion, psiThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, psiCombustionModel ); @@ -56,7 +57,7 @@ namespace combustionModels ( diffusion, rhoThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, rhoCombustionModel ); @@ -64,7 +65,41 @@ namespace combustionModels ( diffusion, rhoThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + + makeCombustionTypesThermo + ( + diffusion, + psiThermoCombustion, + gasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + diffusion, + psiThermoCombustion, + constGasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + diffusion, + rhoThermoCombustion, + gasEThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + diffusion, + rhoThermoCombustion, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C index b8a48ed0ce..89ea70d85c 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistrys.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,11 +36,13 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy + makeCombustionTypesThermo ( infinitelyFastChemistry, psiThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, psiCombustionModel ); @@ -48,7 +50,7 @@ namespace combustionModels ( infinitelyFastChemistry, psiThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, psiCombustionModel ); @@ -56,7 +58,7 @@ namespace combustionModels ( infinitelyFastChemistry, rhoThermoCombustion, - gasThermoPhysics, + gasHThermoPhysics, rhoCombustionModel ); @@ -64,7 +66,41 @@ namespace combustionModels ( infinitelyFastChemistry, rhoThermoCombustion, - constGasThermoPhysics, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiThermoCombustion, + gasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiThermoCombustion, + constGasEThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoThermoCombustion, + gasEThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoThermoCombustion, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index bc6af600b5..65c389e037 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -137,7 +137,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() // TODO: currently re-evaluating the entire gTan field to return this patch const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); - if (max(mag(gTan)) < SMALL) + if (patch().size() && (max(mag(gTan)) < SMALL)) { WarningIn ( diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C index 72a7e9fdc3..67374b7b47 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,7 +136,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() // TODO: currently re-evaluating the entire gTan field to return this patch const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); - if (max(mag(gTan)) < SMALL) + if (patch().size() && (max(mag(gTan)) < SMALL)) { WarningIn ( diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C index b4a973a708..62e40e215b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,39 +39,76 @@ Description namespace Foam { + // Chemistry moldels based on sensibleEnthalpy makeChemistryModel ( chemistryModel, psiChemistryModel, - constGasThermoPhysics + constGasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - gasThermoPhysics + gasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - incompressibleGasThermoPhysics + incompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, psiChemistryModel, - icoPoly8ThermoPhysics + icoPoly8HThermoPhysics + ); + + // Chemistry moldels based on sensibleInternalEnergy + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + constGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + gasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + constIncompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + incompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + psiChemistryModel, + icoPoly8EThermoPhysics ); } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C index e5be84743c..5ecc84043a 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,39 +39,77 @@ Description namespace Foam { + // Chemistry moldels based on sensibleEnthalpy makeChemistryModel ( chemistryModel, rhoChemistryModel, - constGasThermoPhysics + constGasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - gasThermoPhysics + gasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - incompressibleGasThermoPhysics + incompressibleGasHThermoPhysics ); makeChemistryModel ( chemistryModel, rhoChemistryModel, - icoPoly8ThermoPhysics + icoPoly8HThermoPhysics + ); + + + // Chemistry moldels based on sensibleInternalEnergy + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + constGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + gasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + constIncompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + incompressibleGasEThermoPhysics + ); + + makeChemistryModel + ( + chemistryModel, + rhoChemistryModel, + icoPoly8EThermoPhysics ); } diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C index 189d43bdfa..ed2c8c2ba6 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/makeChemistrySolvers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,24 +33,61 @@ License namespace Foam { - makeChemistrySolverTypes(psiChemistryModel, constGasThermoPhysics); - makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics); + // Chemistry solvers based on sensibleEnthalpy + makeChemistrySolverTypes(psiChemistryModel, constGasHThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, gasHThermoPhysics); makeChemistrySolverTypes ( psiChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); - makeChemistrySolverTypes(psiChemistryModel, incompressibleGasThermoPhysics); - makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, constGasThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); + makeChemistrySolverTypes + ( + psiChemistryModel, + incompressibleGasHThermoPhysics) + ; + makeChemistrySolverTypes(psiChemistryModel, icoPoly8HThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, constGasHThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, gasHThermoPhysics); makeChemistrySolverTypes ( rhoChemistryModel, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); - makeChemistrySolverTypes(rhoChemistryModel, incompressibleGasThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics); + makeChemistrySolverTypes + ( + rhoChemistryModel, + incompressibleGasHThermoPhysics + ); + makeChemistrySolverTypes(rhoChemistryModel, icoPoly8HThermoPhysics); + + // Chemistry solvers based on sensibleInternalEnergy + makeChemistrySolverTypes(psiChemistryModel, constGasEThermoPhysics); + makeChemistrySolverTypes(psiChemistryModel, gasEThermoPhysics); + makeChemistrySolverTypes + ( + psiChemistryModel, + constIncompressibleGasEThermoPhysics + ); + makeChemistrySolverTypes + ( + psiChemistryModel, + incompressibleGasEThermoPhysics + ); + makeChemistrySolverTypes(psiChemistryModel, icoPoly8EThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, constGasEThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, gasEThermoPhysics); + makeChemistrySolverTypes + ( + rhoChemistryModel, + constIncompressibleGasEThermoPhysics + ); + makeChemistrySolverTypes + ( + rhoChemistryModel, + incompressibleGasEThermoPhysics + ); + makeChemistrySolverTypes(rhoChemistryModel, icoPoly8EThermoPhysics); } diff --git a/src/thermophysicalModels/radiationModels/include/createIncompressibleRadiationModel.H b/src/thermophysicalModels/radiationModels/include/createIncompressibleRadiationModel.H new file mode 100644 index 0000000000..ab7466d0a7 --- /dev/null +++ b/src/thermophysicalModels/radiationModels/include/createIncompressibleRadiationModel.H @@ -0,0 +1,32 @@ + autoPtr radiation + ( + radiation::radiationModel::New(T) + ); + + dimensionedScalar rhoCpRef + ( + "rhoCpRef", + dimDensity*dimEnergy/dimMass/dimTemperature, + 1.0 + ); + + if (radiation->radiation()) + { + IOdictionary transportProperties + ( + IOobject + ( + "transportProperties", + runTime.constant(), + runTime, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false // do not register! + ) + ); + + dimensionedScalar rhoRef(transportProperties.lookup("rhoRef")); + dimensionedScalar CpRef(transportProperties.lookup("CpRef")); + + rhoCpRef = rhoRef*CpRef; + } diff --git a/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.C b/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.C index 94d08934ab..a07142897b 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "P1.H" -#include "fvm.H" +#include "fvmLaplacian.H" +#include "fvmSup.H" #include "absorptionEmissionModel.H" #include "scatterModel.H" @@ -279,7 +280,7 @@ Foam::radiation::P1::Ru() const const DimensionedField a = absorptionEmission_->aCont()().dimensionedInternalField(); - return a*G - 4.0*E; + return a*G - 4.0*E; } diff --git a/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.H b/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.H index 2077d74445..fd86c51d09 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.H +++ b/src/thermophysicalModels/radiationModels/radiationModel/P1/P1.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-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,6 +42,7 @@ SourceFiles #define radiationModelP1_H #include "radiationModel.H" +#include "volFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/radiationModels/radiationModel/noRadiation/noRadiation.C b/src/thermophysicalModels/radiationModels/radiationModel/noRadiation/noRadiation.C index 69666b7c63..234b0fcd00 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/noRadiation/noRadiation.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/noRadiation/noRadiation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,6 +25,9 @@ License #include "noRadiation.H" #include "physicoChemicalConstants.H" +#include "fvMesh.H" +#include "Time.H" +#include "volFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/radiationModels/radiationModel/opaqueSolid/opaqueSolid.C b/src/thermophysicalModels/radiationModels/radiationModel/opaqueSolid/opaqueSolid.C index ddc4a7a438..405ae7cc9c 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/opaqueSolid/opaqueSolid.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/opaqueSolid/opaqueSolid.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,6 +25,9 @@ License #include "opaqueSolid.H" #include "physicoChemicalConstants.H" +#include "fvMesh.H" +#include "Time.H" +#include "volFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C index 5948101185..48cd417860 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ License #include "absorptionEmissionModel.H" #include "scatterModel.H" #include "fvmSup.H" +#include "fluidThermo.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -232,6 +233,20 @@ Foam::tmp Foam::radiation::radiationModel::Sh } +Foam::tmp Foam::radiation::radiationModel::ST +( + const dimensionedScalar& rhoCp, + volScalarField& T +) const +{ + return + ( + Ru()/rhoCp + - fvm::Sp(Rp()*pow3(T)/rhoCp, T) + ); +} + + const Foam::radiation::absorptionEmissionModel& Foam::radiation::radiationModel::absorptionEmission() const { diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H index 1218dac9e9..d4c39bd958 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,13 +47,18 @@ SourceFiles #include "runTimeSelectionTables.H" #include "addToRunTimeSelectionTable.H" #include "volFieldsFwd.H" -#include "fluidThermo.H" +#include "DimensionedField.H" #include "fvMatricesFwd.H" +#include "Switch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + +class fluidThermo; +class fvMesh; + namespace radiation { @@ -82,7 +87,7 @@ protected: //- Reference to the temperature field const volScalarField& T_; - //- Model specific dictionary input parameters + //- Radiation model on/off flag Switch radiation_; //- Radiation model dictionary @@ -204,6 +209,12 @@ public: // Access + //- Radiation model on/off flag + const Switch radiation() const + { + return radiation_; + } + //- Source term component (for power of T^4) virtual tmp Rp() const = 0; @@ -213,6 +224,13 @@ public: //- Energy source term virtual tmp Sh(fluidThermo& thermo) const; + //- Temperature source term + virtual tmp ST + ( + const dimensionedScalar& rhoCp, + volScalarField& T + ) const; + //- Access to absorptionEmissionModel const absorptionEmissionModel& absorptionEmission() const; }; diff --git a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModelNew.C b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModelNew.C index 0a4dd3730c..65b96b48ed 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModelNew.C +++ b/src/thermophysicalModels/radiationModels/radiationModel/radiationModel/radiationModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "radiationModel.H" +#include "volFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.H b/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.H index 3b34006e8e..0718afc069 100644 --- a/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.H +++ b/src/thermophysicalModels/radiationModels/radiationModel/viewFactor/viewFactor.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,9 @@ SourceFiles #include "globalIndex.H" #include "scalarListIOList.H" #include "mapDistribute.H" +#include "volFields.H" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C index b7474a9faf..b90e447c0b 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/makeChemistryReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,23 +37,50 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeChemistryReader(constGasThermoPhysics); -makeChemistryReader(gasThermoPhysics); -makeChemistryReader(constIncompressibleGasThermoPhysics); -makeChemistryReader(incompressibleGasThermoPhysics); -makeChemistryReader(icoPoly8ThermoPhysics); -makeChemistryReader(hConstSolidThermoPhysics); -makeChemistryReader(hExponentialSolidThermoPhysics); +// Solid chemistry readers based on sensibleEnthalpy -makeChemistryReaderType(foamChemistryReader, constGasThermoPhysics); -makeChemistryReaderType(foamChemistryReader, gasThermoPhysics); +makeChemistryReader(constGasHThermoPhysics); +makeChemistryReader(gasHThermoPhysics); +makeChemistryReader(constIncompressibleGasHThermoPhysics); +makeChemistryReader(incompressibleGasHThermoPhysics); +makeChemistryReader(icoPoly8HThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics); makeChemistryReaderType ( foamChemistryReader, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); -makeChemistryReaderType(foamChemistryReader, incompressibleGasThermoPhysics); -makeChemistryReaderType(foamChemistryReader, icoPoly8ThermoPhysics); +makeChemistryReaderType(foamChemistryReader, incompressibleGasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, icoPoly8HThermoPhysics); + + + +// Solid chemistry readers based on sensibleInternalEnergy + +makeChemistryReader(constGasEThermoPhysics); +makeChemistryReader(gasEThermoPhysics); +makeChemistryReader(constIncompressibleGasEThermoPhysics); +makeChemistryReader(incompressibleGasEThermoPhysics); +makeChemistryReader(icoPoly8EThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics); +makeChemistryReaderType +( + foamChemistryReader, + constIncompressibleGasEThermoPhysics +); +makeChemistryReaderType(foamChemistryReader, incompressibleGasEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, icoPoly8EThermoPhysics); + + +// Solid chemistry readers for solids based on sensibleInternalEnergy + +makeChemistryReader(hConstSolidThermoPhysics); +makeChemistryReader(hExponentialSolidThermoPhysics); + makeChemistryReaderType(foamChemistryReader, hConstSolidThermoPhysics); makeChemistryReaderType(foamChemistryReader, hExponentialSolidThermoPhysics); diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index c0cce76a2a..678300a172 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -296,13 +296,13 @@ List currentSpecieComposition(5); scalar currentLowT = 0; scalar currentHighT = 0; scalar currentCommonT = 0; -gasThermoPhysics::coeffArray highCpCoeffs(scalarList(7)); -gasThermoPhysics::coeffArray lowCpCoeffs(scalarList(7)); +gasHThermoPhysics::coeffArray highCpCoeffs(scalarList(7)); +gasHThermoPhysics::coeffArray lowCpCoeffs(scalarList(7)); -gasReaction::specieCoeffs currentSpecieCoeff; +gasHReaction::specieCoeffs currentSpecieCoeff; -DynamicList lhs; -DynamicList rhs; +DynamicList lhs; +DynamicList rhs; scalarList ArrheniusCoeffs(3); DynamicList reactionCoeffs; @@ -312,7 +312,7 @@ label currentThirdBodyIndex = -1; word reactionCoeffsName = word::null; HashTable reactionCoeffsTable; -DynamicList *lrhsPtr = &lhs; +DynamicList *lrhsPtr = &lhs; reactionType rType = unknownReactionType; reactionRateType rrType = Arrhenius; @@ -609,7 +609,7 @@ bool finishReaction = false; {thermoLineLabel4} { - HashPtrTable::iterator specieThermoIter + HashPtrTable::iterator specieThermoIter ( speciesThermo_.find(currentSpecieName) ); @@ -622,7 +622,7 @@ bool finishReaction = false; speciesThermo_.insert ( currentSpecieName, - new gasThermoPhysics + new gasHThermoPhysics ( janafThermo > ( @@ -1429,7 +1429,7 @@ bool finishReaction = false; {reactionCoeff}{endReactionCoeffs} { - DynamicList& lrhs = *lrhsPtr; + DynamicList& lrhs = *lrhsPtr; bool found = false; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index 922c1227b9..5ee2a03ac3 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.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) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ License namespace Foam { - addChemistryReaderType(chemkinReader, gasThermoPhysics); + addChemistryReaderType(chemkinReader, gasHThermoPhysics); } @@ -168,8 +168,8 @@ template void Foam::chemkinReader::addReactionType ( const reactionType rType, - DynamicList& lhs, - DynamicList& rhs, + DynamicList& lhs, + DynamicList& rhs, const ReactionRateType& rr ) { @@ -180,9 +180,9 @@ void Foam::chemkinReader::addReactionType reactions_.append ( new IrreversibleReaction - + ( - Reaction + Reaction ( speciesTable_, lhs.shrink(), @@ -200,9 +200,9 @@ void Foam::chemkinReader::addReactionType reactions_.append ( new ReversibleReaction - + ( - Reaction + Reaction ( speciesTable_, lhs.shrink(), @@ -240,8 +240,8 @@ void Foam::chemkinReader::addPressureDependentReaction ( const reactionType rType, const fallOffFunctionType fofType, - DynamicList& lhs, - DynamicList& rhs, + DynamicList& lhs, + DynamicList& rhs, const scalarList& efficiencies, const scalarList& k0Coeffs, const scalarList& kInfCoeffs, @@ -423,8 +423,8 @@ void Foam::chemkinReader::addPressureDependentReaction void Foam::chemkinReader::addReaction ( - DynamicList& lhs, - DynamicList& rhs, + DynamicList& lhs, + DynamicList& rhs, const scalarList& efficiencies, const reactionType rType, const reactionRateType rrType, @@ -499,9 +499,9 @@ void Foam::chemkinReader::addReaction reactions_.append ( new NonEquilibriumReversibleReaction - + ( - Reaction + Reaction ( speciesTable_, lhs.shrink(), @@ -554,11 +554,11 @@ void Foam::chemkinReader::addReaction new NonEquilibriumReversibleReaction < Reaction, - gasThermoPhysics, + gasHThermoPhysics, thirdBodyArrheniusReactionRate > ( - Reaction + Reaction ( speciesTable_, lhs.shrink(), @@ -661,9 +661,9 @@ void Foam::chemkinReader::addReaction reactions_.append ( new NonEquilibriumReversibleReaction - + ( - Reaction + Reaction ( speciesTable_, lhs.shrink(), diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H index 6e0d4dc5c1..4cd84f59a5 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.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) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ namespace Foam class chemkinReader : - public chemistryReader, + public chemistryReader, public yyFlexLexer { @@ -199,13 +199,13 @@ private: HashTable speciePhase_; //- Table of the thermodynamic data given in the CHEMKIN file - HashPtrTable speciesThermo_; + HashPtrTable speciesThermo_; //- Table of species composition HashTable > specieComposition_; //- List of the reactions - ReactionList reactions_; + ReactionList reactions_; // Private Member Functions @@ -257,8 +257,8 @@ private: void addReactionType ( const reactionType rType, - DynamicList& lhs, - DynamicList& rhs, + DynamicList& lhs, + DynamicList& rhs, const ReactionRateType& rr ); @@ -267,8 +267,8 @@ private: ( const reactionType rType, const fallOffFunctionType fofType, - DynamicList& lhs, - DynamicList& rhs, + DynamicList& lhs, + DynamicList& rhs, const scalarList& thirdBodyEfficiencies, const scalarList& k0Coeffs, const scalarList& kInfCoeffs, @@ -280,8 +280,8 @@ private: void addReaction ( - DynamicList& lhs, - DynamicList& rhs, + DynamicList& lhs, + DynamicList& rhs, const scalarList& thirdBodyEfficiencies, const reactionType rType, const reactionRateType rrType, @@ -364,7 +364,7 @@ public: } //- Table of the thermodynamic data given in the CHEMKIN file - const HashPtrTable& speciesThermo() const + const HashPtrTable& speciesThermo() const { return speciesThermo_; } @@ -376,7 +376,7 @@ public: } //- List of the reactions - const ReactionList& reactions() const + const ReactionList& reactions() const { return reactions_; } diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C index 4e65f3a24c..ed1e0abf81 100644 --- a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,7 +179,7 @@ makeReactionThermo ); -// Multi-component thermo +// Multi-component thermo for sensible enthalpy makeReactionMixtureThermo ( @@ -187,7 +187,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, multiComponentMixture, - constGasThermoPhysics + constGasHThermoPhysics ); makeReactionMixtureThermo @@ -196,11 +196,32 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, multiComponentMixture, - gasThermoPhysics + gasHThermoPhysics ); -// Multi-component reaction thermo +// Multi-component thermo for internal energy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + multiComponentMixture, + constGasEThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + multiComponentMixture, + gasEThermoPhysics +); + + +// Multi-component reaction thermo for sensible enthalpy makeReactionMixtureThermo ( @@ -208,7 +229,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, reactingMixture, - constGasThermoPhysics + constGasHThermoPhysics ); makeReactionMixtureThermo @@ -217,7 +238,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, reactingMixture, - gasThermoPhysics + gasHThermoPhysics ); makeReactionMixtureThermo @@ -226,7 +247,37 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, singleStepReactingMixture, - gasThermoPhysics + gasHThermoPhysics +); + + +// Multi-component reaction thermo for internal energy + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + constGasEThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + gasEThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + singleStepReactingMixture, + gasEThermoPhysics ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index 6dbf589bce..a6a880ca76 100644 --- a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C +++ b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -213,7 +213,7 @@ makeReactionThermo ); -// Multi-component thermo +// Multi-component thermo for internal energy makeReactionMixtureThermo ( @@ -221,7 +221,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - constGasThermoPhysics + constGasEThermoPhysics ); makeReactionMixtureThermo @@ -230,7 +230,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - gasThermoPhysics + gasEThermoPhysics ); makeReactionMixtureThermo @@ -239,7 +239,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - constIncompressibleGasThermoPhysics + constIncompressibleGasEThermoPhysics ); makeReactionMixtureThermo @@ -248,7 +248,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - incompressibleGasThermoPhysics + incompressibleGasEThermoPhysics ); makeReactionMixtureThermo @@ -257,7 +257,114 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, multiComponentMixture, - icoPoly8ThermoPhysics + icoPoly8EThermoPhysics +); + + + // Multi-component reaction thermo + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constGasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + gasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + constIncompressibleGasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + incompressibleGasEThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + reactingMixture, + icoPoly8EThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + singleStepReactingMixture, + gasEThermoPhysics +); + + + + +// Multi-component thermo for sensible enthalpy + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constGasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + gasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + constIncompressibleGasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + incompressibleGasHThermoPhysics +); + +makeReactionMixtureThermo +( + rhoThermo, + rhoReactionThermo, + heRhoThermo, + multiComponentMixture, + icoPoly8HThermoPhysics ); @@ -269,7 +376,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - constGasThermoPhysics + constGasHThermoPhysics ); makeReactionMixtureThermo @@ -278,7 +385,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - gasThermoPhysics + gasHThermoPhysics ); makeReactionMixtureThermo @@ -287,7 +394,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - constIncompressibleGasThermoPhysics + constIncompressibleGasHThermoPhysics ); makeReactionMixtureThermo @@ -296,7 +403,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - incompressibleGasThermoPhysics + incompressibleGasHThermoPhysics ); makeReactionMixtureThermo @@ -305,7 +412,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, reactingMixture, - icoPoly8ThermoPhysics + icoPoly8HThermoPhysics ); makeReactionMixtureThermo @@ -314,7 +421,7 @@ makeReactionMixtureThermo rhoReactionThermo, heRhoThermo, singleStepReactingMixture, - gasThermoPhysics + gasHThermoPhysics ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C index 104fa11a7d..d51976f196 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModels.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -46,7 +46,7 @@ namespace Foam ODESolidChemistryModel, solidChemistryModel, hConstSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ); makeSolidChemistryModel @@ -54,7 +54,7 @@ namespace Foam ODESolidChemistryModel, solidChemistryModel, hExponentialSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ); } diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C index 9c8a6df052..3b6f13f486 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolvers.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -41,7 +41,7 @@ namespace Foam ode, solidChemistryModel, hConstSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ) makeSolidChemistrySolverType @@ -49,7 +49,7 @@ namespace Foam ode, solidChemistryModel, hExponentialSolidThermoPhysics, - gasThermoPhysics + gasHThermoPhysics ) } diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H index 7ff3f054e3..566c3c9729 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGas.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,7 +105,10 @@ public: // Constructors //- Construct from components - inline incompressiblePerfectGas(const Specie& sp); + inline incompressiblePerfectGas(const Specie& sp, const scalar pRef); + + //- Construct from incompressiblePerfectGas + inline incompressiblePerfectGas(const incompressiblePerfectGas& sp); //- Construct from Istream incompressiblePerfectGas(Istream&); @@ -173,6 +176,10 @@ public: // Member operators + inline incompressiblePerfectGas& operator= + ( + const incompressiblePerfectGas& + ); inline void operator+=(const incompressiblePerfectGas&); inline void operator-=(const incompressiblePerfectGas&); diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index 340d4b1e4c..ff2f3e233d 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,28 +25,40 @@ License #include "incompressiblePerfectGas.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -template -inline Foam::incompressiblePerfectGas::incompressiblePerfectGas -( - const Specie& sp -) -: - Specie(sp) -{} - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template inline Foam::incompressiblePerfectGas::incompressiblePerfectGas ( - const word& name, - const incompressiblePerfectGas& pg + const Specie& sp, const scalar pRef ) : - Specie(name, pg) + Specie(sp), + pRef_(pRef) +{} + + +template +inline Foam::incompressiblePerfectGas::incompressiblePerfectGas +( + const incompressiblePerfectGas& ipg +) +: + Specie(ipg), + pRef_(ipg.pRef_) +{} + + +template +inline Foam::incompressiblePerfectGas::incompressiblePerfectGas +( + const word& name, + const incompressiblePerfectGas& ipg +) +: + Specie(name, ipg), + pRef_(ipg.pRef_) {} @@ -109,7 +121,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas::psi scalar T ) const { - return 0.0; + return 1.0/(this->R()*T); } @@ -120,7 +132,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas::Z scalar ) const { - return 0.0; + return 1.0; } @@ -139,22 +151,42 @@ inline Foam::scalar Foam::incompressiblePerfectGas::cpMcv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // template -inline void Foam::incompressiblePerfectGas::operator+= +inline Foam::incompressiblePerfectGas& +Foam::incompressiblePerfectGas::operator= ( - const incompressiblePerfectGas& pg + const incompressiblePerfectGas& ipg ) { - Specie::operator+=(pg); + Specie::operator=(ipg); + + pRef_ = ipg.pRef_; + + return *this; +} + +template +inline void Foam::incompressiblePerfectGas::operator+= +( + const incompressiblePerfectGas& ipg +) +{ + scalar molr1 = this->nMoles(); + Specie::operator+=(ipg); + molr1 /= this->nMoles(); + scalar molr2 = ipg.nMoles()/this->nMoles(); + + pRef_ = molr1*pRef_ + molr2*ipg.pRef_; } template inline void Foam::incompressiblePerfectGas::operator-= ( - const incompressiblePerfectGas& pg + const incompressiblePerfectGas& ipg ) { - Specie::operator-=(pg); + Specie::operator-=(ipg); + pRef_ = ipg.pRef_; } @@ -170,14 +202,19 @@ inline void Foam::incompressiblePerfectGas::operator*=(const scalar s) template inline Foam::incompressiblePerfectGas Foam::operator+ ( - const incompressiblePerfectGas& pg1, - const incompressiblePerfectGas& pg2 + const incompressiblePerfectGas& ipg1, + const incompressiblePerfectGas& ipg2 ) { + scalar nMoles = ipg1.nMoles() + ipg2.nMoles(); + scalar molr1 = ipg1.nMoles()/nMoles; + scalar molr2 = ipg2.nMoles()/nMoles; + return incompressiblePerfectGas ( - static_cast(pg1) - + static_cast(pg2) + static_cast(ipg1) + + static_cast(ipg2), + molr1*ipg1.pRef_ + molr2*ipg2.pRef_ ); } @@ -185,14 +222,15 @@ inline Foam::incompressiblePerfectGas Foam::operator+ template inline Foam::incompressiblePerfectGas Foam::operator- ( - const incompressiblePerfectGas& pg1, - const incompressiblePerfectGas& pg2 + const incompressiblePerfectGas& ipg1, + const incompressiblePerfectGas& ipg2 ) { return incompressiblePerfectGas ( - static_cast(pg1) - - static_cast(pg2) + static_cast(ipg1) + - static_cast(ipg2), + ipg1.pRef_ ); } @@ -201,10 +239,14 @@ template inline Foam::incompressiblePerfectGas Foam::operator* ( const scalar s, - const incompressiblePerfectGas& pg + const incompressiblePerfectGas& ipg ) { - return incompressiblePerfectGas(s*static_cast(pg)); + return incompressiblePerfectGas + ( + s*static_cast(ipg), + ipg.pRef_ + ); } diff --git a/src/thermophysicalModels/specie/include/reactionTypes.H b/src/thermophysicalModels/specie/include/reactionTypes.H index 8b0a5f20d5..e6af91d896 100644 --- a/src/thermophysicalModels/specie/include/reactionTypes.H +++ b/src/thermophysicalModels/specie/include/reactionTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,16 +43,31 @@ Description namespace Foam { - typedef Reaction constGasReaction; + // sensible enthalpy based reactions + typedef Reaction constGasHReaction; - typedef Reaction gasReaction; + typedef Reaction gasHReaction; - typedef Reaction - constIncompressibleGasReaction; + typedef Reaction + constIncompressibleGasHReaction; - typedef Reaction incompressibleGasReaction; + typedef Reaction + incompressibleGasHReaction; - typedef Reaction icoPoly8Reaction; + typedef Reaction icoPoly8HReaction; + + // internal ennergy based reactions + typedef Reaction constGasEReaction; + + typedef Reaction gasEReaction; + + typedef Reaction + constIncompressibleGasEReaction; + + typedef Reaction + incompressibleGasEReaction; + + typedef Reaction icoPoly8EReaction; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index a3a276b926..cb17a56a14 100644 --- a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H +++ b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,9 @@ Description #include "incompressiblePerfectGas.H" #include "hConstThermo.H" #include "janafThermo.H" + #include "sensibleEnthalpy.H" +#include "sensibleInternalEnergy.H" #include "thermo.H" #include "sutherlandTransport.H" #include "constTransport.H" @@ -50,6 +52,7 @@ Description namespace Foam { + // thermo physics types based on sensibleEnthalpy typedef constTransport < @@ -61,7 +64,7 @@ namespace Foam >, sensibleEnthalpy > - > constGasThermoPhysics; + > constGasHThermoPhysics; typedef sutherlandTransport @@ -74,7 +77,7 @@ namespace Foam >, sensibleEnthalpy > - > gasThermoPhysics; + > gasHThermoPhysics; typedef constTransport @@ -87,7 +90,7 @@ namespace Foam >, sensibleEnthalpy > - > constIncompressibleGasThermoPhysics; + > constIncompressibleGasHThermoPhysics; typedef sutherlandTransport @@ -100,7 +103,7 @@ namespace Foam >, sensibleEnthalpy > - > incompressibleGasThermoPhysics; + > incompressibleGasHThermoPhysics; typedef polynomialTransport @@ -115,7 +118,76 @@ namespace Foam sensibleEnthalpy >, 8 - > icoPoly8ThermoPhysics; + > icoPoly8HThermoPhysics; + + + // thermo physics types based on sensibleInternalEnergy + typedef + constTransport + < + species::thermo + < + hConstThermo + < + perfectGas + >, + sensibleInternalEnergy + > + > constGasEThermoPhysics; + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + perfectGas + >, + sensibleInternalEnergy + > + > gasEThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + incompressiblePerfectGas + >, + sensibleInternalEnergy + > + > constIncompressibleGasEThermoPhysics; + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + incompressiblePerfectGas + >, + sensibleInternalEnergy + > + > incompressibleGasEThermoPhysics; + + typedef + polynomialTransport + < + species::thermo + < + hPolynomialThermo + < + icoPolynomial, + 8 + >, + sensibleInternalEnergy + >, + 8 + > icoPoly8EThermoPhysics; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C index 6f98a4bc35..b5d8c0ad1d 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,8 +31,11 @@ License namespace Foam { - makeIRReactions(gasThermoPhysics, LangmuirHinshelwoodReactionRate) - makeIRReactions(icoPoly8ThermoPhysics, LangmuirHinshelwoodReactionRate) + makeIRReactions(gasHThermoPhysics, LangmuirHinshelwoodReactionRate) + makeIRReactions(icoPoly8HThermoPhysics, LangmuirHinshelwoodReactionRate) + + makeIRReactions(gasEThermoPhysics, LangmuirHinshelwoodReactionRate) + makeIRReactions(icoPoly8EThermoPhysics, LangmuirHinshelwoodReactionRate) } // ************************************************************************* // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C index ff13e68b69..4dfd73d6a0 100644 --- a/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C +++ b/src/thermophysicalModels/specie/reaction/reactions/makeReactions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,15 +83,26 @@ License namespace Foam { - makeReactions(constGasThermoPhysics, constGasReaction) - makeReactions(gasThermoPhysics, gasReaction) + // sensible enthalpy based reactions + makeReactions(constGasHThermoPhysics, constGasHReaction) + makeReactions(gasHThermoPhysics, gasHReaction) makeReactions ( - constIncompressibleGasThermoPhysics, - constIncompressibleGasReaction + constIncompressibleGasHThermoPhysics, + constIncompressibleGasHReaction ) - makeReactions(incompressibleGasThermoPhysics, incompressibleGasReaction) - makeReactions(icoPoly8ThermoPhysics, icoPoly8Reaction) + makeReactions(incompressibleGasHThermoPhysics, incompressibleGasHReaction) + makeReactions(icoPoly8HThermoPhysics, icoPoly8HReaction) + + makeReactions(constGasEThermoPhysics, constGasEReaction) + makeReactions(gasEThermoPhysics, gasEReaction) + makeReactions + ( + constIncompressibleGasEThermoPhysics, + constIncompressibleGasEReaction + ) + makeReactions(incompressibleGasEThermoPhysics, incompressibleGasEReaction) + makeReactions(icoPoly8EThermoPhysics, icoPoly8EReaction) } // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties index 30c31c7471..643c593447 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry; +combustionModel infinitelyFastChemistry; active true; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties index 1576592b91..51e80f82d6 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties @@ -15,9 +15,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -//combustionModel noCombustion; -combustionModel infinitelyFastChemistry; -//combustionModel FSD; +combustionModel infinitelyFastChemistry; +//combustionModel FSD; active true; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties index 689dc54c62..cedf34b411 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties @@ -16,7 +16,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry; +combustionModel infinitelyFastChemistry; active on; diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 index 79da11e10a..2e865a7856 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 @@ -107,55 +107,79 @@ edges ( ); -patches +boundary ( // is there no way of defining all my 'defaultFaces' to be 'wall'? - wall front - ( - // inlet block - frontQuad(in1, join1, join2, in2) - // outlet block - frontQuad(poro1, out1, out2, poro2) - ) + front + { + type wall; + faces + ( + // inlet block + frontQuad(in1, join1, join2, in2) + // outlet block + frontQuad(poro1, out1, out2, poro2) + ); + } - wall back - ( - // inlet block - backQuad(in1, join1, join2, in2) - // outlet block - backQuad(poro1, out1, out2, poro2) - ) + back + { + type wall; + faces + ( + // inlet block + backQuad(in1, join1, join2, in2) + // outlet block + backQuad(poro1, out1, out2, poro2) + ); + } - wall wall - ( - // inlet block - quad2D(in1, join1) - quad2D(join2, in2) - // outlet block - quad2D(poro1, out1) - quad2D(out2, poro2) - ) + wall + { + type wall; + faces + ( + // inlet block + quad2D(in1, join1) + quad2D(join2, in2) + // outlet block + quad2D(poro1, out1) + quad2D(out2, poro2) + ); + } - wall porosityWall - ( - // porosity block - frontQuad(join1, poro1, poro2, join2) - // porosity block - backQuad(join1, poro1, poro2, join2) - // porosity block - quad2D(join1, poro1) - quad2D(poro2, join2) - ) + porosityWall + { + type wall; + faces + ( + // porosity block + frontQuad(join1, poro1, poro2, join2) + // porosity block + backQuad(join1, poro1, poro2, join2) + // porosity block + quad2D(join1, poro1) + quad2D(poro2, join2) + ); + } - patch inlet - ( - quad2D(in2, in1) - ) + inlet + { + type patch; + faces + ( + quad2D(in2, in1) + ); + } - patch outlet - ( - quad2D(out2, out1) - ) + outlet + { + type patch; + faces + ( + quad2D(out2, out1) + ); + } ); mergePatchPairs diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions index 7dba85c0dc..b150d51b8f 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions @@ -28,23 +28,17 @@ porosity1 DarcyForchheimerCoeffs { - d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); + d d [0 -2 0 0 0 0 0] (7e5 -1000 -1000); f f [0 -1 0 0 0 0 0] (0 0 0); coordinateSystem { - type cartesian; - origin (0 0 0); - coordinateRotation - { - type axesRotation; - e1 (0.70710678 0.70710678 0); - e2 (0 0 1); - } + e1 (0.70710678 0.70710678 0); + e3 (0 0 1); } } } } -// ************************************************************************* // +//************************************************************************ // diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSolution b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSolution index 4a126ed8e4..3f77479c31 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSolution +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvSolution @@ -21,14 +21,14 @@ solvers { solver PCG; preconditioner DIC; - tolerance 1e-06; + tolerance 1e-07; relTol 0.01; } pFinal { $p; - tolerance 1e-06; + tolerance 1e-07; relTol 0; } @@ -36,14 +36,14 @@ solvers { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-06; relTol 0.1; } "(rho|U|h|k|epsilon|omega)Final" { $U; - tolerance 1e-05; + tolerance 1e-06; relTol 0; } @@ -56,8 +56,8 @@ PIMPLE nOuterCorrectors 50; nCorrectors 1; nNonOrthogonalCorrectors 0; - rhoMin rhoMin [ 1 -3 0 0 0 ] 0.1; - rhoMax rhoMax [ 1 -3 0 0 0 ] 3.0; + rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5; + rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0; residualControl { @@ -75,13 +75,12 @@ relaxationFactors { fields { - "p.*" 1; + "p.*" 0.3; "rho.*" 1; } equations { - "(U|h|k|epsilon|omega).*" 0.85; - "p.*" 1; + "(U|h|k|epsilon|omega).*" 0.7; } } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution index a1e3109222..e2bc9c870d 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution @@ -64,7 +64,7 @@ SIMPLE { p 1e-2; U 1e-4; - T 1e-3; + e 1e-3; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; @@ -76,7 +76,7 @@ relaxationFactors fields { p 0.3; - rho 0.05; + rho 0.03; } equations { diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution index 65a9606e7f..1fb7a16e85 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution @@ -58,7 +58,7 @@ SIMPLE { p 1e-3; U 1e-4; - T 1e-3; + e 1e-3; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution index 56c28a929a..25b10212a3 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/system/fvSolution @@ -64,7 +64,7 @@ SIMPLE { p 1e-2; U 1e-4; - T 1e-3; + e 1e-3; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; @@ -76,7 +76,7 @@ relaxationFactors fields { p 0.3; - rho 0.02; + rho 0.05; } equations { diff --git a/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution b/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution index 812766041a..24db1f2af0 100644 --- a/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution +++ b/tutorials/compressible/rhoSimplecFoam/squareBend/system/fvSolution @@ -54,6 +54,16 @@ SIMPLE rhoMin rhoMin [1 -3 0 0 0] 0.1; rhoMax rhoMax [1 -3 0 0 0] 1.0; transonic yes; + + residualControl + { + p 1e-3; + U 1e-4; + e 1e-3; + + // possibly check turbulence fields + "(k|epsilon|omega)" 1e-3; + } } relaxationFactors diff --git a/tutorials/electromagnetics/electrostaticFoam/chargedWire/system/fvSchemes b/tutorials/electromagnetics/electrostaticFoam/chargedWire/system/fvSchemes index e60b3cbff1..7e4087cf14 100644 --- a/tutorials/electromagnetics/electrostaticFoam/chargedWire/system/fvSchemes +++ b/tutorials/electromagnetics/electrostaticFoam/chargedWire/system/fvSchemes @@ -28,7 +28,7 @@ gradSchemes divSchemes { default none; - div(rhoFlux,rho) Gauss limitedLinear 1; + div(rhoFlux,rho) Gauss upwind; } laplacianSchemes diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties index bcb3e3e80d..b59b42445e 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/constant/reactingCloud1Properties @@ -89,7 +89,7 @@ subModels duration 10.0; parcelsPerSecond 200; } - ] + } dispersionModel none; diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/0/k b/tutorials/multiphase/cavitatingFoam/les/throttle/0/k index b8e8e662f8..25ca30f1e1 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/0/k +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/0/k @@ -10,36 +10,37 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [0 2 -2 0 0]; +dimensions [0 2 -2 0 0 0 0]; -internalField uniform 10.0; +internalField uniform 10; boundaryField { inlet { - type fixedValue; - value uniform 0.5; + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value uniform 0.05; } - outlet { type zeroGradient; } - walls { - type zeroGradient; + type kqRWallFunction; + value uniform 10; } - frontBack { type empty; } } + // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs b/tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs index d23afe73b4..6d4b26abea 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/0/nuSgs @@ -10,27 +10,30 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object nuSgs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; -internalField uniform 1e-11; +internalField uniform 0; boundaryField { inlet { - type zeroGradient; + type calculated; + value uniform 0; } outlet { - type zeroGradient; + type calculated; + value uniform 0; } walls { - type fixedValue; + type nutUSpaldingWallFunction; value uniform 0; } frontBack @@ -39,4 +42,5 @@ boundaryField } } + // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes index 3d506aa1d7..08a4e20e6b 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSchemes @@ -28,9 +28,9 @@ interpolationSchemes divSchemes { default none; - div(phiv,rho) Gauss limitedLinear 0.2; - div(phi,U) Gauss filteredLinear2V 0.2 0; - div(phiv,k) Gauss filteredLinear2 0.2 0; + div(phiv,rho) Gauss vanLeer; + div(phi,U) Gauss LUST grad(U); + div(phiv,k) Gauss LUST grad(k); div((muEff*dev(T(grad(U))))) Gauss linear; } diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/k b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/k index 567bb997b9..9df6a831bf 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/k +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/k @@ -16,14 +16,15 @@ FoamFile dimensions [0 2 -2 0 0]; -internalField uniform 10.0; +internalField uniform 10; boundaryField { inlet { - type fixedValue; - value uniform 0.5; + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value uniform 0.05; } outlet @@ -33,7 +34,8 @@ boundaryField walls { - type zeroGradient; + type kqRWallFunction; + value uniform 10; } frontBack diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs index 87011efb06..c4d32cf2ff 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0.org/nuSgs @@ -10,34 +10,38 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object nuSgs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; -internalField uniform 1e-11; +internalField uniform 0; boundaryField { inlet { - type zeroGradient; + type calculated; + value uniform 0; } outlet { - type zeroGradient; + type calculated; + value uniform 0; } walls { - type fixedValue; + type nutUSpaldingWallFunction; value uniform 0; } frontBack { - type fixedValue; + type nutUSpaldingWallFunction; value uniform 0; } } + // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/k b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/k index 567bb997b9..9df6a831bf 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/k +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/k @@ -16,14 +16,15 @@ FoamFile dimensions [0 2 -2 0 0]; -internalField uniform 10.0; +internalField uniform 10; boundaryField { inlet { - type fixedValue; - value uniform 0.5; + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; + value uniform 0.05; } outlet @@ -33,7 +34,8 @@ boundaryField walls { - type zeroGradient; + type kqRWallFunction; + value uniform 10; } frontBack diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/nuSgs b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/nuSgs index 87011efb06..c4d32cf2ff 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/nuSgs +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/0/nuSgs @@ -10,34 +10,38 @@ FoamFile version 2.0; format ascii; class volScalarField; + location "0"; object nuSgs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; -internalField uniform 1e-11; +internalField uniform 0; boundaryField { inlet { - type zeroGradient; + type calculated; + value uniform 0; } outlet { - type zeroGradient; + type calculated; + value uniform 0; } walls { - type fixedValue; + type nutUSpaldingWallFunction; value uniform 0; } frontBack { - type fixedValue; + type nutUSpaldingWallFunction; value uniform 0; } } + // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun index 4314556cfc..91c8379fa0 100755 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/Allrun @@ -29,8 +29,8 @@ cp -r 0.org 0 runApplication blockMesh refineMeshByCellSet 1 2 3 -echo "mapping fields from 2D throttle case" -runApplication mapFields ../throttle -sourceTime latestTime +#echo "mapping fields from 2D throttle case" +#runApplication mapFields ../throttle -sourceTime latestTime runApplication decomposePar runParallel $application 4 diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes index 3d506aa1d7..08a4e20e6b 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSchemes @@ -28,9 +28,9 @@ interpolationSchemes divSchemes { default none; - div(phiv,rho) Gauss limitedLinear 0.2; - div(phi,U) Gauss filteredLinear2V 0.2 0; - div(phiv,k) Gauss filteredLinear2 0.2 0; + div(phiv,rho) Gauss vanLeer; + div(phi,U) Gauss LUST grad(U); + div(phiv,k) Gauss LUST grad(k); div((muEff*dev(T(grad(U))))) Gauss linear; } diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 index 67fe78ad74..bf6106677f 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 @@ -11,2285 +11,13 @@ FoamFile format ascii; class volScalarField; location "0"; - object alpha1; + object alpha1.org; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; -internalField nonuniform List -2268 -( -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 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-0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -) -; +internalField uniform 0; boundaryField { diff --git a/tutorials/multiphase/settlingFoam/ras/dahl/system/controlDict b/tutorials/multiphase/settlingFoam/ras/dahl/system/controlDict index 6c82463863..63da42914c 100644 --- a/tutorials/multiphase/settlingFoam/ras/dahl/system/controlDict +++ b/tutorials/multiphase/settlingFoam/ras/dahl/system/controlDict @@ -17,7 +17,7 @@ FoamFile application settlingFoam; -startFrom startTime; +startFrom latestTime; startTime 0; @@ -47,7 +47,7 @@ runTimeModifiable yes; adjustTimeStep on; -maxCo 0.5; +maxCo 0.4; maxDeltaT 1;