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