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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::regionModels::thermalShellModels::thermalShellModel
28 
29 Description
30  Intermediate class for thermal-shell finite-area models.
31 
32 Usage
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 
62 SourceFiles
63  thermalShellModel.C
64  thermalShellModelNew.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef thermalShellModel_H
69 #define thermalShellModel_H
70 
71 #include "runTimeSelectionTables.H"
72 #include "autoPtr.H"
73 #include "areaFieldsFwd.H"
74 #include "volFieldsFwd.H"
75 #include "regionFaModel.H"
76 #include "faOptions.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace regionModels
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class thermalShellModel Declaration
87 \*---------------------------------------------------------------------------*/
88 
90 :
91  public regionFaModel
92 {
93 protected:
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
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("thermalShellModel");
114 
115 
116  // Declare runtime constructor selection tables
117 
119  (
122  dictionary,
123  (
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 
162 
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
180  Foam::fa::options& faOptions() noexcept
181  {
182  return faOptions_;
183  }
184 
185 
186  // Evolution
187 
188  //- Pre-evolve region
189  virtual void preEvolveRegion();
190 };
191 
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 } // End namespace regionModels
196 } // End namespace Foam
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
volFieldsFwd.H
Foam::regionModels::thermalShellModel::TName_
word TName_
Name of the temperature field.
Definition: thermalShellModel.H:117
Foam::regionModels::thermalShellModel::operator=
void operator=(const thermalShellModel &)=delete
No copy assignment.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::regionModels::thermalShellModel::TypeName
TypeName("thermalShellModel")
Runtime type information.
Foam::regionModels::thermalShellModel::thermalShellModel
thermalShellModel(const word &modelType, const fvPatch &patch, const dictionary &dict)
Construct from type name and mesh and dict.
Definition: thermalShellModel.C:49
Foam::regionModels::thermalShellModel::T_
areaScalarField T_
Shell temperature.
Definition: thermalShellModel.H:123
faOptions.H
Foam::regionModels::thermalShellModel::Tp
const volScalarField & Tp() const noexcept
Return primary region temperature.
Definition: thermalShellModel.H:187
Foam::regionModels::thermalShellModel::T
const areaScalarField & T() const noexcept
Return shell temperature.
Definition: thermalShellModel.H:193
areaFieldsFwd.H
Forwards and collection of common area field types.
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::regionModels::thermalShellModel::~thermalShellModel
virtual ~thermalShellModel()=default
Destructor.
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::regionModels::thermalShellModel::faOptions
Foam::fa::options & faOptions() noexcept
Return faOptions.
Definition: thermalShellModel.H:199
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::areaScalarField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Definition: areaFieldsFwd.H:53
Foam::regionModels::thermalShellModel::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve region.
Definition: thermalShellModel.C:81
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fa::options
Finite-area options.
Definition: faOptions.H:54
Foam::regionModels::thermalShellModel::New
static autoPtr< thermalShellModel > New(const fvPatch &patch, const dictionary &dict)
Return a reference to the selected model using dictionary.
Definition: thermalShellModelNew.C:40
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::regionModels::thermalShellModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, thermalShellModel, dictionary,(const word &modelType, const fvPatch &patch, const dictionary &dict),(modelType, patch, dict))
Foam::regionModels::regionFaModel
Base class for area region models.
Definition: regionFaModel.H:113
thermalShellModel
Intermediate class for thermal-shell finite-area models.
Foam::regionModels::thermalShellModel
Definition: thermalShellModel.H:108
Foam::regionModels::thermalShellModel::Tp_
const volScalarField & Tp_
Primary region temperature.
Definition: thermalShellModel.H:120
regionFaModel.H
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::regionModels::thermalShellModel::faOptions_
Foam::fa::options & faOptions_
Pointer to faOptions.
Definition: thermalShellModel.H:126
autoPtr.H