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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::combustionModel
28 
29 Group
30  grpCombustionModels
31 
32 Description
33  Base class for combustion models
34 
35 SourceFiles
36  combustionModel.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef combustionModel_H
41 #define combustionModel_H
42 
43 #include "IOdictionary.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class combustionModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class combustionModel
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 
75 protected:
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 
95 public:
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
175  #include "combustionModelTemplates.C"
176 #endif
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Foam::combustionModel
Base class for combustion models.
Definition: combustionModel.H:54
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:77
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::combustionModel::modelType_
const word modelType_
Model type.
Definition: combustionModel.H:91
Foam::combustionModel::Qdot
virtual tmp< volScalarField > Qdot() const =0
Heat release rate [kg/m/s3].
Foam::CombustionModel::reactionThermo
ReactionThermo reactionThermo
Thermo type.
Definition: CombustionModel.H:71
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::combustionModel::R
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const =0
Fuel consumption rate matrix, i.e. source term for fuel equation.
Foam::combustionModel::TypeName
TypeName("combustionModel")
Runtime type information.
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Foam::basicThermo
Abstract base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:63
Foam::combustionModel::active_
Switch active_
Active.
Definition: combustionModel.H:85
Foam::combustionModel::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: combustionModelI.H:30
Foam::combustionModel::mesh_
const fvMesh & mesh_
Reference to the mesh database.
Definition: combustionModel.H:79
Foam::combustionModel::turbulence
const compressibleTurbulenceModel & turbulence() const
Return access to turbulence.
Definition: combustionModelI.H:37
Foam::combustionModel::coeffs
const dictionary & coeffs() const
Return const dictionary of the model.
Definition: combustionModelI.H:61
Foam::combustionModel::coeffs_
dictionary coeffs_
Dictionary of the model.
Definition: combustionModel.H:88
Foam::combustionModel::active
const Switch & active() const
Is combustion active?
Definition: combustionModelI.H:55
Foam::combustionModel::rho
const volScalarField & rho() const
Return const access to rho.
Definition: combustionModelI.H:43
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Y
PtrList< volScalarField > & Y
Definition: createFieldRefs.H:7
Foam::combustionModel::combustionPropertiesName
static const word combustionPropertiesName
Default combustionProperties dictionary name.
Definition: combustionModel.H:100
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::combustionModel::turb_
const compressibleTurbulenceModel & turb_
Reference to the turbulence model.
Definition: combustionModel.H:82
Foam::combustionModel::New
static autoPtr< CombustionModel > New(typename CombustionModel::reactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties)
Generic New for each of the related chemistry model.
Foam::combustionModel::phi
tmp< surfaceScalarField > phi() const
Return const access to phi.
Definition: combustionModelI.H:49
Foam::combustionModel::read
virtual bool read()
Update properties from given dictionary.
Definition: combustionModel.C:101
combustionModelTemplates.C
combustionModelI.H
Foam::combustionModel::~combustionModel
virtual ~combustionModel()
Destructor.
Definition: combustionModel.C:95
Foam::GeometricField< scalar, fvPatchField, volMesh >
turb
compressible::turbulenceModel & turb
Definition: setRegionFluidFields.H:10
Foam::compressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: compressibleTurbulenceModel.H:54
turbulentFluidThermoModel.H
Foam::combustionModel::correct
virtual void correct()=0
Correct combustion rate.