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 Description
30  Combustion models for templated thermodynamics
31 
32 SourceFiles
33  CombustionModelI.H
34  CombustionModel.C
35  CombustionModelNew.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef CombustionModel_H
40 #define CombustionModel_H
41 
42 #include "combustionModel.H"
43 #include "autoPtr.H"
44 #include "runTimeSelectionTables.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  class CombustionModel Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class ReactionThermo>
56 class CombustionModel
57 :
58  public combustionModel
59 {
60  // Private Member Functions
61 
62  //- Construct as copy (not implemented)
63  CombustionModel(const CombustionModel&) = delete;
64 
65  //- No copy assignment
66  void operator=(const CombustionModel&) = delete;
67 
68 
69 public:
70 
71  //- Thermo type
72  typedef ReactionThermo reactionThermo;
73 
74 
75  //- Runtime type information
76  TypeName("CombustionModel");
77 
78 
79  //- Declare run-time constructor selection tables
81  (
82  autoPtr,
84  dictionary,
85  (
86  const word& modelType,
87  ReactionThermo& thermo,
89  const word& combustionProperties
90  ),
91  (modelType, thermo, turb, combustionProperties)
92  );
93 
94 
95  // Constructors
96 
97  //- Construct from components
99  (
100  const word& modelType,
101  ReactionThermo& thermo,
103  const word& combustionProperties
104  );
105 
106 
107  //- Selector
109  (
110  ReactionThermo& thermo,
112  const word& combustionProperties=combustionPropertiesName
113  );
114 
115 
116  //- Destructor
117  virtual ~CombustionModel();
118 
119 
120  // Member Functions
121 
122  //- Return access to the thermo package
123  virtual ReactionThermo& thermo() = 0;
124 
125  //- Return const access to the thermo package
126  virtual const ReactionThermo& thermo() const = 0;
127 
128 
129  // IO
130 
131  //- Update properties from given dictionary
132  virtual bool read();
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace Foam
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #ifdef NoRepository
143  #include "CombustionModel.C"
144 #endif
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
Foam::combustionModel
Base class for combustion models.
Definition: combustionModel.H:54
Foam::CombustionModel
Combustion models for templated thermodynamics.
Definition: CombustionModel.H:55
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::CombustionModel::reactionThermo
ReactionThermo reactionThermo
Thermo type.
Definition: CombustionModel.H:71
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::CombustionModel::declareRunTimeSelectionTable
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.
Foam::CombustionModel::~CombustionModel
virtual ~CombustionModel()
Destructor.
Definition: CombustionModel.C:70
Foam::CombustionModel::thermo
virtual ReactionThermo & thermo()=0
Return access to the thermo package.
CombustionModel.C
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::combustionModel::combustionPropertiesName
static const word combustionPropertiesName
Default combustionProperties dictionary name.
Definition: combustionModel.H:100
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::CombustionModel::read
virtual bool read()
Update properties from given dictionary.
Definition: CombustionModel.C:77
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::CombustionModel::New
static autoPtr< CombustionModel > New(ReactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties=combustionPropertiesName)
Selector.
Definition: CombustionModel.C:51
turb
compressible::turbulenceModel & turb
Definition: setRegionFluidFields.H:10
combustionModel.H
Foam::compressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: compressibleTurbulenceModel.H:54
autoPtr.H