thermalBaffleModel.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-2013 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::thermalBaffleModels::thermalBaffleModel
28
29Description
30
31SourceFiles
32 thermalBaffleModel.C
33
34\*---------------------------------------------------------------------------*/
35
36#ifndef thermalBaffleModel_H
37#define thermalBaffleModel_H
38
40#include "scalarIOField.H"
41#include "autoPtr.H"
42#include "volFieldsFwd.H"
43#include "solidThermo.H"
44#include "regionModel1D.H"
45#include "radiationModel.H"
46
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52namespace regionModels
53{
54namespace thermalBaffleModels
55{
56
57/*---------------------------------------------------------------------------*\
58 Class thermalBaffleModel Declaration
59\*---------------------------------------------------------------------------*/
62:
63 public regionModel1D
64{
65private:
66
67 // Private Member Functions
68
69 //- No copy construct
71
72 //- No copy assignment
73 void operator=(const thermalBaffleModel&) = delete;
74
75 //- Initialize thermal Baffle
76 void init();
77
78
79protected:
80
81 // Protected Data
82
83 //- Baffle physical thickness
85
86 //- Baffle mesh thickness
88
89 //- Is it one dimension
90 bool oneD_;
91
92 //- Is thickness constant
94
95
96 // Protected Member Functions
97
98 //- Read control parameters from IO dictionary
99 virtual bool read();
100
101 //- Read control parameters from dictionary
102 virtual bool read(const dictionary&);
103
104
105public:
106
107 //- Runtime type information
108 TypeName("thermalBaffleModel");
109
110
111 // Declare runtime constructor selection tables
114 (
115 autoPtr,
117 mesh,
118 (
119 const word& modelType,
120 const fvMesh& mesh
121 ),
122 (modelType, mesh)
123 );
126 (
127 autoPtr,
130 (
131 const word& modelType,
132 const fvMesh& mesh,
133 const dictionary& dict
134 ),
135 (modelType, mesh, dict)
136 );
137
138
139 // Constructors
140
141 //- Construct null from mesh
143
144 //- Construct from type name and mesh
145 thermalBaffleModel(const word& modelType, const fvMesh& mesh);
146
147 //- Construct from type name and mesh and dict
149 (
150 const word& modelType,
151 const fvMesh& mesh,
152 const dictionary& dict
153 );
154
155
156 // Selectors
157
158 //- Return a reference to the selected model
160
161 //- Return a reference to the selected model using dictionary
163 (
164 const fvMesh& mesh,
165 const dictionary& dict
166 );
167
168
169 //- Destructor
170 virtual ~thermalBaffleModel();
171
172
173 // Member Functions
174
175 // Access
176
177 //- Return solid thermo
178 virtual const solidThermo& thermo() const = 0;
179
180 //- Return thickness
181 const scalarField& thickness() const
182 {
183 return thickness_;
184 }
185
186 //- Return geometrical thickness
187 const dimensionedScalar& delta() const
188 {
189 return delta_;
190 }
191
192 //- Return if region is one dimensional
193 bool oneD() const
194 {
195 return oneD_;
196 }
197
198 //- Return if region has constant thickness
199 bool constantThickness() const
200 {
201 return constantThickness_;
202 }
203
204
205 // Fields
206
207 //- Return density [kg/m3]
208 virtual const volScalarField& rho() const = 0;
209
210 //- Return const temperature [K]
211 virtual const volScalarField& T() const = 0;
212
213 //- Return specific heat capacity [J/kg/K]
214 virtual const tmp<volScalarField> Cp() const = 0;
215
216 //- Return the region absorptivity [1/m]
217 virtual const volScalarField& kappaRad() const = 0;
218
219 //- Return the region thermal conductivity [W/m/k]
220 virtual const volScalarField& kappa() const = 0;
221
222
223 // Evolution
224
225 //- Pre-evolve region
226 virtual void preEvolveRegion();
227};
228
229
230// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231
232} // End namespace thermalBaffleModels
233} // End namespace regionModels
234} // End namespace Foam
235
236// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237
238#endif
239
240// ************************************************************************* //
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
Base class for 1-D region models.
Definition: regionModel1D.H:57
static autoPtr< thermalBaffleModel > New(const fvMesh &mesh)
Return a reference to the selected model.
bool constantThickness() const
Return if region has constant thickness.
const dimensionedScalar & delta() const
Return geometrical thickness.
virtual const tmp< volScalarField > Cp() const =0
Return specific heat capacity [J/kg/K].
virtual const volScalarField & kappaRad() const =0
Return the region absorptivity [1/m].
virtual const volScalarField & T() const =0
Return const temperature [K].
bool oneD() const
Return if region is one dimensional.
virtual const volScalarField & kappa() const =0
Return the region thermal conductivity [W/m/k].
const scalarField & thickness() const
Return thickness.
virtual const solidThermo & thermo() const =0
Return solid thermo.
virtual const volScalarField & rho() const =0
Return density [kg/m3].
TypeName("thermalBaffleModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, thermalBaffleModel, mesh,(const word &modelType, const fvMesh &mesh),(modelType, mesh))
virtual bool read()
Read control parameters from IO dictionary.
declareRunTimeSelectionTable(autoPtr, thermalBaffleModel, dictionary,(const word &modelType, const fvMesh &mesh, const dictionary &dict),(modelType, mesh, dict))
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:55
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.
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