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 | Copyright (C) 2011-2015 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  //- Disallow copy construct
58 
59  //- Disallow default bitwise assignment
60  void operator=(const combustionModel&);
61 
62 
63 protected:
64 
65  // Protected data
66 
67  //- Reference to the turbulence model
69 
70  //- Reference to the mesh database
71  const fvMesh& mesh_;
72 
73  //- Active
75 
76  //- Dictionary of the model
78 
79  //- Model type
80  const word modelType_;
81 
82  //- Phase name
83  const word phaseName_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("combustionModel");
90 
91 
92  // Constructors
93 
94  //- Construct from components
96  (
97  const word& modelType,
98  const fvMesh& mesh,
99  const word& phaseName=word::null
100  );
101 
102 
103  //- Destructor
104  virtual ~combustionModel();
105 
106 
107  // Member Functions
108 
109  // Access
110 
111  //- Return const access to the mesh database
112  inline const fvMesh& mesh() const;
113 
114  //- Return const access to phi
115  inline const surfaceScalarField& phi() const;
116 
117  //- Return const access to rho
118  virtual tmp<volScalarField> rho() const = 0;
119 
120  //- Return access to turbulence
121  inline const compressibleTurbulenceModel& turbulence() const;
122 
123  //- Set turbulence
124  inline void setTurbulence
125  (
126  compressibleTurbulenceModel& turbModel
127  );
128 
129  //- Is combustion active?
130  inline const Switch& active() const;
131 
132  //- Return const dictionary of the model
133  inline const dictionary& coeffs() const;
134 
135 
136  // Evolution
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 calculated from fuel consumption rate matrix
145  virtual tmp<volScalarField> dQ() const = 0;
146 
147  //- Return source for enthalpy equation [kg/m/s3]
148  virtual tmp<volScalarField> Sh() const;
149 
150 
151  // IO
152 
153  //- Update properties from given dictionary
154  virtual bool read();
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #include "combustionModelI.H"
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
virtual tmp< volScalarField > rho() const =0
Return const access to rho.
const fvMesh & mesh_
Reference to the mesh database.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void correct()=0
Correct combustion rate.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const =0
Fuel consumption rate matrix, i.e. source term for fuel equation.
const dictionary & coeffs() const
Return const dictionary of the model.
const fvMesh & mesh() const
Return const access to the mesh database.
compressibleTurbulenceModel * turbulencePtr_
Reference to the turbulence model.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
void setTurbulence(compressibleTurbulenceModel &turbModel)
Set turbulence.
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< volScalarField > dQ() const =0
Heat release rate calculated from fuel consumption rate matrix.
virtual ~combustionModel()
Destructor.
static const word null
An empty word.
Definition: word.H:77
Switch active_
Active.
dictionary coeffs_
Dictionary of the model.
virtual bool read()
Update properties from given dictionary.
const word phaseName_
Phase name.
const surfaceScalarField & phi() const
Return const access to phi.
Abstract base class for turbulence models (RAS, LES and laminar).
Base class for combustion models.
virtual tmp< volScalarField > Sh() const
Return source for enthalpy equation [kg/m/s3].
const word modelType_
Model type.
PtrList< volScalarField > & Y
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const compressibleTurbulenceModel & turbulence() const
Return access to turbulence.
A class for managing temporary objects.
Definition: PtrList.H:54
const Switch & active() const
Is combustion active?
TypeName("combustionModel")
Runtime type information.
Namespace for OpenFOAM.