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-2018 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  Combustion models for templated thermodynamics
29 
30 SourceFiles
31  CombustionModelI.H
32  CombustionModel.C
33  CombustionModelNew.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef CombustionModel_H
38 #define CombustionModel_H
39 
40 #include "combustionModel.H"
41 #include "autoPtr.H"
42 #include "runTimeSelectionTables.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  class CombustionModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class ReactionThermo>
54 class CombustionModel
55 :
56  public combustionModel
57 {
58 public:
59 
60  //- Thermo type
61  typedef ReactionThermo reactionThermo;
62 
63 
64  //- Runtime type information
65  TypeName("CombustionModel");
66 
67 
68  //- Declare run-time constructor selection tables
70  (
71  autoPtr,
73  dictionary,
74  (
75  const word& modelType,
76  ReactionThermo& thermo,
77  const compressibleTurbulenceModel& turb,
78  const word& combustionProperties
79  ),
80  (modelType, thermo, turb, combustionProperties)
81  );
82 
83 
84  // Constructors
85 
86  //- Construct from components
88  (
89  const word& modelType,
90  ReactionThermo& thermo,
91  const compressibleTurbulenceModel& turb,
92  const word& combustionProperties
93  );
94 
95 
96  //- Selector
98  (
99  ReactionThermo& thermo,
100  const compressibleTurbulenceModel& turb,
101  const word& combustionProperties=combustionPropertiesName
102  );
103 
104 
105  //- Destructor
106  virtual ~CombustionModel();
107 
108 
109  // Member Functions
110 
111  //- Return access to the thermo package
112  virtual ReactionThermo& thermo() = 0;
113 
114  //- Return const access to the thermo package
115  virtual const ReactionThermo& thermo() const = 0;
116 
117 
118  // IO
119 
120  //- Update properties from given dictionary
121  virtual bool read();
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #ifdef NoRepository
132  #include "CombustionModel.C"
133 #endif
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
CombustionModel(const word &modelType, ReactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties)
Construct from components.
static autoPtr< CombustionModel > New(ReactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties=combustionPropertiesName)
Selector.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual ~CombustionModel()
Destructor.
TypeName("CombustionModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, CombustionModel, dictionary,(const word &modelType, ReactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties),(modelType, thermo, turb, combustionProperties))
Declare run-time constructor selection tables.
ReactionThermo reactionThermo
Thermo type.
A class for handling words, derived from string.
Definition: word.H:59
virtual bool read()
Update properties from given dictionary.
Abstract base class for turbulence models (RAS, LES and laminar).
Base class for combustion models.
Combustion models for templated thermodynamics.
virtual ReactionThermo & thermo()=0
Return access to the thermo package.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
Namespace for OpenFOAM.
static const word combustionPropertiesName
Default combustionProperties dictionary name.