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 | Copyright (C) 2011-2013 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::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:
64 
65  // Private Member Functions
66 
67  //- Disallow default bitwise copy construct
69 
70  //- Disallow default bitwise assignment
71  void operator=(const thermalBaffleModel&);
72 
73  //- Initialize thermal Baffle
74  void init();
75 
76 
77 protected:
78 
79  // Protected Data
80 
81  //- Baffle physical thickness
83 
84  //- Baffle mesh thickness
86 
87  //- Is it one dimension
88  bool oneD_;
89 
90  //- Is thickness constant
91  bool constantThickness_;
92 
93 
94  // Protected Member Functions
95 
96  //- Read control parameters from IO dictionary
97  virtual bool read();
98 
99  //- Read control parameters from dictionary
100  virtual bool read(const dictionary&);
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("thermalBaffleModel");
107 
108 
109  // Declare runtime constructor selection tables
110 
112  (
113  autoPtr,
115  mesh,
116  (
117  const word& modelType,
118  const fvMesh& mesh
119  ),
120  (modelType, mesh)
121  );
122 
124  (
125  autoPtr,
127  dictionary,
128  (
129  const word& modelType,
130  const fvMesh& mesh,
131  const dictionary& dict
132  ),
133  (modelType, mesh, dict)
134  );
135 
136 
137  // Constructors
138 
139  //- Construct null from mesh
140  thermalBaffleModel(const fvMesh& mesh);
141 
142  //- Construct from type name and mesh
143  thermalBaffleModel(const word& modelType, const fvMesh& mesh);
144 
145  //- Construct from type name and mesh and dict
147  (
148  const word& modelType,
149  const fvMesh& mesh,
150  const dictionary& dict
151  );
152 
153 
154  // Selectors
155 
156  //- Return a reference to the selected model
157  static autoPtr<thermalBaffleModel> New(const fvMesh& mesh);
158 
159  //- Return a reference to the selected model using dictionary
161  (
162  const fvMesh& mesh,
163  const dictionary& dict
164  );
165 
166 
167  //- Destructor
168  virtual ~thermalBaffleModel();
169 
170 
171  // Member Functions
172 
173  // Access
174 
175  //- Return solid thermo
176  virtual const solidThermo& thermo() const = 0;
177 
178  //- Return thickness
179  const scalarField& thickness() const
180  {
181  return thickness_;
182  }
183 
184  //- Return geometrical thickness
185  const dimensionedScalar& delta() const
186  {
187  return delta_;
188  }
189 
190  //- Return if region is one dimensional
191  bool oneD() const
192  {
193  return oneD_;
194  }
195 
196  //- Return if region has constant thickness
197  bool constantThickness() const
198  {
199  return constantThickness_;
200  }
201 
202 
203  // Fields
204 
205  //- Return density [kg/m3]
206  virtual const volScalarField& rho() const = 0;
207 
208  //- Return const temperature [K]
209  virtual const volScalarField& T() const = 0;
210 
211  //- Return specific heat capacity [J/kg/K]
212  virtual const tmp<volScalarField> Cp() const = 0;
213 
214  //- Return the region absorptivity [1/m]
215  virtual const volScalarField& kappaRad() const = 0;
216 
217  //- Return the region thermal conductivity [W/m/k]
218  virtual const volScalarField& kappa() const = 0;
219 
220 
221  // Evolution
222 
223  //- Pre-evolve region
224  virtual void preEvolveRegion();
225 };
226 
227 
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 
230 } // End namespace thermalBaffleModels
231 } // End namespace regionModels
232 } // End namespace Foam
233 
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
235 
236 #endif
237 
238 // ************************************************************************* //
virtual const solidThermo & thermo() const =0
Return solid thermo.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual const volScalarField & T() const =0
Return const temperature [K].
declareRunTimeSelectionTable(autoPtr, thermalBaffleModel, mesh,( const word &modelType, const fvMesh &mesh ),(modelType, mesh))
virtual bool read()
Read control parameters from IO dictionary.
Macros to ease declaration of run-time selection tables.
bool constantThickness() const
Return if region has constant thickness.
const dimensionedScalar & delta() const
Return geometrical thickness.
A class for handling words, derived from string.
Definition: word.H:59
dynamicFvMesh & mesh
virtual const volScalarField & kappaRad() const =0
Return the region absorptivity [1/m].
virtual const volScalarField & rho() const =0
Return density [kg/m3].
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
bool oneD() const
Return if region is one dimensional.
dictionary dict
static autoPtr< thermalBaffleModel > New(const fvMesh &mesh)
Return a reference to the selected model.
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:54
virtual const volScalarField & kappa() const =0
Return the region thermal conductivity [W/m/k].
virtual const tmp< volScalarField > Cp() const =0
Return specific heat capacity [J/kg/K].
TypeName("thermalBaffleModel")
Runtime type information.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
A class for managing temporary objects.
Definition: PtrList.H:118
const scalarField & thickness() const
Return thickness.