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