thermalBaffle.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2021 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::regionModels::thermalBaffleModels::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 Member Functions
62 
63  //- Initialise thermalBaffle
64  void init();
65 
66 
67 protected:
68 
69  // Protected data
70 
71  // Solution parameters
72 
73  //- Number of non orthogonal correctors
75 
76 
77  // Thermo properties
78 
79  //- Solid thermo
81 
82  //- Enthalpy/internal energy
84 
85 
86  // Source term fields
87 
88  //- Surface energy source / [J/m2/s]
90 
91  //- Volumetric energy source / [J/m3/s]
93 
94 
95  // Sub models
96 
97  //- Pointer to radiation model
99 
100 
101  // Protected member functions
102 
103  //- Read control parameters IO dictionary
104  virtual bool read();
105 
106  //- Read control parameters from dictionary
107  virtual bool read(const dictionary& dict);
108 
109 
110  // Equations
111 
112  //- Solve energy equation
113  void solveEnergy();
114 
115 
116 public:
117 
118  //- Runtime type information
119  TypeName("thermalBaffle");
120 
121 
122  // Constructors
123 
124  //- Construct from components
125  thermalBaffle(const word& modelType, const fvMesh& mesh);
126 
127  //- Construct from components and dict
129  (
130  const word& modelType,
131  const fvMesh& mesh,
132  const dictionary& dict
133  );
134 
135  //- Disallow default bitwise copy construction
136  thermalBaffle(const thermalBaffle&) = delete;
137 
138 
139  //- Destructor
140  virtual ~thermalBaffle();
141 
142 
143  // Member Functions
144 
145  // Thermo properties
146 
147  //- Return const reference to the solidThermo
148  virtual const solidThermo& thermo() const;
149 
150 
151  // Fields
152 
153  //- Return the film specific heat capacity [J/kg/K]
154  virtual const tmp<volScalarField> Cp() const;
155 
156  //- Return solid absorptivity [1/m]
157  virtual const volScalarField& kappaRad() const;
158 
159  //- Return temperature [K]
160  virtual const volScalarField& T() const;
161 
162  //- Return density [Kg/m^3]
163  virtual const volScalarField& rho() const;
164 
165  //- Return thermal conductivity [W/m/K]
166  virtual const volScalarField& kappa() const;
167 
168 
169  // Helper functions
170 
171  //- Return sensible enthalpy/internal energy
172  // as a function of temperature
173  // for a patch
174  inline tmp<scalarField> he
175  (
176  const scalarField& p,
177  const scalarField& T,
178  const label patchi
179  ) const;
180 
181  //- Return sensible enthalpy/internal energy
182  inline tmp<volScalarField> he() const;
183 
184 
185  // Evolution
186 
187  //- Pre-evolve thermal baffle
188  virtual void preEvolveRegion();
189 
190  //- Evolve the thermal baffle
191  virtual void evolveRegion();
192 
193 
194  // I-O
195 
196  //- Provide some feedback
197  virtual void info();
198 
199 
200  // Member Operators
201 
202  //- Disallow default bitwise assignment
203  void operator=(const thermalBaffle&) = delete;
204 };
205 
206 
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208 
209 } // End namespace thermalBaffleModels
210 } // End namespace regionModels
211 } // End namespace Foam
212 
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214 
215 #include "thermalBaffleI.H"
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #endif
220 
221 // ************************************************************************* //
autoPtr< solidThermo > thermo_
Solid thermo.
Definition: thermalBaffle.H:79
thermalBaffle(const word &modelType, const fvMesh &mesh)
Construct from components.
volScalarField Qs_
Surface energy source / [J/m2/s].
Definition: thermalBaffle.H:88
dictionary dict
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
autoPtr< radiationModel > radiation_
Pointer to radiation model.
Definition: thermalBaffle.H:97
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
label nNonOrthCorr_
Number of non orthogonal correctors.
Definition: thermalBaffle.H:73
virtual const solidThermo & thermo() const
Return const reference to the solidThermo.
volScalarField & h_
Enthalpy/internal energy.
Definition: thermalBaffle.H:82
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 absorptivity [1/m].
virtual void preEvolveRegion()
Pre-evolve thermal baffle.
volScalarField Q_
Volumetric energy source / [J/m3/s].
Definition: thermalBaffle.H:91
A class for handling words, derived from string.
Definition: word.H:59
void operator=(const thermalBaffle &)=delete
Disallow default bitwise assignment.
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:53
Base-class for solid thermodynamic properties.
Definition: solidThermo.H:53
label patchi
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
virtual const volScalarField & T() const
Return temperature [K].
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
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/m^3].
Namespace for OpenFOAM.