sootModel.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) 2013-2020 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::radiationModels::sootModel
26 
27 Description
28  Base class for soot models
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef sootModel_H
33 #define sootModel_H
34 
35 #include "IOdictionary.H"
36 #include "autoPtr.H"
37 #include "runTimeSelectionTables.H"
38 #include "volFields.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace radiationModels
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class sootModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class sootModel
52 {
53 protected:
54 
55  // Protected data
56 
57  //- Radiation model dictionary
58  const dictionary dict_;
59 
60  //- Reference to the fvMesh
61  const fvMesh& mesh_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("sootModel");
68 
69  //- Declare runtime constructor selection table
70 
72  (
73  autoPtr,
74  sootModel,
75  dictionary,
76  (
77  const dictionary& dict,
78  const fvMesh& mesh,
79  const word& modelType
80  ),
81  (dict, mesh, modelType)
82  );
83 
84 
85  // Constructors
86 
87  //- Construct from components
88  sootModel
89  (
90  const dictionary& dict,
91  const fvMesh& mesh,
92  const word& modelType
93  );
94 
95 
96  //- Selector
97  static autoPtr<sootModel> New
98  (
99  const dictionary& dict,
100  const fvMesh& mesh
101  );
102 
103 
104  //- Destructor
105  virtual ~sootModel();
106 
107 
108  // Member Functions
109 
110  // Access
111 
112  //- Reference to the mesh
113  inline const fvMesh& mesh() const
114  {
115  return mesh_;
116  }
117 
118  //- Reference to the dictionary
119  inline const dictionary& dict() const
120  {
121  return dict_;
122  }
123 
124 
125  // Edit
126 
127  //- Main update/correction routine
128  virtual void correct() = 0;
129 
130 
131  // Access
132 
133  //- Return const reference to soot
134  virtual const volScalarField& soot() const = 0;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace radiationModels
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Base class for soot models.
Definition: sootModel.H:51
virtual ~sootModel()
Destructor.
Definition: sootModel.C:55
const dictionary & dict() const
Reference to the dictionary.
Definition: sootModel.H:118
const fvMesh & mesh_
Reference to the fvMesh.
Definition: sootModel.H:60
sootModel(const dictionary &dict, const fvMesh &mesh, const word &modelType)
Construct from components.
Definition: sootModel.C:42
const fvMesh & mesh() const
Reference to the mesh.
Definition: sootModel.H:112
static autoPtr< sootModel > New(const dictionary &dict, const fvMesh &mesh)
Selector.
Definition: sootModelNew.C:35
virtual void correct()=0
Main update/correction routine.
declareRunTimeSelectionTable(autoPtr, sootModel, dictionary,(const dictionary &dict, const fvMesh &mesh, const word &modelType),(dict, mesh, modelType))
Declare runtime constructor selection table.
TypeName("sootModel")
Runtime type information.
virtual const volScalarField & soot() const =0
Return const reference to soot.
const dictionary dict_
Radiation model dictionary.
Definition: sootModel.H:57
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.