Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2013-01-28 14:10:12 +00:00
78 changed files with 1693 additions and 2659 deletions

View File

@ -15,15 +15,15 @@
} }
label nSpecie = Y.size(); label nSpecie = Y.size();
PtrList<gasThermoPhysics> specieData(Y.size()); PtrList<gasHThermoPhysics> specieData(Y.size());
forAll(specieData, i) forAll(specieData, i)
{ {
specieData.set specieData.set
( (
i, i,
new gasThermoPhysics new gasHThermoPhysics
( (
dynamic_cast<const reactingMixture<gasThermoPhysics>&> dynamic_cast<const reactingMixture<gasHThermoPhysics>&>
(thermo).speciesData()[i] (thermo).speciesData()[i]
) )
); );

View File

@ -5,11 +5,10 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));
volVectorField HbyA("HbyA", U); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H(); HbyA = rAU*UEqn().H();
if (pimple.nCorrPIMPLE() <= 1) if (pimple.nCorrPISO() <= 1)
{ {
UEqn.clear(); UEqn.clear();
} }
@ -26,6 +25,8 @@ if (pimple.transonic())
) )
); );
fvOptions.relativeFlux(fvc::interpolate(psi), phid);
surfaceScalarField phic surfaceScalarField phic
( (
"phic", "phic",
@ -48,12 +49,9 @@ if (pimple.transonic())
fvOptions(psi, p, rho.name()) fvOptions(psi, p, rho.name())
); );
// Relax the pressure equation to maintain diagonal dominance
pEqn.relax();
fvOptions.constrain(pEqn); fvOptions.constrain(pEqn);
pEqn.solve(); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) 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(); phiHbyA += fvc::interpolate(rho*(rAtU - rAU))*fvc::snGrad(p)*mesh.magSf();
HbyA -= (rAU - rAtU)*fvc::grad(p); HbyA -= (rAU - rAtU)*fvc::grad(p);
@ -91,7 +91,7 @@ else
fvOptions.constrain(pEqn); fvOptions.constrain(pEqn);
pEqn.solve(); pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {

View File

@ -1,9 +1,4 @@
{ {
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
volVectorField HbyA("HbyA", U); volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn().H(); HbyA = rAU*UEqn().H();

View File

@ -1,9 +1,4 @@
{ {
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
const volScalarField& psi = thermo.psi(); const volScalarField& psi = thermo.psi();
volVectorField HbyA("HbyA", U); volVectorField HbyA("HbyA", U);

View File

@ -1,8 +1,3 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1())); volScalarField rAtU(1.0/(1.0/rAU - UEqn().H1()));

View File

@ -4,11 +4,13 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools \
-lincompressibleTurbulenceModel \ -lincompressibleTurbulenceModel \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleTransportModels -lincompressibleTransportModels \
-lradiationModels

View File

@ -9,10 +9,14 @@
fvm::ddt(T) fvm::ddt(T)
+ fvm::div(phi, T) + fvm::div(phi, T)
- fvm::laplacian(kappaEff, T) - fvm::laplacian(kappaEff, T)
==
radiation->ST(rhoCpRef, T)
); );
TEqn.relax(); TEqn.relax();
TEqn.solve(); TEqn.solve();
radiation->correct();
rhok = 1.0 - beta*(T - TRef); rhok = 1.0 - beta*(T - TRef);
} }

View File

@ -49,6 +49,7 @@ Description
#include "singlePhaseTransportModel.H" #include "singlePhaseTransportModel.H"
#include "RASModel.H" #include "RASModel.H"
#include "pimpleControl.H" #include "pimpleControl.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -59,6 +60,7 @@ int main(int argc, char *argv[])
#include "createMesh.H" #include "createMesh.H"
#include "readGravitationalAcceleration.H" #include "readGravitationalAcceleration.H"
#include "createFields.H" #include "createFields.H"
#include "createIncompressibleRadiationModel.H"
#include "initContinuityErrs.H" #include "initContinuityErrs.H"
#include "readTimeControls.H" #include "readTimeControls.H"
#include "CourantNo.H" #include "CourantNo.H"

View File

@ -17,7 +17,8 @@
) )
- fvm::laplacian(turbulence->alphaEff(), he) - fvm::laplacian(turbulence->alphaEff(), he)
== ==
fvOptions(rho, he) radiation->Sh(thermo)
+ fvOptions(rho, he)
); );
EEqn.relax(); EEqn.relax();
@ -29,4 +30,5 @@
fvOptions.correct(he); fvOptions.correct(he);
thermo.correct(); thermo.correct();
radiation->correct();
} }

View File

@ -1,4 +1,4 @@
EXE_INC = -g \ EXE_INC = \
-IphaseModel/lnInclude \ -IphaseModel/lnInclude \
-ImultiphaseSystem/lnInclude \ -ImultiphaseSystem/lnInclude \
-ImultiphaseFixedFluxPressure \ -ImultiphaseFixedFluxPressure \

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
wclean libso helpTypes
wclean
# ----------------------------------------------------------------- end-of-file

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -176,38 +176,32 @@ Foam::doxygenXmlParser::doxygenXmlParser
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * 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> // recurse to move forward in 'is' until come across </blockName>
string closeName = ""; string closeName = "";
// fast-forward until we reach a '<'
char c; char c;
while (is.good() && (closeName != blockName))
{
// fast-forward until we reach a '<'
while (is.get(c) && c != '<') while (is.get(c) && c != '<')
{} {}
// check to see if this is a closing block // check to see if this is a closing block
if (is.get(c) && c == '/') if (is.get(c) && c == '/')
{ {
closeName = "";
while (is.get(c) && c != '>') while (is.get(c) && c != '>')
{ {
closeName += c; closeName += c;
} }
if (closeName == blockName)
{
// finished reading block
return;
} }
else
{
skipBlock(is, blockName);
}
}
else
{
skipBlock(is, blockName);
} }
} }
@ -215,7 +209,7 @@ void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const
void Foam::doxygenXmlParser::skipForward void Foam::doxygenXmlParser::skipForward
( (
IFstream& is, IFstream& is,
const word blockName const word& blockName
) const ) const
{ {
// recurse to move forward in 'is' until come across <blockName> // recurse to move forward in 'is' until come across <blockName>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,8 +25,10 @@ Class
Foam::doxygenXmlParser Foam::doxygenXmlParser
Description Description
Parser for doxygen XML
SourceFiles SourceFiles
doxygenXmlParser.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -65,10 +67,10 @@ public:
// Member functions // Member functions
//- Skip past a block //- Skip past a block
void skipBlock(IFstream& is, const word blockName) const; void skipBlock(IFstream& is, const word& blockName) const;
//- Skip forward to block //- Skip forward to block
void skipForward(IFstream& is, const word blockName) const; void skipForward(IFstream& is, const word& blockName) const;
//- Return the entry //- Return the entry
template<class Type> template<class Type>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -148,7 +148,12 @@ void Foam::helpType::displayDoc
{ {
FatalErrorIn 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." << "No help for type " << className << " found."
<< " Valid options include:" << SortableList<word>(parser.toc()) << " Valid options include:" << SortableList<word>(parser.toc())

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License 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[]) int main(int argc, char *argv[])
{ {
argList::addNote argList::addNote
@ -169,6 +187,11 @@ int main(int argc, char *argv[])
{ {
masterTimeDirs = runTime.times(); 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 // 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 Info<< "\n\nReconstructing fields for mesh " << regionName << nl
<< endl; << 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 fvMesh mesh
( (
IOobject IOobject
@ -245,25 +283,12 @@ int main(int argc, char *argv[])
// Loop over all times // Loop over all times
forAll(timeDirs, timeI) 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() Info<< "Skipping time " << timeDirs[timeI].name()
<< endl << endl; << endl << endl;
continue; continue;
} }
}
// Set time for global database // Set time for global database

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -64,6 +64,7 @@ Foam::label Foam::dictionaryEntry::startLineNumber() const
} }
} }
Foam::label Foam::dictionaryEntry::endLineNumber() const Foam::label Foam::dictionaryEntry::endLineNumber() const
{ {
if (size()) if (size())

View File

@ -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) Foam::dimensionSet Foam::transform(const dimensionSet& ds)
{ {
return ds; return ds;

View File

@ -354,6 +354,8 @@ public:
// for transcendental functions // for transcendental functions
friend dimensionSet trans(const dimensionSet&); friend dimensionSet trans(const dimensionSet&);
friend dimensionSet atan2(const dimensionSet&, const dimensionSet&);
//- Return the argument; transformations do not change the dimensions //- Return the argument; transformations do not change the dimensions
friend dimensionSet transform(const dimensionSet&); friend dimensionSet transform(const dimensionSet&);

View File

@ -277,6 +277,21 @@ transFunc(yn)
#undef transFunc #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 } // End namespace Foam

View File

@ -79,6 +79,7 @@ dimensionedScalar tan(const dimensionedScalar&);
dimensionedScalar asin(const dimensionedScalar&); dimensionedScalar asin(const dimensionedScalar&);
dimensionedScalar acos(const dimensionedScalar&); dimensionedScalar acos(const dimensionedScalar&);
dimensionedScalar atan(const dimensionedScalar&); dimensionedScalar atan(const dimensionedScalar&);
dimensionedScalar atan2(const dimensionedScalar&, const dimensionedScalar&);
dimensionedScalar sinh(const dimensionedScalar&); dimensionedScalar sinh(const dimensionedScalar&);
dimensionedScalar cosh(const dimensionedScalar&); dimensionedScalar cosh(const dimensionedScalar&);
dimensionedScalar tanh(const dimensionedScalar&); dimensionedScalar tanh(const dimensionedScalar&);

View File

@ -369,6 +369,263 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
return pow(dimensionedScalar(s), tdsf); 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) UNARY_FUNCTION(scalar, scalar, pow3, pow3)

View File

@ -76,6 +76,9 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
BINARY_FUNCTION(scalar, scalar, scalar, pow) BINARY_FUNCTION(scalar, scalar, scalar, pow)
BINARY_TYPE_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)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -115,6 +115,7 @@ BINARY_OPERATOR(scalar, scalar, scalar, /, '|', divide)
BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide) BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<template<class> class PatchField, class GeoMesh> 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) UNARY_FUNCTION(scalar, scalar, pow3, pow3)

View File

@ -84,6 +84,9 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
BINARY_FUNCTION(scalar, scalar, scalar, pow) BINARY_FUNCTION(scalar, scalar, scalar, pow)
BINARY_TYPE_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)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,11 +38,12 @@ namespace Foam
{ {
namespace combustionModels namespace combustionModels
{ {
// Combustion models based on sensibleEnthalpy
makeCombustionTypesThermo makeCombustionTypesThermo
( (
FSD, FSD,
psiThermoCombustion, psiThermoCombustion,
gasThermoPhysics, gasHThermoPhysics,
psiCombustionModel psiCombustionModel
); );
@ -50,7 +51,7 @@ namespace combustionModels
( (
FSD, FSD,
psiThermoCombustion, psiThermoCombustion,
constGasThermoPhysics, constGasHThermoPhysics,
psiCombustionModel psiCombustionModel
); );
@ -58,7 +59,7 @@ namespace combustionModels
( (
FSD, FSD,
rhoThermoCombustion, rhoThermoCombustion,
gasThermoPhysics, gasHThermoPhysics,
rhoCombustionModel rhoCombustionModel
); );
@ -66,7 +67,40 @@ namespace combustionModels
( (
FSD, FSD,
rhoThermoCombustion, 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 rhoCombustionModel
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,11 +36,12 @@ namespace Foam
{ {
namespace combustionModels namespace combustionModels
{ {
// Combustion models based on sensibleEnthalpy
makeCombustionTypesThermo makeCombustionTypesThermo
( (
diffusion, diffusion,
psiThermoCombustion, psiThermoCombustion,
gasThermoPhysics, gasHThermoPhysics,
psiCombustionModel psiCombustionModel
); );
@ -48,7 +49,7 @@ namespace combustionModels
( (
diffusion, diffusion,
psiThermoCombustion, psiThermoCombustion,
constGasThermoPhysics, constGasHThermoPhysics,
psiCombustionModel psiCombustionModel
); );
@ -56,7 +57,7 @@ namespace combustionModels
( (
diffusion, diffusion,
rhoThermoCombustion, rhoThermoCombustion,
gasThermoPhysics, gasHThermoPhysics,
rhoCombustionModel rhoCombustionModel
); );
@ -64,7 +65,41 @@ namespace combustionModels
( (
diffusion, diffusion,
rhoThermoCombustion, 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 rhoCombustionModel
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,11 +36,13 @@ namespace Foam
{ {
namespace combustionModels namespace combustionModels
{ {
// Combustion models based on sensibleEnthalpy
makeCombustionTypesThermo makeCombustionTypesThermo
( (
infinitelyFastChemistry, infinitelyFastChemistry,
psiThermoCombustion, psiThermoCombustion,
gasThermoPhysics, gasHThermoPhysics,
psiCombustionModel psiCombustionModel
); );
@ -48,7 +50,7 @@ namespace combustionModels
( (
infinitelyFastChemistry, infinitelyFastChemistry,
psiThermoCombustion, psiThermoCombustion,
constGasThermoPhysics, constGasHThermoPhysics,
psiCombustionModel psiCombustionModel
); );
@ -56,7 +58,7 @@ namespace combustionModels
( (
infinitelyFastChemistry, infinitelyFastChemistry,
rhoThermoCombustion, rhoThermoCombustion,
gasThermoPhysics, gasHThermoPhysics,
rhoCombustionModel rhoCombustionModel
); );
@ -64,7 +66,41 @@ namespace combustionModels
( (
infinitelyFastChemistry, infinitelyFastChemistry,
rhoThermoCombustion, rhoThermoCombustion,
constGasThermoPhysics, constGasHThermoPhysics,
rhoCombustionModel
);
// Combustion models based on sensibleInternalEnergy
makeCombustionTypesThermo
(
infinitelyFastChemistry,
psiThermoCombustion,
gasEThermoPhysics,
psiCombustionModel
);
makeCombustionTypesThermo
(
infinitelyFastChemistry,
psiThermoCombustion,
constGasEThermoPhysics,
psiCombustionModel
);
makeCombustionTypesThermo
(
infinitelyFastChemistry,
rhoThermoCombustion,
gasEThermoPhysics,
rhoCombustionModel
);
makeCombustionTypesThermo
(
infinitelyFastChemistry,
rhoThermoCombustion,
constGasEThermoPhysics,
rhoCombustionModel rhoCombustionModel
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -137,7 +137,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs()
// TODO: currently re-evaluating the entire gTan field to return this patch // TODO: currently re-evaluating the entire gTan field to return this patch
const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); const scalarField gTan(film.gTan()().boundaryField()[patchI] & n);
if (max(mag(gTan)) < SMALL) if (patch().size() && (max(mag(gTan)) < SMALL))
{ {
WarningIn WarningIn
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -136,7 +136,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs()
// TODO: currently re-evaluating the entire gTan field to return this patch // TODO: currently re-evaluating the entire gTan field to return this patch
const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); const scalarField gTan(film.gTan()().boundaryField()[patchI] & n);
if (max(mag(gTan)) < SMALL) if (patch().size() && (max(mag(gTan)) < SMALL))
{ {
WarningIn WarningIn
( (

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,39 +39,76 @@ Description
namespace Foam namespace Foam
{ {
// Chemistry moldels based on sensibleEnthalpy
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
constGasThermoPhysics constGasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
gasThermoPhysics gasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
constIncompressibleGasThermoPhysics constIncompressibleGasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
psiChemistryModel, psiChemistryModel,
incompressibleGasThermoPhysics incompressibleGasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
psiChemistryModel, 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
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -39,39 +39,77 @@ Description
namespace Foam namespace Foam
{ {
// Chemistry moldels based on sensibleEnthalpy
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
constGasThermoPhysics constGasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
gasThermoPhysics gasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
constIncompressibleGasThermoPhysics constIncompressibleGasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
rhoChemistryModel, rhoChemistryModel,
incompressibleGasThermoPhysics incompressibleGasHThermoPhysics
); );
makeChemistryModel makeChemistryModel
( (
chemistryModel, chemistryModel,
rhoChemistryModel, 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
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,24 +33,61 @@ License
namespace Foam namespace Foam
{ {
makeChemistrySolverTypes(psiChemistryModel, constGasThermoPhysics); // Chemistry solvers based on sensibleEnthalpy
makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics); makeChemistrySolverTypes(psiChemistryModel, constGasHThermoPhysics);
makeChemistrySolverTypes(psiChemistryModel, gasHThermoPhysics);
makeChemistrySolverTypes makeChemistrySolverTypes
( (
psiChemistryModel, psiChemistryModel,
constIncompressibleGasThermoPhysics constIncompressibleGasHThermoPhysics
); );
makeChemistrySolverTypes(psiChemistryModel, incompressibleGasThermoPhysics); makeChemistrySolverTypes
makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics); (
makeChemistrySolverTypes(rhoChemistryModel, constGasThermoPhysics); psiChemistryModel,
makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); incompressibleGasHThermoPhysics)
;
makeChemistrySolverTypes(psiChemistryModel, icoPoly8HThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, constGasHThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, gasHThermoPhysics);
makeChemistrySolverTypes makeChemistrySolverTypes
( (
rhoChemistryModel, rhoChemistryModel,
constIncompressibleGasThermoPhysics constIncompressibleGasHThermoPhysics
); );
makeChemistrySolverTypes(rhoChemistryModel, incompressibleGasThermoPhysics); makeChemistrySolverTypes
makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics); (
rhoChemistryModel,
incompressibleGasHThermoPhysics
);
makeChemistrySolverTypes(rhoChemistryModel, icoPoly8HThermoPhysics);
// Chemistry solvers based on sensibleInternalEnergy
makeChemistrySolverTypes(psiChemistryModel, constGasEThermoPhysics);
makeChemistrySolverTypes(psiChemistryModel, gasEThermoPhysics);
makeChemistrySolverTypes
(
psiChemistryModel,
constIncompressibleGasEThermoPhysics
);
makeChemistrySolverTypes
(
psiChemistryModel,
incompressibleGasEThermoPhysics
);
makeChemistrySolverTypes(psiChemistryModel, icoPoly8EThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, constGasEThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, gasEThermoPhysics);
makeChemistrySolverTypes
(
rhoChemistryModel,
constIncompressibleGasEThermoPhysics
);
makeChemistrySolverTypes
(
rhoChemistryModel,
incompressibleGasEThermoPhysics
);
makeChemistrySolverTypes(rhoChemistryModel, icoPoly8EThermoPhysics);
} }

View File

@ -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;
}

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,7 +24,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "P1.H" #include "P1.H"
#include "fvm.H" #include "fvmLaplacian.H"
#include "fvmSup.H"
#include "absorptionEmissionModel.H" #include "absorptionEmissionModel.H"
#include "scatterModel.H" #include "scatterModel.H"

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,6 +42,7 @@ SourceFiles
#define radiationModelP1_H #define radiationModelP1_H
#include "radiationModel.H" #include "radiationModel.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,6 +25,9 @@ License
#include "noRadiation.H" #include "noRadiation.H"
#include "physicoChemicalConstants.H" #include "physicoChemicalConstants.H"
#include "fvMesh.H"
#include "Time.H"
#include "volFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,6 +25,9 @@ License
#include "opaqueSolid.H" #include "opaqueSolid.H"
#include "physicoChemicalConstants.H" #include "physicoChemicalConstants.H"
#include "fvMesh.H"
#include "Time.H"
#include "volFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,6 +27,7 @@ License
#include "absorptionEmissionModel.H" #include "absorptionEmissionModel.H"
#include "scatterModel.H" #include "scatterModel.H"
#include "fvmSup.H" #include "fvmSup.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * 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& const Foam::radiation::absorptionEmissionModel&
Foam::radiation::radiationModel::absorptionEmission() const Foam::radiation::radiationModel::absorptionEmission() const
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,13 +47,18 @@ SourceFiles
#include "runTimeSelectionTables.H" #include "runTimeSelectionTables.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "volFieldsFwd.H" #include "volFieldsFwd.H"
#include "fluidThermo.H" #include "DimensionedField.H"
#include "fvMatricesFwd.H" #include "fvMatricesFwd.H"
#include "Switch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
class fluidThermo;
class fvMesh;
namespace radiation namespace radiation
{ {
@ -82,7 +87,7 @@ protected:
//- Reference to the temperature field //- Reference to the temperature field
const volScalarField& T_; const volScalarField& T_;
//- Model specific dictionary input parameters //- Radiation model on/off flag
Switch radiation_; Switch radiation_;
//- Radiation model dictionary //- Radiation model dictionary
@ -204,6 +209,12 @@ public:
// Access // Access
//- Radiation model on/off flag
const Switch radiation() const
{
return radiation_;
}
//- Source term component (for power of T^4) //- Source term component (for power of T^4)
virtual tmp<volScalarField> Rp() const = 0; virtual tmp<volScalarField> Rp() const = 0;
@ -213,6 +224,13 @@ public:
//- Energy source term //- Energy source term
virtual tmp<fvScalarMatrix> Sh(fluidThermo& thermo) const; virtual tmp<fvScalarMatrix> Sh(fluidThermo& thermo) const;
//- Temperature source term
virtual tmp<fvScalarMatrix> ST
(
const dimensionedScalar& rhoCp,
volScalarField& T
) const;
//- Access to absorptionEmissionModel //- Access to absorptionEmissionModel
const absorptionEmissionModel& absorptionEmission() const; const absorptionEmissionModel& absorptionEmission() const;
}; };

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "radiationModel.H" #include "radiationModel.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -51,7 +51,9 @@ SourceFiles
#include "globalIndex.H" #include "globalIndex.H"
#include "scalarListIOList.H" #include "scalarListIOList.H"
#include "mapDistribute.H" #include "mapDistribute.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,23 +37,50 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeChemistryReader(constGasThermoPhysics); // Solid chemistry readers based on sensibleEnthalpy
makeChemistryReader(gasThermoPhysics);
makeChemistryReader(constIncompressibleGasThermoPhysics);
makeChemistryReader(incompressibleGasThermoPhysics);
makeChemistryReader(icoPoly8ThermoPhysics);
makeChemistryReader(hConstSolidThermoPhysics);
makeChemistryReader(hExponentialSolidThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constGasThermoPhysics); makeChemistryReader(constGasHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, gasThermoPhysics); makeChemistryReader(gasHThermoPhysics);
makeChemistryReader(constIncompressibleGasHThermoPhysics);
makeChemistryReader(incompressibleGasHThermoPhysics);
makeChemistryReader(icoPoly8HThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics);
makeChemistryReaderType makeChemistryReaderType
( (
foamChemistryReader, foamChemistryReader,
constIncompressibleGasThermoPhysics constIncompressibleGasHThermoPhysics
); );
makeChemistryReaderType(foamChemistryReader, incompressibleGasThermoPhysics); makeChemistryReaderType(foamChemistryReader, incompressibleGasHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, icoPoly8ThermoPhysics); makeChemistryReaderType(foamChemistryReader, icoPoly8HThermoPhysics);
// Solid chemistry readers based on sensibleInternalEnergy
makeChemistryReader(constGasEThermoPhysics);
makeChemistryReader(gasEThermoPhysics);
makeChemistryReader(constIncompressibleGasEThermoPhysics);
makeChemistryReader(incompressibleGasEThermoPhysics);
makeChemistryReader(icoPoly8EThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics);
makeChemistryReaderType
(
foamChemistryReader,
constIncompressibleGasEThermoPhysics
);
makeChemistryReaderType(foamChemistryReader, incompressibleGasEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, icoPoly8EThermoPhysics);
// Solid chemistry readers for solids based on sensibleInternalEnergy
makeChemistryReader(hConstSolidThermoPhysics);
makeChemistryReader(hExponentialSolidThermoPhysics);
makeChemistryReaderType(foamChemistryReader, hConstSolidThermoPhysics); makeChemistryReaderType(foamChemistryReader, hConstSolidThermoPhysics);
makeChemistryReaderType(foamChemistryReader, hExponentialSolidThermoPhysics); makeChemistryReaderType(foamChemistryReader, hExponentialSolidThermoPhysics);

View File

@ -296,13 +296,13 @@ List<specieElement> currentSpecieComposition(5);
scalar currentLowT = 0; scalar currentLowT = 0;
scalar currentHighT = 0; scalar currentHighT = 0;
scalar currentCommonT = 0; scalar currentCommonT = 0;
gasThermoPhysics::coeffArray highCpCoeffs(scalarList(7)); gasHThermoPhysics::coeffArray highCpCoeffs(scalarList(7));
gasThermoPhysics::coeffArray lowCpCoeffs(scalarList(7)); gasHThermoPhysics::coeffArray lowCpCoeffs(scalarList(7));
gasReaction::specieCoeffs currentSpecieCoeff; gasHReaction::specieCoeffs currentSpecieCoeff;
DynamicList<gasReaction::specieCoeffs> lhs; DynamicList<gasHReaction::specieCoeffs> lhs;
DynamicList<gasReaction::specieCoeffs> rhs; DynamicList<gasHReaction::specieCoeffs> rhs;
scalarList ArrheniusCoeffs(3); scalarList ArrheniusCoeffs(3);
DynamicList<scalar> reactionCoeffs; DynamicList<scalar> reactionCoeffs;
@ -312,7 +312,7 @@ label currentThirdBodyIndex = -1;
word reactionCoeffsName = word::null; word reactionCoeffsName = word::null;
HashTable<scalarList> reactionCoeffsTable; HashTable<scalarList> reactionCoeffsTable;
DynamicList<gasReaction::specieCoeffs> *lrhsPtr = &lhs; DynamicList<gasHReaction::specieCoeffs> *lrhsPtr = &lhs;
reactionType rType = unknownReactionType; reactionType rType = unknownReactionType;
reactionRateType rrType = Arrhenius; reactionRateType rrType = Arrhenius;
@ -609,7 +609,7 @@ bool finishReaction = false;
<readThermoLineLabel4>{thermoLineLabel4} { <readThermoLineLabel4>{thermoLineLabel4} {
HashPtrTable<gasThermoPhysics>::iterator specieThermoIter HashPtrTable<gasHThermoPhysics>::iterator specieThermoIter
( (
speciesThermo_.find(currentSpecieName) speciesThermo_.find(currentSpecieName)
); );
@ -622,7 +622,7 @@ bool finishReaction = false;
speciesThermo_.insert speciesThermo_.insert
( (
currentSpecieName, currentSpecieName,
new gasThermoPhysics new gasHThermoPhysics
( (
janafThermo<perfectGas<specie> > janafThermo<perfectGas<specie> >
( (
@ -1429,7 +1429,7 @@ bool finishReaction = false;
<readReactionOrder>{reactionCoeff}{endReactionCoeffs} { <readReactionOrder>{reactionCoeff}{endReactionCoeffs} {
DynamicList<gasReaction::specieCoeffs>& lrhs = *lrhsPtr; DynamicList<gasHReaction::specieCoeffs>& lrhs = *lrhsPtr;
bool found = false; bool found = false;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,7 +46,7 @@ License
namespace Foam namespace Foam
{ {
addChemistryReaderType(chemkinReader, gasThermoPhysics); addChemistryReaderType(chemkinReader, gasHThermoPhysics);
} }
@ -168,8 +168,8 @@ template<class ReactionRateType>
void Foam::chemkinReader::addReactionType void Foam::chemkinReader::addReactionType
( (
const reactionType rType, const reactionType rType,
DynamicList<gasReaction::specieCoeffs>& lhs, DynamicList<gasHReaction::specieCoeffs>& lhs,
DynamicList<gasReaction::specieCoeffs>& rhs, DynamicList<gasHReaction::specieCoeffs>& rhs,
const ReactionRateType& rr const ReactionRateType& rr
) )
{ {
@ -180,9 +180,9 @@ void Foam::chemkinReader::addReactionType
reactions_.append reactions_.append
( (
new IrreversibleReaction new IrreversibleReaction
<Reaction, gasThermoPhysics, ReactionRateType> <Reaction, gasHThermoPhysics, ReactionRateType>
( (
Reaction<gasThermoPhysics> Reaction<gasHThermoPhysics>
( (
speciesTable_, speciesTable_,
lhs.shrink(), lhs.shrink(),
@ -200,9 +200,9 @@ void Foam::chemkinReader::addReactionType
reactions_.append reactions_.append
( (
new ReversibleReaction new ReversibleReaction
<Reaction, gasThermoPhysics, ReactionRateType> <Reaction, gasHThermoPhysics, ReactionRateType>
( (
Reaction<gasThermoPhysics> Reaction<gasHThermoPhysics>
( (
speciesTable_, speciesTable_,
lhs.shrink(), lhs.shrink(),
@ -240,8 +240,8 @@ void Foam::chemkinReader::addPressureDependentReaction
( (
const reactionType rType, const reactionType rType,
const fallOffFunctionType fofType, const fallOffFunctionType fofType,
DynamicList<gasReaction::specieCoeffs>& lhs, DynamicList<gasHReaction::specieCoeffs>& lhs,
DynamicList<gasReaction::specieCoeffs>& rhs, DynamicList<gasHReaction::specieCoeffs>& rhs,
const scalarList& efficiencies, const scalarList& efficiencies,
const scalarList& k0Coeffs, const scalarList& k0Coeffs,
const scalarList& kInfCoeffs, const scalarList& kInfCoeffs,
@ -423,8 +423,8 @@ void Foam::chemkinReader::addPressureDependentReaction
void Foam::chemkinReader::addReaction void Foam::chemkinReader::addReaction
( (
DynamicList<gasReaction::specieCoeffs>& lhs, DynamicList<gasHReaction::specieCoeffs>& lhs,
DynamicList<gasReaction::specieCoeffs>& rhs, DynamicList<gasHReaction::specieCoeffs>& rhs,
const scalarList& efficiencies, const scalarList& efficiencies,
const reactionType rType, const reactionType rType,
const reactionRateType rrType, const reactionRateType rrType,
@ -499,9 +499,9 @@ void Foam::chemkinReader::addReaction
reactions_.append reactions_.append
( (
new NonEquilibriumReversibleReaction new NonEquilibriumReversibleReaction
<Reaction, gasThermoPhysics, ArrheniusReactionRate> <Reaction, gasHThermoPhysics, ArrheniusReactionRate>
( (
Reaction<gasThermoPhysics> Reaction<gasHThermoPhysics>
( (
speciesTable_, speciesTable_,
lhs.shrink(), lhs.shrink(),
@ -554,11 +554,11 @@ void Foam::chemkinReader::addReaction
new NonEquilibriumReversibleReaction new NonEquilibriumReversibleReaction
< <
Reaction, Reaction,
gasThermoPhysics, gasHThermoPhysics,
thirdBodyArrheniusReactionRate thirdBodyArrheniusReactionRate
> >
( (
Reaction<gasThermoPhysics> Reaction<gasHThermoPhysics>
( (
speciesTable_, speciesTable_,
lhs.shrink(), lhs.shrink(),
@ -661,9 +661,9 @@ void Foam::chemkinReader::addReaction
reactions_.append reactions_.append
( (
new NonEquilibriumReversibleReaction new NonEquilibriumReversibleReaction
<Reaction, gasThermoPhysics, LandauTellerReactionRate> <Reaction, gasHThermoPhysics, LandauTellerReactionRate>
( (
Reaction<gasThermoPhysics> Reaction<gasHThermoPhysics>
( (
speciesTable_, speciesTable_,
lhs.shrink(), lhs.shrink(),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ namespace Foam
class chemkinReader class chemkinReader
: :
public chemistryReader<gasThermoPhysics>, public chemistryReader<gasHThermoPhysics>,
public yyFlexLexer public yyFlexLexer
{ {
@ -199,13 +199,13 @@ private:
HashTable<phase> speciePhase_; HashTable<phase> speciePhase_;
//- Table of the thermodynamic data given in the CHEMKIN file //- Table of the thermodynamic data given in the CHEMKIN file
HashPtrTable<gasThermoPhysics> speciesThermo_; HashPtrTable<gasHThermoPhysics> speciesThermo_;
//- Table of species composition //- Table of species composition
HashTable<List<specieElement> > specieComposition_; HashTable<List<specieElement> > specieComposition_;
//- List of the reactions //- List of the reactions
ReactionList<gasThermoPhysics> reactions_; ReactionList<gasHThermoPhysics> reactions_;
// Private Member Functions // Private Member Functions
@ -257,8 +257,8 @@ private:
void addReactionType void addReactionType
( (
const reactionType rType, const reactionType rType,
DynamicList<gasReaction::specieCoeffs>& lhs, DynamicList<gasHReaction::specieCoeffs>& lhs,
DynamicList<gasReaction::specieCoeffs>& rhs, DynamicList<gasHReaction::specieCoeffs>& rhs,
const ReactionRateType& rr const ReactionRateType& rr
); );
@ -267,8 +267,8 @@ private:
( (
const reactionType rType, const reactionType rType,
const fallOffFunctionType fofType, const fallOffFunctionType fofType,
DynamicList<gasReaction::specieCoeffs>& lhs, DynamicList<gasHReaction::specieCoeffs>& lhs,
DynamicList<gasReaction::specieCoeffs>& rhs, DynamicList<gasHReaction::specieCoeffs>& rhs,
const scalarList& thirdBodyEfficiencies, const scalarList& thirdBodyEfficiencies,
const scalarList& k0Coeffs, const scalarList& k0Coeffs,
const scalarList& kInfCoeffs, const scalarList& kInfCoeffs,
@ -280,8 +280,8 @@ private:
void addReaction void addReaction
( (
DynamicList<gasReaction::specieCoeffs>& lhs, DynamicList<gasHReaction::specieCoeffs>& lhs,
DynamicList<gasReaction::specieCoeffs>& rhs, DynamicList<gasHReaction::specieCoeffs>& rhs,
const scalarList& thirdBodyEfficiencies, const scalarList& thirdBodyEfficiencies,
const reactionType rType, const reactionType rType,
const reactionRateType rrType, const reactionRateType rrType,
@ -364,7 +364,7 @@ public:
} }
//- Table of the thermodynamic data given in the CHEMKIN file //- Table of the thermodynamic data given in the CHEMKIN file
const HashPtrTable<gasThermoPhysics>& speciesThermo() const const HashPtrTable<gasHThermoPhysics>& speciesThermo() const
{ {
return speciesThermo_; return speciesThermo_;
} }
@ -376,7 +376,7 @@ public:
} }
//- List of the reactions //- List of the reactions
const ReactionList<gasThermoPhysics>& reactions() const const ReactionList<gasHThermoPhysics>& reactions() const
{ {
return reactions_; return reactions_;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -179,7 +179,7 @@ makeReactionThermo
); );
// Multi-component thermo // Multi-component thermo for sensible enthalpy
makeReactionMixtureThermo makeReactionMixtureThermo
( (
@ -187,7 +187,7 @@ makeReactionMixtureThermo
psiReactionThermo, psiReactionThermo,
hePsiThermo, hePsiThermo,
multiComponentMixture, multiComponentMixture,
constGasThermoPhysics constGasHThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -196,11 +196,32 @@ makeReactionMixtureThermo
psiReactionThermo, psiReactionThermo,
hePsiThermo, hePsiThermo,
multiComponentMixture, 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 makeReactionMixtureThermo
( (
@ -208,7 +229,7 @@ makeReactionMixtureThermo
psiReactionThermo, psiReactionThermo,
hePsiThermo, hePsiThermo,
reactingMixture, reactingMixture,
constGasThermoPhysics constGasHThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -217,7 +238,7 @@ makeReactionMixtureThermo
psiReactionThermo, psiReactionThermo,
hePsiThermo, hePsiThermo,
reactingMixture, reactingMixture,
gasThermoPhysics gasHThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -226,7 +247,37 @@ makeReactionMixtureThermo
psiReactionThermo, psiReactionThermo,
hePsiThermo, hePsiThermo,
singleStepReactingMixture, singleStepReactingMixture,
gasThermoPhysics gasHThermoPhysics
);
// Multi-component reaction thermo for internal energy
makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiThermo,
reactingMixture,
constGasEThermoPhysics
);
makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiThermo,
reactingMixture,
gasEThermoPhysics
);
makeReactionMixtureThermo
(
psiThermo,
psiReactionThermo,
hePsiThermo,
singleStepReactingMixture,
gasEThermoPhysics
); );
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -213,7 +213,7 @@ makeReactionThermo
); );
// Multi-component thermo // Multi-component thermo for internal energy
makeReactionMixtureThermo makeReactionMixtureThermo
( (
@ -221,7 +221,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
constGasThermoPhysics constGasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -230,7 +230,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
gasThermoPhysics gasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -239,7 +239,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
constIncompressibleGasThermoPhysics constIncompressibleGasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -248,7 +248,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
incompressibleGasThermoPhysics incompressibleGasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -257,7 +257,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
multiComponentMixture, multiComponentMixture,
icoPoly8ThermoPhysics icoPoly8EThermoPhysics
); );
@ -269,7 +269,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
reactingMixture, reactingMixture,
constGasThermoPhysics constGasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -278,7 +278,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
reactingMixture, reactingMixture,
gasThermoPhysics gasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -287,7 +287,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
reactingMixture, reactingMixture,
constIncompressibleGasThermoPhysics constIncompressibleGasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -296,7 +296,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
reactingMixture, reactingMixture,
incompressibleGasThermoPhysics incompressibleGasEThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -305,7 +305,7 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
reactingMixture, reactingMixture,
icoPoly8ThermoPhysics icoPoly8EThermoPhysics
); );
makeReactionMixtureThermo makeReactionMixtureThermo
@ -314,7 +314,114 @@ makeReactionMixtureThermo
rhoReactionThermo, rhoReactionThermo,
heRhoThermo, heRhoThermo,
singleStepReactingMixture, singleStepReactingMixture,
gasThermoPhysics 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
);
// Multi-component reaction thermo
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
reactingMixture,
constGasHThermoPhysics
);
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
reactingMixture,
gasHThermoPhysics
);
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
reactingMixture,
constIncompressibleGasHThermoPhysics
);
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
reactingMixture,
incompressibleGasHThermoPhysics
);
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
reactingMixture,
icoPoly8HThermoPhysics
);
makeReactionMixtureThermo
(
rhoThermo,
rhoReactionThermo,
heRhoThermo,
singleStepReactingMixture,
gasHThermoPhysics
); );

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,7 +46,7 @@ namespace Foam
ODESolidChemistryModel, ODESolidChemistryModel,
solidChemistryModel, solidChemistryModel,
hConstSolidThermoPhysics, hConstSolidThermoPhysics,
gasThermoPhysics gasHThermoPhysics
); );
makeSolidChemistryModel makeSolidChemistryModel
@ -54,7 +54,7 @@ namespace Foam
ODESolidChemistryModel, ODESolidChemistryModel,
solidChemistryModel, solidChemistryModel,
hExponentialSolidThermoPhysics, hExponentialSolidThermoPhysics,
gasThermoPhysics gasHThermoPhysics
); );
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,7 +41,7 @@ namespace Foam
ode, ode,
solidChemistryModel, solidChemistryModel,
hConstSolidThermoPhysics, hConstSolidThermoPhysics,
gasThermoPhysics gasHThermoPhysics
) )
makeSolidChemistrySolverType makeSolidChemistrySolverType
@ -49,7 +49,7 @@ namespace Foam
ode, ode,
solidChemistryModel, solidChemistryModel,
hExponentialSolidThermoPhysics, hExponentialSolidThermoPhysics,
gasThermoPhysics gasHThermoPhysics
) )
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -105,7 +105,10 @@ public:
// Constructors // Constructors
//- Construct from components //- 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 //- Construct from Istream
incompressiblePerfectGas(Istream&); incompressiblePerfectGas(Istream&);
@ -173,6 +176,10 @@ public:
// Member operators // Member operators
inline incompressiblePerfectGas& operator=
(
const incompressiblePerfectGas&
);
inline void operator+=(const incompressiblePerfectGas&); inline void operator+=(const incompressiblePerfectGas&);
inline void operator-=(const incompressiblePerfectGas&); inline void operator-=(const incompressiblePerfectGas&);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,28 +25,40 @@ License
#include "incompressiblePerfectGas.H" #include "incompressiblePerfectGas.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class Specie>
inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas
(
const Specie& sp
)
:
Specie(sp)
{}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Specie> template<class Specie>
inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas inline Foam::incompressiblePerfectGas<Specie>::incompressiblePerfectGas
( (
const word& name, const Specie& sp, const scalar pRef
const incompressiblePerfectGas<Specie>& pg
) )
: :
Specie(name, pg) Specie(sp),
pRef_(pRef)
{}
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>& ipg
)
:
Specie(name, ipg),
pRef_(ipg.pRef_)
{} {}
@ -109,7 +121,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::psi
scalar T scalar T
) const ) const
{ {
return 0.0; return 1.0/(this->R()*T);
} }
@ -120,7 +132,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Z
scalar scalar
) const ) const
{ {
return 0.0; return 1.0;
} }
@ -139,22 +151,42 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::cpMcv
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template<class Specie> template<class Specie>
inline void Foam::incompressiblePerfectGas<Specie>::operator+= inline Foam::incompressiblePerfectGas<Specie>&
Foam::incompressiblePerfectGas<Specie>::operator=
( (
const incompressiblePerfectGas<Specie>& pg const incompressiblePerfectGas<Specie>& ipg
) )
{ {
Specie::operator+=(pg); Specie::operator=(ipg);
pRef_ = ipg.pRef_;
return *this;
}
template<class Specie>
inline void Foam::incompressiblePerfectGas<Specie>::operator+=
(
const incompressiblePerfectGas<Specie>& ipg
)
{
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> template<class Specie>
inline void Foam::incompressiblePerfectGas<Specie>::operator-= 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> template<class Specie>
inline Foam::incompressiblePerfectGas<Specie> Foam::operator+ inline Foam::incompressiblePerfectGas<Specie> Foam::operator+
( (
const incompressiblePerfectGas<Specie>& pg1, const incompressiblePerfectGas<Specie>& ipg1,
const incompressiblePerfectGas<Specie>& pg2 const incompressiblePerfectGas<Specie>& ipg2
) )
{ {
scalar nMoles = ipg1.nMoles() + ipg2.nMoles();
scalar molr1 = ipg1.nMoles()/nMoles;
scalar molr2 = ipg2.nMoles()/nMoles;
return incompressiblePerfectGas<Specie> return incompressiblePerfectGas<Specie>
( (
static_cast<const Specie&>(pg1) static_cast<const Specie&>(ipg1)
+ static_cast<const Specie&>(pg2) + static_cast<const Specie&>(ipg2),
molr1*ipg1.pRef_ + molr2*ipg2.pRef_
); );
} }
@ -185,14 +222,15 @@ inline Foam::incompressiblePerfectGas<Specie> Foam::operator+
template<class Specie> template<class Specie>
inline Foam::incompressiblePerfectGas<Specie> Foam::operator- inline Foam::incompressiblePerfectGas<Specie> Foam::operator-
( (
const incompressiblePerfectGas<Specie>& pg1, const incompressiblePerfectGas<Specie>& ipg1,
const incompressiblePerfectGas<Specie>& pg2 const incompressiblePerfectGas<Specie>& ipg2
) )
{ {
return incompressiblePerfectGas<Specie> return incompressiblePerfectGas<Specie>
( (
static_cast<const Specie&>(pg1) static_cast<const Specie&>(ipg1)
- static_cast<const Specie&>(pg2) - static_cast<const Specie&>(ipg2),
ipg1.pRef_
); );
} }
@ -201,10 +239,14 @@ template<class Specie>
inline Foam::incompressiblePerfectGas<Specie> Foam::operator* inline Foam::incompressiblePerfectGas<Specie> Foam::operator*
( (
const scalar s, 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_
);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -43,16 +43,31 @@ Description
namespace Foam 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> typedef Reaction<constIncompressibleGasHThermoPhysics>
constIncompressibleGasReaction; 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;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,9 @@ Description
#include "incompressiblePerfectGas.H" #include "incompressiblePerfectGas.H"
#include "hConstThermo.H" #include "hConstThermo.H"
#include "janafThermo.H" #include "janafThermo.H"
#include "sensibleEnthalpy.H" #include "sensibleEnthalpy.H"
#include "sensibleInternalEnergy.H"
#include "thermo.H" #include "thermo.H"
#include "sutherlandTransport.H" #include "sutherlandTransport.H"
#include "constTransport.H" #include "constTransport.H"
@ -50,6 +52,7 @@ Description
namespace Foam namespace Foam
{ {
// thermo physics types based on sensibleEnthalpy
typedef typedef
constTransport constTransport
< <
@ -61,7 +64,7 @@ namespace Foam
>, >,
sensibleEnthalpy sensibleEnthalpy
> >
> constGasThermoPhysics; > constGasHThermoPhysics;
typedef typedef
sutherlandTransport sutherlandTransport
@ -74,7 +77,7 @@ namespace Foam
>, >,
sensibleEnthalpy sensibleEnthalpy
> >
> gasThermoPhysics; > gasHThermoPhysics;
typedef typedef
constTransport constTransport
@ -87,7 +90,7 @@ namespace Foam
>, >,
sensibleEnthalpy sensibleEnthalpy
> >
> constIncompressibleGasThermoPhysics; > constIncompressibleGasHThermoPhysics;
typedef typedef
sutherlandTransport sutherlandTransport
@ -100,7 +103,7 @@ namespace Foam
>, >,
sensibleEnthalpy sensibleEnthalpy
> >
> incompressibleGasThermoPhysics; > incompressibleGasHThermoPhysics;
typedef typedef
polynomialTransport polynomialTransport
@ -115,7 +118,76 @@ namespace Foam
sensibleEnthalpy sensibleEnthalpy
>, >,
8 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;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,8 +31,11 @@ License
namespace Foam namespace Foam
{ {
makeIRReactions(gasThermoPhysics, LangmuirHinshelwoodReactionRate) makeIRReactions(gasHThermoPhysics, LangmuirHinshelwoodReactionRate)
makeIRReactions(icoPoly8ThermoPhysics, LangmuirHinshelwoodReactionRate) makeIRReactions(icoPoly8HThermoPhysics, LangmuirHinshelwoodReactionRate)
makeIRReactions(gasEThermoPhysics, LangmuirHinshelwoodReactionRate)
makeIRReactions(icoPoly8EThermoPhysics, LangmuirHinshelwoodReactionRate)
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -83,15 +83,26 @@ License
namespace Foam namespace Foam
{ {
makeReactions(constGasThermoPhysics, constGasReaction) // sensible enthalpy based reactions
makeReactions(gasThermoPhysics, gasReaction) makeReactions(constGasHThermoPhysics, constGasHReaction)
makeReactions(gasHThermoPhysics, gasHReaction)
makeReactions makeReactions
( (
constIncompressibleGasThermoPhysics, constIncompressibleGasHThermoPhysics,
constIncompressibleGasReaction constIncompressibleGasHReaction
) )
makeReactions(incompressibleGasThermoPhysics, incompressibleGasReaction) makeReactions(incompressibleGasHThermoPhysics, incompressibleGasHReaction)
makeReactions(icoPoly8ThermoPhysics, icoPoly8Reaction) makeReactions(icoPoly8HThermoPhysics, icoPoly8HReaction)
makeReactions(constGasEThermoPhysics, constGasEReaction)
makeReactions(gasEThermoPhysics, gasEReaction)
makeReactions
(
constIncompressibleGasEThermoPhysics,
constIncompressibleGasEReaction
)
makeReactions(incompressibleGasEThermoPhysics, incompressibleGasEReaction)
makeReactions(icoPoly8EThermoPhysics, icoPoly8EReaction)
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>;
active true; active true;

View File

@ -15,9 +15,8 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//combustionModel noCombustion<psiThermoCombustion>; combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>;
combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; //combustionModel FSD<psiThermoCombustion,gasHThermoPhysics>;
//combustionModel FSD<psiThermoCombustion,gasThermoPhysics>;
active true; active true;

View File

@ -16,7 +16,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
combustionModel infinitelyFastChemistry<psiThermoCombustion,gasThermoPhysics>; combustionModel infinitelyFastChemistry<psiThermoCombustion,gasHThermoPhysics>;
active on; active on;

View File

@ -107,26 +107,37 @@ edges
( (
); );
patches boundary
( (
// is there no way of defining all my 'defaultFaces' to be 'wall'? // is there no way of defining all my 'defaultFaces' to be 'wall'?
wall front front
{
type wall;
faces
( (
// inlet block // inlet block
frontQuad(in1, join1, join2, in2) frontQuad(in1, join1, join2, in2)
// outlet block // outlet block
frontQuad(poro1, out1, out2, poro2) frontQuad(poro1, out1, out2, poro2)
) );
}
wall back back
{
type wall;
faces
( (
// inlet block // inlet block
backQuad(in1, join1, join2, in2) backQuad(in1, join1, join2, in2)
// outlet block // outlet block
backQuad(poro1, out1, out2, poro2) backQuad(poro1, out1, out2, poro2)
) );
}
wall wall wall
{
type wall;
faces
( (
// inlet block // inlet block
quad2D(in1, join1) quad2D(in1, join1)
@ -134,9 +145,13 @@ patches
// outlet block // outlet block
quad2D(poro1, out1) quad2D(poro1, out1)
quad2D(out2, poro2) quad2D(out2, poro2)
) );
}
wall porosityWall porosityWall
{
type wall;
faces
( (
// porosity block // porosity block
frontQuad(join1, poro1, poro2, join2) frontQuad(join1, poro1, poro2, join2)
@ -145,17 +160,26 @@ patches
// porosity block // porosity block
quad2D(join1, poro1) quad2D(join1, poro1)
quad2D(poro2, join2) quad2D(poro2, join2)
) );
}
patch inlet inlet
{
type patch;
faces
( (
quad2D(in2, in1) quad2D(in2, in1)
) );
}
patch outlet outlet
{
type patch;
faces
( (
quad2D(out2, out1) quad2D(out2, out1)
) );
}
); );
mergePatchPairs mergePatchPairs

View File

@ -28,23 +28,17 @@ porosity1
DarcyForchheimerCoeffs 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); f f [0 -1 0 0 0 0 0] (0 0 0);
coordinateSystem coordinateSystem
{ {
type cartesian;
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (0.70710678 0.70710678 0); e1 (0.70710678 0.70710678 0);
e2 (0 0 1); e3 (0 0 1);
}
} }
} }
} }
} }
// ************************************************************************* // //************************************************************************ //

View File

@ -21,14 +21,14 @@ solvers
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
tolerance 1e-06; tolerance 1e-07;
relTol 0.01; relTol 0.01;
} }
pFinal pFinal
{ {
$p; $p;
tolerance 1e-06; tolerance 1e-07;
relTol 0; relTol 0;
} }
@ -36,14 +36,14 @@ solvers
{ {
solver PBiCG; solver PBiCG;
preconditioner DILU; preconditioner DILU;
tolerance 1e-05; tolerance 1e-06;
relTol 0.1; relTol 0.1;
} }
"(rho|U|h|k|epsilon|omega)Final" "(rho|U|h|k|epsilon|omega)Final"
{ {
$U; $U;
tolerance 1e-05; tolerance 1e-06;
relTol 0; relTol 0;
} }
@ -56,8 +56,8 @@ PIMPLE
nOuterCorrectors 50; nOuterCorrectors 50;
nCorrectors 1; nCorrectors 1;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.1; rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
rhoMax rhoMax [ 1 -3 0 0 0 ] 3.0; rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
residualControl residualControl
{ {
@ -75,13 +75,12 @@ relaxationFactors
{ {
fields fields
{ {
"p.*" 1; "p.*" 0.3;
"rho.*" 1; "rho.*" 1;
} }
equations equations
{ {
"(U|h|k|epsilon|omega).*" 0.85; "(U|h|k|epsilon|omega).*" 0.7;
"p.*" 1;
} }
} }

View File

@ -64,7 +64,7 @@ SIMPLE
{ {
p 1e-2; p 1e-2;
U 1e-4; U 1e-4;
T 1e-3; e 1e-3;
// possibly check turbulence fields // possibly check turbulence fields
"(k|epsilon|omega)" 1e-3; "(k|epsilon|omega)" 1e-3;
@ -76,7 +76,7 @@ relaxationFactors
fields fields
{ {
p 0.3; p 0.3;
rho 0.05; rho 0.03;
} }
equations equations
{ {

View File

@ -58,7 +58,7 @@ SIMPLE
{ {
p 1e-3; p 1e-3;
U 1e-4; U 1e-4;
T 1e-3; e 1e-3;
// possibly check turbulence fields // possibly check turbulence fields
"(k|epsilon|omega)" 1e-3; "(k|epsilon|omega)" 1e-3;

View File

@ -64,7 +64,7 @@ SIMPLE
{ {
p 1e-2; p 1e-2;
U 1e-4; U 1e-4;
T 1e-3; e 1e-3;
// possibly check turbulence fields // possibly check turbulence fields
"(k|epsilon|omega)" 1e-3; "(k|epsilon|omega)" 1e-3;
@ -76,7 +76,7 @@ relaxationFactors
fields fields
{ {
p 0.3; p 0.3;
rho 0.02; rho 0.05;
} }
equations equations
{ {

View File

@ -54,6 +54,16 @@ SIMPLE
rhoMin rhoMin [1 -3 0 0 0] 0.1; rhoMin rhoMin [1 -3 0 0 0] 0.1;
rhoMax rhoMax [1 -3 0 0 0] 1.0; rhoMax rhoMax [1 -3 0 0 0] 1.0;
transonic yes; transonic yes;
residualControl
{
p 1e-3;
U 1e-4;
e 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
} }
relaxationFactors relaxationFactors

View File

@ -28,7 +28,7 @@ gradSchemes
divSchemes divSchemes
{ {
default none; default none;
div(rhoFlux,rho) Gauss limitedLinear 1; div(rhoFlux,rho) Gauss upwind;
} }
laplacianSchemes laplacianSchemes

View File

@ -89,7 +89,7 @@ subModels
duration 10.0; duration 10.0;
parcelsPerSecond 200; parcelsPerSecond 200;
} }
] }
dispersionModel none; dispersionModel none;

View File

@ -10,36 +10,37 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object k; object k;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0]; dimensions [0 2 -2 0 0 0 0];
internalField uniform 10.0; internalField uniform 10;
boundaryField boundaryField
{ {
inlet inlet
{ {
type fixedValue; type turbulentIntensityKineticEnergyInlet;
value uniform 0.5; intensity 0.05;
value uniform 0.05;
} }
outlet outlet
{ {
type zeroGradient; type zeroGradient;
} }
walls walls
{ {
type zeroGradient; type kqRWallFunction;
value uniform 10;
} }
frontBack frontBack
{ {
type empty; type empty;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -10,27 +10,30 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object nuSgs; object nuSgs;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [0 2 -1 0 0 0 0];
internalField uniform 1e-11; internalField uniform 0;
boundaryField boundaryField
{ {
inlet inlet
{ {
type zeroGradient; type calculated;
value uniform 0;
} }
outlet outlet
{ {
type zeroGradient; type calculated;
value uniform 0;
} }
walls walls
{ {
type fixedValue; type nutUSpaldingWallFunction;
value uniform 0; value uniform 0;
} }
frontBack frontBack
@ -39,4 +42,5 @@ boundaryField
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -28,9 +28,9 @@ interpolationSchemes
divSchemes divSchemes
{ {
default none; default none;
div(phiv,rho) Gauss limitedLinear 0.2; div(phiv,rho) Gauss vanLeer;
div(phi,U) Gauss filteredLinear2V 0.2 0; div(phi,U) Gauss LUST grad(U);
div(phiv,k) Gauss filteredLinear2 0.2 0; div(phiv,k) Gauss LUST grad(k);
div((muEff*dev(T(grad(U))))) Gauss linear; div((muEff*dev(T(grad(U))))) Gauss linear;
} }

View File

@ -16,14 +16,15 @@ FoamFile
dimensions [0 2 -2 0 0]; dimensions [0 2 -2 0 0];
internalField uniform 10.0; internalField uniform 10;
boundaryField boundaryField
{ {
inlet inlet
{ {
type fixedValue; type turbulentIntensityKineticEnergyInlet;
value uniform 0.5; intensity 0.05;
value uniform 0.05;
} }
outlet outlet
@ -33,7 +34,8 @@ boundaryField
walls walls
{ {
type zeroGradient; type kqRWallFunction;
value uniform 10;
} }
frontBack frontBack

View File

@ -10,34 +10,38 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object nuSgs; object nuSgs;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [0 2 -1 0 0 0 0];
internalField uniform 1e-11; internalField uniform 0;
boundaryField boundaryField
{ {
inlet inlet
{ {
type zeroGradient; type calculated;
value uniform 0;
} }
outlet outlet
{ {
type zeroGradient; type calculated;
value uniform 0;
} }
walls walls
{ {
type fixedValue; type nutUSpaldingWallFunction;
value uniform 0; value uniform 0;
} }
frontBack frontBack
{ {
type fixedValue; type nutUSpaldingWallFunction;
value uniform 0; value uniform 0;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -16,14 +16,15 @@ FoamFile
dimensions [0 2 -2 0 0]; dimensions [0 2 -2 0 0];
internalField uniform 10.0; internalField uniform 10;
boundaryField boundaryField
{ {
inlet inlet
{ {
type fixedValue; type turbulentIntensityKineticEnergyInlet;
value uniform 0.5; intensity 0.05;
value uniform 0.05;
} }
outlet outlet
@ -33,7 +34,8 @@ boundaryField
walls walls
{ {
type zeroGradient; type kqRWallFunction;
value uniform 10;
} }
frontBack frontBack

View File

@ -10,34 +10,38 @@ FoamFile
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0";
object nuSgs; object nuSgs;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0]; dimensions [0 2 -1 0 0 0 0];
internalField uniform 1e-11; internalField uniform 0;
boundaryField boundaryField
{ {
inlet inlet
{ {
type zeroGradient; type calculated;
value uniform 0;
} }
outlet outlet
{ {
type zeroGradient; type calculated;
value uniform 0;
} }
walls walls
{ {
type fixedValue; type nutUSpaldingWallFunction;
value uniform 0; value uniform 0;
} }
frontBack frontBack
{ {
type fixedValue; type nutUSpaldingWallFunction;
value uniform 0; value uniform 0;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -29,8 +29,8 @@ cp -r 0.org 0
runApplication blockMesh runApplication blockMesh
refineMeshByCellSet 1 2 3 refineMeshByCellSet 1 2 3
echo "mapping fields from 2D throttle case" #echo "mapping fields from 2D throttle case"
runApplication mapFields ../throttle -sourceTime latestTime #runApplication mapFields ../throttle -sourceTime latestTime
runApplication decomposePar runApplication decomposePar
runParallel $application 4 runParallel $application 4

View File

@ -28,9 +28,9 @@ interpolationSchemes
divSchemes divSchemes
{ {
default none; default none;
div(phiv,rho) Gauss limitedLinear 0.2; div(phiv,rho) Gauss vanLeer;
div(phi,U) Gauss filteredLinear2V 0.2 0; div(phi,U) Gauss LUST grad(U);
div(phiv,k) Gauss filteredLinear2 0.2 0; div(phiv,k) Gauss LUST grad(k);
div((muEff*dev(T(grad(U))))) Gauss linear; div((muEff*dev(T(grad(U))))) Gauss linear;
} }

View File

@ -17,7 +17,7 @@ FoamFile
application settlingFoam; application settlingFoam;
startFrom startTime; startFrom latestTime;
startTime 0; startTime 0;
@ -47,7 +47,7 @@ runTimeModifiable yes;
adjustTimeStep on; adjustTimeStep on;
maxCo 0.5; maxCo 0.4;
maxDeltaT 1; maxDeltaT 1;