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 -------------------------------------------------------------------------------
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::regionModels::pyrolysisModels::thermo
28 
29 Description
30  Pyrolysis model which solves only the energy equation in the region.
31 
32 SourceFiles
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 
48 namespace Foam
49 {
50 namespace regionModels
51 {
52 namespace pyrolysisModels
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class thermo Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class thermo
60 :
61  public pyrolysisModel
62 {
63 private:
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 
74 protected:
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 
106 public:
107 
108  //- Runtime type information
109  TypeName("thermo");
110 
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 // ************************************************************************* //
virtual tmp< volScalarField > kappaRad() const
Return the region absorptivity [1/m].
Definition: thermo.C:183
dictionary dict
Pyrolysis model which solves only the energy equation in the region.
Definition: thermo.H:54
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual bool read()
Read control parameters from dictionary.
Definition: thermo.C:53
virtual tmp< volScalarField > kappa() const
Return the region thermal conductivity [W/m/k].
Definition: thermo.C:189
void readControls()
Read control options.
Definition: thermo.C:45
virtual void evolveRegion()
Evolve the pyrolysis equations.
Definition: thermo.C:137
virtual const volScalarField & T() const
Return const temperature [K].
Definition: thermo.C:171
virtual void preEvolveRegion()
Pre-evolve region.
Definition: thermo.C:128
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
Definition: thermo.H:103
virtual const surfaceScalarField & phiGas() const
Return the total gas mass flux to primary region [kg/m2/s].
Definition: thermo.C:195
dynamicFvMesh & mesh
scalar maxDiff_
Maximum diffusivity.
Definition: thermo.H:116
A class for handling words, derived from Foam::string.
Definition: word.H:63
autoPtr< solidThermo > solidThermo_
Pointer to the solid chemistry model.
Definition: thermo.H:98
label nNonOrthCorr_
Number of non-orthogonal correctors.
Definition: thermo.H:111
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
TypeName("thermo")
Runtime type information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
virtual const tmp< volScalarField > Cp() const
Return specific heat capacity [J/kg/K].
Definition: thermo.C:177
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual const volScalarField & rho() const
Return density [kg/m3].
Definition: thermo.C:165
Namespace for OpenFOAM.