thermalBaffle.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-2014 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::thermalBaffle
26 
27 Description
28  2D thermal baffle
29 
30 SourceFiles
31  thermalBaffle.C
32  thermalBaffleI.H
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef thermalBaffle_H
37 #define thermalBaffle_H
38 
39 #include "thermalBaffleModel.H"
40 #include "volFieldsFwd.H"
41 
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace regionModels
48 {
49 namespace thermalBaffleModels
50 {
51 
52 
53 /*---------------------------------------------------------------------------*\
54  Class thermalBaffle Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class thermalBaffle
58 :
59  public thermalBaffleModel
60 {
61 private:
62 
63  // Private member functions
64 
65  //- Disallow default bitwise copy construct
67 
68  //- Disallow default bitwise assignment
69  void operator=(const thermalBaffle&);
70 
71  //- Initialize thermalBaffle
72  void init();
73 
74 
75 protected:
76 
77  // Protected data
78 
79  // Solution parameters
80 
81  //- Number of non orthogonal correctors
83 
84 
85  // Thermo properties
86 
87  //- Solid thermo
89 
90  //- Enthalpy/internal energy
92 
93 
94  // Source term fields
95 
96  //- Surface energy source / [J/m2/s]
98 
99  //- Volumetric energy source / [J/m3/s]
101 
102 
103  // Sub models
104 
105  //- Pointer to radiation model
107 
108 
109  // Protected member functions
110 
111  //- Read control parameters IO dictionary
112  virtual bool read();
113 
114  //- Read control parameters from dictionary
115  virtual bool read(const dictionary& dict);
116 
117 
118  // Equations
119 
120  //- Solve energy equation
121  void solveEnergy();
122 
123 
124 public:
125 
126  //- Runtime type information
127  TypeName("thermalBaffle");
128 
129 
130  // Constructors
131 
132  //- Construct from components
133  thermalBaffle(const word& modelType, const fvMesh& mesh);
134 
135  //- Construct from components and dict
137  (
138  const word& modelType,
139  const fvMesh& mesh,
140  const dictionary& dict
141  );
142 
143 
144  //- Destructor
145  virtual ~thermalBaffle();
146 
147 
148  // Member Functions
149 
150  // Thermo properties
151 
152  //- Return const reference to the solidThermo
153  virtual const solidThermo& thermo() const;
154 
155 
156  // Fields
157 
158  //- Return the film specific heat capacity [J/kg/K]
159  virtual const tmp<volScalarField> Cp() const;
160 
161  //- Return solid absortivity [1/m]
162  virtual const volScalarField& kappaRad() const;
163 
164  //- Return temperature [K]
165  virtual const volScalarField& T() const;
166 
167  //- Return density [Kg/m3]
168  virtual const volScalarField& rho() const;
169 
170  //- Return thermal conductivity [W/m/K]
171  virtual const volScalarField& kappa() const;
172 
173 
174  // Helper functions
175 
176  //- Return sensible enthalpy/internal energy
177  // as a function of temperature
178  // for a patch
179  inline tmp<scalarField> he
180  (
181  const scalarField& p,
182  const scalarField& T,
183  const label patchI
184  ) const;
185 
186  //- Return sensible enthalpy/internal energy
187  inline tmp<volScalarField> he() const;
188 
189 
190  // Evolution
191 
192  //- Pre-evolve thermal baffle
193  virtual void preEvolveRegion();
194 
195  //- Evolve the thermal baffle
196  virtual void evolveRegion();
197 
198 
199  // I-O
200 
201  //- Provide some feedback
202  virtual void info();
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace thermalBaffleModels
209 } // End namespace regionModels
210 } // End namespace Foam
211 
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 
214 #include "thermalBaffleI.H"
215 
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 
218 #endif
219 
220 // ************************************************************************* //
Foam::regionModels::thermalBaffleModels::thermalBaffle::T
virtual const volScalarField & T() const
Return temperature [K].
Definition: thermalBaffle.C:343
Foam::regionModels::thermalBaffleModels::thermalBaffle
Definition: thermalBaffle.H:56
volFieldsFwd.H
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::regionModels::thermalBaffleModels::thermalBaffle::kappa
virtual const volScalarField & kappa() const
Return thermal conductivity [W/m/K].
Definition: thermalBaffle.C:337
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::regionModels::thermalBaffleModels::thermalBaffle::h_
volScalarField & h_
Enthalpy/internal energy.
Definition: thermalBaffle.H:90
Foam::regionModels::thermalBaffleModels::thermalBaffle::~thermalBaffle
virtual ~thermalBaffle()
Destructor.
Definition: thermalBaffle.C:281
thermalBaffleModel.H
Foam::regionModels::thermalBaffleModels::thermalBaffle::solveEnergy
void solveEnergy()
Solve energy equation.
Definition: thermalBaffle.C:67
Foam::regionModels::thermalBaffleModels::thermalBaffle::Qs_
volScalarField Qs_
Surface energy source / [J/m2/s].
Definition: thermalBaffle.H:96
Foam::regionModels::thermalBaffleModels::thermalBaffle::Q_
volScalarField Q_
Volumetric energy source / [J/m3/s].
Definition: thermalBaffle.H:99
Foam::regionModels::thermalBaffleModels::thermalBaffle::he
tmp< volScalarField > he() const
Return sensible enthalpy/internal energy.
Definition: thermalBaffleI.H:51
thermalBaffleI.H
Foam::regionModels::thermalBaffleModels::thermalBaffle::thermo
virtual const solidThermo & thermo() const
Return const reference to the solidThermo.
Definition: thermalBaffle.C:349
Foam::regionModels::thermalBaffleModels::thermalBaffle::operator=
void operator=(const thermalBaffle &)
Disallow default bitwise assignment.
Foam::solidThermo
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:54
Foam::regionModels::thermalBaffleModels::thermalBaffleModel
Definition: thermalBaffleModel.H:58
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::regionModels::thermalBaffleModels::thermalBaffle::thermalBaffle
thermalBaffle(const thermalBaffle &)
Disallow default bitwise copy construct.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::regionModels::thermalBaffleModels::thermalBaffle::evolveRegion
virtual void evolveRegion()
Evolve the thermal baffle.
Definition: thermalBaffle.C:310
Foam::regionModels::thermalBaffleModels::thermalBaffle::radiation_
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
Definition: thermalBaffle.H:105
Foam::regionModels::thermalBaffleModels::thermalBaffle::init
void init()
Initialize thermalBaffle.
Definition: thermalBaffle.C:287
Foam::regionModels::thermalBaffleModels::thermalBaffle::kappaRad
virtual const volScalarField & kappaRad() const
Return solid absortivity [1/m].
Definition: thermalBaffle.C:325
Foam::regionModels::thermalBaffleModels::thermalBaffle::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve thermal baffle.
Definition: thermalBaffle.C:306
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::regionModels::thermalBaffleModels::thermalBaffle::rho
virtual const volScalarField & rho() const
Return density [Kg/m3].
Definition: thermalBaffle.C:331
Foam::regionModels::thermalBaffleModels::thermalBaffle::info
virtual void info()
Provide some feedback.
Definition: thermalBaffle.C:355
Foam::regionModels::thermalBaffleModels::thermalBaffle::TypeName
TypeName("thermalBaffle")
Runtime type information.
Foam::regionModels::thermalBaffleModels::thermalBaffle::Cp
virtual const tmp< volScalarField > Cp() const
Return the film specific heat capacity [J/kg/K].
Definition: thermalBaffle.C:319
Foam::regionModels::thermalBaffleModels::thermalBaffle::read
virtual bool read()
Read control parameters IO dictionary.
Definition: thermalBaffle.C:53
Foam::regionModels::thermalBaffleModels::thermalBaffle::thermo_
autoPtr< solidThermo > thermo_
Solid thermo.
Definition: thermalBaffle.H:87
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::regionModels::thermalBaffleModels::thermalBaffle::nNonOrthCorr_
label nNonOrthCorr_
Number of non orthogonal correctors.
Definition: thermalBaffle.H:81