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-2016 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  //- Default combustionProperties dictionary name
92  static const word combustionPropertiesName;
93 
94 
95  // Constructors
96 
97  //- Construct from components
99  (
100  const word& modelType,
101  const fvMesh& mesh,
102  const word& combustionProperties=combustionPropertiesName,
103  const word& phaseName=word::null
104  );
105 
106 
107  //- Destructor
108  virtual ~combustionModel();
109 
110 
111  // Member Functions
112 
113  //- Return const access to the mesh database
114  inline const fvMesh& mesh() const;
115 
116  //- Set turbulence
117  inline void setTurbulence(compressibleTurbulenceModel& turbModel);
118 
119  //- Return access to turbulence
120  inline const compressibleTurbulenceModel& turbulence() const;
121 
122  //- Return const access to rho
123  inline const volScalarField& rho() const;
124 
125  //- Return const access to phi
126  inline tmp<surfaceScalarField> phi() const;
127 
128  //- Is combustion active?
129  inline const Switch& active() const;
130 
131  //- Return const dictionary of the model
132  inline const dictionary& coeffs() const;
133 
134  //- Correct combustion rate
135  virtual void correct() = 0;
136 
137  //- Fuel consumption rate matrix, i.e. source term for fuel equation
138  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const = 0;
139 
140  //- Heat release rate [kg/m/s3]
141  virtual tmp<volScalarField> Qdot() const = 0;
142 
143  //- Update properties from given dictionary
144  virtual bool read();
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #include "combustionModelI.H"
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 #endif
159 
160 // ************************************************************************* //
const fvMesh & mesh_
Reference to the mesh database.
const compressibleTurbulenceModel & turbulence() const
Return access to turbulence.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
const fvMesh & mesh() const
Return const access to the mesh database.
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 Switch & active() const
Is combustion active?
compressibleTurbulenceModel * turbulencePtr_
Reference to the turbulence model.
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.
void setTurbulence(compressibleTurbulenceModel &turbModel)
Set turbulence.
const volScalarField & rho() const
Return const access to rho.
virtual tmp< volScalarField > Qdot() const =0
Heat release rate [kg/m/s3].
A class for handling words, derived from string.
Definition: word.H:59
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.
Abstract base class for turbulence models (RAS, LES and laminar).
Base class for combustion models.
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
A class for managing temporary objects.
Definition: PtrList.H:53
TypeName("combustionModel")
Runtime type information.
Namespace for OpenFOAM.
static const word combustionPropertiesName
Default combustionProperties dictionary name.