thermo.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) 2016 OpenCFD Ltd
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::thermo
28
29Description
30 Pyrolysis model which solves only the energy equation in the region.
31
32SourceFiles
33 thermo.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef regionModels_pyrolysisModels_thermo_H
38#define regionModels_pyrolysisModels_thermo_H
39
40#include "pyrolysisModel.H"
41#include "volFieldsFwd.H"
43#include "radiationModel.H"
44#include "solidThermo.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50namespace regionModels
51{
52namespace pyrolysisModels
53{
54
55/*---------------------------------------------------------------------------*\
56 Class thermo Declaration
57\*---------------------------------------------------------------------------*/
59class thermo
60:
61 public pyrolysisModel
62{
63private:
64
65 // Private member functions
66
67 //- No copy construct
68 thermo(const thermo&) = delete;
69
70 //- No copy assignment
71 void operator=(const thermo&) = delete;
72
73
74protected:
75
76 // Protected member functions
77
78 //- Read control parameters from dictionary
79 virtual bool read();
80
81 //- Read control parameters from dictionary
82 virtual bool read(const dictionary& dict);
83
84 //- Read control options
85 void readControls();
86
87
88 // Protected data
89
90 //- Pointer to the solid chemistry model
92
93 //- Pointer to radiation model
95
96
97 // Solution parameters
98
99 //- Number of non-orthogonal correctors
100 label nNonOrthCorr_;
101
102 //- Maximum diffusivity
103 scalar maxDiff_;
104
105
106public:
107
108 //- Runtime type information
109 TypeName("thermo");
110
111
112 // Constructors
113
114 //- Construct from type name and mesh
115 thermo
116 (
117 const word& modelType,
118 const fvMesh& mesh,
119 const word& regionType
120 );
121
122 //- Construct from type name and mesh and dict
123 thermo
124 (
125 const word& modelType,
126 const fvMesh& mesh,
127 const dictionary& dict,
128 const word& regionType
129 );
130
131
132 //- Destructor
133 virtual ~thermo();
134
135
136 // Member Functions
137
138 // Fields
139
140 //- Return density [kg/m3]
141 virtual const volScalarField& rho() const;
142
143 //- Return const temperature [K]
144 virtual const volScalarField& T() const;
145
146 //- Return specific heat capacity [J/kg/K]
147 virtual const tmp<volScalarField> Cp() const;
148
149 //- Return the region absorptivity [1/m]
150 virtual tmp<volScalarField> kappaRad() const;
151
152 //- Return the region thermal conductivity [W/m/k]
153 virtual tmp<volScalarField> kappa() const;
154
155 //- Return the total gas mass flux to primary region [kg/m2/s]
156 virtual const surfaceScalarField& phiGas() const;
157
158
159 // Evolution
160
161 //- Pre-evolve region
162 virtual void preEvolveRegion();
163
164 //- Evolve the pyrolysis equations
165 virtual void evolveRegion();
166
167};
168
169
170// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171
172} // End namespace pyrolysisModels
173} // End namespace regionModels
174} // End namespace Foam
175
176// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177
178#endif
179
180// ************************************************************************* //
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
Pyrolysis model which solves only the energy equation in the region.
Definition: thermo.H:61
scalar maxDiff_
Maximum diffusivity.
Definition: thermo.H:102
virtual const volScalarField & rho() const
Return density [kg/m3].
Definition: thermo.C:172
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
Definition: thermo.C:196
TypeName("thermo")
Runtime type information.
virtual const volScalarField & T() const
Return const temperature [K].
Definition: thermo.C:178
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
Definition: thermo.C:190
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
Definition: thermo.C:184
virtual void preEvolveRegion()
Pre-evolve region.
Definition: thermo.C:135
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
Definition: thermo.H:93
void readControls()
Read control options.
Definition: thermo.C:52
autoPtr< solidThermo > solidThermo_
Pointer to the solid chemistry model.
Definition: thermo.H:90
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
Definition: thermo.C:202
label nNonOrthCorr_
Number of non-orthogonal correctors.
Definition: thermo.H:99
virtual bool read()
Read control parameters from dictionary.
Definition: thermo.C:60
virtual void evolveRegion()
Evolve the pyrolysis equations.
Definition: thermo.C:144
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
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73