combustionModels::zoneCombustion: Corrected base-class
to avoid duplicate instantiation of the thermodynamics package. The 'zoneCombustion' model is now selected in constant/combustionProperties by either combustionModel zoneCombustion<psiCombustionModel>; or combustionModel zoneCombustion<rhoCombustionModel>; as appropriate. Resolves bug-report http://bugs.openfoam.org/view.php?id=2354
This commit is contained in:
parent
8bfff27468
commit
9ed8a6bdf5
8 changed files with 37 additions and 13 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|
@ -65,7 +65,8 @@ makeCombustionTypesThermo
|
||||||
rhoCombustionModel
|
rhoCombustionModel
|
||||||
);
|
);
|
||||||
|
|
||||||
// Combustion models based on sensibleInternalEnergy
|
|
||||||
|
// Combustion models based on sensibleInternalEnergy
|
||||||
|
|
||||||
makeCombustionTypesThermo
|
makeCombustionTypesThermo
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,6 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef psiCombustionModel CombustionModel;
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components and thermo
|
//- Construct from components and thermo
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,9 @@ class psiCombustionModel
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef psiReactionThermo ReactionThermo;
|
||||||
|
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("psiCombustionModel");
|
TypeName("psiCombustionModel");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,6 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef rhoCombustionModel CombustionModel;
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components and thermo
|
//- Construct from components and thermo
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,9 @@ class rhoCombustionModel
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
typedef rhoReactionThermo ReactionThermo;
|
||||||
|
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("rhoCombustionModel");
|
TypeName("rhoCombustionModel");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ Foam::combustionModels::zoneCombustion<Type>::zoneCombustion
|
||||||
Type(modelType, mesh, combustionProperties, phaseName),
|
Type(modelType, mesh, combustionProperties, phaseName),
|
||||||
combustionModelPtr_
|
combustionModelPtr_
|
||||||
(
|
(
|
||||||
Type::CombustionModel::New
|
Type::New
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
"zoneCombustionProperties",
|
"zoneCombustionProperties",
|
||||||
|
|
@ -132,6 +132,22 @@ Foam::combustionModels::zoneCombustion<Type>::~zoneCombustion()
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
typename Type::ReactionThermo&
|
||||||
|
Foam::combustionModels::zoneCombustion<Type>::thermo()
|
||||||
|
{
|
||||||
|
return combustionModelPtr_->thermo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
const typename Type::ReactionThermo&
|
||||||
|
Foam::combustionModels::zoneCombustion<Type>::thermo() const
|
||||||
|
{
|
||||||
|
return combustionModelPtr_->thermo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::combustionModels::zoneCombustion<Type>::correct()
|
void Foam::combustionModels::zoneCombustion<Type>::correct()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ class zoneCombustion
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- The combustion model to be zone-filtered
|
//- The combustion model to be zone-filtered
|
||||||
autoPtr<typename Type::CombustionModel> combustionModelPtr_;
|
autoPtr<Type> combustionModelPtr_;
|
||||||
|
|
||||||
//- List of zone names in which the reactions are active
|
//- List of zone names in which the reactions are active
|
||||||
wordList zoneNames_;
|
wordList zoneNames_;
|
||||||
|
|
@ -102,6 +102,12 @@ public:
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return access to the thermo package
|
||||||
|
virtual typename Type::ReactionThermo& thermo();
|
||||||
|
|
||||||
|
//- Return const access to the thermo package
|
||||||
|
virtual const typename Type::ReactionThermo& thermo() const;
|
||||||
|
|
||||||
//- Correct combustion rate
|
//- Correct combustion rate
|
||||||
virtual void correct();
|
virtual void correct();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,13 @@ License
|
||||||
|
|
||||||
#include "makeCombustionTypes.H"
|
#include "makeCombustionTypes.H"
|
||||||
|
|
||||||
#include "psiChemistryCombustion.H"
|
#include "psiCombustionModel.H"
|
||||||
#include "rhoChemistryCombustion.H"
|
#include "rhoCombustionModel.H"
|
||||||
#include "zoneCombustion.H"
|
#include "zoneCombustion.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
makeCombustionTypes(zoneCombustion, psiChemistryCombustion, psiCombustionModel);
|
makeCombustionTypes(zoneCombustion, psiCombustionModel, psiCombustionModel);
|
||||||
makeCombustionTypes(zoneCombustion, rhoChemistryCombustion, rhoCombustionModel);
|
makeCombustionTypes(zoneCombustion, rhoCombustionModel, rhoCombustionModel);
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue