Loading...
Searching...
No Matches
thermalShell.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) 2019-2025 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::regionFaModels::thermalShell
28
29Description
30 Thermal-shell finite-area model. It solves the energy
31 equation in 2D. The coupling with the 3D region is done through
32 the \c temperatureCoupledBase, plus \c faOption is available to
33 add extra sources on the shell such as \c externalHeatFluxSource etc.
34
35Usage
36 Example of the boundary condition specification:
37 \verbatim
38 <patchName>
39 {
40 // Mandatory entries
41 thermalShellModel thermalShell;
42 thermo
43 {
44 // subdictionary entries
45 }
46
47 // Optional entries
48 qr <word>;
49 thickness <scalar>;
50
51 // Inherited entries
52 ...
53 nNonOrthCorr <int>; // read from another dict
54 }
55 \endverbatim
56
57 where the entries mean:
58 \table
59 Property | Description | Type | Reqd | Deflt
60 thermalShellModel | Type name: thermalShell | word | yes | -
61 h | Name of thickness field | word | no | h (suffix)
62 qs | Name of source field | word | no | qs (suffix)
63 qr | Name of radiative heat flux field | word | no | none
64 thermo | Solid thermal properties | dict | yes | -
65 thickness | Uniform shell thickness [m] | scalar | choice | -
66 \endtable
67
68 Fields/variables used:
69 \table
70 Property | Description | Type | Deflt
71 h | Thickness | shell | h (suffix)
72 qs | Source field | shell | qs (suffix)
73 qr | Radiative heat flux field | volume | none
74 \endtable
75
76 Note the following naming changes from 2056 and earlier:
77 \table
78 Keyword | Description | Keyword (old) | Deflt (old)
79 h | Thickness | h | "h_" + regionName
80 qs | Source field | qs | "qs_" + regionName
81 \endtable
82
83 The inherited entries are elaborated in:
84 - \link thermalShellModel.H \endlink
85
86SourceFiles
87 thermalShell.C
88
89\*---------------------------------------------------------------------------*/
90
91#ifndef Foam_regionModels_thermalShell_H
92#define Foam_regionModels_thermalShell_H
93
94#include "volFieldsFwd.H"
95#include "thermalShellModel.H"
96#include "solidProperties.H"
97#include "faOptions.H"
98
99// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
100
101namespace Foam
102{
103namespace regionModels
104{
105
106/*---------------------------------------------------------------------------*\
107 Class thermalShell Declaration
108\*---------------------------------------------------------------------------*/
109
110class thermalShell
111:
112 public thermalShellModel
113{
114 // Private Member Functions
115
116 //- Initialize thermalShell
117 bool init(const dictionary& dict);
118
119 //- Return radiative heat flux
120 tmp<areaScalarField> qr();
121
122
123protected:
124
125 // Protected Data
126
127 //- Name of shell thickness [height] field (default: "hs" + suffix)
128 const word hName_;
129
130 //- Name of surface energy source (default: "qs" + suffix)
131 const word qsName_;
132
133 //- Name of (volume) radiative flux field (default: none)
134 const word qrName_;
135
136
137 // Solution Parameters
138
139 //- Number of non orthogonal correctors
140 label nNonOrthCorr_;
141
142
143 // Thermo properties
144
145 //- Solid properties
146 solidProperties thermo_;
147
148
149 // Source term fields
150
151 //- Shell thickness field [m]
153
154 //- External surface energy source [J/m2/s]
156
157 //- Uniform shell thickness [m]
158 scalar thickness_;
159
160
161 // Protected Member Functions
162
163 // Equations
164
165 //- Solve energy equation
166 void solveEnergy();
167
168
169public:
170
171 //- Runtime type information
172 TypeName("thermalShell");
173
174
175 // Constructors
176
177 //- Construct from components and dict
179 (
180 const word& modelType,
181 const fvMesh& mesh,
183 );
184
185 //- No copy construct
186 thermalShell(const thermalShell&) = delete;
187
188 //- No copy assignment
189 void operator=(const thermalShell&) = delete;
190
191
192 //- Destructor
193 virtual ~thermalShell() = default;
194
195
196 // Member Functions
197
198 // Fields
199
200 //- Return the shell specific heat capacity [J/kg/K]
201 const tmp<areaScalarField> Cp() const;
202
203 //- Return density [kg/m3]
204 const tmp<areaScalarField> rho() const;
205
206 //- Return thermal conductivity [W/m/K]
207 const tmp<areaScalarField> kappa() const;
208
209
210 // Evolution
212 //- Pre-evolve thermal baffle
213 virtual void preEvolveRegion();
214
215 //- Evolve the thermal baffle
216 virtual void evolveRegion();
217
218
219 // IO
220
221 //- Provide some feedback
222 virtual void info();
223};
225
226// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227
228} // End namespace regionModels
229} // End namespace Foam
230
231// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233
234#endif
235
236// ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
dictionary()
Default construct, a top-level empty dictionary.
Definition dictionary.C:68
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Thermal-shell finite-area model. It solves the energy equation in 2D. The coupling with the 3D region...
thermalShellModel(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
thermalShell(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from components and dict.
thermalShell(const thermalShell &)=delete
No copy construct.
areaScalarField h_
Shell thickness field [m].
const tmp< areaScalarField > rho() const
Return density [kg/m3].
scalar thickness_
Uniform shell thickness [m].
const word qsName_
Name of surface energy source (default: "qs" + suffix).
void solveEnergy()
Solve energy equation.
areaScalarField qs_
External surface energy source [J/m2/s].
const word qrName_
Name of (volume) radiative flux field (default: none).
virtual void preEvolveRegion()
Pre-evolve thermal baffle.
virtual ~thermalShell()=default
Destructor.
solidProperties thermo_
Solid properties.
const tmp< areaScalarField > Cp() const
Return the shell specific heat capacity [J/kg/K].
void operator=(const thermalShell &)=delete
No copy assignment.
TypeName("thermalShell")
Runtime type information.
const word hName_
Name of shell thickness [height] field (default: "hs" + suffix).
virtual void info()
Provide some feedback.
label nNonOrthCorr_
Number of non orthogonal correctors.
const tmp< areaScalarField > kappa() const
Return thermal conductivity [W/m/K].
virtual void evolveRegion()
Evolve the thermal baffle.
The thermophysical, mechanical properties of a solid.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for OpenFOAM.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68
Forwards and collection of common volume field types.