diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index d929b14128c31846ca02b528f6771c7ef19b04ee..b25fd944c50504289bbf0aa801e2204e299c3596 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -15,15 +15,15 @@ } label nSpecie = Y.size(); - PtrList<gasThermoPhysics> specieData(Y.size()); + PtrList<gasHThermoPhysics> specieData(Y.size()); forAll(specieData, i) { specieData.set ( i, - new gasThermoPhysics + new gasHThermoPhysics ( - dynamic_cast<const reactingMixture<gasThermoPhysics>&> + dynamic_cast<const reactingMixture<gasHThermoPhysics>&> (thermo).speciesData()[i] ) ); diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H index c6096d743d93a414c979823037c4753428691860..7d843b62e045c9a993ae11c9d174c344eb9df665 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 61917fcefd59c192145aeac427225cd580142df8..0f5bbdb1629c1cb5c31e57565c1623b0f8ea9432 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 57ce92a0cdd932ab6fb3d6228157b80243790b11..2d9a8f40d4e229526a6e9afc5d7b76842bd08ba5 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 4ea15b94465647bd2faa4b3dfb39f62ba9c2f5bb..353593b7f4091db1e9f357dba3115a6a16e7afce 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 cadaf0850daaa9242d22a22b7b5276a6f9751f6e..365e64d1b131efbad40267c5bfa19437e3a3c3a6 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 dbfc61739f7d21e2d095ae55181831345fc05a75..708d968d6c6df30a9521a9c5e1c3a70471155fb4 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 126e10b3376db7ed71df101e5bb395241434ada8..65dda0653e0917f509c141bb2ca45938d046a508 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 ee2a95f2082b2a298e2ac4a53ae7d307191f1e2d..b6cf96b5b0d368cd9ba5d2882587afaf6fb78e05 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 688b9364b63c3840446bc89927e9c8718fc7975f..7cd8f48ee4bb5632913fa492abcce2a26b9522dd 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 0000000000000000000000000000000000000000..9dca480e2ec1907c6f27fb2e9b1eac70843a4b38 --- /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 acf9a72d2406dcfa843de9092ba8885e21952ab7..ac9c639c497956968433375dc05fc8123f71c9a3 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,46 +176,40 @@ 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 </blockName> - 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; - } - else - { - skipBlock(is, blockName); + closeName = ""; + + while (is.get(c) && c != '>') + { + closeName += c; + } } } - else - { - skipBlock(is, blockName); - } } void Foam::doxygenXmlParser::skipForward ( IFstream& is, - const word blockName + const word& blockName ) const { // recurse to move forward in 'is' until come across <blockName> diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H b/applications/utilities/miscellaneous/foamHelp/helpTypes/doxygenXmlParser/doxygenXmlParser.H index f2abdaee8d4f6c9f9e071b807f80e4e5b92663cf..9853589fa3e3b688a55b9923bddece682b8e188b 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<class Type> diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpType/helpType.C index 0b982e76a7e03a466df79b076609b570ba810060..29ad9ddbde30963b7001891fd3c5127612ac81cb 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<word>(parser.toc()) diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index 09b169821dfdf683c35e9cb827d6a4ccbfe5a6f6..c774d5012c977cc20992bce6a51126e08cdb229e 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<word>& 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<word> selectedFields; if (args.optionFound("fields")) @@ -169,6 +187,11 @@ int main(int argc, char *argv[]) { masterTimeDirs = runTime.times(); } + HashSet<word> 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 4dce3b20280fd4c3fa262d38702f53de1e0e5a54..26a6a45f5755d528a0705a5896bafce5cb253425 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 eb13cdf60b124dc91725a328e5162a014754f300..1c7275b1663a89ca33df22006e9fe32582a18b7e 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 7a6faf95c45434cd7a5cc4e26119553c2d707d7b..1b03e9e27d182a642bee6d85bd7c46395e02cf3f 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 b5aea0e5719483fd2376477a5b4ec371c3bdb29e..895dee69e122f13c9b98fab7120e20b5df918030 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 bf57a98eb98052e23958607ff093ca8bdee86e8e..97522bab8c88caa5342b95e20b1e532064b8bc07 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 a4296ff91b648c2a412bd8c6224b731af47b6466..eedd2ac9bd8e2c6e14cd69de315cada787981415 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedScalarField/DimensionedScalarField.C @@ -369,6 +369,263 @@ tmp<DimensionedField<scalar, GeoMesh> > pow return pow(dimensionedScalar(s), tdsf); } + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const DimensionedField<scalar, GeoMesh>& dsf1, + const DimensionedField<scalar, GeoMesh>& dsf2 +) +{ + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 + ( + new DimensionedField<scalar, GeoMesh> + ( + 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<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1, + const DimensionedField<scalar, GeoMesh>& dsf2 +) +{ + const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1(); + + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 = + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New + ( + tdsf1, + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + atan2(dsf1.dimensions(), dsf2.dimensions()) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf1); + + return tAtan2; +} + + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const DimensionedField<scalar, GeoMesh>& dsf1, + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2 +) +{ + const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2(); + + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 = + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New + ( + tdsf2, + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + atan2(dsf1.dimensions(), dsf2.dimensions()) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf2); + + return tAtan2; +} + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1, + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2 +) +{ + const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1(); + const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2(); + + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 = + reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>:: + New + ( + tdsf1, + tdsf2, + "atan2(" + dsf1.name() + ',' + dsf2.name() + ')', + atan2(dsf1.dimensions(), dsf2.dimensions()) + ); + + atan2(tAtan2().field(), dsf1.field(), dsf2.field()); + + reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::clear + ( + tdsf1, + tdsf2 + ); + + return tAtan2; +} + + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const DimensionedField<scalar, GeoMesh>& dsf, + const dimensionedScalar& ds +) +{ + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 + ( + new DimensionedField<scalar, GeoMesh> + ( + 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<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf, + const dimensionedScalar& ds +) +{ + const DimensionedField<scalar, GeoMesh>& dsf = tdsf(); + + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 = + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New + ( + tdsf, + "atan2(" + dsf.name() + ',' + ds.name() + ')', + atan2(dsf.dimensions(), ds) + ); + + atan2(tAtan2().field(), dsf.field(), ds.value()); + + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf); + + return tAtan2; +} + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const DimensionedField<scalar, GeoMesh>& dsf, + const scalar& s +) +{ + return atan2(dsf, dimensionedScalar(s)); +} + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf, + const scalar& s +) +{ + return atan2(tdsf, dimensionedScalar(s)); +} + + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const dimensionedScalar& ds, + const DimensionedField<scalar, GeoMesh>& dsf +) +{ + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 + ( + new DimensionedField<scalar, GeoMesh> + ( + 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<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const dimensionedScalar& ds, + const tmp<DimensionedField<scalar, GeoMesh> >& tdsf +) +{ + const DimensionedField<scalar, GeoMesh>& dsf = tdsf(); + + tmp<DimensionedField<scalar, GeoMesh> > tAtan2 = + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New + ( + tdsf, + "atan2(" + ds.name() + ',' + dsf.name() + ')', + atan2(ds, dsf.dimensions()) + ); + + atan2(tAtan2().field(), ds.value(), dsf.field()); + + reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf); + + return tAtan2; +} + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const scalar& s, + const DimensionedField<scalar, GeoMesh>& dsf +) +{ + return atan2(dimensionedScalar(s), dsf); +} + +template<class GeoMesh> +tmp<DimensionedField<scalar, GeoMesh> > atan2 +( + const scalar& s, + const tmp<DimensionedField<scalar, GeoMesh> >& 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 b6e76631e0402b9e68996c61d75e30b8b2451105..1503c2567b8c6da4f86e0db723b2ab8fc145035e 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 ce78313efb2884b09d65bb0cc51852be380ec0e5..4c7ee46b89bc5eea662787d9bf3e5a02a0f5c30e 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<template<class> class PatchField, class GeoMesh> @@ -440,6 +441,315 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow } +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<template<class> class PatchField, class GeoMesh> +void atan2 +( + GeometricField<scalar, PatchField, GeoMesh>& Atan2, + const GeometricField<scalar, PatchField, GeoMesh>& gsf1, + const GeometricField<scalar, PatchField, GeoMesh>& gsf2 +) +{ + atan2(Atan2.internalField(), gsf1.internalField(), gsf2.internalField()); + atan2(Atan2.boundaryField(), gsf1.boundaryField(), gsf2.boundaryField()); +} + + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const GeometricField<scalar, PatchField, GeoMesh>& gsf1, + const GeometricField<scalar, PatchField, GeoMesh>& gsf2 +) +{ + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + new GeometricField<scalar, PatchField, GeoMesh> + ( + 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<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1, + const GeometricField<scalar, PatchField, GeoMesh>& gsf2 +) +{ + const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1(); + + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New + ( + tgsf1, + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + atan2(gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf1); + + return tAtan2; +} + + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const GeometricField<scalar, PatchField, GeoMesh>& gsf1, + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2 +) +{ + const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2(); + + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New + ( + tgsf2, + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + atan2( gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf2); + + return tAtan2; +} + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1, + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2 +) +{ + const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1(); + const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2(); + + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + reuseTmpTmpGeometricField + <scalar, scalar, scalar, scalar, PatchField, GeoMesh>::New + ( + tgsf1, + tgsf2, + "atan2(" + gsf1.name() + ',' + gsf2.name() + ')', + atan2(gsf1.dimensions(), gsf2.dimensions()) + ) + ); + + atan2(tAtan2(), gsf1, gsf2); + + reuseTmpTmpGeometricField + <scalar, scalar, scalar, scalar, PatchField, GeoMesh> + ::clear(tgsf1, tgsf2); + + return tAtan2; +} + + +template<template<class> class PatchField, class GeoMesh> +void atan2 +( + GeometricField<scalar, PatchField, GeoMesh>& tAtan2, + const GeometricField<scalar, PatchField, GeoMesh>& gsf, + const dimensioned<scalar>& ds +) +{ + atan2(tAtan2.internalField(), gsf.internalField(), ds.value()); + atan2(tAtan2.boundaryField(), gsf.boundaryField(), ds.value()); +} + + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const GeometricField<scalar, PatchField, GeoMesh>& gsf, + const dimensionedScalar& ds +) +{ + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + new GeometricField<scalar, PatchField, GeoMesh> + ( + 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<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf, + const dimensionedScalar& ds +) +{ + const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf(); + + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New + ( + tgsf, + "atan2(" + gsf.name() + ',' + ds.name() + ')', + atan2(gsf.dimensions(), ds) + ) + ); + + atan2(tAtan2(), gsf, ds); + + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf); + + return tAtan2; +} + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const GeometricField<scalar, PatchField, GeoMesh>& gsf, + const scalar& s +) +{ + return atan2(gsf, dimensionedScalar(s)); +} + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf, + const scalar& s +) +{ + return atan2(tgsf, dimensionedScalar(s)); +} + + +template<template<class> class PatchField, class GeoMesh> +void atan2 +( + GeometricField<scalar, PatchField, GeoMesh>& tAtan2, + const dimensioned<scalar>& ds, + const GeometricField<scalar, PatchField, GeoMesh>& gsf +) +{ + atan2(tAtan2.internalField(), ds.value(), gsf.internalField()); + atan2(tAtan2.boundaryField(), ds.value(), gsf.boundaryField()); +} + + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const dimensionedScalar& ds, + const GeometricField<scalar, PatchField, GeoMesh>& gsf +) +{ + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + new GeometricField<scalar, PatchField, GeoMesh> + ( + 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<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const dimensionedScalar& ds, + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf +) +{ + const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf(); + + tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2 + ( + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New + ( + tgsf, + "atan2(" + ds.name() + ',' + gsf.name() + ')', + atan2(ds, gsf.dimensions()) + ) + ); + + atan2(tAtan2(), ds, gsf); + + reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf); + + return tAtan2; +} + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const scalar& s, + const GeometricField<scalar, PatchField, GeoMesh>& gsf +) +{ + return atan2(dimensionedScalar(s), gsf); +} + +template<template<class> class PatchField, class GeoMesh> +tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2 +( + const scalar& s, + const tmp<GeometricField<scalar, PatchField, GeoMesh> >& 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 fd20e171c9c0e28f346381a51b9d0d92f214bb87..9c41fb1fec41acb8fab8bfc26819a513a86ae84a 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 4ee6d7bb36e1af69b21c4e1473738dee389015fa..aed10a40a1f4a58324238d172c236a2a599bb76a 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 73c201f0fcc483897c74dba408c4c68ee2bf6156..0376a91bf906e6e71b331e56fd65330568bb8ee9 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 b8a48ed0ce879b214d4ee34883971f1eeb2fd5b4..89ea70d85c7986dd9b53342aa877ea5febf0ce66 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,47 @@ namespace Foam { namespace combustionModels { + // Combustion models based on sensibleEnthalpy + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiThermoCombustion, + gasHThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + psiThermoCombustion, + constGasHThermoPhysics, + psiCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoThermoCombustion, + gasHThermoPhysics, + rhoCombustionModel + ); + + makeCombustionTypesThermo + ( + infinitelyFastChemistry, + rhoThermoCombustion, + constGasHThermoPhysics, + rhoCombustionModel + ); + + // Combustion models based on sensibleInternalEnergy + makeCombustionTypesThermo ( infinitelyFastChemistry, psiThermoCombustion, - gasThermoPhysics, + gasEThermoPhysics, psiCombustionModel ); @@ -48,7 +84,7 @@ namespace combustionModels ( infinitelyFastChemistry, psiThermoCombustion, - constGasThermoPhysics, + constGasEThermoPhysics, psiCombustionModel ); @@ -56,7 +92,7 @@ namespace combustionModels ( infinitelyFastChemistry, rhoThermoCombustion, - gasThermoPhysics, + gasEThermoPhysics, rhoCombustionModel ); @@ -64,7 +100,7 @@ namespace combustionModels ( infinitelyFastChemistry, rhoThermoCombustion, - constGasThermoPhysics, + constGasEThermoPhysics, rhoCombustionModel ); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index bc6af600b564a9fafd96ce04743b0dd539fb5591..65c389e0372c44756257d6a604736a35cd289be9 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 72a7e9fdc37e28115b11bad6c19da93e86f75316..67374b7b47bc7eb42c1f504f7bc983337c16778a 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 b4a973a70828fe0355fe41e671a4e5635b3529b2..62e40e215b07b72e1dc4af5168a1d14d7265fc9f 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 e5be84743cb2412f03d8f75eab542653fd0a6a90..5ecc84043af7b24e086ddf419da1bd418fc1b85c 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 189d43bdfa917426b6348fa5b4823c820e3574a9..ed2c8c2ba61b67f098bd8c15f3815115763a63e1 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, + incompressibleGasHThermoPhysics) + ; + makeChemistrySolverTypes(psiChemistryModel, icoPoly8HThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, constGasHThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, gasHThermoPhysics); + makeChemistrySolverTypes + ( + rhoChemistryModel, + constIncompressibleGasHThermoPhysics + ); + 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(psiChemistryModel, incompressibleGasThermoPhysics); - makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, constGasThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); makeChemistrySolverTypes ( rhoChemistryModel, - constIncompressibleGasThermoPhysics + incompressibleGasEThermoPhysics ); - makeChemistrySolverTypes(rhoChemistryModel, incompressibleGasThermoPhysics); - makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics); + makeChemistrySolverTypes(rhoChemistryModel, icoPoly8EThermoPhysics); } diff --git a/src/thermophysicalModels/radiationModels/include/createIncompressibleRadiationModel.H b/src/thermophysicalModels/radiationModels/include/createIncompressibleRadiationModel.H new file mode 100644 index 0000000000000000000000000000000000000000..ab7466d0a79195b257b3c7f38b2e301d69b14f5e --- /dev/null +++ b/src/thermophysicalModels/radiationModels/include/createIncompressibleRadiationModel.H @@ -0,0 +1,32 @@ + autoPtr<radiation::radiationModel> 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 94d08934ab6ca7eb36e903b19f6845dbd678213f..a07142897b78228ac6c4fa15e8a583e9f77b4d4d 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<scalar, volMesh> 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 2077d74445685ff3bc09884e8b6bb57083308c6c..fd86c51d09070699768d78b586f182af5169fcb5 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 69666b7c63a0a591021ed049dc00e439bbc4bb4c..234b0fcd00c57d28030ee2a5e330162756108583 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 ddc4a7a438f7fd17ad470c950aba78ce05c3b667..405ae7cc9c92c31541b952ab5e42ff87ba188b58 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 5948101185c074bc1aa90c44b10bca28be2c7759..48cd4178609f1a8a967f8b97d7179bf2cce74107 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::fvScalarMatrix> Foam::radiation::radiationModel::Sh } +Foam::tmp<Foam::fvScalarMatrix> 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 1218dac9e9b72612be3a91984f2d08d52215ec88..d4c39bd958eacd1e3a2e7b6811bd360bacf6442a 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<volScalarField> Rp() const = 0; @@ -213,6 +224,13 @@ public: //- Energy source term virtual tmp<fvScalarMatrix> Sh(fluidThermo& thermo) const; + //- Temperature source term + virtual tmp<fvScalarMatrix> 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 0a4dd3730c8e47d264c38de8d4255444bdfdfec3..65b96b48ed476bc8ae720ac3386832650fdd75a6 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 3b34006e8eb1e8ca6f893c146059eee3dc966b2b..0718afc0698aaed7c996498cef41b8a27a2d2560 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 b7474a9fafba56f46d2fae5eb0199ae2b04c8aa1..b90e447c0b2350e1f138a3b55849437a27363f3e 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 + +makeChemistryReader(constGasHThermoPhysics); +makeChemistryReader(gasHThermoPhysics); +makeChemistryReader(constIncompressibleGasHThermoPhysics); +makeChemistryReader(incompressibleGasHThermoPhysics); +makeChemistryReader(icoPoly8HThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics); +makeChemistryReaderType +( + foamChemistryReader, + constIncompressibleGasHThermoPhysics +); +makeChemistryReaderType(foamChemistryReader, incompressibleGasHThermoPhysics); +makeChemistryReaderType(foamChemistryReader, icoPoly8HThermoPhysics); + -makeChemistryReaderType(foamChemistryReader, constGasThermoPhysics); -makeChemistryReaderType(foamChemistryReader, gasThermoPhysics); + +// Solid chemistry readers based on sensibleInternalEnergy + +makeChemistryReader(constGasEThermoPhysics); +makeChemistryReader(gasEThermoPhysics); +makeChemistryReader(constIncompressibleGasEThermoPhysics); +makeChemistryReader(incompressibleGasEThermoPhysics); +makeChemistryReader(icoPoly8EThermoPhysics); + +makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics); +makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics); makeChemistryReaderType ( foamChemistryReader, - constIncompressibleGasThermoPhysics + constIncompressibleGasEThermoPhysics ); -makeChemistryReaderType(foamChemistryReader, incompressibleGasThermoPhysics); -makeChemistryReaderType(foamChemistryReader, icoPoly8ThermoPhysics); +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 c0cce76a2ade77865be53adf2194423a12bc928f..678300a172ca945e6da19b0cea0377a753de995e 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -296,13 +296,13 @@ List<specieElement> 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<gasReaction::specieCoeffs> lhs; -DynamicList<gasReaction::specieCoeffs> rhs; +DynamicList<gasHReaction::specieCoeffs> lhs; +DynamicList<gasHReaction::specieCoeffs> rhs; scalarList ArrheniusCoeffs(3); DynamicList<scalar> reactionCoeffs; @@ -312,7 +312,7 @@ label currentThirdBodyIndex = -1; word reactionCoeffsName = word::null; HashTable<scalarList> reactionCoeffsTable; -DynamicList<gasReaction::specieCoeffs> *lrhsPtr = &lhs; +DynamicList<gasHReaction::specieCoeffs> *lrhsPtr = &lhs; reactionType rType = unknownReactionType; reactionRateType rrType = Arrhenius; @@ -609,7 +609,7 @@ bool finishReaction = false; <readThermoLineLabel4>{thermoLineLabel4} { - HashPtrTable<gasThermoPhysics>::iterator specieThermoIter + HashPtrTable<gasHThermoPhysics>::iterator specieThermoIter ( speciesThermo_.find(currentSpecieName) ); @@ -622,7 +622,7 @@ bool finishReaction = false; speciesThermo_.insert ( currentSpecieName, - new gasThermoPhysics + new gasHThermoPhysics ( janafThermo<perfectGas<specie> > ( @@ -1429,7 +1429,7 @@ bool finishReaction = false; <readReactionOrder>{reactionCoeff}{endReactionCoeffs} { - DynamicList<gasReaction::specieCoeffs>& lrhs = *lrhsPtr; + DynamicList<gasHReaction::specieCoeffs>& lrhs = *lrhsPtr; bool found = false; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index 922c1227b9c55615fd44f985bd2eef75e9e0fc59..5ee2a03ac3da93eda3043e7c6ccd96948a99b327 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<class ReactionRateType> void Foam::chemkinReader::addReactionType ( const reactionType rType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const ReactionRateType& rr ) { @@ -180,9 +180,9 @@ void Foam::chemkinReader::addReactionType reactions_.append ( new IrreversibleReaction - <Reaction, gasThermoPhysics, ReactionRateType> + <Reaction, gasHThermoPhysics, ReactionRateType> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -200,9 +200,9 @@ void Foam::chemkinReader::addReactionType reactions_.append ( new ReversibleReaction - <Reaction, gasThermoPhysics, ReactionRateType> + <Reaction, gasHThermoPhysics, ReactionRateType> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -240,8 +240,8 @@ void Foam::chemkinReader::addPressureDependentReaction ( const reactionType rType, const fallOffFunctionType fofType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& efficiencies, const scalarList& k0Coeffs, const scalarList& kInfCoeffs, @@ -423,8 +423,8 @@ void Foam::chemkinReader::addPressureDependentReaction void Foam::chemkinReader::addReaction ( - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& efficiencies, const reactionType rType, const reactionRateType rrType, @@ -499,9 +499,9 @@ void Foam::chemkinReader::addReaction reactions_.append ( new NonEquilibriumReversibleReaction - <Reaction, gasThermoPhysics, ArrheniusReactionRate> + <Reaction, gasHThermoPhysics, ArrheniusReactionRate> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -554,11 +554,11 @@ void Foam::chemkinReader::addReaction new NonEquilibriumReversibleReaction < Reaction, - gasThermoPhysics, + gasHThermoPhysics, thirdBodyArrheniusReactionRate > ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), @@ -661,9 +661,9 @@ void Foam::chemkinReader::addReaction reactions_.append ( new NonEquilibriumReversibleReaction - <Reaction, gasThermoPhysics, LandauTellerReactionRate> + <Reaction, gasHThermoPhysics, LandauTellerReactionRate> ( - Reaction<gasThermoPhysics> + Reaction<gasHThermoPhysics> ( speciesTable_, lhs.shrink(), diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H index 6e0d4dc5c1af7eec497eb6d7c0ece31f71be1c39..4cd84f59a507b93d2aa3fcc5b3f35dfdc213a881 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<gasThermoPhysics>, + public chemistryReader<gasHThermoPhysics>, public yyFlexLexer { @@ -199,13 +199,13 @@ private: HashTable<phase> speciePhase_; //- Table of the thermodynamic data given in the CHEMKIN file - HashPtrTable<gasThermoPhysics> speciesThermo_; + HashPtrTable<gasHThermoPhysics> speciesThermo_; //- Table of species composition HashTable<List<specieElement> > specieComposition_; //- List of the reactions - ReactionList<gasThermoPhysics> reactions_; + ReactionList<gasHThermoPhysics> reactions_; // Private Member Functions @@ -257,8 +257,8 @@ private: void addReactionType ( const reactionType rType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const ReactionRateType& rr ); @@ -267,8 +267,8 @@ private: ( const reactionType rType, const fallOffFunctionType fofType, - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& rhs, const scalarList& thirdBodyEfficiencies, const scalarList& k0Coeffs, const scalarList& kInfCoeffs, @@ -280,8 +280,8 @@ private: void addReaction ( - DynamicList<gasReaction::specieCoeffs>& lhs, - DynamicList<gasReaction::specieCoeffs>& rhs, + DynamicList<gasHReaction::specieCoeffs>& lhs, + DynamicList<gasHReaction::specieCoeffs>& 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<gasThermoPhysics>& speciesThermo() const + const HashPtrTable<gasHThermoPhysics>& speciesThermo() const { return speciesThermo_; } @@ -376,7 +376,7 @@ public: } //- List of the reactions - const ReactionList<gasThermoPhysics>& reactions() const + const ReactionList<gasHThermoPhysics>& reactions() const { return reactions_; } diff --git a/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C b/src/thermophysicalModels/reactionThermo/psiReactionThermo/psiReactionThermos.C index 4e65f3a24c8dbc5dd3283b6015446cfc2b475e1b..ed1e0abf8144f27e11ba34b661ae9d9b991fa775 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,62 @@ 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 +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + constGasHThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + reactingMixture, + gasHThermoPhysics +); + +makeReactionMixtureThermo +( + psiThermo, + psiReactionThermo, + hePsiThermo, + singleStepReactingMixture, + gasHThermoPhysics +); + + +// Multi-component reaction thermo for internal energy makeReactionMixtureThermo ( @@ -208,7 +259,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, reactingMixture, - constGasThermoPhysics + constGasEThermoPhysics ); makeReactionMixtureThermo @@ -217,7 +268,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, reactingMixture, - gasThermoPhysics + gasEThermoPhysics ); makeReactionMixtureThermo @@ -226,7 +277,7 @@ makeReactionMixtureThermo psiReactionThermo, hePsiThermo, singleStepReactingMixture, - gasThermoPhysics + gasEThermoPhysics ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C b/src/thermophysicalModels/reactionThermo/rhoReactionThermo/rhoReactionThermos.C index 6dbf589bce9ecbcc9ee02a9274adb18e4753bb29..a6a880ca764bd63d4853a324abbb9adfffd29c8a 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 104fa11a7d7a5d55c5073a324ee2d72c08c790ed..d51976f196c2c8d74101aabcc844d8f078981463 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 9c8a6df052fbd0e7be6f5efc0ce21c519c2582e7..3b6f13f486398a810b1c9bff714b95d5b095ef72 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 7ff3f054e3adfc9a42567bfbf2835eca07fd1121..566c3c972911bfdb5634ba70ac6699d47833bdcf 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 340d4b1e4c5f502320282a3256228329ee53abe2..ff2f3e233dfccfa21d08c5cb150ca4070fa0ff89 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 * * * * * * * * * * * // + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Specie> inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas ( - const Specie& sp + const Specie& sp, const scalar pRef ) : - Specie(sp) + Specie(sp), + pRef_(pRef) {} -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class Specie> +inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas +( + const incompressiblePerfectGas& ipg +) +: + Specie(ipg), + pRef_(ipg.pRef_) +{} + template<class Specie> inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas ( const word& name, - const incompressiblePerfectGas<Specie>& pg + const incompressiblePerfectGas<Specie>& ipg ) : - Specie(name, pg) + Specie(name, ipg), + pRef_(ipg.pRef_) {} @@ -109,7 +121,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::psi scalar T ) const { - return 0.0; + return 1.0/(this->R()*T); } @@ -120,7 +132,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Z scalar ) const { - return 0.0; + return 1.0; } @@ -138,23 +150,43 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::cpMcv // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // +template<class Specie> +inline Foam::incompressiblePerfectGas<Specie>& +Foam::incompressiblePerfectGas<Specie>::operator= +( + const incompressiblePerfectGas<Specie>& ipg +) +{ + Specie::operator=(ipg); + + pRef_ = ipg.pRef_; + + return *this; +} + template<class Specie> inline void Foam::incompressiblePerfectGas<Specie>::operator+= ( - const incompressiblePerfectGas<Specie>& pg + const incompressiblePerfectGas<Specie>& ipg ) { - Specie::operator+=(pg); + scalar molr1 = this->nMoles(); + Specie::operator+=(ipg); + molr1 /= this->nMoles(); + scalar molr2 = ipg.nMoles()/this->nMoles(); + + pRef_ = molr1*pRef_ + molr2*ipg.pRef_; } template<class Specie> inline void Foam::incompressiblePerfectGas<Specie>::operator-= ( - const incompressiblePerfectGas<Specie>& pg + const incompressiblePerfectGas<Specie>& ipg ) { - Specie::operator-=(pg); + Specie::operator-=(ipg); + pRef_ = ipg.pRef_; } @@ -170,14 +202,19 @@ inline void Foam::incompressiblePerfectGas<Specie>::operator*=(const scalar s) template<class Specie> inline Foam::incompressiblePerfectGas<Specie> Foam::operator+ ( - const incompressiblePerfectGas<Specie>& pg1, - const incompressiblePerfectGas<Specie>& pg2 + const incompressiblePerfectGas<Specie>& ipg1, + const incompressiblePerfectGas<Specie>& ipg2 ) { + scalar nMoles = ipg1.nMoles() + ipg2.nMoles(); + scalar molr1 = ipg1.nMoles()/nMoles; + scalar molr2 = ipg2.nMoles()/nMoles; + return incompressiblePerfectGas<Specie> ( - static_cast<const Specie&>(pg1) - + static_cast<const Specie&>(pg2) + static_cast<const Specie&>(ipg1) + + static_cast<const Specie&>(ipg2), + molr1*ipg1.pRef_ + molr2*ipg2.pRef_ ); } @@ -185,14 +222,15 @@ inline Foam::incompressiblePerfectGas<Specie> Foam::operator+ template<class Specie> inline Foam::incompressiblePerfectGas<Specie> Foam::operator- ( - const incompressiblePerfectGas<Specie>& pg1, - const incompressiblePerfectGas<Specie>& pg2 + const incompressiblePerfectGas<Specie>& ipg1, + const incompressiblePerfectGas<Specie>& ipg2 ) { return incompressiblePerfectGas<Specie> ( - static_cast<const Specie&>(pg1) - - static_cast<const Specie&>(pg2) + static_cast<const Specie&>(ipg1) + - static_cast<const Specie&>(ipg2), + ipg1.pRef_ ); } @@ -201,10 +239,14 @@ template<class Specie> inline Foam::incompressiblePerfectGas<Specie> Foam::operator* ( const scalar s, - const incompressiblePerfectGas<Specie>& pg + const incompressiblePerfectGas<Specie>& ipg ) { - return incompressiblePerfectGas<Specie>(s*static_cast<const Specie&>(pg)); + return incompressiblePerfectGas<Specie> + ( + s*static_cast<const Specie&>(ipg), + ipg.pRef_ + ); } diff --git a/src/thermophysicalModels/specie/include/reactionTypes.H b/src/thermophysicalModels/specie/include/reactionTypes.H index 8b0a5f20d559f128a46e7624d8a016da46562328..e6af91d8967d473b36fbed027e4211b14f99003c 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<constGasThermoPhysics> constGasReaction; + // sensible enthalpy based reactions + typedef Reaction<constGasHThermoPhysics> constGasHReaction; - typedef Reaction<gasThermoPhysics> gasReaction; + typedef Reaction<gasHThermoPhysics> gasHReaction; - typedef Reaction<constIncompressibleGasThermoPhysics> - constIncompressibleGasReaction; + typedef Reaction<constIncompressibleGasHThermoPhysics> + constIncompressibleGasHReaction; - typedef Reaction<incompressibleGasThermoPhysics> incompressibleGasReaction; + typedef Reaction<incompressibleGasHThermoPhysics> + incompressibleGasHReaction; - typedef Reaction<icoPoly8ThermoPhysics> icoPoly8Reaction; + typedef Reaction<icoPoly8HThermoPhysics> icoPoly8HReaction; + + // internal ennergy based reactions + typedef Reaction<constGasEThermoPhysics> constGasEReaction; + + typedef Reaction<gasEThermoPhysics> gasEReaction; + + typedef Reaction<constIncompressibleGasEThermoPhysics> + constIncompressibleGasEReaction; + + typedef Reaction<incompressibleGasEThermoPhysics> + incompressibleGasEReaction; + + typedef Reaction<icoPoly8EThermoPhysics> icoPoly8EReaction; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H b/src/thermophysicalModels/specie/include/thermoPhysicsTypes.H index a3a276b926a44c307671aaeecfcd2a809fa72601..cb17a56a1419b064ece1a1d6d6e613609832b545 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<specie> + >, + sensibleInternalEnergy + > + > constGasEThermoPhysics; + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + perfectGas<specie> + >, + sensibleInternalEnergy + > + > gasEThermoPhysics; + + typedef + constTransport + < + species::thermo + < + hConstThermo + < + incompressiblePerfectGas<specie> + >, + sensibleInternalEnergy + > + > constIncompressibleGasEThermoPhysics; + + typedef + sutherlandTransport + < + species::thermo + < + janafThermo + < + incompressiblePerfectGas<specie> + >, + sensibleInternalEnergy + > + > incompressibleGasEThermoPhysics; + + typedef + polynomialTransport + < + species::thermo + < + hPolynomialThermo + < + icoPolynomial<specie, 8>, + 8 + >, + sensibleInternalEnergy + >, + 8 + > icoPoly8EThermoPhysics; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C b/src/thermophysicalModels/specie/reaction/reactions/makeLangmuirHinshelwoodReactions.C index 6f98a4bc3570eb7b426109b6437138c9aa93f5b8..b5d8c0ad1d1f5ff0addceb56b4895d23d19f63e6 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 ff13e68b69abdadc537f0f84799f620c7e0003d6..4dfd73d6a033d9cfdd17a84d8037125187371604 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 30c31c7471bffc10fc8a57c75bc336190538f89d..643c593447c13d0d44977f4bbd6d06fab50fa0e8 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/combustionProperties @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; +combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>; active true; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties index 1576592b91a3a00fb93f3adfbf53029216dabd7c..51e80f82d64f8071b585d60ff043dd8742ab02b5 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/combustionProperties @@ -15,9 +15,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -//combustionModel noCombustion<psiThermoCombustion>; -combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; -//combustionModel FSD<psiThermoCombustion,gasThermoPhysics>; +combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>; +//combustionModel FSD<psiThermoCombustion,gasHThermoPhysics>; active true; diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties index 689dc54c6295bdc4da1324124adb9fe69fb1e281..cedf34b4115448cd5a88c36120d5b7949fa97e8f 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/combustionProperties @@ -16,7 +16,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; +combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>; active on; diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 b/tutorials/compressible/rhoPimplecFoam/angledDuct/constant/polyMesh/blockMeshDict.m4 index 79da11e10ac8f655aa16fc6287c9496875d8672f..2e865a7856a7ac268e22302a7b752184d8bc0ba7 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) - ) - - wall back - ( - // 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 porosityWall - ( - // 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) - ) - - patch outlet - ( - quad2D(out2, out1) - ) + front + { + type wall; + faces + ( + // inlet block + frontQuad(in1, join1, join2, in2) + // outlet block + frontQuad(poro1, out1, out2, poro2) + ); + } + + back + { + type wall; + faces + ( + // inlet block + backQuad(in1, join1, join2, in2) + // outlet block + backQuad(poro1, out1, out2, poro2) + ); + } + + wall + { + type wall; + faces + ( + // inlet block + quad2D(in1, join1) + quad2D(join2, in2) + // outlet block + quad2D(poro1, out1) + quad2D(out2, poro2) + ); + } + + 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) + ); + } + + inlet + { + type patch; + faces + ( + quad2D(in2, in1) + ); + } + + 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 7dba85c0dcd3f2dc9774bb4a6a9ef91b7034f5f4..b150d51b8f0bd76a38f2c675609965072624ec03 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 4a126ed8e44ac2adea221069d86969dc2c51456a..3f77479c31016c975eebcee01f6f429602e7746e 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 a1e310922224d85f5ade01fa361b7ed0e1aeba01..e2bc9c870dd195f36ae69dac774451bf91191614 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 65a9606e7fb75aadf0be3b521903be30b9f3f193..1fb7a16e855de7f1a5a729571f5fa55b95f7a227 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 56c28a929a15d0a6132817100e86302594d41a60..25b10212a3e5bd6efbc0c30f98acf844cae3eb93 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 812766041a21bed2e68133a8532c64336f224a37..24db1f2af0146d9f8cad648232676823b748848f 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 e60b3cbff166383be12aa5b3ad5c4d934c663b2a..7e4087cf142fcda51ec132c51811f9c51d7b2290 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 bcb3e3e80d63667f4ed013fb1be631777cff6e33..b59b42445e9092a2997977b7433fd3d158f968d4 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 b8e8e662f88b1198baf6581d758d88e99e8ad9ad..25ca30f1e13f1092112b38fef9f1bcabad7533b5 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 d23afe73b472f4ac467a2fdac84f7f3073f17536..6d4b26abea7615f2413b0fad7d4956782bccc968 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 3d506aa1d7f2e631efb8635916edcd7f8dcc0ab1..08a4e20e6b535bf4f6e40aa4a780238af6bbec17 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 567bb997b9e99779c99732cfd88010ca19678ac4..9df6a831bf7d92eee132130ce0f14958784163a5 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 87011efb061f19f0e45da082b0855543320704b9..c4d32cf2ff7d6597b53e84048a1078b387fa7df9 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 567bb997b9e99779c99732cfd88010ca19678ac4..9df6a831bf7d92eee132130ce0f14958784163a5 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 87011efb061f19f0e45da082b0855543320704b9..c4d32cf2ff7d6597b53e84048a1078b387fa7df9 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 4314556cfc66040c96b55dda75e40488d46144d9..91c8379fa0ffbbbb49b45c91c10604864057f1ff 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 3d506aa1d7f2e631efb8635916edcd7f8dcc0ab1..08a4e20e6b535bf4f6e40aa4a780238af6bbec17 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 67fe78ad7490ec8c0b915a570e98432fa0292a20..bf6106677fc7d27dc3791d3ab7196a30e9a2c411 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<scalar> -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 -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 -0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 -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 6c824638638ac93677155e8c851d30e944a6cae7..63da42914cee299300a6090a251e8acef3930129 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;