reactingMixture: use the foamChemistryReader directly rather than chemistryReader::New

This formalises the flexible and extensible OpenFOAM thermodynamics and reaction
format as the direct input to OpenFOAM solvers.  The CHEMKIN format is still
supported by first converting to the OpenFOAM format using the chemkinToFoam
utility.
This commit is contained in:
Henry Weller
2019-08-02 14:47:37 +01:00
parent 50dc057184
commit 4baf73b54d
57 changed files with 82 additions and 438 deletions

View File

@ -1,4 +1,5 @@
chemkinReader/chemkinReader.C
chemkinReader/chemkinLexer.L
chemkinToFoam.C chemkinToFoam.C
EXE = $(FOAM_APPBIN)/chemkinToFoam EXE = $(FOAM_APPBIN)/chemkinToFoam

View File

@ -1,4 +1,5 @@
EXE_INC = \ EXE_INC = \
-IchemkinReader \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude

View File

@ -43,14 +43,6 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
/* * * * * * * * * * * * * * * * * Static data * * * * * * * * * * * * * * * */
namespace Foam
{
addChemistryReaderType(chemkinReader, gasHThermoPhysics);
}
/* * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * */ /* * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * */
const char* Foam::chemkinReader::reactionTypeNames[4] = const char* Foam::chemkinReader::reactionTypeNames[4] =

View File

@ -36,7 +36,6 @@ SourceFiles
#ifndef chemkinReader_H #ifndef chemkinReader_H
#define chemkinReader_H #define chemkinReader_H
#include "chemistryReader.H"
#include "fileName.H" #include "fileName.H"
#include "typeInfo.H" #include "typeInfo.H"
#include "Switch.H" #include "Switch.H"
@ -45,6 +44,7 @@ SourceFiles
#include "DynamicList.H" #include "DynamicList.H"
#include "labelList.H" #include "labelList.H"
#include "speciesTable.H" #include "speciesTable.H"
#include "specieElement.H"
#include "atomicWeights.H" #include "atomicWeights.H"
#include "reactionTypes.H" #include "reactionTypes.H"
@ -55,13 +55,14 @@ SourceFiles
namespace Foam namespace Foam
{ {
typedef HashTable<List<specieElement>> speciesCompositionTable;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class chemkinReader Declaration Class chemkinReader Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class chemkinReader class chemkinReader
: :
public chemistryReader<gasHThermoPhysics>,
public yyFlexLexer public yyFlexLexer
{ {
@ -290,10 +291,6 @@ private:
public: public:
//- Runtime type information
TypeName("chemkinReader");
// Constructors // Constructors
//- Construct from CHEMKIN III file name //- Construct from CHEMKIN III file name

View File

@ -1,7 +1,3 @@
chemistryReaders/chemkinReader/chemkinReader.C
chemistryReaders/chemkinReader/chemkinLexer.L
chemistryReaders/chemistryReader/makeChemistryReaders.C
mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C
mixtures/basicSpecieMixture/basicSpecieMixture.C mixtures/basicSpecieMixture/basicSpecieMixture.C
mixtures/basicCombustionMixture/basicCombustionMixture.C mixtures/basicCombustionMixture/basicCombustionMixture.C

View File

@ -1,67 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 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 "chemistryReader.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class ThermoType>
Foam::autoPtr<Foam::chemistryReader<ThermoType>>
Foam::chemistryReader<ThermoType>::New
(
const dictionary& thermoDict,
speciesTable& species
)
{
// Let the chemistry reader type default to CHEMKIN
// for backward compatibility
word chemistryReaderTypeName("chemkinReader");
// otherwise use the specified reader
thermoDict.readIfPresent("chemistryReader", chemistryReaderTypeName);
Info<< "Selecting chemistryReader " << chemistryReaderTypeName << endl;
typename dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(chemistryReaderTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorInFunction
<< "Unknown chemistryReader type "
<< chemistryReaderTypeName << nl << nl
<< "Valid chemistryReader types are:" << nl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalError);
}
return autoPtr<chemistryReader<ThermoType>>
(
cstrIter()(thermoDict, species)
);
}
// ************************************************************************* //

View File

@ -1,173 +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::chemistryReader
Description
Abstract class for reading chemistry
SourceFiles
chemistryReader.C
\*---------------------------------------------------------------------------*/
#ifndef chemistryReader_H
#define chemistryReader_H
#include "typeInfo.H"
#include "specieElement.H"
#include "Reaction.H"
#include "ReactionList.H"
#include "runTimeSelectionTables.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef HashTable<List<specieElement>> speciesCompositionTable;
/*---------------------------------------------------------------------------*\
Class chemistryReader Declaration
\*---------------------------------------------------------------------------*/
template<class ThermoType>
class chemistryReader
{
public:
//- Runtime type information
TypeName("chemistryReader");
//- The type of thermo package the reader was instantiated for
typedef ThermoType thermoType;
// Constructors
//- Construct null
chemistryReader()
{}
//- Disallow default bitwise copy construction
chemistryReader(const chemistryReader&) = delete;
// Declare run-time constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
chemistryReader,
dictionary,
(
const dictionary& thermoDict,
speciesTable& species
),
(thermoDict, species)
);
// Selectors
//- Select constructed from dictionary
static autoPtr<chemistryReader> New
(
const dictionary& thermoDict,
speciesTable& species
);
//- Destructor
virtual ~chemistryReader()
{}
// Member Functions
//- Return access to the list of species
virtual const speciesTable& species() const = 0;
//- Table of species composition
virtual const speciesCompositionTable& specieComposition() const = 0;
//- Return access to the thermo packages
virtual const HashPtrTable<ThermoType>& speciesThermo() const = 0;
//- Return access to the list of reactions
virtual const ReactionList<ThermoType>& reactions() const = 0;
// Member Operators
//- Disallow default bitwise assignment
void operator=(const chemistryReader&) = delete;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "chemistryReader.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeChemistryReader(Thermo) \
defineTemplateTypeNameAndDebug(chemistryReader<Thermo>, 0); \
defineTemplateRunTimeSelectionTable(chemistryReader<Thermo>, dictionary)
#define makeChemistryReaderType(Reader, Thermo) \
defineNamedTemplateTypeNameAndDebug(Reader<Thermo>, 0); \
chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader<Thermo>> \
add##Reader##Thermo##ConstructorToTable_
// for non-templated chemistry readers
#define addChemistryReaderType(Reader, Thermo) \
defineTypeNameAndDebug(Reader, 0); \
chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader> \
add##Reader##Thermo##ConstructorToTable_
// for templated chemistry readers
#define addTemplateChemistryReaderType(Reader, Thermo) \
defineNamedTemplateTypeNameAndDebug(Reader, 0); \
chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader> \
add##Reader##Thermo##ConstructorToTable_
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -1,104 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 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 "makeReactionThermo.H"
#include "thermoPhysicsTypes.H"
#include "solidThermoPhysicsTypes.H"
#include "chemistryReader.H"
#include "foamChemistryReader.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Solid chemistry readers based on sensibleEnthalpy
makeChemistryReader(constGasHThermoPhysics);
makeChemistryReader(gasHThermoPhysics);
makeChemistryReader(constIncompressibleGasHThermoPhysics);
makeChemistryReader(incompressibleGasHThermoPhysics);
makeChemistryReader(icoPoly8HThermoPhysics);
makeChemistryReader(constFluidHThermoPhysics);
makeChemistryReader(constAdiabaticFluidHThermoPhysics);
makeChemistryReader(constHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constGasHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, gasHThermoPhysics);
makeChemistryReaderType
(
foamChemistryReader,
constIncompressibleGasHThermoPhysics
);
makeChemistryReaderType(foamChemistryReader, incompressibleGasHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, icoPoly8HThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constFluidHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constAdiabaticFluidHThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constHThermoPhysics);
// Solid chemistry readers based on sensibleInternalEnergy
makeChemistryReader(constGasEThermoPhysics);
makeChemistryReader(gasEThermoPhysics);
makeChemistryReader(constIncompressibleGasEThermoPhysics);
makeChemistryReader(incompressibleGasEThermoPhysics);
makeChemistryReader(icoPoly8EThermoPhysics);
makeChemistryReader(constFluidEThermoPhysics);
makeChemistryReader(constAdiabaticFluidEThermoPhysics);
makeChemistryReader(constEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constGasEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, gasEThermoPhysics);
makeChemistryReaderType
(
foamChemistryReader,
constIncompressibleGasEThermoPhysics
);
makeChemistryReaderType(foamChemistryReader, incompressibleGasEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, icoPoly8EThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constFluidEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constAdiabaticFluidEThermoPhysics);
makeChemistryReaderType(foamChemistryReader, constEThermoPhysics);
// Solid chemistry readers for solids based on sensibleInternalEnergy
makeChemistryReader(hConstSolidThermoPhysics);
makeChemistryReader(hPowerSolidThermoPhysics);
makeChemistryReader(hExpKappaConstSolidThermoPhysics);
makeChemistryReaderType(foamChemistryReader, hConstSolidThermoPhysics);
makeChemistryReaderType(foamChemistryReader, hPowerSolidThermoPhysics);
makeChemistryReaderType(foamChemistryReader, hExpKappaConstSolidThermoPhysics);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | 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
@ -131,7 +131,6 @@ Foam::foamChemistryReader<ThermoType>::foamChemistryReader
const fileName& thermoFileName const fileName& thermoFileName
) )
: :
chemistryReader<ThermoType>(),
chemDict_ chemDict_
( (
IFstream IFstream
@ -161,7 +160,6 @@ Foam::foamChemistryReader<ThermoType>::foamChemistryReader
speciesTable& species speciesTable& species
) )
: :
chemistryReader<ThermoType>(),
chemDict_ chemDict_
( (
IFstream IFstream

View File

@ -35,27 +35,22 @@ SourceFiles
#ifndef foamChemistryReader_H #ifndef foamChemistryReader_H
#define foamChemistryReader_H #define foamChemistryReader_H
#include "chemistryReader.H" #include "specieElement.H"
#include "fileName.H" #include "ReactionList.H"
#include "typeInfo.H"
#include "HashPtrTable.H"
#include "labelList.H"
#include "speciesTable.H"
#include "atomicWeights.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef HashTable<List<specieElement>> speciesCompositionTable;
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class foamChemistry Declaration Class foamChemistry Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template<class ThermoType> template<class ThermoType>
class foamChemistryReader class foamChemistryReader
:
public chemistryReader<ThermoType>
{ {
//- Chemistry/reactions dictionary //- Chemistry/reactions dictionary
dictionary chemDict_; dictionary chemDict_;
@ -93,10 +88,6 @@ class foamChemistryReader
public: public:
//- Runtime type information
TypeName("foamChemistryReader");
// Constructors // Constructors
//- Construct from foamChemistry and thermodynamics file names //- Construct from foamChemistry and thermodynamics file names

View File

@ -37,28 +37,29 @@ Foam::reactingMixture<ThermoType>::reactingMixture
) )
: :
speciesTable(), speciesTable(),
autoPtr<chemistryReader<ThermoType>> autoPtr<foamChemistryReader<ThermoType>>
( (
chemistryReader<ThermoType>::New(thermoDict, *this) new foamChemistryReader<ThermoType>(thermoDict, *this)
), ),
multiComponentMixture<ThermoType> multiComponentMixture<ThermoType>
( (
thermoDict, thermoDict,
*this, *this,
autoPtr<chemistryReader<ThermoType>>::operator()().speciesThermo(), autoPtr<foamChemistryReader<ThermoType>>::operator()().speciesThermo(),
mesh, mesh,
phaseName phaseName
), ),
reactions_ reactions_
( (
autoPtr<chemistryReader<ThermoType>>::operator()().reactions() autoPtr<foamChemistryReader<ThermoType>>::operator()().reactions()
), ),
speciesComposition_ speciesComposition_
( (
autoPtr<chemistryReader<ThermoType>>::operator()().specieComposition() autoPtr<foamChemistryReader<ThermoType>>::
operator()().specieComposition()
) )
{ {
autoPtr<chemistryReader<ThermoType>>::clear(); autoPtr<foamChemistryReader<ThermoType>>::clear();
} }

View File

@ -36,7 +36,7 @@ SourceFiles
#define reactingMixture_H #define reactingMixture_H
#include "speciesTable.H" #include "speciesTable.H"
#include "chemistryReader.H" #include "foamChemistryReader.H"
#include "multiComponentMixture.H" #include "multiComponentMixture.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -52,7 +52,7 @@ template<class ThermoType>
class reactingMixture class reactingMixture
: :
public speciesTable, public speciesTable,
public autoPtr<chemistryReader<ThermoType>>, public autoPtr<foamChemistryReader<ThermoType>>,
public multiComponentMixture<ThermoType> public multiComponentMixture<ThermoType>
{ {
// Private member data // Private member data

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo";

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase cleanCase
rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII rm -rf 0 chemFoam.out constant/reactions constant/thermo \
validation/OF_vs_CHEMKINII.eps validation/chemkinII
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -7,6 +7,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name # Set application name
application=$(getApplication) application=$(getApplication)
runApplication chemkinToFoam \
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
constant/reactions constant/thermo
runApplication $application runApplication $application
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)

View File

@ -26,8 +26,7 @@ thermoType
specie specie; specie specie;
} }
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; foamChemistryFile "$FOAM_CASE/constant/reactions";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase cleanCase
rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII rm -rf 0 chemFoam.out constant/reactions constant/thermo \
validation/OF_vs_CHEMKINII.eps validation/chemkinII
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -7,6 +7,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name # Set application name
application=$(getApplication) application=$(getApplication)
runApplication chemkinToFoam \
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
constant/reactions constant/thermo
runApplication $application runApplication $application
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)

View File

@ -26,8 +26,7 @@ thermoType
specie specie; specie specie;
} }
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; foamChemistryFile "$FOAM_CASE/constant/reactions";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,6 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase cleanCase
rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII rm -rf 0 chemFoam.out constant/reactions constant/thermo \
validation/OF_vs_CHEMKINII.eps validation/chemkinII
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -7,6 +7,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name # Set application name
application=$(getApplication) application=$(getApplication)
runApplication chemkinToFoam \
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
constant/reactions constant/thermo
runApplication $application runApplication $application
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)

View File

@ -26,8 +26,7 @@ thermoType
specie specie; specie specie;
} }
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; foamChemistryFile "$FOAM_CASE/constant/reactions";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
// ************************************************************************* // // ************************************************************************* //

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase cleanCase
rm -rf 0 chemFoam.out validation/OF_vs_CHEMKINII.eps validation/chemkinII rm -rf 0 chemFoam.out constant/reactions constant/thermo \
validation/OF_vs_CHEMKINII.eps validation/chemkinII
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -7,6 +7,10 @@ cd ${0%/*} || exit 1 # Run from this directory
# Set application name # Set application name
application=$(getApplication) application=$(getApplication)
runApplication chemkinToFoam \
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
constant/reactions constant/thermo
runApplication $application runApplication $application
(cd validation && ./Allrun $*) (cd validation && ./Allrun $*)

View File

@ -26,8 +26,7 @@ thermoType
specie specie; specie specie;
} }
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; foamChemistryFile "$FOAM_CASE/constant/reactions";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
// ************************************************************************* // // ************************************************************************* //

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie air; inertSpecie air;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/include/reactions.air"; foamChemistryFile "$FOAM_CASE/constant/include/reactions.air";

View File

@ -26,7 +26,6 @@ thermoType
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/pyrolysisRegion/reactions"; foamChemistryFile "$FOAM_CASE/constant/pyrolysisRegion/reactions";

View File

@ -30,7 +30,6 @@ inertSpecie N2;
fuel C3H8; fuel C3H8;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -26,7 +26,6 @@ thermoType
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/panelRegion/reactions"; foamChemistryFile "$FOAM_CASE/constant/panelRegion/reactions";

View File

@ -30,7 +30,6 @@ inertSpecie N2;
fuel C3H8; fuel C3H8;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -30,7 +30,6 @@ inertSpecie N2;
fuel CH4; fuel CH4;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -30,7 +30,6 @@ inertSpecie N2;
fuel CH4; fuel CH4;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -29,7 +29,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI"; foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI"; foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI"; foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI"; foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactionsGRI"; foamChemistryFile "$FOAM_CASE/constant/reactionsGRI";
foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo.compressibleGasGRI";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/gas/reactions"; foamChemistryFile "$FOAM_CASE/constant/gas/reactions";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat"; foamChemistryThermoFile "$FOAM_CASE/constant/foam.dat";

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie N2; inertSpecie N2;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp"; foamChemistryFile "$FOAM_CASE/constant/foam.inp";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp"; foamChemistryFile "$FOAM_CASE/constant/foam.inp";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp"; foamChemistryFile "$FOAM_CASE/constant/foam.inp";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/foam.inp"; foamChemistryFile "$FOAM_CASE/constant/foam.inp";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -26,7 +26,6 @@ thermoType
specie specie; specie specie;
} }
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions"; foamChemistryFile "$FOAM_CASE/constant/reactions";

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf constant/reactions constant/thermo
#------------------------------------------------------------------------------

View File

@ -0,0 +1,17 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Set application name
application=$(getApplication)
runApplication chemkinToFoam \
chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
constant/reactions constant/thermo
runApplication blockMesh
runApplication $application
#------------------------------------------------------------------------------

View File

@ -26,9 +26,8 @@ thermoType
specie specie; specie specie;
} }
CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; foamChemistryFile "$FOAM_CASE/constant/reactions";
CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; foamChemistryThermoFile "$FOAM_CASE/constant/thermo";
CHEMKINTransportFile "$FOAM_CASE/chemkin/transportProperties";
newFormat yes; newFormat yes;

View File

@ -28,7 +28,6 @@ thermoType
inertSpecie AIR; inertSpecie AIR;
chemistryReader foamChemistryReader;
foamChemistryFile "$FOAM_CASE/constant/reactions.gas"; foamChemistryFile "$FOAM_CASE/constant/reactions.gas";