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-2020 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"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class combustionModel Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 class combustionModel
51 :
52  public IOdictionary
53 {
54  // Private Member Functions
55 
56  //- Construct the base IO object
57  IOobject createIOobject
58  (
59  const basicThermo& thermo,
60  const word& combustionProperties
61  ) const;
62 
63 
64 protected:
65 
66  // Protected data
67 
68  //- Reference to the mesh database
69  const fvMesh& mesh_;
70 
71  //- Reference to the turbulence model
73 
74  //- Dictionary of the model
76 
77  //- Model type
78  const word modelType_;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("combustionModel");
85 
86  //- Default combustionProperties dictionary name
87  static const word combustionPropertiesName;
88 
89 
90  // Constructors
91 
92  //- Construct from components
94  (
95  const word& modelType,
96  const basicThermo& thermo,
98  const word& combustionProperties=combustionPropertiesName
99  );
100 
101  //- Disallow default bitwise copy construction
103 
104 
105  // Selectors
106 
107  //- Generic New for each of the related chemistry model
108  template<class CombustionModel>
110  (
111  const typename CombustionModel::reactionThermo& thermo,
113  const word& combustionProperties
114  );
115 
116 
117  //- Destructor
118  virtual ~combustionModel();
119 
120 
121  // Member Functions
122 
123  //- Return const access to the mesh database
124  inline const fvMesh& mesh() const;
125 
126  //- Return access to turbulence
127  inline const compressibleMomentumTransportModel& turbulence() const;
128 
129  //- Return const access to rho
130  inline const volScalarField& rho() const;
131 
132  //- Return const access to phi
133  inline tmp<surfaceScalarField> phi() const;
134 
135  //- Return const dictionary of the model
136  inline const dictionary& coeffs() const;
137 
138  //- Correct combustion rate
139  virtual void correct() = 0;
140 
141  //- Fuel consumption rate matrix, i.e. source term for fuel equation
142  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
143 
144  //- Heat release rate [kg/m/s^3]
145  virtual tmp<volScalarField> Qdot() const = 0;
146 
147  //- Update properties from given dictionary
148  virtual bool read();
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const combustionModel&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #include "combustionModelI.H"
165 
166 #ifdef NoRepository
167  #include "combustionModelTemplates.C"
168 #endif
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
void operator=(const combustionModel &)=delete
Disallow default bitwise assignment.
const fvMesh & mesh_
Reference to the mesh database.
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:52
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const fvMesh & mesh() const
Return const access to the mesh database.
virtual void correct()=0
Correct combustion rate.
static autoPtr< CombustionModel > New(const typename CombustionModel::reactionThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Generic New for each of the related chemistry model.
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const =0
Fuel consumption rate matrix, i.e. source term for fuel equation.
rhoReactionThermo & thermo
Definition: createFields.H:28
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
const dictionary & coeffs() const
Return const dictionary of the model.
const volScalarField & rho() const
Return const access to rho.
virtual tmp< volScalarField > Qdot() const =0
Heat release rate [kg/m/s^3].
ReactionThermo reactionThermo
Thermo type.
A class for handling words, derived from string.
Definition: word.H:59
const compressibleMomentumTransportModel & turbulence() const
Return access to turbulence.
virtual ~combustionModel()
Destructor.
dictionary coeffs_
Dictionary of the model.
virtual bool read()
Update properties from given dictionary.
Base class for combustion models.
combustionModel(const word &modelType, const basicThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties=combustionPropertiesName)
Construct from components.
const word modelType_
Model type.
tmp< surfaceScalarField > phi() const
Return const access to phi.
PtrList< volScalarField > & Y
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const compressibleMomentumTransportModel & turb_
Reference to the turbulence model.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Abstract base class for turbulence models (RAS, LES and laminar).
TypeName("combustionModel")
Runtime type information.
Namespace for OpenFOAM.
static const word combustionPropertiesName
Default combustionProperties dictionary name.