reactingMixture: Rationalised the reading of the species thermo and reactions
which are now read directly from the thermophysicalProperties dictionary for consistency with non-reacting mixture thermodynamics. The species thermo and reactions lists can still be in separate files if convenient and included into the thermophysicalProperties file using the standard dictionary #include.
This commit is contained in:
@ -64,43 +64,47 @@ int main(int argc, char *argv[])
|
|||||||
bool newFormat = args.optionFound("newFormat");
|
bool newFormat = args.optionFound("newFormat");
|
||||||
|
|
||||||
speciesTable species;
|
speciesTable species;
|
||||||
|
|
||||||
chemkinReader cr(species, args[1], args[3], args[2], newFormat);
|
chemkinReader cr(species, args[1], args[3], args[2], newFormat);
|
||||||
|
const HashPtrTable<gasHThermoPhysics>& speciesThermo = cr.speciesThermo();
|
||||||
|
|
||||||
OFstream reactionsFile(args[4]);
|
dictionary thermoDict;
|
||||||
writeEntry(reactionsFile, "elements", cr.elementNames());
|
thermoDict.add("species", cr.species());
|
||||||
reactionsFile << nl;
|
|
||||||
writeEntry(reactionsFile, "species", cr.species());
|
// Add the species thermo formatted entries
|
||||||
reactionsFile << nl;
|
{
|
||||||
cr.reactions().write(reactionsFile);
|
OStringStream os;
|
||||||
|
speciesThermo.write(os);
|
||||||
|
dictionary speciesThermoDict(IStringStream(os.str())());
|
||||||
|
thermoDict.merge(speciesThermoDict);
|
||||||
|
}
|
||||||
|
|
||||||
// Temporary hack to splice the specie composition data into the thermo file
|
// Temporary hack to splice the specie composition data into the thermo file
|
||||||
// pending complete integration into the thermodynamics structure
|
// pending complete integration into the thermodynamics structure
|
||||||
|
|
||||||
OStringStream os;
|
|
||||||
cr.speciesThermo().write(os);
|
|
||||||
dictionary thermoDict(IStringStream(os.str())());
|
|
||||||
|
|
||||||
wordList speciesList(thermoDict.toc());
|
|
||||||
|
|
||||||
// Add elements
|
// Add elements
|
||||||
forAll(speciesList, si)
|
forAllConstIter(HashPtrTable<gasHThermoPhysics>, speciesThermo, iter)
|
||||||
{
|
{
|
||||||
|
const word specieName(iter.key());
|
||||||
|
|
||||||
dictionary elementsDict("elements");
|
dictionary elementsDict("elements");
|
||||||
forAll(cr.specieComposition()[speciesList[si]], ei)
|
forAll(cr.specieComposition()[specieName], ei)
|
||||||
{
|
{
|
||||||
elementsDict.add
|
elementsDict.add
|
||||||
(
|
(
|
||||||
cr.specieComposition()[speciesList[si]][ei].name(),
|
cr.specieComposition()[specieName][ei].name(),
|
||||||
cr.specieComposition()[speciesList[si]][ei].nAtoms()
|
cr.specieComposition()[specieName][ei].nAtoms()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
thermoDict.subDict(speciesList[si]).add("elements", elementsDict);
|
thermoDict.subDict(specieName).add("elements", elementsDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
thermoDict.write(OFstream(args[5])(), false);
|
thermoDict.write(OFstream(args[5])(), false);
|
||||||
|
|
||||||
|
|
||||||
|
OFstream reactionsFile(args[4]);
|
||||||
|
cr.reactions().write(reactionsFile);
|
||||||
|
|
||||||
reactionsFile << nl;
|
reactionsFile << nl;
|
||||||
|
|
||||||
writeEntry
|
writeEntry
|
||||||
|
|||||||
@ -72,7 +72,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [0 0 0 1 0 0 0];
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [ 0 0 0 1 0 0 0 ];
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,34 +73,6 @@ void Foam::multiComponentMixture<ThermoType>::correctMassFractions()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::multiComponentMixture<ThermoType>::multiComponentMixture
|
|
||||||
(
|
|
||||||
const dictionary& thermoDict,
|
|
||||||
const wordList& specieNames,
|
|
||||||
const HashPtrTable<ThermoType>& thermoData,
|
|
||||||
const fvMesh& mesh,
|
|
||||||
const word& phaseName
|
|
||||||
)
|
|
||||||
:
|
|
||||||
basicSpecieMixture(thermoDict, specieNames, mesh, phaseName),
|
|
||||||
speciesData_(species_.size()),
|
|
||||||
mixture_("mixture", *thermoData[specieNames[0]]),
|
|
||||||
mixtureVol_("volMixture", *thermoData[specieNames[0]])
|
|
||||||
{
|
|
||||||
forAll(species_, i)
|
|
||||||
{
|
|
||||||
speciesData_.set
|
|
||||||
(
|
|
||||||
i,
|
|
||||||
new ThermoType(*thermoData[species_[i]])
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
correctMassFractions();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ThermoType>
|
template<class ThermoType>
|
||||||
Foam::multiComponentMixture<ThermoType>::multiComponentMixture
|
Foam::multiComponentMixture<ThermoType>::multiComponentMixture
|
||||||
(
|
(
|
||||||
|
|||||||
@ -86,17 +86,6 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from dictionary, specie names, thermo database,
|
|
||||||
// mesh and phase name
|
|
||||||
multiComponentMixture
|
|
||||||
(
|
|
||||||
const dictionary&,
|
|
||||||
const wordList& specieNames,
|
|
||||||
const HashPtrTable<ThermoType>& thermoData,
|
|
||||||
const fvMesh&,
|
|
||||||
const word&
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct from dictionary, mesh and phase name
|
//- Construct from dictionary, mesh and phase name
|
||||||
multiComponentMixture(const dictionary&, const fvMesh&, const word&);
|
multiComponentMixture(const dictionary&, const fvMesh&, const word&);
|
||||||
|
|
||||||
|
|||||||
@ -1,185 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "foamChemistryReader.H"
|
|
||||||
#include "IFstream.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::speciesTable& Foam::foamChemistryReader<ThermoType>::setSpecies
|
|
||||||
(
|
|
||||||
const dictionary& dict,
|
|
||||||
speciesTable& species
|
|
||||||
)
|
|
||||||
{
|
|
||||||
wordList s(dict.lookup("species"));
|
|
||||||
species.transfer(s);
|
|
||||||
return species;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
void Foam::foamChemistryReader<ThermoType>::readSpeciesComposition()
|
|
||||||
{
|
|
||||||
if (!chemDict_.found("elements"))
|
|
||||||
{
|
|
||||||
Info<< " elements not defined in " << chemDict_.name() << endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
wordList e(chemDict_.lookup("elements"));
|
|
||||||
label currentElementIndex(0);
|
|
||||||
|
|
||||||
DynamicList<word> elementNames_;
|
|
||||||
HashTable<label> elementIndices_;
|
|
||||||
|
|
||||||
forAll(e, ei)
|
|
||||||
{
|
|
||||||
if (!elementIndices_.found(e[ei]))
|
|
||||||
{
|
|
||||||
elementIndices_.insert(e[ei], currentElementIndex++);
|
|
||||||
elementNames_.append(e[ei]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
IOWarningInFunction(chemDict_)
|
|
||||||
<< "element " << e[ei] << " already in table." << endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loop through all species in thermoDict to retrieve
|
|
||||||
// the species composition
|
|
||||||
forAll(speciesTable_, si)
|
|
||||||
{
|
|
||||||
if (thermoDict_.subDict(speciesTable_[si]).isDict("elements"))
|
|
||||||
{
|
|
||||||
dictionary currentElements
|
|
||||||
(
|
|
||||||
thermoDict_.subDict(speciesTable_[si]).subDict("elements")
|
|
||||||
);
|
|
||||||
|
|
||||||
wordList currentElementsName(currentElements.toc());
|
|
||||||
List<specieElement> currentComposition(currentElementsName.size());
|
|
||||||
|
|
||||||
forAll(currentElementsName, eni)
|
|
||||||
{
|
|
||||||
currentComposition[eni].name() = currentElementsName[eni];
|
|
||||||
|
|
||||||
currentComposition[eni].nAtoms() =
|
|
||||||
currentElements.lookupOrDefault
|
|
||||||
(
|
|
||||||
currentElementsName[eni],
|
|
||||||
0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add current specie composition to the hash table
|
|
||||||
speciesCompositionTable::iterator specieCompositionIter
|
|
||||||
(
|
|
||||||
speciesComposition_.find(speciesTable_[si])
|
|
||||||
);
|
|
||||||
|
|
||||||
if (specieCompositionIter != speciesComposition_.end())
|
|
||||||
{
|
|
||||||
speciesComposition_.erase(specieCompositionIter);
|
|
||||||
}
|
|
||||||
|
|
||||||
speciesComposition_.insert(speciesTable_[si], currentComposition);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FatalIOErrorInFunction(thermoDict_)
|
|
||||||
<< "Specie " << speciesTable_[si]
|
|
||||||
<< " does not contain element description."
|
|
||||||
<< exit(FatalIOError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::foamChemistryReader<ThermoType>::foamChemistryReader
|
|
||||||
(
|
|
||||||
const fileName& reactionsFileName,
|
|
||||||
speciesTable& species,
|
|
||||||
const fileName& thermoFileName
|
|
||||||
)
|
|
||||||
:
|
|
||||||
chemDict_
|
|
||||||
(
|
|
||||||
IFstream
|
|
||||||
(
|
|
||||||
fileName(reactionsFileName).expand()
|
|
||||||
)()
|
|
||||||
),
|
|
||||||
thermoDict_
|
|
||||||
(
|
|
||||||
IFstream
|
|
||||||
(
|
|
||||||
fileName(thermoFileName).expand()
|
|
||||||
)()
|
|
||||||
),
|
|
||||||
speciesTable_(setSpecies(chemDict_, species)),
|
|
||||||
speciesThermo_(thermoDict_),
|
|
||||||
reactions_(speciesTable_, speciesThermo_, chemDict_)
|
|
||||||
{
|
|
||||||
readSpeciesComposition();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
Foam::foamChemistryReader<ThermoType>::foamChemistryReader
|
|
||||||
(
|
|
||||||
const dictionary& thermoDict,
|
|
||||||
speciesTable& species
|
|
||||||
)
|
|
||||||
:
|
|
||||||
chemDict_
|
|
||||||
(
|
|
||||||
IFstream
|
|
||||||
(
|
|
||||||
fileName(thermoDict.lookup("foamChemistryFile")).expand()
|
|
||||||
)()
|
|
||||||
),
|
|
||||||
thermoDict_
|
|
||||||
(
|
|
||||||
IFstream
|
|
||||||
(
|
|
||||||
fileName(thermoDict.lookup("foamChemistryThermoFile")).expand()
|
|
||||||
)()
|
|
||||||
),
|
|
||||||
speciesTable_(setSpecies(chemDict_, species)),
|
|
||||||
speciesThermo_(thermoDict_),
|
|
||||||
reactions_(speciesTable_, speciesThermo_, chemDict_)
|
|
||||||
{
|
|
||||||
readSpeciesComposition();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
@ -1,178 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
|
||||||
\\/ M anipulation |
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
License
|
|
||||||
This file is part of OpenFOAM.
|
|
||||||
|
|
||||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
||||||
under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Class
|
|
||||||
Foam::foamChemistryReader
|
|
||||||
|
|
||||||
Description
|
|
||||||
Chemistry reader for OpenFOAM format
|
|
||||||
|
|
||||||
SourceFiles
|
|
||||||
foamChemistryReader.C
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#ifndef foamChemistryReader_H
|
|
||||||
#define foamChemistryReader_H
|
|
||||||
|
|
||||||
#include "specieElement.H"
|
|
||||||
#include "ReactionList.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
typedef HashTable<List<specieElement>> speciesCompositionTable;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
Class foamChemistry Declaration
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
template<class ThermoType>
|
|
||||||
class foamChemistryReader
|
|
||||||
{
|
|
||||||
//- Chemistry/reactions dictionary
|
|
||||||
dictionary chemDict_;
|
|
||||||
|
|
||||||
//- Thermo properties dictionary
|
|
||||||
dictionary thermoDict_;
|
|
||||||
|
|
||||||
//- List of elements
|
|
||||||
DynamicList<word> elementNames_;
|
|
||||||
|
|
||||||
//- Element indices
|
|
||||||
HashTable<label> elementIndices_;
|
|
||||||
|
|
||||||
//- Table of species
|
|
||||||
speciesTable& speciesTable_;
|
|
||||||
|
|
||||||
//- Table of species composition
|
|
||||||
speciesCompositionTable speciesComposition_;
|
|
||||||
|
|
||||||
//- Table of the thermodynamic data given in the foamChemistry file
|
|
||||||
HashPtrTable<ThermoType> speciesThermo_;
|
|
||||||
|
|
||||||
//- List of the reactions
|
|
||||||
ReactionList<ThermoType> reactions_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
|
||||||
|
|
||||||
//- Set the species list
|
|
||||||
speciesTable& setSpecies(const dictionary& dict, speciesTable& species);
|
|
||||||
|
|
||||||
//- Read the species composition
|
|
||||||
void readSpeciesComposition();
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
// Constructors
|
|
||||||
|
|
||||||
//- Construct from foamChemistry and thermodynamics file names
|
|
||||||
foamChemistryReader
|
|
||||||
(
|
|
||||||
const fileName& reactionsFileName,
|
|
||||||
speciesTable& species,
|
|
||||||
const fileName& thermoFileName
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Construct by getting the foamChemistry and thermodynamics file names
|
|
||||||
// from dictionary
|
|
||||||
foamChemistryReader
|
|
||||||
(
|
|
||||||
const dictionary& thermoDict,
|
|
||||||
speciesTable& species
|
|
||||||
);
|
|
||||||
|
|
||||||
//- Disallow default bitwise copy construction
|
|
||||||
foamChemistryReader(const foamChemistryReader&) = delete;
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
|
||||||
virtual ~foamChemistryReader()
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
|
||||||
|
|
||||||
//- List of elements
|
|
||||||
const wordList& elementNames() const
|
|
||||||
{
|
|
||||||
return elementNames_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Element indices
|
|
||||||
const HashTable<label>& elementIndices() const
|
|
||||||
{
|
|
||||||
return elementIndices_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Table of species
|
|
||||||
const speciesTable& species() const
|
|
||||||
{
|
|
||||||
return speciesTable_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Table of species composition
|
|
||||||
const speciesCompositionTable& specieComposition() const
|
|
||||||
{
|
|
||||||
return speciesComposition_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- Table of the thermodynamic data given in the foamChemistry file
|
|
||||||
const HashPtrTable<ThermoType>& speciesThermo() const
|
|
||||||
{
|
|
||||||
return speciesThermo_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- List of the reactions
|
|
||||||
const ReactionList<ThermoType>& reactions() const
|
|
||||||
{
|
|
||||||
return reactions_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
|
||||||
|
|
||||||
//- Disallow default bitwise assignment
|
|
||||||
void operator=(const foamChemistryReader&) = delete;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#ifdef NoRepository
|
|
||||||
#include "foamChemistryReader.C"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -26,6 +26,63 @@ License
|
|||||||
#include "reactingMixture.H"
|
#include "reactingMixture.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class ThermoType>
|
||||||
|
Foam::speciesCompositionTable
|
||||||
|
Foam::reactingMixture<ThermoType>::readSpeciesComposition
|
||||||
|
(
|
||||||
|
const dictionary& thermoDict,
|
||||||
|
const speciesTable& species
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
speciesCompositionTable speciesComposition_;
|
||||||
|
|
||||||
|
// Loop through all species in thermoDict to retrieve
|
||||||
|
// the species composition
|
||||||
|
forAll(species, si)
|
||||||
|
{
|
||||||
|
if (thermoDict.subDict(species[si]).isDict("elements"))
|
||||||
|
{
|
||||||
|
dictionary currentElements
|
||||||
|
(
|
||||||
|
thermoDict.subDict(species[si]).subDict("elements")
|
||||||
|
);
|
||||||
|
|
||||||
|
wordList currentElementsName(currentElements.toc());
|
||||||
|
List<specieElement> currentComposition(currentElementsName.size());
|
||||||
|
|
||||||
|
forAll(currentElementsName, eni)
|
||||||
|
{
|
||||||
|
currentComposition[eni].name() = currentElementsName[eni];
|
||||||
|
|
||||||
|
currentComposition[eni].nAtoms() =
|
||||||
|
currentElements.lookupOrDefault
|
||||||
|
(
|
||||||
|
currentElementsName[eni],
|
||||||
|
0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add current specie composition to the hash table
|
||||||
|
speciesCompositionTable::iterator specieCompositionIter
|
||||||
|
(
|
||||||
|
speciesComposition_.find(species[si])
|
||||||
|
);
|
||||||
|
|
||||||
|
if (specieCompositionIter != speciesComposition_.end())
|
||||||
|
{
|
||||||
|
speciesComposition_.erase(specieCompositionIter);
|
||||||
|
}
|
||||||
|
|
||||||
|
speciesComposition_.insert(species[si], currentComposition);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return speciesComposition_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class ThermoType>
|
template<class ThermoType>
|
||||||
@ -36,30 +93,35 @@ Foam::reactingMixture<ThermoType>::reactingMixture
|
|||||||
const word& phaseName
|
const word& phaseName
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
speciesTable(),
|
|
||||||
autoPtr<foamChemistryReader<ThermoType>>
|
|
||||||
(
|
|
||||||
new foamChemistryReader<ThermoType>(thermoDict, *this)
|
|
||||||
),
|
|
||||||
multiComponentMixture<ThermoType>
|
multiComponentMixture<ThermoType>
|
||||||
(
|
(
|
||||||
thermoDict,
|
thermoDict,
|
||||||
*this,
|
|
||||||
autoPtr<foamChemistryReader<ThermoType>>::operator()().speciesThermo(),
|
|
||||||
mesh,
|
mesh,
|
||||||
phaseName
|
phaseName
|
||||||
),
|
),
|
||||||
reactions_
|
speciesComposition_(readSpeciesComposition(thermoDict, this->species()))
|
||||||
(
|
|
||||||
autoPtr<foamChemistryReader<ThermoType>>::operator()().reactions()
|
|
||||||
),
|
|
||||||
speciesComposition_
|
|
||||||
(
|
|
||||||
autoPtr<foamChemistryReader<ThermoType>>::
|
|
||||||
operator()().specieComposition()
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
autoPtr<foamChemistryReader<ThermoType>>::clear();
|
HashPtrTable<ThermoType> thermoDatabase;
|
||||||
|
const PtrList<ThermoType>& speciesData = this->speciesData();
|
||||||
|
|
||||||
|
forAll(speciesData, i)
|
||||||
|
{
|
||||||
|
thermoDatabase.insert
|
||||||
|
(
|
||||||
|
speciesData[i].name(),
|
||||||
|
speciesData[i].clone().ptr()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
reactions_ = PtrList<Reaction<ThermoType>>
|
||||||
|
(
|
||||||
|
ReactionList<ThermoType>
|
||||||
|
(
|
||||||
|
this->species(),
|
||||||
|
thermoDatabase,
|
||||||
|
thermoDict
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,17 @@ SourceFiles
|
|||||||
#ifndef reactingMixture_H
|
#ifndef reactingMixture_H
|
||||||
#define reactingMixture_H
|
#define reactingMixture_H
|
||||||
|
|
||||||
#include "speciesTable.H"
|
|
||||||
#include "foamChemistryReader.H"
|
|
||||||
#include "multiComponentMixture.H"
|
#include "multiComponentMixture.H"
|
||||||
|
#include "ReactionList.H"
|
||||||
|
#include "specieElement.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
typedef HashTable<List<specieElement>> speciesCompositionTable;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class reactingMixture Declaration
|
Class reactingMixture Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -51,17 +53,21 @@ namespace Foam
|
|||||||
template<class ThermoType>
|
template<class ThermoType>
|
||||||
class reactingMixture
|
class reactingMixture
|
||||||
:
|
:
|
||||||
public speciesTable,
|
|
||||||
public autoPtr<foamChemistryReader<ThermoType>>,
|
|
||||||
public multiComponentMixture<ThermoType>
|
public multiComponentMixture<ThermoType>
|
||||||
{
|
{
|
||||||
// Private member data
|
// Private member data
|
||||||
|
|
||||||
PtrList<Reaction<ThermoType>> reactions_;
|
|
||||||
|
|
||||||
//- Table of species composition
|
//- Table of species composition
|
||||||
speciesCompositionTable speciesComposition_;
|
speciesCompositionTable speciesComposition_;
|
||||||
|
|
||||||
|
PtrList<Reaction<ThermoType>> reactions_;
|
||||||
|
|
||||||
|
speciesCompositionTable readSpeciesComposition
|
||||||
|
(
|
||||||
|
const dictionary& thermoDict,
|
||||||
|
const speciesTable& speciesTable_
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -96,6 +96,9 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
constAnIsoSolidTransport(const dictionary&);
|
constAnIsoSolidTransport(const dictionary&);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
inline autoPtr<constAnIsoSolidTransport> clone() const;
|
||||||
|
|
||||||
// Selector from dictionary
|
// Selector from dictionary
|
||||||
inline static autoPtr<constAnIsoSolidTransport> New
|
inline static autoPtr<constAnIsoSolidTransport> New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -49,6 +49,17 @@ inline Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Thermo>
|
||||||
|
inline Foam::autoPtr<Foam::constAnIsoSolidTransport<Thermo>>
|
||||||
|
Foam::constAnIsoSolidTransport<Thermo>::clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<constAnIsoSolidTransport<Thermo>>
|
||||||
|
(
|
||||||
|
new constAnIsoSolidTransport<Thermo>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Thermo>
|
template<class Thermo>
|
||||||
inline Foam::autoPtr<Foam::constAnIsoSolidTransport<Thermo>>
|
inline Foam::autoPtr<Foam::constAnIsoSolidTransport<Thermo>>
|
||||||
Foam::constAnIsoSolidTransport<Thermo>::New
|
Foam::constAnIsoSolidTransport<Thermo>::New
|
||||||
|
|||||||
@ -97,6 +97,9 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
constIsoSolidTransport(const dictionary& dict);
|
constIsoSolidTransport(const dictionary& dict);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
inline autoPtr<constIsoSolidTransport> clone() const;
|
||||||
|
|
||||||
// Selector from dictionary
|
// Selector from dictionary
|
||||||
inline static autoPtr<constIsoSolidTransport> New
|
inline static autoPtr<constIsoSolidTransport> New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -25,30 +25,41 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::constIsoSolidTransport<thermo>::constIsoSolidTransport
|
inline Foam::constIsoSolidTransport<Thermo>::constIsoSolidTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar kappa
|
const scalar kappa
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(t),
|
Thermo(t),
|
||||||
kappa_(kappa)
|
kappa_(kappa)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::constIsoSolidTransport<thermo>::constIsoSolidTransport
|
inline Foam::constIsoSolidTransport<Thermo>::constIsoSolidTransport
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const constIsoSolidTransport& ct
|
const constIsoSolidTransport& ct
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(name, ct),
|
Thermo(name, ct),
|
||||||
kappa_(ct.kappa_)
|
kappa_(ct.kappa_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Thermo>
|
||||||
|
inline Foam::autoPtr<Foam::constIsoSolidTransport<Thermo>>
|
||||||
|
Foam::constIsoSolidTransport<Thermo>::clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<constIsoSolidTransport<Thermo>>
|
||||||
|
(
|
||||||
|
new constIsoSolidTransport<Thermo>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Thermo>
|
template<class Thermo>
|
||||||
inline Foam::autoPtr<Foam::constIsoSolidTransport<Thermo>>
|
inline Foam::autoPtr<Foam::constIsoSolidTransport<Thermo>>
|
||||||
Foam::constIsoSolidTransport<Thermo>::New
|
Foam::constIsoSolidTransport<Thermo>::New
|
||||||
@ -62,25 +73,26 @@ Foam::constIsoSolidTransport<Thermo>::New
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::constIsoSolidTransport<thermo>::
|
inline Foam::scalar Foam::constIsoSolidTransport<Thermo>::
|
||||||
kappa(const scalar p, const scalar T) const
|
kappa(const scalar p, const scalar T) const
|
||||||
{
|
{
|
||||||
return kappa_;
|
return kappa_;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::vector Foam::constIsoSolidTransport<thermo>::
|
inline Foam::vector Foam::constIsoSolidTransport<Thermo>::
|
||||||
Kappa(const scalar p, const scalar T) const
|
Kappa(const scalar p, const scalar T) const
|
||||||
{
|
{
|
||||||
return vector(kappa_, kappa_, kappa_);
|
return vector(kappa_, kappa_, kappa_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::constIsoSolidTransport<thermo>::
|
inline Foam::scalar Foam::constIsoSolidTransport<Thermo>::
|
||||||
mu(const scalar p, const scalar T) const
|
mu(const scalar p, const scalar T) const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
@ -88,8 +100,8 @@ mu(const scalar p, const scalar T) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::constIsoSolidTransport<thermo>::
|
inline Foam::scalar Foam::constIsoSolidTransport<Thermo>::
|
||||||
alphah(const scalar p, const scalar T) const
|
alphah(const scalar p, const scalar T) const
|
||||||
{
|
{
|
||||||
return kappa_/this->Cp(p, T);
|
return kappa_/this->Cp(p, T);
|
||||||
@ -97,14 +109,14 @@ alphah(const scalar p, const scalar T) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline void Foam::constIsoSolidTransport<thermo>::operator+=
|
inline void Foam::constIsoSolidTransport<Thermo>::operator+=
|
||||||
(
|
(
|
||||||
const constIsoSolidTransport<thermo>& ct
|
const constIsoSolidTransport<Thermo>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar Y1 = this->Y();
|
scalar Y1 = this->Y();
|
||||||
thermo::operator+=(ct);
|
Thermo::operator+=(ct);
|
||||||
|
|
||||||
Y1 /= this->Y();
|
Y1 /= this->Y();
|
||||||
scalar Y2 = ct.Y()/this->Y();
|
scalar Y2 = ct.Y()/this->Y();
|
||||||
@ -116,16 +128,16 @@ inline void Foam::constIsoSolidTransport<thermo>::operator+=
|
|||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::constIsoSolidTransport<thermo> Foam::operator*
|
inline Foam::constIsoSolidTransport<Thermo> Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const constIsoSolidTransport<thermo>& ct
|
const constIsoSolidTransport<Thermo>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return constIsoSolidTransport<thermo>
|
return constIsoSolidTransport<Thermo>
|
||||||
(
|
(
|
||||||
s*static_cast<const thermo&>(ct),
|
s*static_cast<const Thermo&>(ct),
|
||||||
ct.kappa_
|
ct.kappa_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,6 +106,9 @@ public:
|
|||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
exponentialSolidTransport(const dictionary&);
|
exponentialSolidTransport(const dictionary&);
|
||||||
|
|
||||||
|
//- Construct and return a clone
|
||||||
|
inline autoPtr<exponentialSolidTransport> clone() const;
|
||||||
|
|
||||||
// Selector from dictionary
|
// Selector from dictionary
|
||||||
inline static autoPtr<exponentialSolidTransport> New
|
inline static autoPtr<exponentialSolidTransport> New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -55,6 +55,17 @@ inline Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Thermo>
|
||||||
|
inline Foam::autoPtr<Foam::exponentialSolidTransport<Thermo>>
|
||||||
|
Foam::exponentialSolidTransport<Thermo>::clone() const
|
||||||
|
{
|
||||||
|
return autoPtr<exponentialSolidTransport<Thermo>>
|
||||||
|
(
|
||||||
|
new exponentialSolidTransport<Thermo>(*this)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Thermo>
|
template<class Thermo>
|
||||||
inline Foam::autoPtr<Foam::exponentialSolidTransport<Thermo>>
|
inline Foam::autoPtr<Foam::exponentialSolidTransport<Thermo>>
|
||||||
Foam::exponentialSolidTransport<Thermo>::New
|
Foam::exponentialSolidTransport<Thermo>::New
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public:
|
|||||||
const HashPtrTable<ThermoType>& thermoDatabase
|
const HashPtrTable<ThermoType>& thermoDatabase
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from thermoDatabase and dictionary
|
||||||
ReactionList
|
ReactionList
|
||||||
(
|
(
|
||||||
const speciesTable& species,
|
const speciesTable& species,
|
||||||
@ -87,6 +87,14 @@ public:
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Construct from thermo list and dictionary
|
||||||
|
ReactionList
|
||||||
|
(
|
||||||
|
const speciesTable& species,
|
||||||
|
const PtrList<ThermoType>& thermoDatabase,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct copy
|
//- Construct copy
|
||||||
ReactionList(const ReactionList<ThermoType>& reactions);
|
ReactionList(const ReactionList<ThermoType>& reactions);
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
rm -rf 0 chemFoam.out constant/reactions constant/thermo \
|
rm -rf 0 chemFoam.out constant/reactions constant/speciesThermo \
|
||||||
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
||||||
constant/reactions constant/thermo
|
constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
1392
tutorials/combustion/chemFoam/gri/constant/thermo
Normal file
1392
tutorials/combustion/chemFoam/gri/constant/thermo
Normal file
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@ thermoType
|
|||||||
specie specie;
|
specie specie;
|
||||||
}
|
}
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "speciesThermo"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
rm -rf 0 chemFoam.out constant/reactions constant/thermo \
|
rm -rf 0 chemFoam.out constant/reactions constant/speciesThermo \
|
||||||
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
||||||
constant/reactions constant/thermo
|
constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ thermoType
|
|||||||
specie specie;
|
specie specie;
|
||||||
}
|
}
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "speciesThermo"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
rm -rf 0 chemFoam.out constant/reactions constant/thermo \
|
rm -rf 0 chemFoam.out constant/reactions constant/speciesThermo \
|
||||||
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
||||||
constant/reactions constant/thermo
|
constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ thermoType
|
|||||||
specie specie;
|
specie specie;
|
||||||
}
|
}
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "speciesThermo"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
rm -rf 0 chemFoam.out constant/reactions constant/thermo \
|
rm -rf 0 chemFoam.out constant/reactions constant/speciesThermo \
|
||||||
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
||||||
constant/reactions constant/thermo
|
constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ thermoType
|
|||||||
specie specie;
|
specie specie;
|
||||||
}
|
}
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "speciesThermo"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
rm -rf 0 chemFoam.out constant/reactions constant/thermo \
|
rm -rf 0 chemFoam.out constant/reactions constant/speciesThermo \
|
||||||
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
validation/OF_vs_CHEMKINII.eps validation/chemkinII
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
||||||
constant/reactions constant/thermo
|
constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ thermoType
|
|||||||
specie specie;
|
specie specie;
|
||||||
}
|
}
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "speciesThermo"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,10 +28,7 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie air;
|
inertSpecie air;
|
||||||
|
|
||||||
|
#include "include/thermo.air"
|
||||||
foamChemistryFile "$FOAM_CASE/constant/include/reactions.air";
|
#include "include/reactions.air"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/include/thermo.air";
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -25,12 +25,6 @@ thermoType
|
|||||||
energy sensibleEnthalpy;
|
energy sensibleEnthalpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/pyrolysisRegion/reactions";
|
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/pyrolysisRegion/thermo.solid";
|
|
||||||
|
|
||||||
gasThermoType
|
gasThermoType
|
||||||
{
|
{
|
||||||
transport sutherland;
|
transport sutherland;
|
||||||
@ -40,7 +34,6 @@ gasThermoType
|
|||||||
energy sensibleEnthalpy;
|
energy sensibleEnthalpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
gas
|
gas
|
||||||
{
|
{
|
||||||
specie
|
specie
|
||||||
@ -62,5 +55,7 @@ gas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "thermo.solid"
|
||||||
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,9 +31,9 @@ inertSpecie N2;
|
|||||||
fuel C3H8;
|
fuel C3H8;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
liquids
|
liquids
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,12 +25,6 @@ thermoType
|
|||||||
energy sensibleEnthalpy;
|
energy sensibleEnthalpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/panelRegion/reactions";
|
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/panelRegion/thermo.solid";
|
|
||||||
|
|
||||||
gasThermoType
|
gasThermoType
|
||||||
{
|
{
|
||||||
transport sutherland;
|
transport sutherland;
|
||||||
@ -62,5 +56,7 @@ gas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "thermo.solid"
|
||||||
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,9 +31,9 @@ inertSpecie N2;
|
|||||||
fuel C3H8;
|
fuel C3H8;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,9 +31,9 @@ inertSpecie N2;
|
|||||||
fuel CH4;
|
fuel CH4;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -31,9 +31,9 @@ inertSpecie N2;
|
|||||||
fuel CH4;
|
fuel CH4;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,56 +1,3 @@
|
|||||||
elements
|
|
||||||
5
|
|
||||||
(
|
|
||||||
O
|
|
||||||
H
|
|
||||||
C
|
|
||||||
N
|
|
||||||
Ar
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
species
|
|
||||||
36
|
|
||||||
(
|
|
||||||
H2
|
|
||||||
H
|
|
||||||
O
|
|
||||||
O2
|
|
||||||
OH
|
|
||||||
H2O
|
|
||||||
HO2
|
|
||||||
H2O2
|
|
||||||
C
|
|
||||||
CH
|
|
||||||
CH2
|
|
||||||
CH2(S)
|
|
||||||
CH3
|
|
||||||
CH4
|
|
||||||
CO
|
|
||||||
CO2
|
|
||||||
HCO
|
|
||||||
CH2O
|
|
||||||
CH2OH
|
|
||||||
CH3O
|
|
||||||
CH3OH
|
|
||||||
C2H
|
|
||||||
C2H2
|
|
||||||
C2H3
|
|
||||||
C2H4
|
|
||||||
C2H5
|
|
||||||
C2H6
|
|
||||||
HCCO
|
|
||||||
CH2CO
|
|
||||||
HCCOH
|
|
||||||
N2
|
|
||||||
AR
|
|
||||||
C3H7
|
|
||||||
C3H8
|
|
||||||
CH2CHO
|
|
||||||
CH3CHO
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
reactions
|
reactions
|
||||||
{
|
{
|
||||||
un-named-reaction-0
|
un-named-reaction-0
|
||||||
@ -3611,4 +3558,3 @@ reactions
|
|||||||
|
|
||||||
Tlow 250;
|
Tlow 250;
|
||||||
Thigh 5000;
|
Thigh 5000;
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
species 36 ( H2 H O O2 OH H2O HO2 H2O2 C CH CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH N2 AR C3H7 C3H8 CH2CHO CH3CHO );
|
||||||
|
|
||||||
OH
|
OH
|
||||||
{
|
{
|
||||||
specie
|
specie
|
||||||
|
|||||||
@ -29,7 +29,7 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
|
#include "thermo.compressibleGasGRI"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
|
#include "reactionsGRI"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,7 +28,7 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
|
#include "thermo.compressibleGasGRI"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
|
#include "reactionsGRI"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,9 +29,9 @@ thermoType
|
|||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,9 +29,9 @@ thermoType
|
|||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,9 +29,9 @@ thermoType
|
|||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,8 +28,8 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
|
#include "reactionsGRI"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
|
#include "thermo.compressibleGasGRI"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,8 +28,8 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
|
#include "reactionsGRI"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
|
#include "thermo.compressibleGasGRI"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -28,8 +28,8 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
|
#include "reactionsGRI"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";
|
#include "thermo.compressibleGasGRI"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [0 0 0 1 0 0 0];
|
dimensions [0 0 0 1 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [ 0 0 0 1 0 0 0 ];
|
dimensions [ 0 0 0 1 0 0 0 ];
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/initialConditions";
|
#include "$FOAM_CASE/constant/initialConditions"
|
||||||
|
|
||||||
dimensions [1 -1 -2 0 0 0 0];
|
dimensions [1 -1 -2 0 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -28,10 +28,7 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
#include "thermo.compressibleGas"
|
||||||
foamChemistryFile "$FOAM_CASE/constant/gas/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/gas/thermo.compressibleGas";
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -63,7 +63,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -63,7 +63,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -63,7 +63,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -1,13 +1,3 @@
|
|||||||
species
|
|
||||||
(
|
|
||||||
N2
|
|
||||||
O2
|
|
||||||
CH4
|
|
||||||
H2
|
|
||||||
CO2
|
|
||||||
H2O
|
|
||||||
);
|
|
||||||
|
|
||||||
reactions
|
reactions
|
||||||
{
|
{
|
||||||
methaneReaction
|
methaneReaction
|
||||||
@ -1,19 +1,12 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
species
|
||||||
========= |
|
(
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
N2
|
||||||
\\ / O peration | Website: https://openfoam.org
|
O2
|
||||||
\\ / A nd | Version: dev
|
CH4
|
||||||
\\/ M anipulation |
|
H2
|
||||||
\*---------------------------------------------------------------------------*/
|
CO2
|
||||||
FoamFile
|
H2O
|
||||||
{
|
);
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "constant";
|
|
||||||
object foam.dat;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
CO2
|
CO2
|
||||||
{
|
{
|
||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
|
#include "speciesThermo"
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
|
#include "reactions"
|
||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|||||||
@ -29,9 +29,9 @@ thermoType
|
|||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGas";
|
#include "thermo.compressibleGas"
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
species
|
|
||||||
(
|
|
||||||
O2
|
|
||||||
H2O
|
|
||||||
N2
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
reactions
|
|
||||||
{}
|
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
reactions
|
||||||
|
{}
|
||||||
@ -1,19 +1,9 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
species
|
||||||
========= |
|
(
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
O2
|
||||||
\\ / O peration | Website: https://openfoam.org
|
H2O
|
||||||
\\ / A nd | Version: dev
|
N2
|
||||||
\\/ M anipulation |
|
);
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "constant";
|
|
||||||
object foam.dat;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
O2
|
O2
|
||||||
{
|
{
|
||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
|
#include "speciesThermo"
|
||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
|
#include "thermo.incompressiblePoly"
|
||||||
|
|
||||||
liquids
|
liquids
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
species
|
|
||||||
(
|
|
||||||
O2
|
|
||||||
H2O
|
|
||||||
N2
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
reactions
|
|
||||||
{}
|
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
reactions
|
||||||
|
{}
|
||||||
@ -1,19 +1,9 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
species
|
||||||
========= |
|
(
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
O2
|
||||||
\\ / O peration | Website: https://openfoam.org
|
H2O
|
||||||
\\ / A nd | Version: dev
|
N2
|
||||||
\\/ M anipulation |
|
);
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "constant";
|
|
||||||
object foam.dat;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
O2
|
O2
|
||||||
{
|
{
|
||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
|
#include "speciesThermo"
|
||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
|
#include "thermo.incompressiblePoly"
|
||||||
|
|
||||||
inertSpecie air;
|
inertSpecie air;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
species
|
|
||||||
(
|
|
||||||
O2
|
|
||||||
H2O
|
|
||||||
N2
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
reactions
|
|
||||||
{}
|
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
reactions
|
||||||
|
{}
|
||||||
@ -1,19 +1,9 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
species
|
||||||
========= |
|
(
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
O2
|
||||||
\\ / O peration | Website: https://openfoam.org
|
H2O
|
||||||
\\ / A nd | Version: dev
|
N2
|
||||||
\\/ M anipulation |
|
);
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "constant";
|
|
||||||
object foam.dat;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
O2
|
O2
|
||||||
{
|
{
|
||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
|
#include "speciesThermo"
|
||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
species
|
|
||||||
(
|
|
||||||
O2
|
|
||||||
H2O
|
|
||||||
N2
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
reactions
|
|
||||||
{}
|
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
reactions
|
||||||
|
{}
|
||||||
@ -1,19 +1,9 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
species
|
||||||
========= |
|
(
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
O2
|
||||||
\\ / O peration | Website: https://openfoam.org
|
H2O
|
||||||
\\ / A nd | Version: dev
|
N2
|
||||||
\\/ M anipulation |
|
);
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
version 2.0;
|
|
||||||
format ascii;
|
|
||||||
class dictionary;
|
|
||||||
location "constant";
|
|
||||||
object foam.dat;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
O2
|
O2
|
||||||
{
|
{
|
||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/foam.inp";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";
|
#include "speciesThermo"
|
||||||
|
|
||||||
inertSpecie N2;
|
inertSpecie N2;
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
|
#include "thermo.incompressiblePoly"
|
||||||
|
|
||||||
inertSpecie air;
|
inertSpecie air;
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
|
#include "thermo.incompressiblePoly"
|
||||||
|
|
||||||
inertSpecie air;
|
inertSpecie air;
|
||||||
|
|
||||||
|
|||||||
@ -27,9 +27,9 @@ thermoType
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "reactions"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";
|
#include "thermo.incompressiblePoly"
|
||||||
|
|
||||||
inertSpecie air;
|
inertSpecie air;
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
|
|
||||||
cleanCase
|
cleanCase
|
||||||
|
|
||||||
rm -rf constant/reactions constant/thermo
|
rm -rf constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication chemkinToFoam \
|
runApplication chemkinToFoam \
|
||||||
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
|
||||||
constant/reactions constant/thermo
|
constant/reactions constant/speciesThermo
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication $application
|
runApplication $application
|
||||||
|
|||||||
@ -26,8 +26,7 @@ thermoType
|
|||||||
specie specie;
|
specie specie;
|
||||||
}
|
}
|
||||||
|
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions";
|
#include "speciesThermo"
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
|
|
||||||
|
|
||||||
newFormat yes;
|
newFormat yes;
|
||||||
|
|
||||||
@ -41,5 +40,6 @@ liquids
|
|||||||
solids
|
solids
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
#include "reactions"
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -59,7 +59,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -59,7 +59,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -63,7 +63,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -63,7 +63,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -60,7 +60,7 @@ controlMeshQualityCoeffs
|
|||||||
{
|
{
|
||||||
// Name of the dictionary that has the mesh quality coefficients used
|
// Name of the dictionary that has the mesh quality coefficients used
|
||||||
// by motionSmoother::checkMesh
|
// by motionSmoother::checkMesh
|
||||||
#include "meshQualityDict";
|
#include "meshQualityDict"
|
||||||
|
|
||||||
// The amount that minimumEdgeLength will be reduced by for each
|
// The amount that minimumEdgeLength will be reduced by for each
|
||||||
// edge if that edge's collapse generates a poor quality face
|
// edge if that edge's collapse generates a poor quality face
|
||||||
|
|||||||
@ -141,7 +141,7 @@ shortEdgeFilter
|
|||||||
extrusion
|
extrusion
|
||||||
{
|
{
|
||||||
extrude off;
|
extrude off;
|
||||||
#include "extrude2DMeshDict";
|
#include "extrude2DMeshDict"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -159,7 +159,7 @@ extrusion
|
|||||||
{
|
{
|
||||||
extrude off;
|
extrude off;
|
||||||
|
|
||||||
#include "extrude2DMeshDict";
|
#include "extrude2DMeshDict"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "$FOAM_CASE/constant/waveProperties";
|
#include "$FOAM_CASE/constant/waveProperties"
|
||||||
|
|
||||||
dimensions [0 1 -1 0 0 0 0];
|
dimensions [0 1 -1 0 0 0 0];
|
||||||
|
|
||||||
|
|||||||
@ -28,10 +28,7 @@ thermoType
|
|||||||
|
|
||||||
inertSpecie AIR;
|
inertSpecie AIR;
|
||||||
|
|
||||||
|
#include "thermo.gas"
|
||||||
foamChemistryFile "$FOAM_CASE/constant/reactions.gas";
|
#include "reactions.gas"
|
||||||
|
|
||||||
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.gas";
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user