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 // ************************************************************************* //
virtual void evolveRegion()
Evolve the thermal baffle.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual const solidThermo & thermo() const
Return const reference to the solidThermo.
virtual void info()
Provide some feedback.
A class for handling words, derived from string.
Definition: word.H:59
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
volScalarField & h_
Enthalpy/internal energy.
Definition: thermalBaffle.H:90
dynamicFvMesh & mesh
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
volScalarField Qs_
Surface energy source / [J/m2/s].
Definition: thermalBaffle.H:96
virtual const tmp< volScalarField > Cp() const
Return the film specific heat capacity [J/kg/K].
virtual const volScalarField & kappa() const
Return thermal conductivity [W/m/K].
dictionary dict
autoPtr< radiation::radiationModel > radiation_
Pointer to radiation model.
autoPtr< solidThermo > thermo_
Solid thermo.
Definition: thermalBaffle.H:87
volScalarField & p
Definition: createFields.H:51
TypeName("thermalBaffle")
Runtime type information.
virtual const volScalarField & T() const
Return temperature [K].
virtual const volScalarField & kappaRad() const
Return solid absortivity [1/m].
tmp< volScalarField > he() const
Return sensible enthalpy/internal energy.
Fundamental solid thermodynamic properties.
Definition: solidThermo.H:54
label nNonOrthCorr_
Number of non orthogonal correctors.
Definition: thermalBaffle.H:81
virtual const volScalarField & rho() const
Return density [Kg/m3].
volScalarField Q_
Volumetric energy source / [J/m3/s].
Definition: thermalBaffle.H:99
virtual bool read()
Read control parameters IO dictionary.
Definition: thermalBaffle.C:53
virtual void preEvolveRegion()
Pre-evolve thermal baffle.
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