All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
thermalBaffleModel.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) 2011-2019 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::regionModels::thermalBaffleModels::thermalBaffleModel
26 
27 Description
28 
29 SourceFiles
30  thermalBaffleModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef thermalBaffleModel_H
35 #define thermalBaffleModel_H
36 
37 #include "runTimeSelectionTables.H"
38 #include "scalarIOField.H"
39 #include "autoPtr.H"
40 #include "volFieldsFwd.H"
41 #include "solidThermo.H"
42 #include "regionModel1D.H"
43 #include "radiationModel.H"
44 
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 namespace regionModels
51 {
52 namespace thermalBaffleModels
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class thermalBaffleModel Declaration
57 \*---------------------------------------------------------------------------*/
58 
60 :
61  public regionModel1D
62 {
63  // Private Member Functions
64 
65  //- Initialize thermal Baffle
66  void init();
67 
68 
69 protected:
70 
71  // Protected Data
72 
73  //- Baffle physical thickness
75 
76  //- Baffle mesh thickness
78 
79  //- Is it one dimension
80  bool oneD_;
81 
82  //- Is thickness constant
83  bool constantThickness_;
84 
85 
86  // Protected Member Functions
87 
88  //- Read control parameters from IO dictionary
89  virtual bool read();
90 
91  //- Read control parameters from dictionary
92  virtual bool read(const dictionary&);
93 
94 
95 public:
96 
97  //- Runtime type information
98  TypeName("thermalBaffleModel");
99 
100 
101  // Declare runtime constructor selection tables
102 
104  (
105  autoPtr,
107  mesh,
108  (
109  const word& modelType,
110  const fvMesh& mesh
111  ),
112  (modelType, mesh)
113  );
114 
116  (
117  autoPtr,
119  dictionary,
120  (
121  const word& modelType,
122  const fvMesh& mesh,
123  const dictionary& dict
124  ),
125  (modelType, mesh, dict)
126  );
127 
128 
129  // Constructors
130 
131  //- Construct null from mesh
132  thermalBaffleModel(const fvMesh& mesh);
133 
134  //- Construct from type name and mesh
135  thermalBaffleModel(const word& modelType, const fvMesh& mesh);
136 
137  //- Construct from type name and mesh and dict
139  (
140  const word& modelType,
141  const fvMesh& mesh,
142  const dictionary& dict
143  );
144 
145  //- Disallow default bitwise copy construction
146  thermalBaffleModel(const thermalBaffleModel&) = delete;
147 
148 
149  // Selectors
150 
151  //- Return a reference to the selected model
152  static autoPtr<thermalBaffleModel> New(const fvMesh& mesh);
153 
154  //- Return a reference to the selected model using dictionary
156  (
157  const fvMesh& mesh,
158  const dictionary& dict
159  );
160 
161 
162  //- Destructor
163  virtual ~thermalBaffleModel();
164 
165 
166  // Member Functions
167 
168  // Access
169 
170  //- Return solid thermo
171  virtual const solidThermo& thermo() const = 0;
172 
173  //- Return thickness
174  const scalarField& thickness() const
175  {
176  return thickness_;
177  }
178 
179  //- Return geometrical thickness
180  const dimensionedScalar& delta() const
181  {
182  return delta_;
183  }
184 
185  //- Return if region is one dimensional
186  bool oneD() const
187  {
188  return oneD_;
189  }
190 
191  //- Return if region has constant thickness
192  bool constantThickness() const
193  {
194  return constantThickness_;
195  }
196 
197 
198  // Fields
199 
200  //- Return density [kg/m^3]
201  virtual const volScalarField& rho() const = 0;
202 
203  //- Return const temperature [K]
204  virtual const volScalarField& T() const = 0;
205 
206  //- Return specific heat capacity [J/kg/K]
207  virtual const tmp<volScalarField> Cp() const = 0;
208 
209  //- Return the region absorptivity [1/m]
210  virtual const volScalarField& kappaRad() const = 0;
211 
212  //- Return the region thermal conductivity [W/m/k]
213  virtual const volScalarField& kappa() const = 0;
214 
215 
216  // Evolution
217 
218  //- Pre-evolve region
219  virtual void preEvolveRegion();
220 
221 
222  // Member Operators
223 
224  //- Disallow default bitwise assignment
225  void operator=(const thermalBaffleModel&) = delete;
226 };
227 
228 
229 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 
231 } // End namespace thermalBaffleModels
232 } // End namespace regionModels
233 } // End namespace Foam
234 
235 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 
237 #endif
238 
239 // ************************************************************************* //
dictionary dict
thermalBaffleModel(const fvMesh &mesh)
Construct null from mesh.
virtual const solidThermo & thermo() const =0
Return solid thermo.
virtual const volScalarField & rho() const =0
Return density [kg/m^3].
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const dimensionedScalar & delta() const
Return geometrical thickness.
Base class for 1-D region models.
Definition: regionModel1D.H:52
static autoPtr< thermalBaffleModel > New(const fvMesh &mesh)
Return a reference to the selected model.
void operator=(const thermalBaffleModel &)=delete
Disallow default bitwise assignment.
const scalarField & thickness() const
Return thickness.
dynamicFvMesh & mesh
A class for handling words, derived from string.
Definition: word.H:59
declareRunTimeSelectionTable(autoPtr, thermalBaffleModel, mesh,(const word &modelType, const fvMesh &mesh),(modelType, mesh))
virtual const volScalarField & kappaRad() const =0
Return the region absorptivity [1/m].
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:48
virtual const volScalarField & T() const =0
Return const temperature [K].
bool constantThickness() const
Return if region has constant thickness.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
TypeName("thermalBaffleModel")
Runtime type information.
virtual bool read()
Read control parameters from IO dictionary.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
A class for managing temporary objects.
Definition: PtrList.H:53
virtual const volScalarField & kappa() const =0
Return the region thermal conductivity [W/m/k].
Namespace for OpenFOAM.
virtual const tmp< volScalarField > Cp() const =0
Return specific heat capacity [J/kg/K].
bool oneD() const
Return if region is one dimensional.