pyrolysisModel.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-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::regionModels::pyrolysisModels::pyrolysisModel
28
29Description
30 Base class for pyrolysis models
31
32SourceFiles
33 pyrolysisModel.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef pyrolysisModel_H
38#define pyrolysisModel_H
39
41#include "volFieldsFwd.H"
42#include "regionModel1D.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49// Forward declaration of classes
50class fvMesh;
51class Time;
52
53namespace regionModels
54{
55namespace pyrolysisModels
56{
57
58/*---------------------------------------------------------------------------*\
59 Class pyrolysisModel Declaration
60\*---------------------------------------------------------------------------*/
63:
64 public regionModel1D
65{
66private:
67
68 // Private Member Functions
69
70 //- Construct fields
71 void constructMeshObjects();
72
73 //- Read pyrolysis controls
74 void readPyrolysisControls();
75
76 //- No copy construct
77 pyrolysisModel(const pyrolysisModel&) = delete;
78
79 //- No copy assignment
80 void operator=(const pyrolysisModel&) = delete;
81
82
83protected:
84
85 // Protected Member Functions
86
87 //- Read control parameters
88 virtual bool read();
89
90 //- Read control parameters from dictionary
91 virtual bool read(const dictionary& dict);
92
93
94public:
95
96 //- Runtime type information
97 TypeName("pyrolysisModel");
98
99
100 // Declare runtime constructor selection table
103 (
104 autoPtr,
106 mesh,
107 (
108 const word& modelType,
109 const fvMesh& mesh,
110 const word& regionType
111 ),
112 (modelType, mesh, regionType)
113 );
116 (
117 autoPtr,
120 (
121 const word& modelType,
122 const fvMesh& mesh,
123 const dictionary& dict,
124 const word& regionType
125 ),
126 (modelType, mesh, dict, regionType)
127 );
128
129
130 // Constructors
131
132 //- Construct null from mesh
134 (
135 const fvMesh& mesh,
136 const word& regionType
137 );
138
139 //- Construct from type name and mesh
141 (
142 const word& modelType,
143 const fvMesh& mesh,
144 const word& regionType
145 );
146
147 //- Construct from type name and mesh and dictionary
149 (
150 const word& modelType,
151 const fvMesh& mesh,
152 const dictionary& dict,
153 const word& regionType
154 );
155
156 //- Return clone
158 {
160 return nullptr;
161 }
162
163
164 // Selectors
165
166 //- Return a reference to the selected pyrolysis model
168 (
169 const fvMesh& mesh,
170 const word& regionType = "pyrolysis"
171 );
172
173 //- Return a reference to a named selected pyrolysis model
175 (
176 const fvMesh& mesh,
177 const dictionary& dict,
178 const word& regionType = "pyrolysis"
179 );
180
181
182 //- Destructor
183 virtual ~pyrolysisModel();
184
185
186 // Member Functions
187
188 // Access
189
190 // Fields
191
192 //- Return density [kg/m3]
193 virtual const volScalarField& rho() const = 0;
194
195 //- Return const temperature [K]
196 virtual const volScalarField& T() const = 0;
197
198 //- Return specific heat capacity [J/kg/K]
199 virtual const tmp<volScalarField> Cp() const = 0;
200
201 //- Return the region absorptivity [1/m]
202 virtual tmp<volScalarField> kappaRad() const = 0;
203
204 //- Return the region thermal conductivity [W/m/k]
205 virtual tmp<volScalarField> kappa() const = 0;
206
207 //- Return the total gas mass flux to primary region [kg/m2/s]
208 virtual const surfaceScalarField& phiGas() const = 0;
209
210
211 // Sources
212
213 //- External hook to add mass to the primary region
214 virtual scalar addMassSources
215 (
216 const label patchi,
217 const label facei
218 );
219
220
221 // Helper function
222
223 //- Mean diffusion number of the solid region
224 virtual scalar solidRegionDiffNo() const;
225
226 //- Return max diffusivity allowed in the solid
227 virtual scalar maxDiff() const;
228};
229
230
231// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
232
233} // End namespace pyrolysisModels
234} // End namespace regionModels
235} // End namespace Foam
236
237// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238
239#endif
240
241// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
virtual scalar solidRegionDiffNo() const
Mean diffusion number of the solid region.
virtual tmp< volScalarField > kappa() const =0
Return the region thermal conductivity [W/m/k].
virtual const surfaceScalarField & phiGas() const =0
Return the total gas mass flux to primary region [kg/m2/s].
autoPtr< pyrolysisModel > clone() const
Return clone.
virtual const tmp< volScalarField > Cp() const =0
Return specific heat capacity [J/kg/K].
virtual const volScalarField & T() const =0
Return const temperature [K].
declareRunTimeSelectionTable(autoPtr, pyrolysisModel, dictionary,(const word &modelType, const fvMesh &mesh, const dictionary &dict, const word &regionType),(modelType, mesh, dict, regionType))
virtual scalar addMassSources(const label patchi, const label facei)
External hook to add mass to the primary region.
declareRunTimeSelectionTable(autoPtr, pyrolysisModel, mesh,(const word &modelType, const fvMesh &mesh, const word &regionType),(modelType, mesh, regionType))
virtual const volScalarField & rho() const =0
Return density [kg/m3].
virtual tmp< volScalarField > kappaRad() const =0
Return the region absorptivity [1/m].
virtual scalar maxDiff() const
Return max diffusivity allowed in the solid.
static autoPtr< pyrolysisModel > New(const fvMesh &mesh, const word &regionType="pyrolysis")
Return a reference to the selected pyrolysis model.
virtual bool read()
Read control parameters.
TypeName("pyrolysisModel")
Runtime type information.
Base class for 1-D region models.
Definition: regionModel1D.H:57
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
dynamicFvMesh & mesh
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73