Merge branch 'master' into cvm

This commit is contained in:
graham
2011-06-23 11:02:48 +01:00
8 changed files with 48 additions and 9 deletions

View File

@ -85,6 +85,14 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
stringOps::inplaceExpand(libs_, dict); stringOps::inplaceExpand(libs_, dict);
} }
// optional
const entry* localPtr = dict.lookupEntryPtr("localCode", false, false);
if (localPtr)
{
localCode_ = stringOps::trim(localPtr->stream());
stringOps::inplaceExpand(localCode_, dict);
}
// calculate SHA1 digest from include, options, localCode, code // calculate SHA1 digest from include, options, localCode, code
OSHA1stream os; OSHA1stream os;
os << include_ << options_ << libs_ << localCode_ << code_; os << include_ << options_ << libs_ << localCode_ << code_;
@ -103,14 +111,18 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
{ {
addLineDirective(include_, includePtr->startLineNumber(), dict.name()); addLineDirective(include_, includePtr->startLineNumber(), dict.name());
} }
if (optionsPtr)
{ // Do not add line directive to options_ (Make/options) since at it is a
addLineDirective(options_, optionsPtr->startLineNumber(), dict.name()); // single line at this point. Can be fixed.
}
if (libsPtr) if (libsPtr)
{ {
addLineDirective(libs_, libsPtr->startLineNumber(), dict.name()); addLineDirective(libs_, libsPtr->startLineNumber(), dict.name());
} }
if (localPtr)
{
addLineDirective(localCode_, localPtr->startLineNumber(), dict.name());
}
} }

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) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,6 +46,12 @@ namespace Foam
gasThermoPhysics gasThermoPhysics
); );
makeChemistryModel makeChemistryModel
(
ODEChemistryModel,
psiChemistryModel,
constGasThermoPhysics
);
makeChemistryModel
( (
ODEChemistryModel, ODEChemistryModel,
psiChemistryModel, psiChemistryModel,

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) 2009-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -46,6 +46,12 @@ namespace Foam
gasThermoPhysics gasThermoPhysics
); );
makeChemistryModel makeChemistryModel
(
ODEChemistryModel,
rhoChemistryModel,
constGasThermoPhysics
);
makeChemistryModel
( (
ODEChemistryModel, ODEChemistryModel,
rhoChemistryModel, rhoChemistryModel,

View File

@ -34,8 +34,10 @@ License
namespace Foam namespace Foam
{ {
makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics); makeChemistrySolverTypes(psiChemistryModel, gasThermoPhysics);
makeChemistrySolverTypes(psiChemistryModel, constGasThermoPhysics);
makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics); makeChemistrySolverTypes(psiChemistryModel, icoPoly8ThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics); makeChemistrySolverTypes(rhoChemistryModel, gasThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, constGasThermoPhysics);
makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics); makeChemistrySolverTypes(rhoChemistryModel, icoPoly8ThermoPhysics);
} }

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) 2004-2010 OpenCFD Ltd. \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -889,12 +889,12 @@ Foam::chemkinReader::chemkinReader(const dictionary& thermoDict)
fileName relPath = thermoDict.name().path(); fileName relPath = thermoDict.name().path();
if (relPath.size()) if (relPath.size())
{ {
if (chemkinFile.size() && chemkinFile[0] != '/') if (!chemkinFile.isAbsolute())
{ {
chemkinFile = relPath/chemkinFile; chemkinFile = relPath/chemkinFile;
} }
if (thermoFile.size() && thermoFile[0] != '/') if (!thermoFile.isAbsolute())
{ {
thermoFile = relPath/thermoFile; thermoFile = relPath/thermoFile;
} }

View File

@ -108,6 +108,8 @@ void Foam::singleStepReactingMixture<ThermoType>::calculateMaxProducts()
Yprod0_[specieI] = this->speciesData()[specieI].W()/Wm*Xi[i]; Yprod0_[specieI] = this->speciesData()[specieI].W()/Wm*Xi[i];
} }
Info << "Maximum products mass concentrations :" << Yprod0_<< endl;
// Normalize the stoichiometric coeff to mass // Normalize the stoichiometric coeff to mass
forAll(specieStoichCoeffs_, i) forAll(specieStoichCoeffs_, i)
{ {

View File

@ -152,6 +152,9 @@ public:
//- Return the list to indicate if specie is produced/consumed //- Return the list to indicate if specie is produced/consumed
inline const List<int>& specieProd() const; inline const List<int>& specieProd() const;
//- Return the list of products mass concentrations
inline const scalarList& Yprod0() const;
// I-O // I-O

View File

@ -94,4 +94,12 @@ Foam::singleStepReactingMixture<ThermoType>::specieProd() const
} }
template<class ThermoType>
inline const Foam::scalarList&
Foam::singleStepReactingMixture<ThermoType>::Yprod0() const
{
return Yprod0_;
}
// ************************************************************************* // // ************************************************************************* //