fixedReferenceTemperature.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) 2017-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::heatTransferCoeffModels::fixedReferenceTemperature
28 
29 Description
30  Heat transfer coefficient calculation
31  that employs a fixed reference temperature.
32 
33  The heat transfer coefficient is calculated by:
34 
35  \f[
36  h = \frac{q}{T_{ref} - T_p}
37  \f]
38 
39  where
40  \vartable
41  h | Heat transfer coefficient [W/m^2/K]
42  q | Heat flux [W/m^2]
43  T_{ref} | User-specified reference temperature [K]
44  T_p | Patch temperature field [K]
45  \endvartable
46 
47 Usage
48  Minimal example by using \c system/controlDict.functions:
49  \verbatim
50  heatTransferCoeff1
51  {
52  // Inherited entries
53  ...
54 
55  // Mandatory entries
56  htcModel fixedReferenceTemperature;
57  Tref <scalar>;
58  }
59  \endverbatim
60 
61  where the entries mean:
62  \table
63  Property | Description | Type | Reqd | Deflt
64  type | Model name: fixedReferenceTemperature | word | yes | -
65  Tref | User-specied reference temperature | scalar | yes | -
66  \endtable
67 
68 SourceFiles
69  fixedReferenceTemperature.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef heatTransferCoeffModels_fixedReferenceTemperature_H
74 #define heatTransferCoeffModels_fixedReferenceTemperature_H
75 
76 #include "heatTransferCoeffModel.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace heatTransferCoeffModels
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class fixedReferenceTemperature Declaration
87 \*---------------------------------------------------------------------------*/
88 
89 class fixedReferenceTemperature
90 :
91  public heatTransferCoeffModel
92 {
93 protected:
94 
95  // Protected Data
96 
97  //- Reference temperature [K]
98  scalar TRef_;
99 
100 
101  // Protected Member Functions
102 
103  //- Set the heat transfer coefficient
104  virtual void htc
105  (
107  const FieldField<Field, scalar>& q
108  );
109 
110 
111 public:
112 
113  //- Runtime type information
114  TypeName("fixedReferenceTemperature");
115 
116 
117  // Constructors
119  //- Construct from components
121  (
122  const dictionary& dict,
123  const fvMesh& mesh,
124  const word& TName
125  );
126 
127  //- No copy construct
130  //- No copy assignment
131  void operator=(const fixedReferenceTemperature&) = delete;
132 
133 
134  //- Destructor
135  virtual ~fixedReferenceTemperature() = default;
136 
137 
138  // Member Functions
139 
140  //- Read from dictionary
141  virtual bool read(const dictionary& dict);
142 };
143 
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 } // End namespace heatTransferCoeffModels
148 } // End namespace Foam
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual ~fixedReferenceTemperature()=default
Destructor.
const word & TName() const noexcept
Return const reference to name of temperature field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
A class for handling words, derived from Foam::string.
Definition: word.H:63
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)
Set the heat transfer coefficient.
void operator=(const fixedReferenceTemperature &)=delete
No copy assignment.
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
virtual bool read(const dictionary &dict)
Read from dictionary.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
TypeName("fixedReferenceTemperature")
Runtime type information.
tmp< FieldField< Field, scalar > > q() const
Return boundary fields of heat-flux field.
Heat transfer coefficient calculation that employs a fixed reference temperature. ...
fixedReferenceTemperature(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
Namespace for OpenFOAM.