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-2022 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 Foam_regionModels_thermalShellModel_H
69 #define Foam_regionModels_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 
89 class thermalShellModel
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  //- Reference to faOptions
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("thermalShellModel");
114 
116  // Declare runtime constructor selection tables
117 
119  (
122  dictionary,
123  (
124  const word& modelType,
125  const fvMesh& mesh,
126  const dictionary& dict
127  ),
128  (modelType, mesh, dict)
129  );
131 
132  // Constructors
133 
134  //- Construct from type name and mesh and dict
136  (
137  const word& modelType,
138  const fvMesh& mesh,
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 fvMesh& mesh,
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
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 // ************************************************************************* //
Foam::fa::options & faOptions_
Reference to faOptions.
const volScalarField & Tp_
Primary region temperature.
dictionary dict
Forwards and collection of common volume field types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
areaScalarField T_
Shell temperature.
word TName_
Name of the temperature field.
const volScalarField & Tp() const noexcept
Return primary region temperature.
virtual ~thermalShellModel()=default
Destructor.
Foam::fa::options & faOptions() noexcept
Return faOptions.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
const areaScalarField & T() const noexcept
Return shell temperature.
dynamicFvMesh & mesh
Finite-area options.
Definition: faOptions.H:50
A class for handling words, derived from Foam::string.
Definition: word.H:63
declareRunTimeSelectionTable(autoPtr, thermalShellModel, dictionary,(const word &modelType, const fvMesh &mesh, const dictionary &dict),(modelType, mesh, dict))
virtual void preEvolveRegion()
Pre-evolve region.
const direction noexcept
Definition: Scalar.H:258
thermalShellModel(const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from type name and mesh and dict.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Macros to ease declaration of run-time selection tables.
TypeName("thermalShellModel")
Runtime type information.
static autoPtr< thermalShellModel > New(const fvMesh &mesh, const dictionary &dict)
Return a reference to the selected model using dictionary.
Forwards and collection of common area field types.
Namespace for OpenFOAM.
void operator=(const thermalShellModel &)=delete
No copy assignment.