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 entries
38  T <word>;
39 
40  // Optional entries
41  thermalShellModel <word>;
42 
43  // Inherited entries
44  ...
45  }
46  \endverbatim
47 
48  where the entries mean:
49  \table
50  Property | Description | Type | Reqd | Deflt
51  T | Name of operand temperature field | word | yes | -
52  thermalShellModel | Name of thermal-shell model <!--
53  --> | word | choice | -
54  \endtable
55 
56  The inherited entries are elaborated in:
57  - \link regionFaModel.H \endlink
58 
59 SourceFiles
60  thermalShellModel.C
61  thermalShellModelNew.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef Foam_regionModels_thermalShellModel_H
66 #define Foam_regionModels_thermalShellModel_H
67 
68 #include "areaFieldsFwd.H"
69 #include "volFieldsFwd.H"
70 #include "regionFaModel.H"
71 #include "faOptions.H"
72 
73 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 
75 namespace Foam
76 {
77 namespace regionModels
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class thermalShellModel Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class thermalShellModel
85 :
86  public regionFaModel
87 {
88 protected:
89 
90  // Protected Data
91 
92  //- Name of the temperature field
93  word TName_;
94 
95  //- Primary region temperature
96  const volScalarField& Tp_;
97 
98  //- Shell temperature
100 
101  //- Reference to faOptions
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("thermalShellModel");
109 
111  // Declare runtime constructor selection tables
112 
114  (
117  dictionary,
118  (
119  const word& modelType,
120  const fvMesh& mesh,
121  const dictionary& dict
122  ),
123  (modelType, mesh, dict)
124  );
126 
127  // Constructors
128 
129  //- Construct from type name and mesh and dict
131  (
132  const word& modelType,
133  const fvMesh& mesh,
134  const dictionary& dict
135  );
136 
137  //- No copy construct
138  thermalShellModel(const thermalShellModel&) = delete;
139 
140  //- No copy assignment
141  void operator=(const thermalShellModel&) = delete;
142 
143 
144  // Selectors
145 
146  //- Return a reference to the selected model using dictionary
148  (
149  const fvMesh& mesh,
150  const dictionary& dict
151  );
152 
153 
154  //- Destructor
155  virtual ~thermalShellModel() = default;
156 
157 
158  // Member Functions
159 
160  // Access
161 
162  //- Return primary region temperature
163  const volScalarField& Tp() const noexcept
164  {
165  return Tp_;
166  }
167 
168  //- Return shell temperature
169  const areaScalarField& T() const noexcept
170  {
171  return T_;
172  }
173 
174  //- Return faOptions
176  {
177  return faOptions_;
178  }
179 
180 
181  // Evolution
182 
183  //- Pre-evolve region
184  virtual void preEvolveRegion();
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace regionModels
191 } // End namespace Foam
192 
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
194 
195 #endif
196 
197 // ************************************************************************* //
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:72
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
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.