Loading...
Searching...
No Matches
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-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::regionModels::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 // Optional entries
38 thermalShellModel <word>;
39
40 Ts <word>;
41 Tprimary <word>;
42
43 // Inherited entries
44 ...
45 }
46 \endverbatim
47
48 where the entries mean:
49 \table
50 Property | Description | Type | Reqd | Deflt
51 Ts | Name of shell temperature field | word | no | Ts(suffix)
52 Tprimary | Name of primary temperature field | word | no | T
53 thermalShellModel | Name of thermalShellModel thermal-shell model <!--
54 --> | word | choice | -
55 \endtable
56
57 Fields/variables used:
58 \table
59 Property | Description | Type | Deflt
60 Ts | Temperature | shell | Ts(suffix)
61 Tprimary | Temperature | volume | T
62 \endtable
63
64 \b Naming changes (possibly breaking) from 2506 and earlier:
65 \table
66 Keyword | Description | Keyword (old) | Deflt (old)
67 Ts | Temperature (shell) | - | "Ts_" + regionName
68 Tprimary | Temperature (volume) | T | -
69 \endtable
70 If \c Tprimary is missing, will still accept the generic "T",
71 but is silently deprecated (may change in the future).
72
73 The inherited entries are elaborated in:
74 - \link regionFaModel.H \endlink
75
76SourceFiles
77 thermalShellModel.C
78 thermalShellModelNew.C
79
80\*---------------------------------------------------------------------------*/
81
82#ifndef Foam_regionModels_thermalShellModel_H
83#define Foam_regionModels_thermalShellModel_H
84
85#include "areaFieldsFwd.H"
86#include "volFieldsFwd.H"
87#include "regionFaModel.H"
88#include "faOptions.H"
89
90// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
91
92namespace Foam
93{
94namespace regionModels
95{
96
97/*---------------------------------------------------------------------------*\
98 Class thermalShellModel Declaration
99\*---------------------------------------------------------------------------*/
100
102:
103 public regionFaModel
104{
105protected:
106
107 // Protected Data
108
109 //- Name of shell temperature field (default: "Ts"+suffix)
110 const word TName_;
111
112 //- Name of volume temperature field (default: "T")
113 const word TprimaryName_;
114
115 //- Primary (volume) region temperature
116 const volScalarField& Tp_;
117
118 //- Shell temperature
120
121 //- Reference to faOptions
122 Foam::fa::options& faOptions_;
123
124
125public:
126
127 //- Runtime type information
128 TypeName("thermalShellModel");
129
130
131 // Declare runtime constructor selection tables
132
134 (
135 autoPtr,
138 (
139 const word& modelType,
140 const fvMesh& mesh,
141 const dictionary& dict
142 ),
143 (modelType, mesh, dict)
144 );
145
146
147 // Constructors
148
149 //- Construct from type name and mesh and dict
151 (
152 const word& modelType,
153 const fvMesh& mesh,
154 const dictionary& dict
155 );
156
157 //- No copy construct
158 thermalShellModel(const thermalShellModel&) = delete;
159
160 //- No copy assignment
161 void operator=(const thermalShellModel&) = delete;
162
164 // Selectors
165
166 //- Return a reference to the selected model using dictionary
169 const fvMesh& mesh,
170 const dictionary& dict
171 );
172
174 //- Destructor
175 virtual ~thermalShellModel() = default;
176
177
178 // Member Functions
179
180 //- Return primary (volume) region temperature
181 const volScalarField& Tp() const noexcept { return Tp_; }
182
183 //- Return shell temperature
184 const areaScalarField& T() const noexcept { return T_; }
185
186 //- Return faOptions
188
189
190 // Evolution
192 //- Pre-evolve region
193 virtual void preEvolveRegion();
194};
195
197// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198
199} // End namespace regionModels
200} // End namespace Foam
201
202// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203
204#endif
205
206// ************************************************************************* //
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:65
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
Finite-area options, which is an IOdictionary of values and a fa::optionList.
Definition faOptions.H:73
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Base class for area region models.
regionFaModel(const fvMesh &mesh, const word &regionType, const word &modelName, const dictionary &dict, bool readFields=true)
Construct from mesh and name and dict.
Intermediate class for thermal-shell finite-area models.
const word TName_
Name of shell temperature field (default: "Ts"+suffix).
void operator=(const thermalShellModel &)=delete
No copy assignment.
thermalShellModel(const thermalShellModel &)=delete
No copy construct.
thermalShellModel(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
const volScalarField & Tp() const noexcept
Return primary (volume) region temperature.
TypeName("thermalShellModel")
Runtime type information.
static autoPtr< thermalShellModel > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected model using dictionary.
virtual ~thermalShellModel()=default
Destructor.
Foam::fa::options & faOptions_
Reference to faOptions.
areaScalarField T_
Shell temperature.
virtual void preEvolveRegion()
Pre-evolve region.
const volScalarField & Tp_
Primary (volume) region temperature.
Foam::fa::options & faOptions() noexcept
Return faOptions.
declareRunTimeSelectionTable(autoPtr, thermalShellModel, dictionary,(const word &modelType, const fvMesh &mesh, const dictionary &dict),(modelType, mesh, dict))
const areaScalarField & T() const noexcept
Return shell temperature.
const word TprimaryName_
Name of volume temperature field (default: "T").
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for OpenFOAM.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
const direction noexcept
Definition scalarImpl.H:265
#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:68
Forwards and collection of common volume field types.