ChemistryModel: Updated names and lookup

This commit is contained in:
Henry
2012-10-01 17:00:43 +01:00
parent 340bbed2e0
commit 7d17731637
28 changed files with 83 additions and 88 deletions

View File

@ -58,12 +58,11 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
Info<< "Selecting chemistry type " << chemistryTypeDict << endl;
const int nCmpt = 8;
const int nCmpt = 7;
const char* cmptNames[nCmpt] =
{
"chemistrySolver",
"chemistryModel",
"???ChemistryModel",
"chemistryThermo",
"transport",
"thermo",
"equationOfState",
@ -109,9 +108,8 @@ Foam::autoPtr<ChemistryModel> Foam::basicChemistryModel::New
// Construct the name of the chemistry type from the components
chemistryTypeName =
word(chemistryTypeDict.lookup("chemistrySolver")) + '<'
+ word(chemistryTypeDict.lookup("chemistryModel")) + '<'
+ ChemistryModel::typeName + ','
+ thermoTypeName + ">>";
+ word(chemistryTypeDict.lookup("chemistryThermo")) + ','
+ thermoTypeName + ">";
typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);

View File

@ -23,14 +23,14 @@ License
\*---------------------------------------------------------------------------*/
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "chemistrySolver.H"
#include "reactingMixture.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
Foam::chemistryModel<CompType, ThermoType>::chemistryModel
(
const fvMesh& mesh,
const word& ODEModelName,
@ -80,7 +80,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
);
}
Info<< "ODEChemistryModel: Number of species = " << nSpecie_
Info<< "chemistryModel: Number of species = " << nSpecie_
<< " and reactions = " << nReaction_ << endl;
}
@ -88,7 +88,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::ODEChemistryModel
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CompType, class ThermoType>
Foam::ODEChemistryModel<CompType, ThermoType>::~ODEChemistryModel()
Foam::chemistryModel<CompType, ThermoType>::~chemistryModel()
{}
@ -96,7 +96,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::~ODEChemistryModel()
template<class CompType, class ThermoType>
Foam::tmp<Foam::scalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::omega
Foam::chemistryModel<CompType, ThermoType>::omega
(
const scalarField& c,
const scalar T,
@ -138,7 +138,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::omega
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omegaI
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::omegaI
(
const label index,
const scalarField& c,
@ -160,7 +160,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omegaI
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::updateConcsInReactionI
void Foam::chemistryModel<CompType, ThermoType>::updateConcsInReactionI
(
const label index,
const scalar dt,
@ -189,7 +189,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::updateConcsInReactionI
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::updateRRInReactionI
void Foam::chemistryModel<CompType, ThermoType>::updateRRInReactionI
(
const label index,
const scalar pr,
@ -220,7 +220,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::updateRRInReactionI
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::omega
(
const Reaction<ThermoType>& R,
const scalarField& c,
@ -338,7 +338,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives
void Foam::chemistryModel<CompType, ThermoType>::derivatives
(
const scalar time,
const scalarField &c,
@ -389,7 +389,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::derivatives
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
void Foam::chemistryModel<CompType, ThermoType>::jacobian
(
const scalar t,
const scalarField& c,
@ -532,7 +532,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian
template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
Foam::chemistryModel<CompType, ThermoType>::tc() const
{
scalar pf, cf, pr, cr;
label lRef, rRef;
@ -615,7 +615,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::tc() const
template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::Sh() const
Foam::chemistryModel<CompType, ThermoType>::Sh() const
{
tmp<volScalarField> tSh
(
@ -657,7 +657,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::Sh() const
template<class CompType, class ThermoType>
Foam::tmp<Foam::volScalarField>
Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
Foam::chemistryModel<CompType, ThermoType>::dQ() const
{
tmp<volScalarField> tdQ
(
@ -689,7 +689,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
template<class CompType, class ThermoType>
Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const
Foam::label Foam::chemistryModel<CompType, ThermoType>::nEqns() const
{
// nEqns = number of species + temperature + pressure
return nSpecie_ + 2;
@ -697,7 +697,7 @@ Foam::label Foam::ODEChemistryModel<CompType, ThermoType>::nEqns() const
template<class CompType, class ThermoType>
void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
void Foam::chemistryModel<CompType, ThermoType>::calculate()
{
if (!this->chemistry_)
{
@ -742,7 +742,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::calculate()
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
(
const scalar t0,
const scalar deltaT
@ -833,7 +833,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
template<class CompType, class ThermoType>
Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
(
scalarField &c,
const scalar T,
@ -844,7 +844,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
{
notImplemented
(
"ODEChemistryModel::solve"
"chemistryModel::solve"
"("
"scalarField&, "
"const scalar, "

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::ODEChemistryModel
Foam::chemistryModel
Description
Extends base chemistry model by adding a thermo package, and ODE functions.
@ -30,13 +30,13 @@ Description
terms.
SourceFiles
ODEChemistryModelI.H
ODEChemistryModel.C
chemistryModelI.H
chemistryModel.C
\*---------------------------------------------------------------------------*/
#ifndef ODEChemistryModel_H
#define ODEChemistryModel_H
#ifndef chemistryModel_H
#define chemistryModel_H
#include "Reaction.H"
#include "ODE.H"
@ -53,11 +53,11 @@ namespace Foam
class fvMesh;
/*---------------------------------------------------------------------------*\
Class ODEChemistryModel Declaration
Class chemistryModel Declaration
\*---------------------------------------------------------------------------*/
template<class CompType, class ThermoType>
class ODEChemistryModel
class chemistryModel
:
public CompType,
public ODE
@ -65,10 +65,10 @@ class ODEChemistryModel
// Private Member Functions
//- Disallow copy constructor
ODEChemistryModel(const ODEChemistryModel&);
chemistryModel(const chemistryModel&);
//- Disallow default bitwise assignment
void operator=(const ODEChemistryModel&);
void operator=(const chemistryModel&);
protected:
@ -104,13 +104,13 @@ protected:
public:
//- Runtime type information
TypeName("ODEChemistryModel");
TypeName("chemistryModel");
// Constructors
//- Construct from components
ODEChemistryModel
chemistryModel
(
const fvMesh& mesh,
const word& ODEModelName,
@ -119,7 +119,7 @@ public:
//- Destructor
virtual ~ODEChemistryModel();
virtual ~chemistryModel();
// Member Functions
@ -263,12 +263,12 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "ODEChemistryModelI.H"
#include "chemistryModelI.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "ODEChemistryModel.C"
# include "chemistryModel.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -30,7 +30,7 @@ License
template<class CompType, class ThermoType>
inline Foam::PtrList<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >&
Foam::ODEChemistryModel<CompType, ThermoType>::RR()
Foam::chemistryModel<CompType, ThermoType>::RR()
{
return RR_;
}
@ -38,7 +38,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::RR()
template<class CompType, class ThermoType>
inline const Foam::PtrList<Foam::Reaction<ThermoType> >&
Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const
Foam::chemistryModel<CompType, ThermoType>::reactions() const
{
return reactions_;
}
@ -46,7 +46,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::reactions() const
template<class CompType, class ThermoType>
inline const Foam::PtrList<ThermoType>&
Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const
Foam::chemistryModel<CompType, ThermoType>::specieThermo() const
{
return specieThermo_;
}
@ -54,7 +54,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::specieThermo() const
template<class CompType, class ThermoType>
inline Foam::label
Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const
Foam::chemistryModel<CompType, ThermoType>::nSpecie() const
{
return nSpecie_;
}
@ -62,7 +62,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::nSpecie() const
template<class CompType, class ThermoType>
inline Foam::label
Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const
Foam::chemistryModel<CompType, ThermoType>::nReaction() const
{
return nReaction_;
}
@ -70,7 +70,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::nReaction() const
template<class CompType, class ThermoType>
inline const Foam::DimensionedField<Foam::scalar, Foam::volMesh>&
Foam::ODEChemistryModel<CompType, ThermoType>::RR
Foam::chemistryModel<CompType, ThermoType>::RR
(
const label i
) const

View File

@ -78,7 +78,7 @@ protected:
public:
//- Runtime type information
TypeName("psiChemistryModel");
TypeName("psi");
//- Declare run-time constructor selection tables

View File

@ -32,7 +32,7 @@ Description
#include "makeChemistryModel.H"
#include "psiChemistryModel.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,35 +41,35 @@ namespace Foam
{
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
constGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
gasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
constIncompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
incompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
psiChemistryModel,
icoPoly8ThermoPhysics
);

View File

@ -78,7 +78,7 @@ protected:
public:
//- Runtime type information
TypeName("rhoChemistryModel");
TypeName("rho");
//- Declare run-time constructor selection tables

View File

@ -32,7 +32,7 @@ Description
#include "makeChemistryModel.H"
#include "rhoChemistryModel.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "thermoPhysicsTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -41,35 +41,35 @@ namespace Foam
{
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
constGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
gasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
constIncompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
incompressibleGasThermoPhysics
);
makeChemistryModel
(
ODEChemistryModel,
chemistryModel,
rhoChemistryModel,
icoPoly8ThermoPhysics
);

View File

@ -35,7 +35,7 @@ SourceFiles
#ifndef chemistrySolver_H
#define chemistrySolver_H
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "IOdictionary.H"
#include "scalarField.H"

View File

@ -28,7 +28,7 @@ License
#include "chemistrySolver.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
#include "noChemistrySolver.H"
#include "EulerImplicit.H"
@ -37,21 +37,22 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define makeChemistrySolverType(SS, ODEChem, Comp, Thermo) \
#define makeChemistrySolverType(SS, Comp, Thermo) \
\
typedef SS<ODEChem<Comp, Thermo> > SS##ODEChem##Comp##Thermo; \
typedef SS<chemistryModel<Comp, Thermo> > SS##Comp##Thermo; \
\
defineTemplateTypeNameAndDebugWithName \
( \
SS##ODEChem##Comp##Thermo, \
(#SS"<"#ODEChem"<"#Comp"," + Thermo::typeName() + ">>").c_str(), \
SS##Comp##Thermo, \
(#SS"<" + word(Comp::typeName_()) \
+ "," + Thermo::typeName() + ">").c_str(), \
0 \
); \
\
addToRunTimeSelectionTable \
( \
Comp, \
SS##ODEChem##Comp##Thermo, \
SS##Comp##Thermo, \
fvMesh \
);
@ -61,7 +62,6 @@ License
makeChemistrySolverType \
( \
noChemistrySolver, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
); \
@ -69,7 +69,6 @@ License
makeChemistrySolverType \
( \
EulerImplicit, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
); \
@ -77,7 +76,6 @@ License
makeChemistrySolverType \
( \
ode, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
); \
@ -85,7 +83,6 @@ License
makeChemistrySolverType \
( \
sequential, \
ODEChemistryModel, \
CompChemModel, \
Thermo \
);

View File

@ -24,7 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "ode.H"
#include "ODEChemistryModel.H"
#include "chemistryModel.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psi;
}
chemistry on;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry on;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry on;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry on;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry on;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry on; // off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry on;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver noChemistrySolver;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry off;

View File

@ -17,8 +17,8 @@ FoamFile
chemistryType
{
chemistryModel ODEChemistryModel;
chemistrySolver ode;
chemistryThermo psiChemistryModel;
}
chemistry off;