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-2020 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 (inherited) entries
38  ...
39 
40  // Mandatory entries (unmodifiable)
41  T <Tname>;
42 
43  // Optional entries (unmodifiable)
44  thermalShellModel <thermalShellModelName>;
45 
46  // Mandatory/Optional (derived) entries
47  ...
48  }
49  \endverbatim
50 
51  where the entries mean:
52  \table
53  Property | Description | Type | Reqd | Dflt
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  // Private Member Functions
94 
95  //- Initialize thermal Baffle
96  void init();
97 
98 
99 protected:
100 
101  // Protected Data
102 
103  //- Name of the temperature field
104  word TName_;
105 
106  //- Primary region temperature
107  const volScalarField& Tp_;
108 
109  //- Shell temperature
111 
112  //- Pointer to faOptions
114 
115 
116  // Protected Member Functions
117 
118  //- Read control parameters from dictionary
119  virtual bool read(const dictionary&);
120 
121 
122 public:
123 
124  //- Runtime type information
125  TypeName("thermalShellModel");
126 
127 
128  // Declare runtime constructor selection tables
129 
131  (
134  dictionary,
135  (
136  const word& modelType,
137  const fvPatch& patch,
138  const dictionary& dict
139  ),
140  (modelType, patch, dict)
141  );
142 
143 
144  // Constructors
145 
146  //- Construct from type name and mesh and dict
148  (
149  const word& modelType,
150  const fvPatch& patch,
151  const dictionary& dict
152  );
153 
154  //- No copy construct
155  thermalShellModel(const thermalShellModel&) = delete;
156 
157  //- No copy assignment
158  void operator=(const thermalShellModel&) = delete;
159 
160 
161  // Selectors
162 
163  //- Return a reference to the selected model using dictionary
165  (
166  const fvPatch& patch,
167  const dictionary& dict
168  );
169 
170 
171  //- Destructor
172  virtual ~thermalShellModel() = default;
173 
174 
175  // Member Functions
176 
177  // Access
178 
179  //- Return primary region temperature
180  const volScalarField& Tp() const;
181 
182  //- Return shell temperature
183  const areaScalarField& T() const;
184 
185  //- Return faOptions
187 
188 
189  // Evolution
190 
191  //- Pre-evolve region
192  virtual void preEvolveRegion();
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace regionModels
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
volFieldsFwd.H
Foam::regionModels::thermalShellModel::TName_
word TName_
Name of the temperature field.
Definition: thermalShellModel.H:123
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:62
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:62
Foam::regionModels::thermalShellModel::Tp
const volScalarField & Tp() const
Return primary region temperature.
Definition: thermalShellModel.C:98
Foam::regionModels::thermalShellModel::T_
areaScalarField T_
Shell temperature.
Definition: thermalShellModel.H:129
faOptions.H
Foam::regionModels::thermalShellModel::faOptions
Foam::fa::options & faOptions()
Return faOptions.
Definition: thermalShellModel.C:110
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
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:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::regionModels::thermalShellModel::preEvolveRegion
virtual void preEvolveRegion()
Pre-evolve region.
Definition: thermalShellModel.C:94
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:126
regionFaModel.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::regionModels::thermalShellModel::T
const areaScalarField & T() const
Return shell temperature.
Definition: thermalShellModel.C:104
Foam::regionModels::thermalShellModel::read
virtual bool read(const dictionary &)
Read control parameters from dictionary.
Definition: thermalShellModel.C:48
Foam::regionModels::thermalShellModel::faOptions_
Foam::fa::options & faOptions_
Pointer to faOptions.
Definition: thermalShellModel.H:132
autoPtr.H