thermophysicalModels::Reaction: Refactored to remove unnecessary solid reaction specific functions

This commit is contained in:
Henry Weller
2018-06-15 16:15:42 +01:00
parent 14a50c7d62
commit 21b3d19575
4 changed files with 14 additions and 38 deletions

View File

@ -6,6 +6,7 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \ -I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidSpecie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \

View File

@ -37,7 +37,13 @@ pyrolysisChemistryModel
) )
: :
solidChemistryModel<CompType, SolidThermo>(thermo), solidChemistryModel<CompType, SolidThermo>(thermo),
pyrolisisGases_(this->reactions_[0].gasSpecies()), pyrolisisGases_
(
dynamic_cast<const SolidReaction<SolidThermo>&>
(
this->reactions_[0]
).gasSpecies()
),
gasThermo_(pyrolisisGases_.size()), gasThermo_(pyrolisisGases_.size()),
nGases_(pyrolisisGases_.size()), nGases_(pyrolisisGases_.size()),
nSpecie_(this->Ys_.size() + nGases_), nSpecie_(this->Ys_.size() + nGases_),
@ -193,7 +199,11 @@ pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega
forAll(this->reactions_, i) forAll(this->reactions_, i)
{ {
const Reaction<SolidThermo>& R = this->reactions_[i]; const SolidReaction<SolidThermo>& R =
dynamic_cast<const SolidReaction<SolidThermo>&>
(
this->reactions_[i]
);
scalar omegai = omega scalar omegai = omega
( (

View File

@ -806,30 +806,4 @@ const Foam::speciesTable& Foam::Reaction<ReactionThermo>::species() const
} }
template<class ReactionThermo>
const Foam::speciesTable& Foam::Reaction<ReactionThermo>::gasSpecies() const
{
NotImplemented;
return NullObjectRef<speciesTable>();
}
template<class ReactionThermo>
const Foam::List<typename Foam::Reaction<ReactionThermo>::specieCoeffs>&
Foam::Reaction<ReactionThermo>::glhs() const
{
NotImplemented;
return NullObjectRef<List<specieCoeffs>>();
}
template<class ReactionThermo>
const Foam::List<typename Foam::Reaction<ReactionThermo>::specieCoeffs>&
Foam::Reaction<ReactionThermo>::grhs() const
{
NotImplemented;
return NullObjectRef<List<specieCoeffs>>();
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -249,18 +249,9 @@ public:
//- Access to the components of the right hand side //- Access to the components of the right hand side
inline const List<specieCoeffs>& rhs() const; inline const List<specieCoeffs>& rhs() const;
//- Access to the gas components of the left hand side
virtual const List<specieCoeffs>& grhs() const;
//- Access to the gas components of the right hand side
virtual const List<specieCoeffs>& glhs() const;
//- Access to specie list //- Access to specie list
const speciesTable& species() const; const speciesTable& species() const;
//- Access to gas specie list
virtual const speciesTable& gasSpecies() const;
//- Construct the left- and right-hand-side reaction coefficients //- Construct the left- and right-hand-side reaction coefficients
void setLRhs void setLRhs
( (