combustionModel.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::combustionModel
28
29Group
30 grpCombustionModels
31
32Description
33 Base class for combustion models
34
35SourceFiles
36 combustionModel.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef combustionModel_H
41#define combustionModel_H
42
43#include "IOdictionary.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class combustionModel Declaration
53\*---------------------------------------------------------------------------*/
56:
57 public IOdictionary
58{
59 // Private Member Functions
60
61 //- No copy construct
62 combustionModel(const combustionModel&) = delete;
63
64 //- No copy assignment
65 void operator=(const combustionModel&) = delete;
66
67 //- Construct the base IO object
68 IOobject createIOobject
69 (
71 const word& combustionProperties
72 ) const;
73
74
75protected:
76
77 // Protected data
78
79 //- Reference to the mesh database
80 const fvMesh& mesh_;
81
82 //- Reference to the turbulence model
84
85 //- Active
87
88 //- Dictionary of the model
90
91 //- Model type
92 const word modelType_;
93
94
95public:
96
97 //- Runtime type information
98 TypeName("combustionModel");
99
100 //- Default combustionProperties dictionary name
101 static const word combustionPropertiesName;
102
103
104 // Constructors
105
106 //- Construct from components
108 (
109 const word& modelType,
112 const word& combustionProperties=combustionPropertiesName
113 );
114
115
116 // Selectors
117
118 //- Generic New for each of the related chemistry model
119 template<class CombustionModel>
121 (
124 const word& combustionProperties
125 );
126
127
128 //- Destructor
129 virtual ~combustionModel();
130
131
132 // Member Functions
133
134 //- Return const access to the mesh database
135 inline const fvMesh& mesh() const;
136
137 //- Return access to turbulence
138 inline const compressibleTurbulenceModel& turbulence() const;
139
140 //- Return const access to rho
141 inline const volScalarField& rho() const;
142
143 //- Return const access to phi
144 inline tmp<surfaceScalarField> phi() const;
145
146 //- Is combustion active?
147 inline const Switch& active() const;
148
149 //- Return const dictionary of the model
150 inline const dictionary& coeffs() const;
151
152 //- Correct combustion rate
153 virtual void correct() = 0;
154
155 //- Fuel consumption rate matrix, i.e. source term for fuel equation
156 virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
157
158 //- Heat release rate [kg/m/s3]
159 virtual tmp<volScalarField> Qdot() const = 0;
160
161 //- Update properties from given dictionary
162 virtual bool read();
163};
164
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168} // End namespace Foam
169
170// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172#include "combustionModelI.H"
173
174#ifdef NoRepository
176#endif
177
178// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179
180#endif
181
182// ************************************************************************* //
#define R(A, B, C, D, E, F, K, M)
compressible::turbulenceModel & turb
ReactionThermo reactionThermo
Thermo type.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:66
Base class for combustion models.
virtual tmp< volScalarField > Qdot() const =0
Heat release rate [kg/m/s3].
const word modelType_
Model type.
const fvMesh & mesh_
Reference to the mesh database.
const compressibleTurbulenceModel & turbulence() const
Return access to turbulence.
static const word combustionPropertiesName
Default combustionProperties dictionary name.
const dictionary & coeffs() const
Return const dictionary of the model.
TypeName("combustionModel")
Runtime type information.
const volScalarField & rho() const
Return const access to rho.
static autoPtr< CombustionModel > New(typename CombustionModel::reactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties)
Generic New for each of the related chemistry model.
dictionary coeffs_
Dictionary of the model.
virtual void correct()=0
Correct combustion rate.
const Switch & active() const
Is combustion active?
virtual ~combustionModel()
Destructor.
const fvMesh & mesh() const
Return const access to the mesh database.
tmp< surfaceScalarField > phi() const
Return const access to phi.
const compressibleTurbulenceModel & turb_
Reference to the turbulence model.
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const =0
Fuel consumption rate matrix, i.e. source term for fuel equation.
virtual bool read()
Update properties from given dictionary.
Abstract base class for turbulence models (RAS, LES and laminar).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
PtrList< volScalarField > & Y
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73