thermalShellModel.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-2021 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::regionModels::thermalShellModels::thermalShellModel
28
29Description
30 Intermediate class for thermal-shell finite-area models.
31
32Usage
33 Example of the boundary condition specification:
34 \verbatim
35 <patchName>
36 {
37 // Mandatory/Optional entries
38 ...
39
40 // Mandatory entries
41 T <Tname>;
42
43 // Optional entries
44 thermalShellModel <thermalShellModelName>;
45
46 // Derived entries
47 ...
48 }
49 \endverbatim
50
51 where the entries mean:
52 \table
53 Property | Description | Type | Reqd | Deflt
54 T | Name of operand temperature field | word | yes | -
55 thermalShellModel | Name of thermal-shell model <!--
56 --> | word | no | thermalShell
57 \endtable
58
59 The inherited entries are elaborated in:
60 - \link regionFaModel.H \endlink
61
62SourceFiles
63 thermalShellModel.C
64 thermalShellModelNew.C
65
66\*---------------------------------------------------------------------------*/
67
68#ifndef thermalShellModel_H
69#define thermalShellModel_H
70
72#include "autoPtr.H"
73#include "areaFieldsFwd.H"
74#include "volFieldsFwd.H"
75#include "regionFaModel.H"
76#include "faOptions.H"
77
78// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79
80namespace Foam
81{
82namespace regionModels
83{
84
85/*---------------------------------------------------------------------------*\
86 Class thermalShellModel Declaration
87\*---------------------------------------------------------------------------*/
88
90:
91 public regionFaModel
92{
93protected:
94
95 // Protected Data
96
97 //- Name of the temperature field
98 word TName_;
99
100 //- Primary region temperature
101 const volScalarField& Tp_;
102
103 //- Shell temperature
105
106 //- Pointer to faOptions
109
110public:
111
112 //- Runtime type information
113 TypeName("thermalShellModel");
114
115
116 // Declare runtime constructor selection tables
119 (
124 const word& modelType,
125 const fvPatch& patch,
127 ),
128 (modelType, patch, dict)
129 );
130
131
132 // Constructors
133
134 //- Construct from type name and mesh and dict
136 (
137 const word& modelType,
138 const fvPatch& patch,
139 const dictionary& dict
140 );
141
142 //- No copy construct
143 thermalShellModel(const thermalShellModel&) = delete;
144
145 //- No copy assignment
146 void operator=(const thermalShellModel&) = delete;
147
148
149 // Selectors
150
151 //- Return a reference to the selected model using dictionary
153 (
154 const fvPatch& patch,
155 const dictionary& dict
156 );
157
158
159 //- Destructor
160 virtual ~thermalShellModel() = default;
161
163 // Member Functions
164
165 // Access
166
167 //- Return primary region temperature
168 const volScalarField& Tp() const noexcept
169 {
170 return Tp_;
171 }
172
173 //- Return shell temperature
174 const areaScalarField& T() const noexcept
175 {
176 return T_;
177 }
178
179 //- Return faOptions
181 {
182 return faOptions_;
183 }
184
185
186 // Evolution
188 //- Pre-evolve region
189 virtual void preEvolveRegion();
190};
191
192
193// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194
195} // End namespace regionModels
196} // End namespace Foam
197
198// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
200#endif
201
202// ************************************************************************* //
Forwards and collection of common area field types.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Finite-area options.
Definition: faOptions.H:58
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
Base class for area region models.
void operator=(const thermalShellModel &)=delete
No copy assignment.
thermalShellModel(const thermalShellModel &)=delete
No copy construct.
const volScalarField & Tp() const noexcept
Return primary region temperature.
TypeName("thermalShellModel")
Runtime type information.
virtual ~thermalShellModel()=default
Destructor.
Foam::fa::options & faOptions_
Pointer to faOptions.
static autoPtr< thermalShellModel > New(const fvPatch &patch, const dictionary &dict)
Return a reference to the selected model using dictionary.
areaScalarField T_
Shell temperature.
virtual void preEvolveRegion()
Pre-evolve region.
const volScalarField & Tp_
Primary region temperature.
Foam::fa::options & faOptions() noexcept
Return faOptions.
declareRunTimeSelectionTable(autoPtr, thermalShellModel, dictionary,(const word &modelType, const fvPatch &patch, const dictionary &dict),(modelType, patch, dict))
word TName_
Name of the temperature field.
const areaScalarField & T() const noexcept
Return shell temperature.
Intermediate class for thermal-shell finite-area models.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:78
const direction noexcept
Definition: Scalar.H:223
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73