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