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]
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
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 // ************************************************************************* //
autoPtr< solidThermo > thermo_
Solid thermo.
Definition: thermalBaffle.H:95
dictionary dict
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
label nNonOrthCorr_
Number of non orthogonal correctors.
Definition: thermalBaffle.H:87
virtual const solidThermo & thermo() const
Return const reference to the solidThermo.
volScalarField & h_
Enthalpy/internal energy.
virtual void evolveRegion()
Evolve the thermal baffle.
dynamicFvMesh & mesh
tmp< volScalarField > he() const
Return sensible enthalpy/internal energy.
virtual const volScalarField & kappaRad() const
Return solid absortivity [1/m].
virtual void preEvolveRegion()
Pre-evolve thermal baffle.
volScalarField Q_
Volumetric energy source / [J/m3/s].
A class for handling words, derived from Foam::string.
Definition: word.H:63
TypeName("thermalBaffle")
Runtime type information.
virtual const tmp< volScalarField > Cp() const
Return the film specific heat capacity [J/kg/K].
virtual bool read()
Read control parameters IO dictionary.
Definition: thermalBaffle.C:48
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:48
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
virtual const volScalarField & T() const
Return temperature [K].
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
volScalarField & p
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual const volScalarField & kappa() const
Return thermal conductivity [W/m/K].
virtual void info()
Provide some feedback.
virtual const volScalarField & rho() const
Return density [Kg/m3].
Namespace for OpenFOAM.
volScalarField qs_
Surface energy source / [J/m2/s].