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();
PtrList<gasThermoPhysics> specieData(Y.size());
PtrList<gasHThermoPhysics> specieData(Y.size());
forAll(specieData, i)
{
specieData.set
(
i,
new gasThermoPhysics
new gasHThermoPhysics
(
dynamic_cast<const reactingMixture<gasThermoPhysics>&>
dynamic_cast<const reactingMixture<gasHThermoPhysics>&>
(thermo).speciesData()[i]
)
);

View File

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

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());
volVectorField HbyA("HbyA", U);
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();
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 rAtU(1.0/(1.0/rAU - UEqn().H1()));

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,6 +43,24 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
bool haveAllTimes
(
const HashSet<word>& masterTimeDirSet,
const instantList& timeDirs
)
{
// Loop over all times
forAll(timeDirs, timeI)
{
if (!masterTimeDirSet.found(timeDirs[timeI].name()))
{
return false;
}
}
return true;
}
int main(int argc, char *argv[])
{
argList::addNote
@ -54,7 +72,7 @@ int main(int argc, char *argv[])
// enable -zeroTime to prevent accidentally trashing the initial fields
timeSelector::addOptions(true, true);
argList::noParallel();
# include "addRegionOption.H"
#include "addRegionOption.H"
argList::addBoolOption
(
"allRegions",
@ -86,8 +104,8 @@ int main(int argc, char *argv[])
"only reconstruct new times (i.e. that do not exist already)"
);
# include "setRootCase.H"
# include "createTime.H"
#include "setRootCase.H"
#include "createTime.H"
HashSet<word> selectedFields;
if (args.optionFound("fields"))
@ -169,6 +187,11 @@ int main(int argc, char *argv[])
{
masterTimeDirs = runTime.times();
}
HashSet<word> masterTimeDirSet(2*masterTimeDirs.size());
forAll(masterTimeDirs, i)
{
masterTimeDirSet.insert(masterTimeDirs[i].name());
}
// Set all times on processor meshes equal to reconstructed mesh
@ -222,6 +245,21 @@ int main(int argc, char *argv[])
Info<< "\n\nReconstructing fields for mesh " << regionName << nl
<< endl;
if
(
newTimes
&& regionNames.size() == 1
&& regionDirs[0].empty()
&& haveAllTimes(masterTimeDirSet, timeDirs)
)
{
Info<< "Skipping region " << regionName
<< " since already have all times"
<< endl << endl;
continue;
}
fvMesh mesh
(
IOobject
@ -240,29 +278,16 @@ int main(int argc, char *argv[])
// check face addressing for meshes that have been decomposed
// with a very old foam version
# include "checkFaceAddressingComp.H"
#include "checkFaceAddressingComp.H"
// Loop over all times
forAll(timeDirs, timeI)
{
if (newTimes)
if (newTimes && masterTimeDirSet.found(timeDirs[timeI].name()))
{
// Compare on timeName, not value
bool foundTime = false;
forAll(masterTimeDirs, i)
{
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
{
foundTime = true;
break;
}
}
if (foundTime)
{
Info<< "Skipping time " << timeDirs[timeI].name()
<< endl << endl;
continue;
}
Info<< "Skipping time " << timeDirs[timeI].name()
<< endl << endl;
continue;
}

View File

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

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)
{
return ds;

View File

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

View File

@ -277,6 +277,21 @@ transFunc(yn)
#undef transFunc
dimensionedScalar atan2
(
const dimensionedScalar& x,
const dimensionedScalar& y
)
{
return dimensionedScalar
(
"atan2(" + x.name() + ',' + y.name() + ')',
atan2(x.dimensions(), y.dimensions()),
::atan2(x.value(), y.value())
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

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

View File

@ -369,6 +369,263 @@ tmp<DimensionedField<scalar, GeoMesh> > pow
return pow(dimensionedScalar(s), tdsf);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const DimensionedField<scalar, GeoMesh>& dsf1,
const DimensionedField<scalar, GeoMesh>& dsf2
)
{
tmp<DimensionedField<scalar, GeoMesh> > tAtan2
(
new DimensionedField<scalar, GeoMesh>
(
IOobject
(
"atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
dsf1.instance(),
dsf1.db()
),
dsf1.mesh(),
atan2(dsf1.dimensions(), dsf2.dimensions())
)
);
atan2(tAtan2().field(), dsf1.field(), dsf2.field());
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1,
const DimensionedField<scalar, GeoMesh>& dsf2
)
{
const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1();
tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
(
tdsf1,
"atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
atan2(dsf1.dimensions(), dsf2.dimensions())
);
atan2(tAtan2().field(), dsf1.field(), dsf2.field());
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf1);
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const DimensionedField<scalar, GeoMesh>& dsf1,
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2
)
{
const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2();
tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
(
tdsf2,
"atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
atan2(dsf1.dimensions(), dsf2.dimensions())
);
atan2(tAtan2().field(), dsf1.field(), dsf2.field());
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf2);
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf1,
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf2
)
{
const DimensionedField<scalar, GeoMesh>& dsf1 = tdsf1();
const DimensionedField<scalar, GeoMesh>& dsf2 = tdsf2();
tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::
New
(
tdsf1,
tdsf2,
"atan2(" + dsf1.name() + ',' + dsf2.name() + ')',
atan2(dsf1.dimensions(), dsf2.dimensions())
);
atan2(tAtan2().field(), dsf1.field(), dsf2.field());
reuseTmpTmpDimensionedField<scalar, scalar, scalar, scalar, GeoMesh>::clear
(
tdsf1,
tdsf2
);
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const DimensionedField<scalar, GeoMesh>& dsf,
const dimensionedScalar& ds
)
{
tmp<DimensionedField<scalar, GeoMesh> > tAtan2
(
new DimensionedField<scalar, GeoMesh>
(
IOobject
(
"atan2(" + dsf.name() + ',' + ds.name() + ')',
dsf.instance(),
dsf.db()
),
dsf.mesh(),
atan2(dsf.dimensions(), ds)
)
);
atan2(tAtan2().field(), dsf.field(), ds.value());
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
const dimensionedScalar& ds
)
{
const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
(
tdsf,
"atan2(" + dsf.name() + ',' + ds.name() + ')',
atan2(dsf.dimensions(), ds)
);
atan2(tAtan2().field(), dsf.field(), ds.value());
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const DimensionedField<scalar, GeoMesh>& dsf,
const scalar& s
)
{
return atan2(dsf, dimensionedScalar(s));
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf,
const scalar& s
)
{
return atan2(tdsf, dimensionedScalar(s));
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const dimensionedScalar& ds,
const DimensionedField<scalar, GeoMesh>& dsf
)
{
tmp<DimensionedField<scalar, GeoMesh> > tAtan2
(
new DimensionedField<scalar, GeoMesh>
(
IOobject
(
"atan2(" + ds.name() + ',' + dsf.name() + ')',
dsf.instance(),
dsf.db()
),
dsf.mesh(),
atan2(ds, dsf.dimensions())
)
);
atan2(tAtan2().field(), ds.value(), dsf.field());
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const dimensionedScalar& ds,
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf
)
{
const DimensionedField<scalar, GeoMesh>& dsf = tdsf();
tmp<DimensionedField<scalar, GeoMesh> > tAtan2 =
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::New
(
tdsf,
"atan2(" + ds.name() + ',' + dsf.name() + ')',
atan2(ds, dsf.dimensions())
);
atan2(tAtan2().field(), ds.value(), dsf.field());
reuseTmpDimensionedField<scalar, scalar, GeoMesh>::clear(tdsf);
return tAtan2;
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const scalar& s,
const DimensionedField<scalar, GeoMesh>& dsf
)
{
return atan2(dimensionedScalar(s), dsf);
}
template<class GeoMesh>
tmp<DimensionedField<scalar, GeoMesh> > atan2
(
const scalar& s,
const tmp<DimensionedField<scalar, GeoMesh> >& tdsf
)
{
return atan2(dimensionedScalar(s), tdsf);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
UNARY_FUNCTION(scalar, scalar, pow3, pow3)

View File

@ -76,6 +76,9 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
BINARY_FUNCTION(scalar, scalar, scalar, pow)
BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
BINARY_FUNCTION(scalar, scalar, scalar, atan2)
BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -115,6 +115,7 @@ BINARY_OPERATOR(scalar, scalar, scalar, /, '|', divide)
BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<template<class> class PatchField, class GeoMesh>
@ -440,6 +441,315 @@ tmp<GeometricField<scalar, PatchField, GeoMesh> > pow
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<template<class> class PatchField, class GeoMesh>
void atan2
(
GeometricField<scalar, PatchField, GeoMesh>& Atan2,
const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
)
{
atan2(Atan2.internalField(), gsf1.internalField(), gsf2.internalField());
atan2(Atan2.boundaryField(), gsf1.boundaryField(), gsf2.boundaryField());
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
)
{
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
new GeometricField<scalar, PatchField, GeoMesh>
(
IOobject
(
"atan2(" + gsf1.name() + ',' + gsf2.name() + ')',
gsf1.instance(),
gsf1.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
gsf1.mesh(),
atan2(gsf1.dimensions(), gsf2.dimensions())
)
);
atan2(tAtan2(), gsf1, gsf2);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1,
const GeometricField<scalar, PatchField, GeoMesh>& gsf2
)
{
const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1();
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
(
tgsf1,
"atan2(" + gsf1.name() + ',' + gsf2.name() + ')',
atan2(gsf1.dimensions(), gsf2.dimensions())
)
);
atan2(tAtan2(), gsf1, gsf2);
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf1);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const GeometricField<scalar, PatchField, GeoMesh>& gsf1,
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2
)
{
const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2();
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
(
tgsf2,
"atan2(" + gsf1.name() + ',' + gsf2.name() + ')',
atan2( gsf1.dimensions(), gsf2.dimensions())
)
);
atan2(tAtan2(), gsf1, gsf2);
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf2);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf1,
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf2
)
{
const GeometricField<scalar, PatchField, GeoMesh>& gsf1 = tgsf1();
const GeometricField<scalar, PatchField, GeoMesh>& gsf2 = tgsf2();
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
reuseTmpTmpGeometricField
<scalar, scalar, scalar, scalar, PatchField, GeoMesh>::New
(
tgsf1,
tgsf2,
"atan2(" + gsf1.name() + ',' + gsf2.name() + ')',
atan2(gsf1.dimensions(), gsf2.dimensions())
)
);
atan2(tAtan2(), gsf1, gsf2);
reuseTmpTmpGeometricField
<scalar, scalar, scalar, scalar, PatchField, GeoMesh>
::clear(tgsf1, tgsf2);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
void atan2
(
GeometricField<scalar, PatchField, GeoMesh>& tAtan2,
const GeometricField<scalar, PatchField, GeoMesh>& gsf,
const dimensioned<scalar>& ds
)
{
atan2(tAtan2.internalField(), gsf.internalField(), ds.value());
atan2(tAtan2.boundaryField(), gsf.boundaryField(), ds.value());
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const GeometricField<scalar, PatchField, GeoMesh>& gsf,
const dimensionedScalar& ds
)
{
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
new GeometricField<scalar, PatchField, GeoMesh>
(
IOobject
(
"atan2(" + gsf.name() + ',' + ds.name() + ')',
gsf.instance(),
gsf.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
gsf.mesh(),
atan2(gsf.dimensions(), ds)
)
);
atan2(tAtan2(), gsf, ds);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
const dimensionedScalar& ds
)
{
const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
(
tgsf,
"atan2(" + gsf.name() + ',' + ds.name() + ')',
atan2(gsf.dimensions(), ds)
)
);
atan2(tAtan2(), gsf, ds);
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const GeometricField<scalar, PatchField, GeoMesh>& gsf,
const scalar& s
)
{
return atan2(gsf, dimensionedScalar(s));
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf,
const scalar& s
)
{
return atan2(tgsf, dimensionedScalar(s));
}
template<template<class> class PatchField, class GeoMesh>
void atan2
(
GeometricField<scalar, PatchField, GeoMesh>& tAtan2,
const dimensioned<scalar>& ds,
const GeometricField<scalar, PatchField, GeoMesh>& gsf
)
{
atan2(tAtan2.internalField(), ds.value(), gsf.internalField());
atan2(tAtan2.boundaryField(), ds.value(), gsf.boundaryField());
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const dimensionedScalar& ds,
const GeometricField<scalar, PatchField, GeoMesh>& gsf
)
{
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
new GeometricField<scalar, PatchField, GeoMesh>
(
IOobject
(
"atan2(" + ds.name() + ',' + gsf.name() + ')',
gsf.instance(),
gsf.db(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
gsf.mesh(),
atan2(ds, gsf.dimensions())
)
);
atan2(tAtan2(), ds, gsf);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const dimensionedScalar& ds,
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf
)
{
const GeometricField<scalar, PatchField, GeoMesh>& gsf = tgsf();
tmp<GeometricField<scalar, PatchField, GeoMesh> > tAtan2
(
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::New
(
tgsf,
"atan2(" + ds.name() + ',' + gsf.name() + ')',
atan2(ds, gsf.dimensions())
)
);
atan2(tAtan2(), ds, gsf);
reuseTmpGeometricField<scalar, scalar, PatchField, GeoMesh>::clear(tgsf);
return tAtan2;
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const scalar& s,
const GeometricField<scalar, PatchField, GeoMesh>& gsf
)
{
return atan2(dimensionedScalar(s), gsf);
}
template<template<class> class PatchField, class GeoMesh>
tmp<GeometricField<scalar, PatchField, GeoMesh> > atan2
(
const scalar& s,
const tmp<GeometricField<scalar, PatchField, GeoMesh> >& tgsf
)
{
return atan2(dimensionedScalar(s), tgsf);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
UNARY_FUNCTION(scalar, scalar, pow3, pow3)

View File

@ -84,6 +84,9 @@ BINARY_TYPE_OPERATOR_SF(scalar, scalar, scalar, /, '|', divide)
BINARY_FUNCTION(scalar, scalar, scalar, pow)
BINARY_TYPE_FUNCTION(scalar, scalar, scalar, pow)
BINARY_FUNCTION(scalar, scalar, scalar, atan2)
BINARY_TYPE_FUNCTION(scalar, scalar, scalar, atan2)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -24,7 +24,8 @@ License
\*---------------------------------------------------------------------------*/
#include "P1.H"
#include "fvm.H"
#include "fvmLaplacian.H"
#include "fvmSup.H"
#include "absorptionEmissionModel.H"
#include "scatterModel.H"
@ -279,7 +280,7 @@ Foam::radiation::P1::Ru() const
const DimensionedField<scalar, volMesh> a =
absorptionEmission_->aCont()().dimensionedInternalField();
return a*G - 4.0*E;
return a*G - 4.0*E;
}

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,7 @@ License
#include "absorptionEmissionModel.H"
#include "scatterModel.H"
#include "fvmSup.H"
#include "fluidThermo.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -232,6 +233,20 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh
}
Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::ST
(
const dimensionedScalar& rhoCp,
volScalarField& T
) const
{
return
(
Ru()/rhoCp
- fvm::Sp(Rp()*pow3(T)/rhoCp, T)
);
}
const Foam::radiation::absorptionEmissionModel&
Foam::radiation::radiationModel::absorptionEmission() const
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -28,23 +28,17 @@ porosity1
DarcyForchheimerCoeffs
{
d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
d d [0 -2 0 0 0 0 0] (7e5 -1000 -1000);
f f [0 -1 0 0 0 0 0] (0 0 0);
coordinateSystem
{
type cartesian;
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (0.70710678 0.70710678 0);
e2 (0 0 1);
}
e1 (0.70710678 0.70710678 0);
e3 (0 0 1);
}
}
}
}
// ************************************************************************* //
//************************************************************************ //

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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