combustionModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::combustionModel
26 
27 Description
28  Base class for combustion models
29 
30 SourceFiles
31  combustionModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef combustionModel_H
36 #define combustionModel_H
37 
38 #include "IOdictionary.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class combustionModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class combustionModel
52 :
53  public IOdictionary
54 {
55  // Private Member Functions
56 
57  //- Construct the base IO object
58  IOobject createIOobject
59  (
61  const word& combustionProperties
62  ) const;
63 
64 
65 protected:
66 
67  // Protected data
68 
69  //- Reference to the mesh database
70  const fvMesh& mesh_;
71 
72  //- Reference to the thermo
74 
75  //- Reference to the turbulence model
77 
78  //- Dictionary of the model
80 
81  //- Model type
82  const word modelType_;
83 
84 
85 public:
86 
87  //- Runtime type information
88  TypeName("combustionModel");
89 
90  //- Default combustionProperties dictionary name
91  static const word combustionPropertiesName;
92 
93 
94  //- Declare run-time constructor selection tables
96  (
97  autoPtr,
99  dictionary,
100  (
101  const word& modelType,
104  const word& combustionProperties
105  ),
106  (modelType, thermo, turb, combustionProperties)
107  );
108 
109 
110  // Constructors
111 
112  //- Construct from components
114  (
115  const word& modelType,
118  const word& combustionProperties = combustionPropertiesName
119  );
120 
121  //- Disallow default bitwise copy construction
122  combustionModel(const combustionModel&) = delete;
123 
124 
125  // Selectors
126 
127  //- Select using thermo and turbulence
129  (
132  const word& combustionProperties = combustionPropertiesName
133  );
134 
135 
136  //- Destructor
137  virtual ~combustionModel();
138 
139 
140  // Member Functions
141 
142  //- Return const access to the mesh database
143  inline const fvMesh& mesh() const;
144 
145  //- Return const access to the thermo
146  inline const fluidMulticomponentThermo& thermo() const;
147 
148  //- Return access to turbulence
149  inline const compressibleMomentumTransportModel& turbulence() const;
150 
151  //- Return const access to rho
152  inline const volScalarField& rho() const;
153 
154  //- Return const access to phi
155  inline tmp<surfaceScalarField> phi() const;
156 
157  //- Return const dictionary of the model
158  inline const dictionary& coeffs() const;
159 
160  //- Correct combustion rate
161  virtual void correct() = 0;
162 
163  //- Consumption rate, i.e. source term for specie equation
164  virtual tmp<volScalarField::Internal> R(const label speciei) const = 0;
165 
166  //- Consumption rate matrix, i.e. source term for specie equation
167  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
168 
169  //- Heat release rate [kg/m/s^3]
170  virtual tmp<volScalarField> Qdot() const = 0;
171 
172  //- Update properties from given dictionary
173  virtual bool read();
174 
175 
176  // Member Operators
177 
178  //- Disallow default bitwise assignment
179  void operator=(const combustionModel&) = delete;
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #include "combustionModelI.H"
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base class for combustion models.
const fluidMulticomponentThermo & thermo() const
Return const access to the thermo.
combustionModel(const word &modelType, const fluidMulticomponentThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties=combustionPropertiesName)
Construct from components.
virtual tmp< volScalarField > Qdot() const =0
Heat release rate [kg/m/s^3].
const word modelType_
Model type.
const compressibleMomentumTransportModel & turbulence() const
Return access to turbulence.
const fvMesh & mesh_
Reference to the mesh database.
virtual tmp< volScalarField::Internal > R(const label speciei) const =0
Consumption rate, i.e. source term for specie equation.
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.
const fluidMulticomponentThermo & thermo_
Reference to the thermo.
void operator=(const combustionModel &)=delete
Disallow default bitwise assignment.
dictionary coeffs_
Dictionary of the model.
virtual void correct()=0
Correct combustion rate.
static autoPtr< combustionModel > New(const fluidMulticomponentThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties=combustionPropertiesName)
Select using thermo and turbulence.
virtual ~combustionModel()
Destructor.
const compressibleMomentumTransportModel & turb_
Reference to the turbulence model.
const fvMesh & mesh() const
Return const access to the mesh database.
tmp< surfaceScalarField > phi() const
Return const access to phi.
declareRunTimeSelectionTable(autoPtr, combustionModel, dictionary,(const word &modelType, const fluidMulticomponentThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties),(modelType, thermo, turb, combustionProperties))
Declare run-time constructor selection tables.
virtual bool read()
Update properties from given dictionary.
Base class for single-phase compressible turbulence models.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Base-class for multi-component fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
PtrList< volScalarField > & Y