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-2024 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  //- Reference to the fvMesh
58  const fvMesh& mesh_;
59 
60 
61 public:
62 
63  //- Runtime type information
64  TypeName("sootModel");
65 
66  //- Declare runtime constructor selection table
67 
69  (
70  autoPtr,
71  sootModel,
72  dictionary,
73  (
74  const dictionary& dict,
75  const fvMesh& mesh,
76  const word& modelType
77  ),
78  (dict, mesh, modelType)
79  );
80 
81 
82  // Constructors
83 
84  //- Construct from components
85  sootModel
86  (
87  const fvMesh& mesh,
88  const word& modelType
89  );
90 
91 
92  //- Selector
93  static autoPtr<sootModel> New
94  (
95  const dictionary& dict,
96  const fvMesh& mesh
97  );
98 
99 
100  //- Destructor
101  virtual ~sootModel();
102 
103 
104  // Member Functions
105 
106  // Access
107 
108  //- Reference to the mesh
109  inline const fvMesh& mesh() const
110  {
111  return mesh_;
112  }
113 
114 
115  // Edit
116 
117  //- Main update/correction routine
118  virtual void correct() = 0;
119 
120 
121  // Access
122 
123  //- Return const reference to soot
124  virtual const volScalarField& soot() const = 0;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace radiationModels
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:96
Base class for soot models.
Definition: sootModel.H:51
virtual ~sootModel()
Destructor.
Definition: sootModel.C:53
const fvMesh & mesh_
Reference to the fvMesh.
Definition: sootModel.H:57
const fvMesh & mesh() const
Reference to the mesh.
Definition: sootModel.H:108
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.
sootModel(const fvMesh &mesh, const word &modelType)
Construct from components.
Definition: sootModel.C:42
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
dictionary dict